CN113761433A - Service processing method and device - Google Patents

Service processing method and device Download PDF

Info

Publication number
CN113761433A
CN113761433A CN202011218608.3A CN202011218608A CN113761433A CN 113761433 A CN113761433 A CN 113761433A CN 202011218608 A CN202011218608 A CN 202011218608A CN 113761433 A CN113761433 A CN 113761433A
Authority
CN
China
Prior art keywords
type
service request
service
server
request
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
CN202011218608.3A
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 Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information 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 Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202011218608.3A priority Critical patent/CN113761433A/en
Publication of CN113761433A publication Critical patent/CN113761433A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification

Abstract

The invention discloses a service processing method and a service processing device, and relates to the technical field of computers. One embodiment of the method comprises: acquiring a service request of a client; determining the type of the service request; if the type of the service request is determined to be a first type, the service request is stored in a preset storage unit, and if the type of the service request is determined to be a second type, the service request is sent to a server; and responding to a preset trigger operation, and sending the first type of service requests stored in the storage unit to a server in batches. According to the method, the first type of service requests are sent to the server in batch, non-core service requests are reported to the server in batch after being summarized, the pressure of the server is reduced, the network bandwidth is saved, the cost is saved, the core service requests are directly sent to the server, the core service requests are returned quickly and accurately, and therefore the user experience is guaranteed.

Description

