CN112181733A - Service request processing method, device, equipment and storage medium - Google Patents

Service request processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112181733A
CN112181733A CN202011192455.XA CN202011192455A CN112181733A CN 112181733 A CN112181733 A CN 112181733A CN 202011192455 A CN202011192455 A CN 202011192455A CN 112181733 A CN112181733 A CN 112181733A
Authority
CN
China
Prior art keywords
request
service request
request data
hit rate
service
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011192455.XA
Other languages
Chinese (zh)
Inventor
徐世超
端玉龙
黄耀东
张晓聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202011192455.XA priority Critical patent/CN112181733A/en
Publication of CN112181733A publication Critical patent/CN112181733A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1464Management of the backup or restore process for networked environments
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/55Detecting local intrusion or implementing counter-measures
    • G06F21/552Detecting local intrusion or implementing counter-measures involving long-term monitoring or reporting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the disclosure discloses a method, a device, equipment and a storage medium for processing a service request. The method comprises the following steps: receiving a service request sent by a client, wherein the service request carries a request identifier; if the server fails, acquiring stored historical request data according to the request identifier; and sending the history request data to the client. The method for processing the service request provided by the embodiment of the disclosure ensures normal processing of the data service, and realizes disaster tolerance of the service.

Description

Service request processing method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of data services, and in particular, to a method, an apparatus, a device, and a storage medium for processing a service request.
Background
Disaster recovery refers to providing equal or slightly worse service when existing services fail. For a service, if the core relies on a problem, the service itself cannot continue to provide the service. For this case, the prior art often solves this by means of redundancy, i.e. implementing core-dependent backup services, but this cost is huge if each core dependency implements a backup service by itself.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device, equipment and a storage medium for processing a service request, which ensure normal processing of a data service and realize disaster tolerance of the service when the service fails.
In a first aspect, an embodiment of the present disclosure provides a method for processing a service request, including:
receiving a service request sent by a client, wherein the service request carries a request identifier;
if the server fails, acquiring stored historical request data according to the request identifier;
and sending the history request data to the client.
In a second aspect, an embodiment of the present disclosure further provides a device for processing a service request, including:
the service request receiving module is used for receiving a service request sent by a client; wherein, the service request carries a request identifier;
the historical request data acquisition module is used for acquiring the stored historical request data according to the request identifier if the server fails;
and the history request data sending module is used for sending the history request data to the client.
In a third aspect, an embodiment of the present disclosure further provides an electronic device, where the electronic device includes:
one or more processing devices;
a storage device to store one or more instructions;
when executed by the one or more processing devices, the one or more instructions cause the one or more processing devices to implement the method for processing a service request according to the embodiment of the disclosure.
In a fourth aspect, the disclosed embodiments also provide a computer-readable storage medium, on which a computer program is stored, which when executed by a processing device, implements a method for processing a service request according to the disclosed embodiments.
The method includes the steps that firstly, a service request sent by a client side is received, wherein the service request carries a request identifier; if the server fails, acquiring stored historical request data according to the request identifier; and finally, sending the history request data to the client. According to the service request processing method provided by the embodiment of the disclosure, the stored historical request data is acquired when the server fails, so that the normal processing of the data service is ensured, and the disaster tolerance of the service is realized.
Drawings
FIG. 1 is a flow chart of a method of processing a service request in an embodiment of the disclosure;
FIG. 2 is a flow chart of a method of requesting storage of data in an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a service request processing apparatus in an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a method for processing a service request according to an embodiment of the present disclosure, where the embodiment is applicable to a case of processing a service request, and the method may be executed by a device for processing a service request, where the device may be composed of hardware and/or software, and may be generally integrated in an apparatus having a function of processing a service request, where the apparatus may be an electronic apparatus such as a server or a server cluster. As shown in fig. 1, the method specifically comprises the following steps:
step 110, receiving a service request sent by a client.
The service request carries a request identifier.
Specifically, after receiving a service request carrying a request identifier, the server acquires data from a corresponding database according to the request identifier to return the acquired data to the client, thereby providing data service for the client.
And step 120, if the server fails, acquiring the stored historical request data according to the request identifier.
The historical request data may be understood as data corresponding to the service request stored when the server operates normally. A server failure may be understood as a failure of the server to retrieve requested data from a corresponding database. In this embodiment, the storage form of the request data may be a key-value (key-value) form, and the request identifier may be a key value therein. And when the server fails, acquiring historical request data from a set memory according to the key value so as to ensure the normal service supply.
Step 130, sending the history request data to the client.
Specifically, the history request data can be sent to the client, so that the server can still provide normal service when the server fails.
Preferably, before sending the history request data to the client, the following steps may be further performed: the failure data is replaced with historical request data.
The failure data may be understood as data automatically generated when the server fails to prompt the user about the failure of the server, for example: may be a "server failure, please try again later" message.
In this embodiment, the fault data is replaced with the acquired historical request data, and the replaced historical request data is returned to the client, so that the client receives normal request data instead of the fault data, thereby ensuring normal processing of the service request.
Fig. 2 is a flowchart of a method for storing request data according to an embodiment of the present disclosure. As shown in fig. 2, optionally, before receiving the service request sent by the client, the following steps may also be performed:
when the server is normal, counting the times of receiving the same service request within a set time length; and if the times are equal to a first set threshold value, storing the request data corresponding to the same service request.
Specifically, the service middleware can be used for storing service request data when the server is normal, and the service request data can be stored when the number of times of the same service request in a set time length is equal to a certain threshold value, so that the server can read the stored historical request data to guarantee normal processing of the service when the server fails.
Wherein, the first set threshold value can be dynamically adjusted. The adjustment mode can be as follows: when the server is normal, determining the actual hit rate of hit stored request data according to the received server request; and adjusting the first set threshold according to the actual hit rate and the set hit rate.
Specifically, as shown in fig. 2, when the server operates normally, and a service request is received, the history request data stored in the setting memory may be obtained in an asynchronous thread manner according to the server request, and if the history request data is obtained, it indicates that the history request data is hit, and if the history request data is not obtained, it indicates that the history request data is not hit. And counting the actual hit rate of the historical request data within a set time period.
In the embodiment, after the actual hit rate is obtained, the actual hit rate is compared with the set hit rate, and if the actual hit rate is greater than the set hit rate, the first set threshold value is reduced; if the actual hit rate is less than the set hit rate, the first set threshold is increased. Thereby realizing the dynamic adjustment of the first set threshold.
Further, the way of counting the number of times of receiving the same service request within the set time length may be: acquiring request data corresponding to the service request; extracting key information in the request data; writing the key information into a set cache, and accumulating the number of the key information; the number of critical information is determined as the number of accesses to the service request.
For example, for data of a certain User, a User Identification (UID) may be used as key information, and after request data corresponding to a service request is acquired, the UID is written into a cache and the number is accumulated, and the number is determined as the number of access times of the service request of the User. In this embodiment, since the amount of data of the key information is small, only the key information is cached, and the storage space can be saved.
Further, the way of counting the number of times of receiving the same service request within the set time length may also be: acquiring request data corresponding to the service request; extracting key information in the request data; judging whether the key information is stored in a set cache or not, and if so, accumulating the writing times of the key information; the number of writes is determined as the number of accesses to the service request.
For example, for data of a certain user, the UID of the user may be used as key information, after request data corresponding to a service request is acquired, it is determined whether the UID of the user is already stored in a set cache, if yes, the number of writing times of the key information is accumulated, and the number of writing times is determined as the number of access times of the service request of the user.
Further, after storing the request data corresponding to the same service request, the method may further include: and if the times are equal to a second set threshold value, updating the stored request data into the request data corresponding to the current service request. Wherein the second set threshold is greater than the first set threshold.
Specifically, after the request data is stored, the request data may be updated when the number of accesses is equal to a second set threshold. For example, the second set threshold may be set to be the nth power of 2, where n may be any natural number that makes the nth power of 2 greater than the first set threshold, and after the request data is stored, if the number of accesses is equal to the nth power of 2, the request data is updated. The advantage of this is that the stored historical request data can be updated regularly to ensure the real-time performance of the historical request data.
The method includes the steps that firstly, a service request sent by a client side is received, wherein the service request carries a request identifier; if the server fails, acquiring stored historical request data according to the request identifier; and finally, sending the history request data to the client. According to the service request processing method provided by the embodiment of the disclosure, the stored historical request data is acquired when the server fails, so that the normal processing of the data service is ensured, and the disaster tolerance of the service is realized.
Fig. 3 is a schematic structural diagram of a device for processing a service request according to an embodiment of the present disclosure. As shown in fig. 3, the apparatus includes: a service request receiving module 210, a history request data obtaining module 220 and a history request data sending module 230.
A service request receiving module 210, configured to receive a service request sent by a client; wherein, the service request carries a request identifier.
A history request data obtaining module 220, configured to obtain stored history request data according to the request identifier if the server fails.
A history request data sending module 230, configured to send the history request data to the client.
Optionally, the apparatus further comprises:
and the service request frequency counting module is used for counting the frequency of the same service request received in a set time length when the server is normal.
And the request data storage module is used for storing the request data corresponding to the same service request if the times are equal to a first set threshold value.
Optionally, the service request number counting module is further configured to: acquiring request data corresponding to the service request; extracting key information in the request data; writing the key information into a set cache, and accumulating the number of the key information; the number of critical information is determined as the number of accesses to the service request.
Optionally, the service request number counting module is further configured to: acquiring request data corresponding to the service request; extracting key information in the request data; judging whether the key information is stored in a set cache or not, and if so, accumulating the writing times of the key information; the number of writes is determined as the number of accesses to the service request.
Optionally, the apparatus further includes a request data updating module, configured to update the stored request data to the request data corresponding to the current service request if the number of times is equal to a second set threshold, where the second set threshold is greater than the first set threshold.
Optionally, the apparatus further comprises:
and the actual hit rate determining module is used for determining the actual hit rate of the hit stored request data according to the received server request when the server is normal.
And the first set threshold adjusting module is used for adjusting the first set threshold according to the actual hit rate and the set hit rate.
Optionally, the first setting threshold adjusting module is further configured to: if the actual hit rate is greater than the set hit rate, the first set threshold value is reduced; if the actual hit rate is less than the set hit rate, the first set threshold is increased.
Optionally, the apparatus further includes a failure data replacement module, configured to replace failure data with the historical request data.
The device can execute the methods provided by all the embodiments of the disclosure, and has corresponding functional modules and beneficial effects for executing the methods. For technical details that are not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the disclosure.
Referring now to FIG. 3, a block diagram of an electronic device 300 suitable for use in implementing embodiments of the present disclosure is shown. The electronic device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like, or various forms of servers such as a stand-alone server or a server cluster. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, electronic device 300 may include a processing means (e.g., central processing unit, graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a read-only memory device (ROM)302 or a program loaded from a storage device 305 into a random access memory device (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program containing program code for performing a method for recommending words. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 305, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a service request sent by a client; wherein, the service request carries a request identifier; if the server fails, acquiring stored historical request data according to the request identifier; and sending the history request data to the client.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the disclosed embodiments, the disclosed embodiments disclose a method for processing a service request, comprising:
receiving a service request sent by a client, wherein the service request carries a request identifier;
if the server fails, acquiring stored historical request data according to the request identifier;
and sending the history request data to the client.
Further, before receiving the service request sent by the client, the method further includes:
when the server is normal, counting the times of receiving the same service request within a set time length;
and if the times are equal to a first set threshold value, storing the request data corresponding to the same service request.
Further, counting the number of times of receiving the same service request within a set time period includes:
acquiring request data corresponding to the service request;
extracting key information in the request data;
writing the key information into a set cache, and accumulating the number of the key information;
and determining the quantity of the key information as the access times of the service request.
Further, counting the number of times of receiving the same service request within a set time period, further includes:
acquiring request data corresponding to the service request;
extracting key information in the request data;
judging whether the key information is stored in a set cache or not, and if so, accumulating the writing times of the key information;
and determining the writing times as the access times of the service request.
Further, after storing the request data corresponding to the same service request, the method further includes:
and if the times are equal to a second set threshold value, updating the stored request data into the request data corresponding to the current service request, wherein the second set threshold value is greater than the first set threshold value.
Further, before receiving the service request sent by the client, the method further includes:
when the server is normal, determining the actual hit rate of hit stored request data according to the received server request;
and adjusting the first set threshold according to the actual hit rate and the set hit rate.
Further, adjusting the first set threshold according to the actual hit rate and the set hit rate includes:
if the actual hit rate is greater than the set hit rate, the first set threshold value is reduced;
and if the actual hit rate is less than the set hit rate, increasing the first set threshold.
Further, before sending the history request data to the client, the method further includes:
and replacing fault data with the historical request data.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present disclosure and the technical principles employed. Those skilled in the art will appreciate that the present disclosure is not limited to the particular embodiments described herein, and that various obvious changes, adaptations, and substitutions are possible, without departing from the scope of the present disclosure. Therefore, although the present disclosure has been described in greater detail with reference to the above embodiments, the present disclosure is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present disclosure, the scope of which is determined by the scope of the appended claims.

Claims (11)

1. A method for processing a service request, comprising:
receiving a service request sent by a client, wherein the service request carries a request identifier;
if the server fails, acquiring stored historical request data according to the request identifier;
and sending the history request data to the client.
2. The method of claim 1, further comprising, before receiving the service request sent by the client:
when the server is normal, counting the times of receiving the same service request within a set time length;
and if the times are equal to a first set threshold value, storing the request data corresponding to the same service request.
3. The method of claim 2, wherein counting the number of times the same service request is received within a set time period comprises:
acquiring request data corresponding to the service request;
extracting key information in the request data;
writing the key information into a set cache, and accumulating the number of the key information;
and determining the quantity of the key information as the access times of the service request.
4. The method of claim 2, wherein counting the number of times the same service request is received within a set time period comprises:
acquiring request data corresponding to the service request;
extracting key information in the request data;
judging whether the key information is stored in a set cache or not, and if so, accumulating the writing times of the key information;
and determining the writing times as the access times of the service request.
5. The method of claim 2, further comprising, after storing the request data corresponding to the same service request:
and if the times are equal to a second set threshold value, updating the stored request data into the request data corresponding to the current service request, wherein the second set threshold value is greater than the first set threshold value.
6. The method of claim 2, further comprising:
when the server is normal, determining the actual hit rate of hit stored request data according to the received server request;
and adjusting the first set threshold according to the actual hit rate and the set hit rate.
7. The method of claim 6, wherein adjusting the first set threshold based on the actual hit rate and a set hit rate comprises:
if the actual hit rate is greater than the set hit rate, the first set threshold value is reduced;
and if the actual hit rate is less than the set hit rate, increasing the first set threshold.
8. The method of claim 1, prior to sending the historical request data to the client, further comprising:
and replacing fault data with the historical request data.
9. An apparatus for processing a service request, comprising:
the service request receiving module is used for receiving a service request sent by a client; wherein, the service request carries a request identifier;
the historical request data acquisition module is used for acquiring the stored historical request data according to the request identifier if the server fails;
and the history request data sending module is used for sending the history request data to the client.
10. An electronic device, characterized in that the electronic device comprises:
one or more processing devices;
a storage device to store one or more instructions;
when executed by the one or more processing devices, cause the one or more processing devices to implement a method of processing a service request as claimed in any of claims 1-8.
11. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by processing means, carries out the method of processing a service request according to any one of claims 1 to 8.
CN202011192455.XA 2020-10-30 2020-10-30 Service request processing method, device, equipment and storage medium Pending CN112181733A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011192455.XA CN112181733A (en) 2020-10-30 2020-10-30 Service request processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011192455.XA CN112181733A (en) 2020-10-30 2020-10-30 Service request processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112181733A true CN112181733A (en) 2021-01-05

Family

ID=73916384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011192455.XA Pending CN112181733A (en) 2020-10-30 2020-10-30 Service request processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112181733A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114647685A (en) * 2022-03-28 2022-06-21 北京字节跳动网络技术有限公司 Data processing method, device, equipment and medium
CN115471168A (en) * 2021-12-14 2022-12-13 国网上海市电力公司 Automatic flow processing method and device, electronic equipment and computer readable medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228084A (en) * 2016-12-21 2018-06-29 伊姆西Ip控股有限责任公司 For managing the method and apparatus of storage system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228084A (en) * 2016-12-21 2018-06-29 伊姆西Ip控股有限责任公司 For managing the method and apparatus of storage system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471168A (en) * 2021-12-14 2022-12-13 国网上海市电力公司 Automatic flow processing method and device, electronic equipment and computer readable medium
CN114647685A (en) * 2022-03-28 2022-06-21 北京字节跳动网络技术有限公司 Data processing method, device, equipment and medium
CN114647685B (en) * 2022-03-28 2024-04-12 北京字节跳动网络技术有限公司 Data processing method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111510466B (en) Data updating method and device for client, electronic equipment and readable medium
CN111246228B (en) Method, device, medium and electronic equipment for updating gift resources of live broadcast room
CN112181733A (en) Service request processing method, device, equipment and storage medium
CN112256733A (en) Data caching method and device, electronic equipment and computer readable storage medium
CN113760536A (en) Data caching method and device, electronic equipment and computer readable medium
CN112422551A (en) SSL certificate updating method and device, electronic equipment and storage medium
CN111881216A (en) Data acquisition method and device based on shared template
CN111355784B (en) Method, device, medium and electronic equipment for processing request information
CN111858381A (en) Application program fault tolerance capability test method, electronic device and medium
CN113824675B (en) Method and device for managing login state
CN114785770A (en) Mirror layer file sending method and device, electronic equipment and computer readable medium
CN111460020B (en) Method, device, electronic equipment and medium for resolving message
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112948108B (en) Request processing method and device and electronic equipment
CN117692672B (en) Snapshot-based video information sending method and device, electronic equipment and medium
CN112506713B (en) Multistage disaster recovery system and method
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
CN115412538A (en) Network request information processing method, device, equipment and storage medium
CN116107930A (en) Cache data transmission method, device, electronic equipment and computer readable medium
CN113792072A (en) Data transmission method, device, electronic equipment and computer readable medium
CN115314718A (en) Live broadcast data processing method, device, equipment and medium
CN115145956A (en) Data acquisition method and device, electronic equipment and computer readable storage medium
CN112256307A (en) Gray scale distribution method and device, electronic equipment and computer readable medium
CN115495124A (en) Processing flow updating method, device, equipment, storage medium and program product

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