CN115086424A - Network request monitoring method and device, terminal equipment and storage medium - Google Patents

Network request monitoring method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN115086424A
CN115086424A CN202210745222.0A CN202210745222A CN115086424A CN 115086424 A CN115086424 A CN 115086424A CN 202210745222 A CN202210745222 A CN 202210745222A CN 115086424 A CN115086424 A CN 115086424A
Authority
CN
China
Prior art keywords
network request
network
information
request
monitoring
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.)
Granted
Application number
CN202210745222.0A
Other languages
Chinese (zh)
Other versions
CN115086424B (en
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 Shareit Information Technology Co Ltd
Original Assignee
Beijing Shareit 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 Shareit Information Technology Co Ltd filed Critical Beijing Shareit Information Technology Co Ltd
Priority to CN202210745222.0A priority Critical patent/CN115086424B/en
Publication of CN115086424A publication Critical patent/CN115086424A/en
Application granted granted Critical
Publication of CN115086424B publication Critical patent/CN115086424B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1014Server selection for load balancing based on the content of a request

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure provides a method, a device, a terminal device and a storage medium for network request monitoring. The method comprises the following steps: acquiring a plurality of network request libraries, wherein the network request libraries comprise a plurality of network request modes; converting the multiple network request modes into preset network request modes to obtain an updated preset network request library; and setting a network monitor for the updated preset network request library, wherein the network monitor is used for monitoring the network request of the target user. According to the method and the device, the request modes of the plurality of network request libraries can be converted into the preset network request mode, and the network monitors are uniformly arranged on the updated network request libraries to monitor the network requests, so that the network monitoring efficiency is improved, and the running speed of the terminal is guaranteed.

Description

Network request monitoring method and device, terminal equipment and storage medium
Technical Field
The present disclosure relates to the field of network request technologies, and in particular, to a method and an apparatus for monitoring a network request, a terminal device, and a storage medium.
Background
Networks are currently used in Android applications, such as social applications, video applications, shopping applications, and the like. In practice, many software products require network requests to execute the corresponding logic to implement certain predetermined functions.
However, the steps that the network request needs to be executed are too cumbersome and complex, and the network request with inconsistent request modes cannot be uniformly monitored, so that the operation rate of the terminal is influenced. The network state of the user, the success rate of the network request, the duration of the request and other factors can directly influence the use experience of the user, related services, the retention of the user and the like. Therefore, the network quality of the user can be known, which is very important and meaningful for finally repairing and improving the network experience of the user.
Therefore, a more suitable method for network request snooping is urgently needed.
Disclosure of Invention
The disclosure provides a method, a device, a terminal device and a storage medium for network request monitoring, so as to improve network monitoring efficiency and guarantee operation rate of a terminal.
In a first aspect, the present disclosure provides a method for network request listening, including: acquiring a plurality of network request libraries, wherein the plurality of network request libraries comprise a plurality of network request modes; converting the various network request modes into preset network request modes to obtain an updated preset network request library; and setting a network monitor for monitoring the network request of the target user for the updated preset network request library.
In some possible embodiments, after setting the network listener for the updated preset network request library, the method further includes: acquiring a target cloud control parameter, wherein the cloud control parameter is determined based on UV (Uniform Visitor, independent Visitor) dimension; sampling the user based on the UV dimension according to the target cloud control parameters to obtain a target user; and monitoring the network request of the target user through the network monitor.
In some possible embodiments, the monitoring the network request of the target user by the network monitor includes: monitoring the execution process of the network request through a network monitor to obtain monitored data; the monitoring data comprises process information and result information, the process information is one or more timestamps, the timestamps are used for indicating time information and corresponding state information in the execution process, and the state information is used for expressing whether the timestamps are executed successfully or not.
In some possible embodiments, the result information of the performed procedure includes classification information, network metadata, status information, time-consuming information, error information, retry and redirection information, and data information.
In some possible embodiments, the converting the multiple network request modes into the preset network request mode to obtain the updated preset network request library includes: converting various network request modes into preset network request modes in an adapter mode; and updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain updated preset network request libraries.
In some possible embodiments, the setting a network listener for the updated preset network request library includes: determining a first network request from the updated preset network request library; instantiating the first network request; generating a byte code file of the first network request; and according to the tangent plane programming rule, setting the network listener by modifying the byte code file in the instantiation.
In a second aspect, the present disclosure provides a network request monitoring apparatus, which may be a chip or a system on a chip in a terminal device, or may be a functional module in the terminal device for implementing the method according to the first aspect and any possible implementation manner thereof. The network request monitoring apparatus may implement the functions executed by the terminal device in the first aspect and any one of the possible implementation manners of the first aspect, where the functions may be implemented by executing corresponding software through hardware. The hardware or software comprises one or more modules corresponding to the functions. The network request monitoring device comprises: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of network request libraries which comprise a plurality of network request modes; the conversion module is used for converting the various network request modes into preset network modes to obtain an updated preset network request library; and the monitoring module is used for setting a network monitor for the updated preset network request library, and the network monitor is used for monitoring the network request of the target user.
In some possible embodiments, the acquisition module is configured to acquire a target cloud control parameter, where the cloud control parameter is determined based on a UV dimension; sampling the user based on the UV dimension according to the target cloud control parameters to obtain a target user; and the monitoring module is used for monitoring the network request of the target user through the network monitor.
In some possible embodiments, the monitoring module is further configured to monitor, by a network monitor, an execution process of the network request to obtain monitored data; the method comprises the steps of monitoring data process information and result information, wherein the process information is one or more timestamps, the timestamps are used for indicating time information and corresponding state information in the execution process, and the state information is used for indicating whether the timestamps are executed successfully or not.
In some possible embodiments, the result information of the performed procedure includes classification information, network metadata, status information, time-consuming information, error information, retry and redirect information, and data information.
In some possible embodiments, the conversion module is further configured to convert the multiple network request modes into preset network request modes in an adapter mode; and updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain updated preset network request libraries.
In some possible embodiments, the monitoring module is further configured to determine the first network request from the updated preset network request library; instantiating a first network request; generating a byte code file of a first network request; according to the tangent plane programming, the network listener is set by modifying the byte code file in the instantiation.
In a third aspect, the present disclosure provides a terminal device, comprising: a memory and a processor; the processor is connected to the memory and configured to execute computer-executable instructions stored on the memory to implement the method as described in the first aspect and any possible implementation thereof.
In a fourth aspect, the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are capable of implementing the method according to the first aspect and any possible implementation manner thereof.
Compared with the prior art, the technical scheme provided by the disclosure has the following beneficial effects:
in the method and the system, the request mode of the plurality of network request libraries is converted into the preset network request mode, and the network monitors are uniformly arranged on the updated network request libraries, so that the network requests are monitored, the network monitoring efficiency is improved, and the running speed of the terminal is guaranteed.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the scope of the disclosure.
Drawings
Fig. 1 is a schematic flowchart of a first implementation of a method for requesting snooping by a network according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating a second implementation flow of a method for requesting listening by a network according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a third implementation flow of a method for requesting listening by a network according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart illustrating a fourth implementation flow of a method for requesting listening by a network according to an embodiment of the present disclosure;
FIG. 5 is a flow chart of an example of a method of network request snooping in an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a network request monitoring apparatus in an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the disclosed embodiments. It will be apparent, however, to one skilled in the art that the present disclosure may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present disclosure with unnecessary detail.
At present, a network request in an Android system mainly carries out the network request through three network request libraries, i.e. an OKHttpClient, an HttpURConnection and an HttpClient, and the process of the network request at each time comprises the following steps: create request tasks, DNS domain name resolution, establish connections, send data, and receive data. Some of the current prior art network requests monitoring methods are: sampling is performed through PV (Page View ) dimensions, for example, different network monitors are respectively set for the 3 network request libraries to collect data, and the data mainly includes a domain name, an IP (Internet Protocol) address, success and failure information of a request, duration information of the request, parameter information of the request, and the like.
However, the above scheme has several problems:
firstly, network monitoring is respectively set for an OKHttpClient network request library, an HttpURLCONNECTION network request library and an HttpClient network request library, so that the workload is additionally increased, and because the used libraries are different, the monitored contents and dimensions are also different, so that a uniform standard cannot be established, for example, the number of monitorable points of the HttpURLCONNECTION is small, and the number of data monitored by the OKHttpClient is large.
Secondly, the monitoring of the okhtttpclient network request library by the existing scheme is usually realized by explicitly setting a network event monitor, which causes the previously set event monitor to be unavailable and complicated to use, and cannot guarantee complete coverage of all scenes, and the okhtttpclient network request library is not monitored after being newly added, which may be caused by forgetting to set the network monitor.
Thirdly, because the data volume of the network request is too large, the monitoring is usually performed by sampling the requested PV, and the sampling mode cannot accurately reflect the actual network request situation of the user.
Fourthly, the existing scheme is to monitor the result. Only the result is monitored, that is, only the final result requested by the user can be reflected, but the process information requested by the network cannot be reflected, so that the problem of some difficulties is difficult to eliminate.
Therefore, a more suitable method for network request monitoring is urgently needed.
In order to solve the above problem, the embodiments of the present disclosure provide a method for network request listening, which may be applied in a network request listening device to listen to a network request.
It should be noted that, in the process of performing network monitoring on the client, the client is configured with a network request monitoring device, so that a network request initiated by a user can be called, and the specific form of the client includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, and other terminal devices.
Fig. 1 is a schematic flowchart of a first implementation flow of a method for requesting to listen to a network in an embodiment of the present disclosure, and referring to fig. 1, the method for requesting to listen to a network may include:
s101, a plurality of network request libraries are obtained.
The network request libraries comprise a plurality of network request modes.
It should be understood that, for a client that needs to perform network request status monitoring, the network request monitoring apparatus may obtain a plurality of network request libraries in which the user initiates network requests to the client before monitoring the network condition of the client, where each network request library is a network request manner.
In one embodiment, the network request library may be one or more of an okttpclient network request library, an HttpURLConnection network request library, and an htttpclient network request library.
S102, converting the various network request modes into preset network request modes to obtain an updated preset network request library.
It should be understood that, after obtaining the multiple network request modes through the foregoing S101, the network request monitoring apparatus needs to perform conversion processing on the multiple network request modes, that is, convert the multiple network request modes into the preset network request mode, so as to obtain the updated preset network request library.
It should be noted that the conversion may be understood as parsing and identifying the different network request modes, and storing the parsed and identified network request modes in the network request library. That is, the conversion means converting the request form into a unified request form. For example, the unified standard may be an OKHttpClient network request.
In some possible embodiments, the preset network request library may be an okhtttpclient network request library, and then S102 may be understood as converting the http connection network request library and the http client network request library into an okhttplient network request library, so that when performing network request snooping, only the okhtpclient network request library is set with network snooping.
S103, setting a network monitor for the updated preset network request library.
Here, the network listener is used to listen to the network requests of the target users.
It should be understood that, after the network request monitoring apparatus obtains the updated preset network request library, a network monitor may be set in the updated preset network request library, so as to monitor the network request.
In some possible embodiments, the method of construction of Hook okhtttpclient can be used to set up listeners for all okhtttpclients, which is convenient and non-exhaustive. It should be noted that, a previously used network listener may also be set in the network listener, so that compatibility with previous listening may be achieved.
In some possible embodiments, the network request listening device may listen for the network request by means of a network listener provided. Then, fig. 2 is a schematic diagram of a second implementation flow of the method for network request snooping in the embodiment of the present disclosure, and referring to fig. 2, after performing S103, the network request snooping device may further perform S201 to S203.
S201, obtaining target cloud control parameters.
Here, the cloud control parameters are determined based on the individual guest UV dimension.
It should be understood that, after the network request monitoring apparatus sets the network monitor to the updated preset network request library through the foregoing S103, the network request monitoring apparatus may obtain the target cloud control parameter. Here, the cloud control parameters refer to some configurations that can be pulled from the server, and the client determines whether there is a hit in the network monitoring according to the pulled configurations (i.e., the cloud control parameters).
In an embodiment, the cloud control parameter may be a sampling rate, for example, the sampling rate may be 1%, 5%, 10%, or the like.
S202, sampling based on the UV dimensionality of the independent visitors is carried out on the users according to the target cloud control parameters, and the target users are obtained.
It should be understood that, the network request monitoring apparatus may perform, according to the cloud control parameter pulled from the server, random sampling of the UV dimension on the user to be monitored, to obtain the user to be monitored, that is, the target user.
It should be noted that sampling based on the UV dimension means that if a user is hit during random sampling, all network requests of the user are collected, and if the user is not hit, all network requests of the user are not sampled. Here, based on the random sampling of the UV dimension, the actual condition of the network request that is hit to the user can be more accurately reflected.
For example, for 1000 users to be selected for monitoring, when the sampling rate is 10%, the network requests the monitoring apparatus to randomly sample 1000 users, and then 100 users are selected, so that the 100 users can be understood as target users, i.e. users to be monitored.
S203, the network monitor monitors the network request of the target user.
It should be understood that after the target user is determined through S202 described above, the network request of the target user may be intercepted through the network listener.
In some possible embodiments, when performing S203, the method may further include: and monitoring the execution process of the network request through the network monitor to obtain monitored data.
Here, the listening data includes process information and result information, the process information is one or more time stamps, the time stamps are used for indicating time information in the execution process and corresponding state information, and the state information is used for expressing whether the time stamps are executed successfully or not.
It should be noted that the request process of a complete network may include the following steps: DNS (Domain Name System), TCP (Transmission Control Protocol) connection, SSL/TLS (Secure Sockets Layer, Secure socket Layer Security), sending a request message header, sending a request message body, receiving a response message header, receiving a response message body, and ending a request. However, in the above steps, each step may fail, and each step includes some additional information, so the process information may include a timestamp and corresponding status information of each step, and the whole network request process may be intuitively and comprehensively known through the timestamp and the status information, and when a request failure occurs, a specific failed step and failed status information may be intuitively known.
In some possible embodiments, the result information of the above-described execution process includes classification information, network metadata, status information, time-consuming information, error information, retry and redirection information, and data information.
In some possible embodiments, the network request monitoring apparatus may convert multiple network request modes by using an adapter mode. Then, fig. 3 is a schematic flow chart of a third implementation of the method for network request listening in the embodiment of the present disclosure, and referring to fig. 3, the network request listening device may further include S301 to S302 when executing S102.
S301, converting the various network request modes into preset network request modes in an adapter mode.
It should be understood that the network request monitoring device may convert a plurality of network request modes into a preset network request mode by means of an adapter.
In some possible embodiments, the foregoing manner by the adapter may be understood as a manner of programming in the client background by a code, so as to finally convert the network request manner in the client into a network request convenient for monitoring to perform a network request.
And S302, updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain updated preset network request libraries.
It should be understood that, after obtaining the converted preset network request manner through the above S301, the network request monitoring apparatus may update the plurality of network request bases by using the converted preset network request base, so as to obtain an updated preset network request base.
In some possible embodiments, the network request listening device may set the network listener by way of instantiation. Then, fig. 4 is a schematic flowchart of a fourth implementation flow of a method for network request snooping in the embodiment of the present disclosure, and referring to fig. 4, the network request snooping device may further include S401 to S404 when executing S103.
S401, determining a first network request from the updated preset network request library.
S402, instantiating the first network request.
S403, generate the bytecode file requested by the first network.
S404, according to the section programming rule, the network monitor is set by modifying the byte code file in the instantiation.
It should be understood that the network request monitoring device determines a network request, i.e. a first network request, from the preset network request library obtained in the above step S302; then, the determined first network request is subjected to instantiation processing, and a byte code file of the first network request is generated; after the generated byte code file is compiled, all the inquired files related to instantiation are modified according to an Aspect programming rule (AOP), so that the network monitor is set.
The following describes a method for network request listening in the embodiments of the present disclosure with a specific example.
Fig. 5 is a flowchart illustrating an example of a method for network request snooping in an embodiment of the present disclosure, and referring to fig. 5, the method for network request snooping may include:
s501, the network request monitoring device obtains a plurality of network request libraries.
S502, the network request monitoring device converts the various network request modes into preset network request modes in an adapter mode.
And S503, the network request monitoring device updates the plurality of network request libraries by adopting the converted preset network request libraries to obtain the updated preset network request libraries.
S504, the network request monitoring device determines a first network request from the updated preset network request library.
S505, the network request monitoring apparatus instantiates the first network request.
S506, the network request monitoring device generates a bytecode file of the first network request.
And S507, the network request monitoring device sets a network monitor by modifying the byte code file in the instantiation according to the tangent plane programming rule.
And S508, the network requests the monitoring device to acquire the target cloud control parameters.
And S509, the network request monitoring device samples the UV dimension of the user according to the target cloud control parameters to obtain the target user.
S510, the network request monitoring device monitors the network request of the target user through the network monitor.
S511, the network requests the monitoring device to obtain the monitored data.
Therefore, the process of monitoring the network request of the client is realized.
Therefore, in the embodiment of the disclosure, the request modes of the plurality of network request libraries are converted into the preset network request mode, and the network listeners are uniformly arranged on the updated network request libraries, so that the network requests are monitored, the network monitoring efficiency is improved, and the operation rate of the terminal is guaranteed. Further, a plurality of network request modes are converted into a preset network request mode through an adapter mode, and an updated preset network request library is obtained, so that the preset network request library only needs to be uniformly monitored; by using the method for constructing the Hook OKHttpClient to set a network listener for the updated preset network request library, compatibility of the previously set monitoring can be realized; by using the random sampling based on the UV dimension, the actual situation of the network request of the user can be reflected more accurately; according to the obtained monitoring data, the request process state information and the result state information of the network request can be known. Therefore, the network request is monitored, the network monitoring efficiency is improved, and the operation speed of the terminal is guaranteed.
Based on the same inventive concept, the embodiments of the present disclosure provide a network request monitoring apparatus, which may be a chip or a system on a chip in a terminal device, or a functional module in the terminal device for implementing the methods described in the above embodiments. The network request monitoring device may implement the functions executed by the terminal device in the above embodiments, and these functions may be implemented by executing corresponding software through hardware. These hardware or software include one or more functionally corresponding modules. Fig. 6 is a schematic structural diagram of a network request monitoring apparatus in an embodiment of the present disclosure, and referring to fig. 6, the network request monitoring apparatus 600 may include: an obtaining module 601, configured to obtain multiple network request libraries, where the multiple network request libraries include multiple network request modes; a conversion module 602, configured to convert multiple network request manners into a preset network manner, so as to obtain an updated preset network request library; the monitoring module 603 sets a network listener for the updated preset network request library, where the network listener is configured to monitor a network request of a target user.
In some possible embodiments, the obtaining module 601 is further configured to obtain a target cloud control parameter, where the cloud control parameter is determined based on the UV dimension of the independent visitor; sampling the user based on the UV dimension of the independent visitor according to the target cloud control parameter to obtain a target user; the listening module 603 is further configured to listen to the network request of the target user through the network listener.
In some possible embodiments, the monitoring module 603 is further configured to monitor, by a network monitor, an execution process of the network request to obtain monitored data; the method comprises the steps of monitoring data process information and result information, wherein the process information is one or more timestamps, the timestamps are used for indicating time information and corresponding state information in the execution process, and the state information is used for indicating whether the timestamps are executed successfully or not.
In some possible embodiments, the result information of the performed procedure includes classification information, network metadata, status information, time-consuming information, error information, retry and redirection information, and data information.
In some possible embodiments, the converting module 602 is further configured to convert the multiple network request manners into preset network request manners by using an adapter; and updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain updated preset network request libraries.
In some possible embodiments, the listening module 603 is further configured to determine the first network request from the updated preset network request library; instantiating a first network request; generating a byte code file of the first network request; according to the tangent plane programming, the network listener is set by modifying the byte code file in the instantiation.
It should be noted that, for the specific implementation processes of the obtaining module 601, the converting module 602, and the monitoring module 603, reference may be made to the detailed description of the embodiments in fig. 1 to fig. 5, and for the sake of brevity of the description, no further description is given here.
The obtaining module 601, the converting module 602, and the listening module 603 mentioned in the embodiments of the present disclosure may be one or more processors.
Based on the same inventive concept, the embodiments of the present disclosure provide a terminal device, which may be consistent with the network request monitoring apparatus described in one or more embodiments above. Fig. 7 is a schematic structural diagram of a terminal device in an embodiment of the present disclosure, and referring to fig. 7, a terminal device 700 may adopt general computer hardware, and includes a processor 701 and a memory 702.
Alternatively, the processor 701 and the memory 702 may communicate via a bus 703.
In some possible implementations, the at least one processor 701 may constitute any physical device having circuitry to perform logical operations on one or more inputs. For example, at least one processor may include one or more Integrated Circuits (ICs), including an Application Specific Integrated Circuit (ASIC), a microchip, a microcontroller, a microprocessor, all or part of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), a Field Programmable Gate Array (FPGA), or other circuitry suitable for executing instructions or performing logical operations. The instructions executed by the at least one processor may be preloaded into a memory integrated with or embedded in the controller, for example, or may be stored in a separate memory. The memory may include Random Access Memory (RAM), read-only memory (ROM), hard disk, optical disk, magnetic media, flash memory, other persistent, fixed, or volatile memory, or any other mechanism capable of storing instructions. In some embodiments, the at least one processor may comprise more than one processor. Each processor may have a similar structure, or the processors may have different configurations that are electrically connected or disconnected from each other. For example, the processor may be a separate circuit or integrated in a single circuit. When more than one processor is used, the processors may be configured to operate independently or cooperatively. The processors may be coupled electrically, magnetically, optically, acoustically, mechanically or by other means allowing them to interact. The present disclosure also provides a computer readable storage medium having stored thereon computer instructions for executing the steps of the calibration method described above by a processor, according to an embodiment of the present disclosure. The memory 702 may include computer storage media in the form of volatile and/or nonvolatile memory such as read only memory and/or random access memory. Memory 702 may store an operating system, application programs, other program modules, executable code, program data, user data, and the like.
In addition, the memory 702 stores computer executable instructions for implementing the functions of the obtaining module 601, the converting module 602, and the listening module 603 in fig. 6. The functions/implementation processes of the obtaining module 601, the converting module 602, and the listening module 603 in fig. 6 may be implemented by the processor 701 in fig. 7 calling a computer executing instruction stored in the memory 702, and the specific implementation processes and functions refer to the above related embodiments.
Based on the same inventive concept, the disclosed embodiments provide a terminal device, including: a memory and a processor; the processor is coupled to the memory and configured to execute the computer-executable instructions stored on the memory and is capable of implementing the method for network request snooping as described in one or more embodiments above.
Based on the same inventive concept, the embodiments of the present disclosure provide a computer storage medium, where computer-executable instructions are stored, and after being executed by a processor, the method for network request snooping according to one or more embodiments can be implemented.
It should be understood by those skilled in the art that the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and its inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present disclosure. Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice in the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
The above description is only an exemplary embodiment of the present disclosure, but the scope of the present disclosure is not limited thereto, and any modifications or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present disclosure should be covered within the scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (14)

1. A method for network request listening, the method comprising:
acquiring a plurality of network request libraries, wherein the network request libraries comprise a plurality of network request modes;
converting the multiple network request modes into preset network request modes to obtain an updated preset network request library;
and setting a network monitor for the updated preset network request library, wherein the network monitor is used for monitoring the network request of the target user.
2. The method of claim 1, wherein after the setting of the network listener for the updated pre-set network request library, the method further comprises:
obtaining target cloud control parameters, wherein the cloud control parameters are determined based on UV (ultraviolet) dimensions of independent visitors;
sampling the user based on the UV dimension of the independent visitor according to the target cloud control parameter to obtain the target user;
and monitoring the network request of the target user through the network monitor.
3. The method of claim 2, wherein the listening, by the network listener, for the network request of the target user comprises:
monitoring the execution process of the network request through the network monitor to obtain monitored data;
the monitoring data comprises process information and result information, the process information is one or more timestamps, the timestamps are used for indicating the time information in the execution process and corresponding state information, and the state information is used for expressing whether the execution of the timestamps is successful or not.
4. The method of claim 3, wherein the result information of the performing process comprises classification information, network metadata, status information, time-consuming information, error information, retry and redirect information, and data information.
5. The method of claim 1, wherein the converting the plurality of network request modes into a preset network request mode to obtain an updated preset network request library comprises:
converting the multiple network request modes into the preset network request mode in an adapter mode;
and updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain the updated preset network request libraries.
6. The method according to claim 1, wherein the setting a network listener for the updated preset network request library comprises:
determining a first network request from the updated preset network request library;
instantiating the first network request;
generating a bytecode file of the first network request;
and setting the network listener by modifying the byte code file in the instantiation according to a section programming rule.
7. An apparatus for network to request listening, the apparatus comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring a plurality of network request libraries which comprise a plurality of network request modes;
the conversion module is used for converting the multiple network request modes into preset network modes to obtain an updated preset network request library;
and the monitoring module is used for setting a network monitor for the updated preset network request library, and the network monitor is used for monitoring the network request of the target user.
8. The apparatus of claim 7, further comprising:
the system comprises an acquisition module, a processing module and a control module, wherein the acquisition module is used for acquiring target cloud control parameters, and the cloud control parameters are determined based on the UV dimension of an independent visitor; sampling the user based on the UV dimension of the independent visitor according to the target cloud control parameter to obtain the target user;
and the monitoring module is used for monitoring the network request of the target user through the network monitor.
9. The apparatus according to claim 8, wherein the snooping module is further configured to snoop, by the network snooper, an execution procedure of the network request to obtain snooped data; the data monitoring method comprises the steps of monitoring data process information and result information, wherein the process information is one or more timestamps, the timestamps are used for indicating time information and corresponding state information in the execution process, and the state information is used for indicating whether the timestamps are executed successfully or not.
10. The apparatus of claim 9, wherein the result information of the performed procedure comprises classification information, network metadata, status information, time-consuming information, error information, retry and redirect information, and data information.
11. The apparatus according to claim 8, wherein the converting module is further configured to convert the plurality of network request manners into the preset network request manner by means of an adapter; and updating the plurality of network request libraries by adopting the converted preset network request libraries to obtain the updated preset network request libraries.
12. The apparatus of claim 8, wherein the listening module is further configured to determine a first network request from the updated preset network request library; instantiating the first network request; generating a bytecode file of the first network request; and according to the section programming, setting the network listener by modifying the byte code file in the instantiation.
13. A terminal device, comprising:
a memory storing computer executable instructions;
a processor coupled to the memory for executing the computer-executable instructions to implement the method of any of claims 1 to 6.
14. A computer storage medium having computer-executable instructions stored thereon which, when executed by a processor, are capable of implementing the method of any one of claims 1 to 6.
CN202210745222.0A 2022-06-27 2022-06-27 Method, device, terminal equipment and storage medium for monitoring network request Active CN115086424B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210745222.0A CN115086424B (en) 2022-06-27 2022-06-27 Method, device, terminal equipment and storage medium for monitoring network request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210745222.0A CN115086424B (en) 2022-06-27 2022-06-27 Method, device, terminal equipment and storage medium for monitoring network request

Publications (2)

Publication Number Publication Date
CN115086424A true CN115086424A (en) 2022-09-20
CN115086424B CN115086424B (en) 2023-10-13

Family

ID=83255912

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210745222.0A Active CN115086424B (en) 2022-06-27 2022-06-27 Method, device, terminal equipment and storage medium for monitoring network request

Country Status (1)

Country Link
CN (1) CN115086424B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198234A1 (en) * 2004-02-20 2005-09-08 Gteko, Ltd. System and unified setting interface for configuring network manageable devices
CN106603593A (en) * 2015-10-15 2017-04-26 北京京东尚科信息技术有限公司 HTTP calling method and device based on adaption
CN108874833A (en) * 2017-05-15 2018-11-23 武汉斗鱼网络科技有限公司 A kind of method and device for realizing Etcd Java client
CN109981621A (en) * 2019-03-15 2019-07-05 厦门美图之家科技有限公司 Network request processing method and processing device
CN112615822A (en) * 2020-12-03 2021-04-06 北京皮尔布莱尼软件有限公司 Message processing method and device, computing equipment and readable storage medium
CN113225351A (en) * 2021-05-28 2021-08-06 中国建设银行股份有限公司 Request processing method and device, storage medium and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050198234A1 (en) * 2004-02-20 2005-09-08 Gteko, Ltd. System and unified setting interface for configuring network manageable devices
CN106603593A (en) * 2015-10-15 2017-04-26 北京京东尚科信息技术有限公司 HTTP calling method and device based on adaption
CN108874833A (en) * 2017-05-15 2018-11-23 武汉斗鱼网络科技有限公司 A kind of method and device for realizing Etcd Java client
CN109981621A (en) * 2019-03-15 2019-07-05 厦门美图之家科技有限公司 Network request processing method and processing device
CN112615822A (en) * 2020-12-03 2021-04-06 北京皮尔布莱尼软件有限公司 Message processing method and device, computing equipment and readable storage medium
CN113225351A (en) * 2021-05-28 2021-08-06 中国建设银行股份有限公司 Request processing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115086424B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN107277153B (en) Method, device and server for providing voice service
JP5870471B2 (en) Method, apparatus, and system for sharing software between terminals
US11360737B2 (en) Method and apparatus for providing speech service
US20150082286A1 (en) Real-time code instrumentation
CN111258627A (en) Interface document generation method and device
CN108600377B (en) Method, device, terminal and storage medium for suspending file downloading
CN113821352A (en) Remote service calling method and device
CN111770174A (en) Cloud platform deployment method, device, equipment and readable storage medium
CN107315672B (en) Method and device for monitoring server
CN111800511B (en) Synchronous login state processing method, system, equipment and readable storage medium
CN112804366B (en) Method and device for resolving domain name
CN115086424B (en) Method, device, terminal equipment and storage medium for monitoring network request
CN109388917B (en) Hardware equipment authentication method, device, equipment and storage medium
CN111161072A (en) Block chain-based random number generation method, equipment and storage medium
CN111355629B (en) Client test method and device, computer equipment and storage medium
CN110851194A (en) Method and device for acquiring code for realizing new interface
CN113810448B (en) Cloud service method, deployment method, device, electronic equipment and storage medium
CN111414200B (en) Method, apparatus, electronic device and computer readable medium for installing operating system
CN114726608A (en) Honeypot drainage method, honeypot drainage device and honeypot drainage medium
CN113132447A (en) Reverse proxy method and system
CN113434384A (en) Pressure testing method and device
CN113742617A (en) Cache updating method and device
CN111949472A (en) Method and device for recording application logs
CN111163156A (en) Data processing method, device and storage medium based on block chain
CN112131095A (en) Pressure testing method and device

Legal Events

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