Service processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a service processing method and apparatus, an electronic device, and a computer-readable medium.
Background
The web page and the applet are two ways of front-end presentation. The web pages are carried by respective browsers, and the applet pages are carried by respective application software (APP). Whether browser or application software, it has a number limit to requests initiated within rendered pages or applet pages. With the increase of the number of requests, the processing pressure of the server is increased, the performance is limited, which may cause that the server cannot process the service request in time or smoothly, increase the risk of losing the key service request, affect the display of the key data of the page, and further affect the interactive experience of the user. At present, in the related art, capacity expansion processing can be performed on a server during a user peak period, and capacity reduction processing can be performed during an off-peak period.
Disclosure of Invention
In view of this, embodiments of the present invention provide a service processing method and apparatus, an electronic device, and a computer-readable medium, where a mode of sending a first type of service request to a server in batch is used to implement batch reporting of non-core service requests to the server after summarizing the non-core service requests, thereby reducing server pressure, saving network bandwidth and cost, and ensuring fast and accurate return of core service requests by directly sending core service requests to the server, thereby ensuring user experience.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a service processing method, including:
acquiring a service request of a client;
determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
and responding to a preset trigger operation, and sending the first type of service requests stored in the storage unit to a server in batches.
Optionally, before obtaining the service request of the client, the method further includes:
classifying service requests of a client, and determining the types of the service requests, wherein the types comprise a first type and a second type.
Optionally, the service request of the first type includes a buried point report request and an exception report request.
Optionally, the preset triggering operation includes one or more of the following: a return operation, a close operation, and a jump operation.
Optionally, determining the type of the service request includes: judging whether the client side starts a degradation processing function or not; and if so, determining the type of the service request.
Optionally, determining the type of the service request includes: acquiring a preset service type table, wherein the service type table is used for recording a second type of service request; and judging whether the service request exists in the service type table, if not, determining that the type of the service request is a first type.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a service processing apparatus including:
the acquisition module is used for acquiring a service request of a client;
the judging module is used for determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
and the batch processing module is used for responding to preset trigger operation and sending the first type of service request stored in the storage unit to the server in batches.
Optionally, the apparatus further comprises a classification module configured to: classifying service requests of a client, and determining the types of the service requests, wherein the types comprise a first type and a second type.
Optionally, the service request of the first type includes a buried point report request and an exception report request.
Optionally, the preset triggering operation includes one or more of the following: a return operation, a close operation, and a jump operation.
Optionally, the determining module is further configured to: judging whether the client side starts a degradation processing function or not; and if so, determining the type of the service request.
Optionally, the determining module is further configured to: acquiring a preset service type table, wherein the service type table is used for recording a second type of service request; and judging whether the service request exists in the service type table, if not, determining that the type of the service request is a first type.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the service processing method of the embodiment of the invention.
To achieve the above object, according to an aspect of the embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program implementing a service processing method of the embodiments of the present invention when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: the service request of the client is acquired; determining the type of the service request, if the type of the service request is determined to be a first type, storing the service request in a preset storage unit, and if the type of the service request is determined to be a second type, sending the service request to a server; the technical means of sending the first type of service requests stored in the storage unit to the server in batches in response to the preset triggering operation realizes batch reporting of non-core service requests to the server after summarizing, so that the server pressure is reduced, the network bandwidth is saved, and the cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a service processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a main flow of a service processing method according to another embodiment of the present invention;
fig. 3 is a schematic diagram of a main flow of a service processing method according to another embodiment of the present invention;
fig. 4 is a schematic diagram of a main flow of a service processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of the main modules of a traffic processing apparatus according to an embodiment of the present invention;
FIG. 6 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 7 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic flow chart of main steps of a service processing method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step S101: acquiring a service request of a client;
step S102: determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
step S103: and responding to a preset trigger operation, and sending the first type of service requests stored in the storage unit to a server in batches.
For step S101, acquiring the service request of the client may be implemented by intercepting the service request sent by the client to the server.
For step S102, before determining the type of the service request, the method may classify the service request of the client in advance to determine the type of the service request. The types of the service requests may include a first type and a second type, the type of the non-core service request or the service request with low priority is the first type, and the type of the core service request or the service request with high priority is the second type. Whether the service request is a core or not and the priority of the service request can be flexibly set according to the application scene, and the invention is not limited herein. More specifically, the first type of service request may include a buried point report request and an exception report request. The embedded point is a data acquisition basis for daily improvement and data analysis of products such as websites and APPs (application software), and data analysis is performed according to acquired user behavior data (such as a page access path and which button is clicked), so that more reasonable pushing and optimization are achieved, and user experience is enhanced. An exception is a program error that is not normal. The service request refers to a request initiated from a user to a server through a client, a TCP (Transmission Control Protocol) connection is created, a port number is designated, and then the connection to the server is performed.
In an alternative embodiment, after classifying the service request from the client in advance, a service type table may be generated, so as to record the service request of the second type by using the service type table, that is, record the core service request by using the service type table. And when the type of the service request is determined, acquiring the service type table and judging whether the service request exists on the service type table. If the service request exists, the type of the service request is indicated to be the second type, and if the service request does not exist, the type of the service request is indicated to be the first type. And after determining that the type of the service request is the first type, storing the service request in a preset storage unit. Wherein the preset storage unit may be a pre-created folder. When a first type of service request is stored, a request header of the service request and parameters that may need to interact with a server (the parameters refer to a result negotiated between a client and the server, and parameters convenient for the client to transmit and the server to parse are prepared, and different interfaces and different requested parameters are different), a timestamp (the timestamp is data generated by using a digital signature technology, and a signed object includes information such as original file information, signature parameters, and signature time), a usergent (a user agent, UA for short, which is a special string header, so that a server can identify information such as an operating system and version used by a client, a CPU type, a browser and version, a browser rendering engine, a browser language, a browser plug-in, and the like), and a source IP.
In an alternative embodiment, the service type table may also record the service request of the first type. And when the type of the service request is determined, acquiring the service type table and judging whether the service request exists on the service type table. If the service request exists, the type of the service request is indicated to be a first type, and if the service request does not exist, the type of the service request is indicated to be a second type. Compared with the above method (the service type table records the service requests of the second type), the method is more convenient for maintaining the service type table. Because the core service has less variation compared with the non-core service, the service type table for further recording the core service has less variation and is easy to maintain.
For step S103, after the preset triggering operation is monitored, the service requests of the first type stored in the storage unit are sent to the server in batch to process the service requests of the first type. Sending the first type of service request to the server means that service requests which need to be reported to the server many times are accumulated together and reported once.
As a specific example, the preset trigger operation may include one or more of the following: a return operation, a close operation, and a jump operation. Wherein, the return operation means that the user clicks a return button to return to the previous page. The closing operation means that the user clicks a closing button to close the current page. The skip operation means that the user clicks an area of the current page containing the skip link to skip away from the current page.
In an alternative embodiment, after the core request of the current page is processed, the service requests of the first type stored in the storage unit may also be sent to the server in batch to process the service requests of the first type.
The business processing method of the embodiment of the invention obtains the business request of the client; determining the type of the service request, if the type of the service request is determined to be a first type, storing the service request in a preset storage unit, and if the type of the service request is determined to be a second type, sending the service request to a server; the method comprises the steps that in response to preset triggering operation, service requests of a first type stored in a storage unit are sent to a server in batches, non-core service requests are reported to the server in batches after being summarized, the pressure of the server is relieved, network bandwidth is saved, and cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
In an alternative embodiment, after determining the type of the service request of the client, for the service request of the first type, it may be directly set in the program to send the service request of the first type to a preset storage unit. However, this method is very intrusive to traffic and is not conducive to expansion. In the embodiment, the service request is intercepted, so that the service intrusion is small and the expansion is easy.
Fig. 2 is a schematic flow chart of main steps of a service processing method according to another embodiment of the present invention, as shown in fig. 2, the method includes:
step S201: classifying service requests of a client, and determining the types of the service requests, wherein the types comprise a first type and a second type;
step S202: judging whether the client side starts a degradation processing function or not;
step S203: if yes, acquiring a service request of the client;
step S204: determining the type of the service request;
step S205: if the type of the service request is determined to be the first type, storing the service request in a preset storage unit;
step S206: responding to a preset trigger operation, sending the first type of service requests stored in the storage unit to a server in batches so as to process the first type of service requests;
step S207: and if the type of the service request is determined to be the second type, the service request is sent to a server side so as to process the service request.
Step S201 and steps S203-S207 may refer to the embodiment shown in fig. 1, and the present invention is not described herein again.
For step S202, the optimization processing function means that the first type of service request is stored in a preset storage unit, and then the first type of service request in the storage unit is sent to the server for processing at a suitable time (for example, when a preset trigger operation is detected); and for the second type of service request, the service request is directly sent to the server side for processing. In an optional embodiment, the degradation processing function may be turned on or off by setting a degradation processing identifier, and when the value of the degradation processing identifier is a first value, it indicates that the client turns on the degradation processing function, and when the value of the degradation processing identifier is a second value, it indicates that the client does not turn on the degradation processing function.
The business processing method of the embodiment of the invention obtains the business request of the client; determining the type of the service request, judging whether the type of the service request is a first type, if so, storing the service request in a preset storage unit, and if so, sending the service request to a server; the method comprises the steps that in response to preset triggering operation, service requests of a first type stored in a storage unit are sent to a server in batches, non-core service requests are reported to the server in batches after being summarized, the pressure of the server is relieved, network bandwidth is saved, and cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
In order to make the service processing method of the embodiment of the present invention clearer, the following specific example is taken as an example for explanation.
And introducing an information storage file collectInfo.js (the information storage file collectInfo.js is a preset storage unit) in the project global environment of the server, wherein the information storage file collectInfo.js is used for recording and storing the first type of service requests (such as a buried point reporting request and an exception reporting request). The information storage file collectinfo.js is used for recording and storing a request header carried by a first type of service request, parameters possibly interacting with a server (the parameters refer to a result of negotiation between the client and the server, parameters convenient for the client to transmit and the server to analyze are made, different interfaces are made, and the requested parameters are different), a timestamp (the timestamp is data generated by using a digital signature technology, and a signed object comprises information such as original file information, signature parameters and signature time), a usergent (a user agent, UA for short), which is a special string header, so that the server can identify information such as an operating system and version, a CPU type, a browser and version, a browser rendering engine, a browser language, a browser plug-in and the like used by the client, and a source IP. Js, an instantiation object collectData is initially obtained. When the instantiation object collectData appears, the representing program has already applied for the memory space to store the first type of service request. When the current page has a service request needing to store the first type, the service request of the first type can be written into the applied memory space.
For example, as shown in fig. 3 and 4, when the user enters the product detail page, the program loads the import information storage file collectinfo. If the business side needs to record the page access record, when a user enters the page, a buried point preset on the page collects the access information of the user, then a buried point reporting request is intercepted, and the relevant access information carried by the buried point reporting request is stored in an instantiation object collectData. If the user clicks a shopping cart adding button, the embedded point preset on the page can collect the information of the user clicking the shopping cart adding button, then the embedded point reporting request is intercepted, and the related information carried by the embedded point reporting request is stored in the instantiated collectData. If the user clicks the button and a script error occurs on the page, the abnormal reporting server is needed, the abnormal reporting request is intercepted, and the abnormal information carried by the abnormal reporting request is stored in the instantiated collectData. And finally, when the preset operation is detected, uniformly reporting the first type of service request stored in the instantiation object collectData to the server. The preset operations may be operations in which the user leaves the current page, such as a return operation, a close operation, and a jump operation. More specifically, if it is recognized that the user is about to leave the current page, it indicates that the preset operation is detected. The way to recognize that the user leaves the current page is: each web page has a window unload method, which when triggered, represents the user leaving the page. User departure includes three cases: return to the previous page (click the browser or app's return button); close the current page (click the close icon of the browser); jump away from the current page (click on the area of the current page with jump links). And after receiving the reported first type of service request, the server judges the first type of service request and distributes the first type of service request to a corresponding service for data statistical analysis.
In the service processing method of the embodiment, a service request of a client is acquired; determining the type of the service request, if the type of the service request is determined to be a first type, storing the service request in a preset storage unit, and if the type of the service request is determined to be a second type, sending the service request to a server; responding to preset triggering operation, sending the first type of service requests stored in the storage unit to the server in batches, and reporting the non-core service requests to the server in batches after gathering the non-core service requests, so that the pressure of the server is reduced, the network bandwidth is saved, and the cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
Fig. 5 is a schematic diagram of main modules of a service processing apparatus 500 according to an embodiment of the present invention, and as shown in fig. 5, the service processing apparatus 500 includes:
an obtaining module 501, configured to obtain a service request of a client;
a determining module 502, configured to determine a type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
the batch processing module 503 is configured to send the service requests of the first type stored in the storage unit to the server in batch in response to a preset trigger operation.
Optionally, the apparatus further comprises a classification module configured to: classifying service requests of a client, and determining the types of the service requests, wherein the types comprise a first type and a second type.
Optionally, the service request of the first type includes a buried point report request and an exception report request.
Optionally, the preset triggering operation includes one or more of the following: a return operation, a close operation, and a jump operation.
Optionally, the determining module 502 is further configured to: judging whether the client side starts a degradation processing function or not; and if so, determining the type of the service request.
Optionally, the determining module 502 is further configured to: acquiring a preset service type table, wherein the service type table is used for recording a second type of service request; and judging whether the service request exists in the service type table, if not, determining that the type of the service request is a first type.
The service processing device of the embodiment of the invention obtains the service request of the client; determining the type of the service request, if the type of the service request is determined to be a first type, storing the service request in a preset storage unit, and if the type of the service request is determined to be a second type, sending the service request to a server; responding to preset triggering operation, sending the first type of service requests stored in the storage unit to the server in batches, and reporting the non-core service requests to the server in batches after gathering the non-core service requests, so that the pressure of the server is reduced, the network bandwidth is saved, and the cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
The device can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Fig. 6 shows an exemplary system architecture 600 of a service processing method or a service processing apparatus to which an embodiment of the present invention may be applied.
As shown in fig. 6, the system architecture 600 may include terminal devices 601, 602, 603, a network 604, and a server 605. The network 604 serves to provide a medium for communication links between the terminal devices 601, 602, 603 and the server 605. Network 604 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 601, 602, 603 to interact with the server 605 via the network 604 to receive or send messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 601, 602, and 603.
The terminal devices 601, 602, 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 605 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the service processing method provided by the embodiment of the present invention is generally executed by the server 605, and accordingly, the service processing apparatus is generally disposed in the server 605.
It should be understood that the number of terminal devices, networks, and servers in fig. 6 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 7, shown is a block diagram of a computer system 700 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 7, the computer system 700 includes a Central Processing Unit (CPU)701, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data necessary for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
The following components are connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
In particular, according to the embodiments 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 comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 701.
It should be noted that the computer readable medium shown in the present invention 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 invention, 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 the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, 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: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
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 invention. 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 or flowchart illustration, and combinations of blocks in the block diagrams 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 modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases constitute a limitation on the unit itself, and for example, the sending module may also be described as a "module that sends a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
acquiring a service request of a client;
determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
and responding to a preset trigger operation, and sending the first type of service requests stored in the storage unit to a server in batches.
According to the technical scheme of the embodiment of the invention, the service request of the client is obtained; determining the type of the service request, if the type of the service request is determined to be a first type, storing the service request in a preset storage unit, and if the type of the service request is determined to be a second type, sending the service request to a server; responding to preset triggering operation, sending the first type of service requests stored in the storage unit to the server in batches, reporting the non-core service requests to the server in batches after the non-core service requests are summarized, so that the server pressure is reduced, the network bandwidth is saved, and the cost is saved; the core service request is directly sent to the server, so that the core service request is quickly and accurately returned, and the user experience is guaranteed.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing a service, comprising:
acquiring a service request of a client;
determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
and responding to a preset trigger operation, and sending the first type of service requests stored in the storage unit to a server in batches.
2. The method of claim 1, wherein prior to obtaining the service request of the client, the method further comprises:
classifying service requests of a client, and determining the types of the service requests, wherein the types comprise a first type and a second type.
3. The method of claim 1, wherein the first type of service request comprises a buried point report request and an exception report request.
4. The method of claim 1, wherein the preset trigger operation comprises one or more of: a return operation, a close operation, and a jump operation.
5. The method of any of claims 1-4, wherein determining the type of the service request comprises:
judging whether the client side starts a degradation processing function or not;
and if so, determining the type of the service request.
6. The method of claim 5, wherein determining the type of the service request comprises:
acquiring a preset service type table, wherein the service type table is used for recording a second type of service request;
and judging whether the service request exists in the service type table, if not, determining that the type of the service request is a first type.
7. A traffic processing apparatus, comprising:
the acquisition module is used for acquiring a service request of a client;
the judging module is used for determining the type of the service request; if the type of the service request is determined to be the first type, storing the service request in a preset storage unit; if the type of the service request is determined to be the second type, the service request is sent to a server;
and the batch processing module is used for responding to preset trigger operation and sending the first type of service request stored in the storage unit to the server in batches.
8. The apparatus of claim 7, further comprising a classification module configured to classify a service request of a client and determine a type of the service request, wherein the type comprises a first type and a second type.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
CN202011218608.3A 2020-11-04 2020-11-04 Service processing method and device Pending CN113761433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011218608.3A CN113761433A (en) 2020-11-04 2020-11-04 Service processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011218608.3A CN113761433A (en) 2020-11-04 2020-11-04 Service processing method and device

Publications (1)

Publication Number Publication Date
CN113761433A true CN113761433A (en) 2021-12-07

Family

ID=78785935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011218608.3A Pending CN113761433A (en) 2020-11-04 2020-11-04 Service processing method and device

Country Status (1)

Country Link
CN (1) CN113761433A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915662A (en) * 2022-04-18 2022-08-16 上海斑马来拉物流科技有限公司 Data request processing method, system, terminal and readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090012675A1 (en) * 2007-07-03 2009-01-08 General Motors Corporation Method of providing data-related services to a telematics-equipped vehicle
CN104468629A (en) * 2014-12-30 2015-03-25 北京奇虎科技有限公司 Method and device for transmitting information in batches
CN104468841A (en) * 2014-12-30 2015-03-25 北京奇虎科技有限公司 Method and device for transmitting information in batches
CN106210032A (en) * 2016-07-06 2016-12-07 乐视控股(北京)有限公司 The method and device reported based on terminal data batch
CN106571949A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Event tracking point processing method and apparatus
CN108073414A (en) * 2016-11-15 2018-05-25 北京亿阳信通科技有限公司 It is a kind of that multi-thread concurrent is asked to merge the implementation method that batch submits simultaneously Distribution Results based on Jedis

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090012675A1 (en) * 2007-07-03 2009-01-08 General Motors Corporation Method of providing data-related services to a telematics-equipped vehicle
CN104468629A (en) * 2014-12-30 2015-03-25 北京奇虎科技有限公司 Method and device for transmitting information in batches
CN104468841A (en) * 2014-12-30 2015-03-25 北京奇虎科技有限公司 Method and device for transmitting information in batches
CN106210032A (en) * 2016-07-06 2016-12-07 乐视控股(北京)有限公司 The method and device reported based on terminal data batch
CN106571949A (en) * 2016-09-23 2017-04-19 北京五八信息技术有限公司 Event tracking point processing method and apparatus
CN108073414A (en) * 2016-11-15 2018-05-25 北京亿阳信通科技有限公司 It is a kind of that multi-thread concurrent is asked to merge the implementation method that batch submits simultaneously Distribution Results based on Jedis

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴泽鹏: "基于安卓的稿件采编发***研究设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 08, 15 August 2019 (2019-08-15), pages 4 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114915662A (en) * 2022-04-18 2022-08-16 上海斑马来拉物流科技有限公司 Data request processing method, system, terminal and readable storage medium

Similar Documents

Publication Publication Date Title
CN111124819B (en) Method and device for full link monitoring
CN107370806B (en) HTTP status code monitoring method, device, storage medium and electronic equipment
CN107644075B (en) Method and device for collecting page information
CN110928934A (en) Data processing method and device for business analysis
CN113505302A (en) Method, device and system for supporting dynamic acquisition of buried point data and electronic equipment
CN116627333A (en) Log caching method and device, electronic equipment and computer readable storage medium
CN112395098B (en) Application program interface calling method and device, storage medium and electronic equipment
CN111427899A (en) Method, device, equipment and computer readable medium for storing file
US20230269304A1 (en) Method and apparatus for processing notification trigger message
CN113761433A (en) Service processing method and device
CN112149392A (en) Rich text editing method and device
CN112910855B (en) Sample message processing method and device
CN110569424A (en) Information recommendation method and device
CN114048059A (en) Method and device for adjusting timeout time of interface, computer equipment and storage medium
CN112688982B (en) User request processing method and device
CN113779122A (en) Method and apparatus for exporting data
CN113079055A (en) Method and device for dynamically acquiring AGV (automatic guided vehicle) running data
CN113722193A (en) Method and device for detecting page abnormity
CN113779018A (en) Data processing method and device
CN113449230A (en) Method and system for determining exposure element, client and server
CN113114611A (en) Method and device for managing blacklist
US11842077B2 (en) Method, device, and computer program product for transmitting data for object storage
CN112783716B (en) Monitoring method and device
CN117632643A (en) Buried point data reporting method and device, electronic equipment and computer readable medium
CN115499402A (en) Instant messaging information processing method, terminal and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination