CN113726770B - Data interception method, device, computer equipment and storage medium - Google Patents
Data interception method, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN113726770B CN113726770B CN202111003059.2A CN202111003059A CN113726770B CN 113726770 B CN113726770 B CN 113726770B CN 202111003059 A CN202111003059 A CN 202111003059A CN 113726770 B CN113726770 B CN 113726770B
- Authority
- CN
- China
- Prior art keywords
- data
- network request
- client
- network
- identification result
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000004891 communication Methods 0.000 claims description 24
- 238000001914 filtration Methods 0.000 claims description 16
- 230000006870 function Effects 0.000 claims description 16
- 239000003795 chemical substances by application Substances 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 11
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims description 2
- 238000012360 testing method Methods 0.000 abstract description 7
- 238000011161 development Methods 0.000 abstract description 6
- 230000004044 response Effects 0.000 description 14
- 238000004088 simulation Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000003111 delayed effect Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000008676 import Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011981 development test Methods 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/14—Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
- H04L63/1441—Countermeasures against malicious traffic
- H04L63/1466—Active attacks involving interception, injection, modification, spoofing of data unit addresses, e.g. hijacking, packet injection or TCP sequence number attacks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/02—Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
- H04L63/0227—Filtering policies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Debugging And Monitoring (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a data interception method, a device, computer equipment and a storage medium, wherein the method comprises the following steps: intercepting network request data of a client, wherein the network request data comprises network request parameters and time identifiers; the network request parameters are sent to a server, and feedback data of the server responding to the network request parameters are intercepted; identifying the feedback data and adding the time identifier in an identification result, wherein the feedback data comprises a first network updating parameter, and the identification result is returned to the client; and based on the time identifier, caching the corresponding relation between the network request data and the corresponding feedback data and the recognition result. According to the invention, system-level software is not required to be installed, network request data and feedback data can be captured and intercepted through the network request agent program, the problem is queried through interception content analysis, so that the normal operation of a client is ensured, the data interception efficiency is improved, and the later test and development of the data are facilitated.
Description
Technical Field
The present invention relates to the field of data interception technologies, and in particular, to a data interception method, a data interception device, a computer device, and a storage medium.
Background
When the website is developed and debugged, network request data initiated by the website is required to be captured and intercepted, and development and test personnel can inquire about problems (code errors, network anomalies and the like) by analyzing the intercepted data.
In the prior art, usually, fiddler or Charles software is installed, all network requests initiated by a website are proxied into local services initiated by Fiddler or Charles software by setting a browser proxy, configuring a proxy port, importing certificates required by network requests (https) and the like, and then the local services forward network request data to achieve the aim of capturing and intercepting. However, since the Fiddler or Charles software is system level software, the installation is time-consuming and the memory occupation is relatively large, and the scheme is complicated especially for users (development testers) with low use frequency or low computer hardware configuration. Meanwhile, certificates need to be imported for partial network requests (https), and development and debugging efficiency are affected. Therefore, a lightweight, efficient data interception method is needed.
Disclosure of Invention
The invention aims to provide a data interception method, a data interception device, computer equipment and a storage medium, which are used for solving the problems existing in the prior art.
In order to achieve the above object, the present invention provides a data interception method, including:
intercepting network request data of a client, wherein the network request data comprises network request parameters and time identifiers;
the network request parameters are sent to a server, and feedback data of the server responding to the network request parameters are intercepted;
identifying the feedback data and adding the time identifier in an identification result, wherein the feedback data comprises a first network updating parameter, and returning the identification result to a client;
and based on the time identifier, caching the corresponding relation between the network request data and the corresponding feedback data and the recognition result.
Preferably, before intercepting the network request data of the client, the method further comprises:
defining a communication channel for the client, wherein the communication channel is used for representing the communication relationship between the client and the network request agent program;
registering the communication channel in the network request broker.
Preferably, the intercepting the network request data of the client includes:
identifying the network request event through the network request agent program according to the network request event generated by the client and intercepting network request data in the network request event;
and inquiring network request parameters in the network request data through the communication channel.
Preferably, the identifying, by the network request agent program, the network request event and intercepting the network request data in the network request event includes:
the network request agent program identifies a corresponding preset filtering condition matched according to the network request event; and is combined with the other components of the water treatment device,
and intercepting network request data in the network request event based on the filtering condition.
Preferably, the returning the identification result to the client includes:
and delaying the identification result to return to the client based on a preset delay configuration.
Preferably, the identifying the feedback data and adding the time identifier to the identification result, where the feedback data includes a first network update parameter, and returning the identification result to the client includes:
identifying corresponding preset configuration data according to the feedback data by a network request agent program, wherein the configuration data comprises second network updating parameters;
if the identification result is null, adding the time identifier in the feedback data and returning the feedback data to the client;
and if the identification result is that the corresponding configuration data is identified, adding the time identifier in the configuration data and returning the configuration data to the client.
Preferably, after the requesting agent identifies the feedback data by the network, adding the time identifier to the identification result and sending the identification result to the client, the method further includes:
the client generates update data based on the first network update parameter or the second network update parameter, and updates and displays an application program interface of the client based on the update data;
and the network request agent program caches the corresponding relation between the network request data and corresponding feedback data and/or configuration data and update data based on the time identifier.
In order to achieve the above object, the present invention further provides a data interception apparatus, including:
the interception module is used for intercepting network request data of the client, wherein the network request data comprises network request parameters and time identifiers;
the sending module is used for sending the network request parameters to a server and intercepting feedback data of the server responding to the network request parameters;
the identification module is used for identifying the feedback data and adding the time identifier in an identification result, wherein the feedback data comprises a first network updating parameter, and the identification result is returned to the client;
and the caching module is used for caching the corresponding relation between the network request data and the corresponding feedback data and the identification result based on the time identification.
To achieve the above object, the present invention also provides a computer apparatus comprising:
a memory storing at least one computer program; and
And a processor executing the computer program stored in the memory to implement the data interception method of any one of the above.
To achieve the above object, the present invention also provides a computer-readable storage medium including a storage data area storing data created according to use of a blockchain node and a storage program area storing a computer program which when executed by a processor realizes the data interception method of any one of the above.
The beneficial effects of the technical scheme are that:
according to the testing method, the testing device, the computer equipment and the storage medium, system-level software (such as Fiddler or Charles software) is not required to be installed, when a client establishes a network request, network request data can be captured and intercepted through a network request agent program, the network request data is sent to a server based on network request parameters, feedback data responded by the server is intercepted, the request and/or the feedback data can be analyzed through interception contents, and the client is ensured to run normally when a query problem exists. Meanwhile, the network request agent program is easy to install and can be embedded in the client, memory consumption is low, and for a network request needing to be imported with a certificate, the network request agent program can be captured and intercepted in an agent rewriting mode without certificate import, so that data interception efficiency is effectively improved, and later test and development of data are facilitated.
Drawings
FIG. 1 is a flow chart of a data interception method according to an embodiment of the invention;
FIG. 2 is a functional block diagram of a data interception device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device according to a third data interception method in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
As shown in fig. 1, which is a flow chart of a data interception method according to the present embodiment, it can be seen from the figure that the method includes steps S100-S400, specifically as follows:
s100: intercepting network request data of a client, wherein the network request data comprises network request parameters and time identifiers.
In an exemplary embodiment, the network request data is used to characterize the user's generation of request data on an application interface in the client (e.g., a web page in a browser) for sending a request to the network to obtain feedback information results. Wherein the network request includes: hypertext transfer protocol (HyperText Transfer Protocol, HTTP) requests, hypertext transfer security protocol (Hyper Text Transfer Protocol over Secure Socket Layer, HTTPs) requests, transmission control protocol (TransmissionControl Protocol, TCP) requests, user datagram protocol (User Datagram Protocol, UDP) requests, quick internet connection protocol (Quick UDP Internet Connection, QUIC) requests, and the like. Alternatively, the network request may be implemented as a request of another network protocol, which is not limited in this embodiment. The client comprises mobile terminals such as a mobile phone, a tablet personal computer, a portable laptop, a portable wearable device and the like. Optionally, the client may also be implemented as a terminal device such as a desktop computer, a monitoring system, and the embodiment is not limited thereto.
Specifically, the network request data is data generated when the user triggers an operation on the client, or data generated by the client according to a preset timer, or data generated by the client according to automatically displayed content, which is not limited in this embodiment. Taking as an example a message generated when the network request data is triggered by a user on a client, for example: when browsing an application program interface on a client, a user receives a refreshing operation on the application program interface, and generates network request data according to the refreshing operation, wherein the network request data is used for requesting to acquire refreshed display content; taking as an example a message generated by a set timer, the network request data is described as: a timer is set in the client, data are acquired from the server for updating and displaying every preset time length, and when the time length reaches the preset time length, network request data are generated, wherein the network request data are used for requesting to acquire refreshed data; taking as an example a message in which the network request data is generated from automatically displayed content, for example: the method comprises the steps that a video A is currently played in a client, the next video played by the video A is a video B, and after the video A is played, network request data are generated and are used for requesting to acquire video data corresponding to the video B.
When the network request data is intercepted, extracting network request parameters in the network request data, and calling corresponding Application program interfaces (Application ProgrammingInterface, API) according to different network request protocols to establish the network request data. Wherein the network request parameters comprise at least one of request header, request address, request method and the like.
Before intercepting network request data of a client, a communication bridge is constructed between the client for generating the network request data and a network request agent program so that the client can conduct network request agent through the network request agent program. Wherein the network request agent is a program written by native code. In this embodiment, the network request agent is written by operating system native code, for example: iOS operating system, android system, world Wide Web (Web) page, or other operating system native code. Optionally, the network request agent is a program written in the Objective-c language, java language or JavaScript language. Specifically, the step of constructing the communication bridge includes:
and step 1, defining a communication channel for the client, wherein the communication channel is used for representing the communication relationship between the client and the network request agent program.
In an exemplary embodiment, a communication method is defined in the code logic of the client for communication between the client and the network request broker. For example: the method dchannel method is defined in the code logic of the client, and may be named as any other character string, which is not limited in this embodiment.
And 2, registering the communication channel in the network request agent program.
In an exemplary embodiment, after a communication channel is defined for a client, the communication channel also needs to be registered in the network request broker. For example: taking the above-mentioned method dchannel method as an example, after the method dchannel method is defined on the client, the method dchannel method is registered in the network request broker.
And according to the network request event generated by the client, identifying the network request event through the network request agent program, intercepting network request data in the network request event, and inquiring network request parameters in the network request data through the communication channel.
Preferably, the network request agent program matches a corresponding preset filtering condition according to the network request event, and intercepts network request data in the network request event based on the filtering condition.
In an exemplary embodiment, corresponding filtering conditions are preset for different network request events, when a client generates a network request event, the corresponding preset filtering conditions are identified and matched through a network request agent program, network request events which partially do not meet the conditions are filtered based on the filtering conditions, and the network request events which meet the conditions are intercepted and network request data in the network request events are extracted. For example: the hypertext transfer protocol request comprises a network request event generated when a user triggers an operation on a client, the network request event generated by the client according to a preset timer, and the network request event generated by the client according to automatically displayed content, wherein at least one of the three network request events is selected as a filtering condition, and the rest of the three network request events are filtered and not intercepted. For example: the network request event generated by the user when the user triggers the operation on the client is selected as a filtering condition, the network request data intercepted by the network request agent program belongs to the data of the network request event generated by the user when the user triggers the operation on the client, and when the network request event is the network request event generated by the client according to a preset timer, the network request event generated by the client according to the automatically displayed content and other network request events, the network request event is filtered according to the filtering condition and is not intercepted.
Also for example: the transmission control protocol request and the hypertext transmission protocol request comprise three network request events, but the network request event generated by the client according to the automatically displayed content is selected as a filtering condition, the network request data intercepted by the network request agent program belongs to the data of the network request event generated by the client according to the automatically displayed content, and when the network request event is the network request event generated by the user when the user triggers the operation on the client, the network request event generated by the client according to the preset timer and other network request events, the network request event is filtered according to the filtering condition and is not intercepted. It is known that the filtering conditions corresponding to different network request events may be different or the same, and are not limited in particular.
S200: and sending the network request parameters to a server, and intercepting feedback data of the server responding to the network request parameters.
In an exemplary embodiment, the network request parameter is sent to the server through the network request agent according to the parameter information such as the request header, the request address, the request method and the like in the network request parameter. Wherein the request address is used to determine the recipient (i.e., server) of the network request; the request method is used for indicating the processing method required by the network request, for example: a GET method, a POST method, a push method, a DELETE method, a CONNECT method, a track method, an OPTIONS method, and the like in an HTTP request or an HTTPs request; the request header is mainly used to configure some special fields, such as: a field indicating a request method may be included in a request header of the HTTP request.
The server receives the network request parameters and generates feedback data in response based on the network request parameters. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
S300: and identifying the feedback data and adding the time identifier in an identification result, wherein the feedback data comprises a first network updating parameter, and the identification result is returned to the client.
In an exemplary embodiment, the network request agent identifies, from the feedback data, configuration data that matches a corresponding preset, the configuration data including a second network update parameter. The feedback data is essentially the same as the configuration data, the feedback data are data of response network request parameters of the server, the feedback data are only data of real response, the configuration data are data of analog response, namely the first network updating parameters and the second network updating parameters comprise response rows, response heads and response bodies. Taking HTTP as an example, the response line is used to represent the status code of the response, the status code of HTTP is composed of three decimal numbers, the first decimal number defines the type of status code, the response header is used to represent which request methods (such as GET, POST, etc.) are supported by the server, and the response body is used to represent the fields of the methods in the response header.
The user can set corresponding configuration data in the network request agent program according to different network request data in advance according to service requirements to serve as simulation feedback data, when the network request agent program intercepts real feedback data generated by the server, the real feedback data are stored, the configuration data are sent to the client as the simulation feedback data, and the influence of the client based on the simulation feedback data is tested. For example: for the hypertext transfer protocol request, the filtering condition is that a network request event generated when a user triggers an operation on the client and a network request event generated by the client according to a preset timer are provided, configuration data is correspondingly set for the network request event generated when the user triggers the operation on the client to serve as simulation feedback data of the corresponding network request data, and the configuration data is not set for the network request event generated by the client according to the preset timer.
And identifying the feedback data through the network request agent program, and if the configuration data is not identified, returning the feedback data to the client if the identification result is null. For example: for a network request event generated by a client according to a preset timer, because configuration data is not preset to serve as simulation feedback data corresponding to the network request data, if a recognition result is null in a recognition process, the feedback data is returned to the client, the client generates update data based on the first network update parameters, and updates and displays an application program interface of the client based on the update data.
And if the identification result is that the configuration data is matched with the corresponding configuration data, returning the configuration data to the client. For example: aiming at a network request event generated when a user triggers operation on a client, as configuration data is preset to serve as simulation feedback data corresponding to the network request data, the configuration data can be matched with the corresponding configuration data in the identification process, the configuration data is returned to the client as simulation feedback data, the client generates update data based on the second network update parameters, and the application program interface of the client is updated and displayed based on the update data. For example: the network request data are data generated when a user executes click jump operation on an http:// www.baidu.com link of an H5 interface of a client, the client generates update data for jumping to a target page corresponding to the click link http:// www.baidu.com according to real feedback data, and updates the H5 interface of the client into the target page corresponding to the http:// www.baidu.com according to the update data; because the configuration data is http:// www.sohu.com, the client generates update data for jumping to the target page corresponding to the clicking link http:// www.sohu.com according to the configuration data (simulation feedback data), and updates the H5 interface of the client to the target page corresponding to http:// www.sohu.com according to the update data.
In this embodiment, system level software (e.g., fiddler or Charles software) is not required to be installed, when a client establishes a network request, capturing and intercepting network request data through a network request agent program, sending the network request data to a server based on network request parameters, intercepting feedback data responded by the server, analyzing the request and/or the feedback data through intercepting content, and inquiring the problem to further ensure that the client operates normally. Meanwhile, the network request agent program is easy to install and can be embedded in the client, memory consumption is low, and for a network request needing to be imported with a certificate, the network request agent program can be captured and intercepted in an agent rewriting mode without certificate import, so that data interception efficiency is effectively improved, and later test and development of data are facilitated.
Wherein, because the interception function in the network request agent program is an asynchronous function, the client generates request data for sending a request to the network to acquire a feedback information result, and records the generation time of the network request data to be used as a time mark of the corresponding network request data, and the time mark is used as a parameter value of the asynchronous function. Meanwhile, since the time identifier is used as a parameter value of the asynchronous function, the time identifier can be added to the feedback data when the server generates the feedback data and is intercepted by the network request agent. If configuration data is preset, the time identifier can be added to the configuration data in the same way.
Preferably, the identification result (feedback data or configuration data) is delayed back to the client based on a preset delay configuration.
In an exemplary embodiment, a user may set a delay configuration in the network request agent in advance according to a service requirement, and when the network request agent intercepts feedback data generated by the server or matches the feedback data with configuration data, the feedback data or the configuration data is sent to the client in a delayed manner according to the delay configuration, so as to test the influence of update data generated by the client in a delayed state. For example: the network request data are data generated when a user executes click jump operation on an http:// www.baidu.com link of an H5 interface of the client, and the feedback data are returned to the client through delay configuration, so that the client cannot generate update data or generate blank update data, namely the H5 interface of the client displays 'connection failure' or automatically jumps to a blank page.
S400: and based on the time identifier, caching the corresponding relation between the network request data and the corresponding feedback data and the recognition result.
In an exemplary embodiment, since the network request agent is asynchronously loaded, the generation time of the request data is recorded as the time identifier of the corresponding network request data by generating the time of the request data for transmitting a request to the network to acquire the feedback information result on the client, and the time identifier is used as the parameter value of the asynchronous function. And based on the time identifier, caching the corresponding relation between the network request data and the corresponding feedback data and the recognition result. The identification result is whether configuration data and update data are included, if the configuration data are preset according to the network request data, the corresponding relation between the network request data and the corresponding feedback data, configuration data and update data is cached
Preferably, the corresponding relation between the network request data and the corresponding feedback data and/or the corresponding relation between the configuration data and the updating data is generated into a relation corresponding table in an Excel format to be cached, so that a later user can conveniently conduct problem investigation according to the corresponding relation in the relation corresponding table, and development test efficiency is improved.
Example two
Fig. 2 is a functional block diagram of a data interception device according to a second embodiment.
The data interception device 3 includes an interception module 31, a sending module 32, an identification module 33 and a buffer module 34. The module referred to in the present invention refers to a series of computer program segments capable of being executed by a processor and of performing a fixed function, which are stored in a memory. In the present embodiment, the functions of the respective modules will be described in detail in the following embodiments.
The interception module 31 is configured to intercept network request data of a client, where the network request data includes a network request parameter and a time identifier.
In an exemplary embodiment, according to the network request event generated by the client, identifying the network request event by the network request agent program and intercepting the network request data in the network request event, and sending the network request parameter to the network request agent program through the communication channel.
The sending module 32 is configured to send the network request parameter to a server, and intercept feedback data of the server in response to the network request parameter.
In an exemplary embodiment, according to parameter information such as a request header, a request address, a request method and the like in the network request parameters, the network request parameters are sent to a server through the network request agent program, the server receives the network request parameters, and feedback data is generated based on response of the network request parameters.
The identifying module 33 is configured to identify the feedback data and add the time identifier to an identification result, where the feedback data includes a first network update parameter, and return the identification result to the client.
In an exemplary embodiment, the network request agent identifies, according to the feedback data, configuration data matching a corresponding preset, the configuration data including a second network update parameter; if the identification result is null, adding the time identifier in the feedback data and returning the feedback data to the client; and if the identification result is that the corresponding configuration data is matched, adding the time identifier in the configuration data and returning the configuration data to the client.
The caching module 34 is configured to cache, based on the time identifier, a correspondence between the network request data and the corresponding feedback data and the recognition result.
Example III
Fig. 3 is a schematic structural diagram of a computer device according to the third data interception method of the present embodiment.
In an exemplary embodiment, the computer device 4 includes, but is not limited to, a memory 41, a processor 42, and a computer program, such as a data interception program, stored in the memory 41 and executable on the processor. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a computer device and is not limiting of the computer device, and may include more or fewer components than shown, or may combine some of the components, or different components, e.g., the computer device may also include input and output devices, network access devices, buses, etc.
The memory 41 includes at least one type of computer-readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage module of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory 41 may also be an external storage device of a computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like. Of course, the memory 41 may also include both internal memory modules of the computer device and external memory devices. In this embodiment, the memory 41 is typically used to store an operating system and various types of application software installed on a computer device. In addition, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a central processing module (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, and the processor 42 is the computing core and control center of the computer device, connects the various parts of the entire computer device using various interfaces and lines, and executes the operating system of the computer device and various applications, program code, etc. installed.
The processor 42 executes the operating system of the computer device as well as the various applications installed. The processor 42 executes the application program to implement the steps in the respective data interception method embodiments described above, such as steps S100, S200, S300, S400 shown in fig. 1.
Example IV
The present embodiment also provides a computer-readable storage medium such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored, which when executed by a processor, performs the corresponding functions. The computer readable storage medium of the present embodiment is used to store a computer program implementing the data interception method, and when executed by the processor 42, implements the data interception method of the first, second, or third embodiment.
Further, the computer-readable storage medium may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The subject application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.
Claims (9)
1. A data interception method, comprising:
intercepting network request data of a client, wherein the network request data comprises network request parameters and time identifiers;
the network request parameters are sent to a server, and feedback data of the server responding to the network request parameters are intercepted;
identifying the feedback data and adding the time identifier to an identification result, wherein the feedback data comprises a first network updating parameter, and the identification result is returned to the client side, and the method comprises the following steps:
identifying corresponding preset configuration data according to the feedback data by a network request agent program, wherein the configuration data comprises second network updating parameters;
if the identification result is null, adding the time identifier in the feedback data and returning the feedback data to the client;
if the identification result is that the corresponding configuration data is identified, adding the time identifier in the configuration data and returning the configuration data to the client;
the interception function in the network request agent program is an asynchronous function;
based on the time identifier, caching the corresponding relation between the network request data and the corresponding feedback data and the identification result;
the time is identified as a parameter value of the asynchronous function.
2. The data interception method according to claim 1, further comprising, before said intercepting the network request data of the client:
defining a communication channel for the client, wherein the communication channel is used for representing the communication relationship between the client and a network request agent program;
registering the communication channel in the network request broker.
3. The method for intercepting data according to claim 2, wherein said intercepting network request data of a client comprises:
identifying the network request event through the network request agent program according to the network request event generated by the client and intercepting network request data in the network request event;
and inquiring network request parameters in the network request data through the communication channel.
4. A data interception method according to claim 3, wherein said identifying said network request event by said network request agent program and intercepting network request data in said network request event comprises:
the network request agent program matches corresponding preset filtering conditions according to the network request event; and is combined with the other components of the water treatment device,
and intercepting network request data in the network request event based on the filtering condition.
5. The method for intercepting data according to claim 1, wherein said returning said identification result to the client comprises:
and delaying the identification result to return to the client based on a preset delay configuration.
6. The data interception method according to claim 1, wherein after said identifying said feedback data by said network request agent, adding said time stamp to an identification result and transmitting said identification result to a client, further comprising:
the client generates update data based on the first network update parameter or the second network update parameter, and updates and displays an application program interface of the client based on the update data;
and the network request agent program caches the corresponding relation between the network request data and corresponding feedback data and/or configuration data and update data based on the time identifier.
7. A data interception device, comprising:
the interception module is used for intercepting network request data of the client, wherein the network request data comprises network request parameters and time identifiers;
the sending module is used for sending the network request parameters to a server and intercepting feedback data of the server responding to the network request parameters;
the identification module is configured to identify the feedback data and add the time identifier to an identification result, where the feedback data includes a first network update parameter, and return the identification result to the client, and includes:
identifying corresponding preset configuration data according to the feedback data by a network request agent program, wherein the configuration data comprises second network updating parameters;
if the identification result is null, adding the time identifier in the feedback data and returning the feedback data to the client;
if the identification result is that the corresponding configuration data is identified, adding the time identifier in the configuration data and returning the configuration data to the client;
the interception function in the network request agent program is an asynchronous function;
the caching module is used for caching the corresponding relation between the network request data and the corresponding feedback data and the identification result based on the time identification;
the time is identified as a parameter value of the asynchronous function.
8. A computer device, comprising:
a memory storing at least one computer program; and
A processor executing a computer program stored in the memory to implement the data interception method according to any one of claims 1 to 6.
9. A computer readable storage medium comprising a stored data area storing data created according to use of blockchain nodes and a stored program area storing a computer program, characterized in that the computer program is executed by a processor to implement the data interception method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111003059.2A CN113726770B (en) | 2021-08-30 | 2021-08-30 | Data interception method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111003059.2A CN113726770B (en) | 2021-08-30 | 2021-08-30 | Data interception method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113726770A CN113726770A (en) | 2021-11-30 |
CN113726770B true CN113726770B (en) | 2023-06-30 |
Family
ID=78679022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111003059.2A Active CN113726770B (en) | 2021-08-30 | 2021-08-30 | Data interception method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113726770B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915565B (en) * | 2022-05-06 | 2023-09-19 | 上海哔哩哔哩科技有限公司 | Network debugging method and system |
CN115987844A (en) * | 2022-12-28 | 2023-04-18 | 航天信息股份有限公司 | Process monitoring method, system, electronic device and medium in exploratory test |
CN116055569B (en) * | 2023-03-31 | 2023-06-06 | 浙江华东工程数字技术有限公司 | Method, system, computer device and storage medium for custom switching time zone |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8898681B1 (en) * | 2013-02-22 | 2014-11-25 | Ca, Inc. | Mainframe virtualization |
US9836388B1 (en) * | 2013-09-26 | 2017-12-05 | Amazon Technologies, Inc. | Software testing environment that includes a duplicating proxy service |
CN108268375A (en) * | 2018-01-12 | 2018-07-10 | 深圳壹账通智能科技有限公司 | Applied program testing method, device, computer equipment and storage medium |
CN108848000A (en) * | 2018-05-07 | 2018-11-20 | 深圳壹账通智能科技有限公司 | Network request test method, device, computer equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050027853A1 (en) * | 2003-07-28 | 2005-02-03 | Martin Terry M. | System and method for collecting data regarding network service operation |
US8516080B2 (en) * | 2008-12-03 | 2013-08-20 | Mobophiles, Inc. | System and method for providing virtual web access |
CN107704369B (en) * | 2017-08-31 | 2021-05-04 | 云宏信息科技股份有限公司 | Operation log recording method, electronic device, storage medium and system |
CN109582556B (en) * | 2017-09-29 | 2022-04-12 | 阿里巴巴集团控股有限公司 | Method, device and system for testing running condition of application program in mobile terminal |
CN110825985B (en) * | 2018-08-06 | 2023-07-07 | 阿里巴巴(北京)软件服务有限公司 | Data acquisition system, method, device, control equipment and proxy equipment |
US11070648B2 (en) * | 2018-10-01 | 2021-07-20 | Oracle International Corporation | Offline client replay and sync |
-
2021
- 2021-08-30 CN CN202111003059.2A patent/CN113726770B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8898681B1 (en) * | 2013-02-22 | 2014-11-25 | Ca, Inc. | Mainframe virtualization |
US9836388B1 (en) * | 2013-09-26 | 2017-12-05 | Amazon Technologies, Inc. | Software testing environment that includes a duplicating proxy service |
CN108268375A (en) * | 2018-01-12 | 2018-07-10 | 深圳壹账通智能科技有限公司 | Applied program testing method, device, computer equipment and storage medium |
CN108848000A (en) * | 2018-05-07 | 2018-11-20 | 深圳壹账通智能科技有限公司 | Network request test method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113726770A (en) | 2021-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113726770B (en) | Data interception method, device, computer equipment and storage medium | |
US8725794B2 (en) | Enhanced website tracking system and method | |
US10103931B2 (en) | Session-based matching of mutable browser identifiers | |
CN111901192B (en) | Statistical method and device for page access data | |
US20110191664A1 (en) | Systems for and methods for detecting url web tracking and consumer opt-out cookies | |
CN110688598B (en) | Service parameter acquisition method and device, computer equipment and storage medium | |
US10097654B2 (en) | Identifying users of client devices for tracking user interactions with content distributed by content provider systems | |
CN110851681A (en) | Crawler processing method and device, server and computer readable storage medium | |
CN110795697A (en) | Logic expression obtaining method and device, storage medium and electronic device | |
CN110929128A (en) | Data crawling method, device, equipment and medium | |
CN112069384A (en) | Buried point data processing method, server and readable storage medium | |
CN111431767B (en) | Multi-browser resource synchronization method and device, computer equipment and storage medium | |
CN113343312A (en) | Page tamper-proofing method and system based on front-end point burying technology | |
WO2021189766A1 (en) | Data visualization method and related device | |
CN113821254A (en) | Interface data processing method, device, storage medium and equipment | |
US20240000192A1 (en) | Methods, systems and computer readable media for providing a user interface for html sap applications | |
Suguna et al. | User interest level based preprocessing algorithms using web usage mining | |
US20200175195A1 (en) | Data transfer management system and data transfer management method | |
US8719708B2 (en) | Systems and methods for dynamic historical browsing | |
US20060123107A1 (en) | Web link management systems and methods | |
CN113704648A (en) | Page data processing method, device, equipment and storage medium | |
CN115314552B (en) | Data processing method and device, electronic equipment and storage medium | |
CN115604041B (en) | Security agent method, system, apparatus, computer device, and storage medium | |
CN113204477B (en) | Application testing method and device, electronic equipment and storage medium | |
CN114285743B (en) | Method, device, electronic equipment and storage medium for updating configuration information |
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 |