Web API defect analysis method, device and equipment based on network capture, and medium
Through the Web API defect analysis method based on network packet capture, the business request data of the client and server side is compared, and the problem of difficulty in troubleshooting duplicate requests by the server business module is solved, efficient defect inspection is achieved, and time and risk costs are reduced.
Patent Information
- Application Number
- CN202411894139.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
The server-side business module receives a large number of repeated business requests from individual clients, which is very difficult to troubleshoot. The existing troubleshooting methods have great limitations in operation performance and storage, and require the transformation of the server-side business module code, which is of great time cost and risk.
The Web API defect analysis method based on network packet capture is adopted. By obtaining the service data, HTTP Session and network data packets of the URI specified by the client and the server within the preset time period, it analyzes and compares it to determine whether the service request sent by the client is consistent with the service request received by the server.
Without changing the server business code, you can implement Web API defect troubleshooting and specify URIs for analysis, without affecting operational performance, reducing storage pressure, saving time costs and reducing risks.
Smart Images

Figure CN119814751A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data analysis, and in particular to a Web API defect analysis method, device, equipment and medium based on network packet capture. Background Art
[0002] In the business processing flow of Web applications, client applications access Web applications through Web API (network application programming interface) to complete business. This involves the client application business module, sending requests through the client HTTP Client module via the HTTP reverse proxy server and the server Web Server to the server business module. After processing, the response parsed status code and response body are returned to the client, and then this information is passed to the client application. The client application makes corresponding processing based on the response content, such as updating the interface, storing data, or performing further operations. This HTTPSession (refers to a session between the server and the browser) involves many modules and a complex process. When the server business module receives a large number of repeated business requests from individual clients, it becomes very difficult to troubleshoot the problem. Common problems include: the client business module repeatedly sends business requests; HTTP Client module defects lead to repeated sending of HTTP requests; server Web Server defects lead to repeated generation of business request calls;
[0003] Common troubleshooting methods include business data record analysis. The principle is that the client and the server open the business data record and save the business operation. Because the devices where the client is located (mobile phones, TVs, etc.) are scattered everywhere, other methods need to be used to upload and collect them; for the server, the business modules concentrated on one server are easier to collect, but because the amount of data contained in the server is very large, opening all logs in a production environment will affect the operating performance, and the storage space is also easily exhausted, so only a small amount of business data records can be opened and run for a limited time, such as 24 hours. If the number and time are not limited, the storage space will be greatly consumed and the performance of the server machine will be affected. After all are collected, use special tools to compare these business data records to see whether the business requests sent by the client are consistent with the business requests received by the server. If not, check which module the problem is in, but this method has great limitations in terms of operating performance and storage, and requires the modification of the server business module code, which has a high time cost and risk. Summary of the invention
[0004] The present invention discloses a Web API defect analysis method, apparatus, device and storage medium based on network packet capture, which solves the problem that a server-side business module receives a large number of repeated business requests from individual clients, which is very difficult to troubleshoot. The existing troubleshooting methods have great limitations in terms of operating performance and storage, and require the modification of the server-side business module code, which has great time cost and risk.
[0005] According to a first aspect of the present disclosure, a Web API defect analysis method based on network packet capture is provided. The method comprises: obtaining business data of a client business module with a specified URI within a preset time period, an http session of a client HTTP Client library with a specified URI, a network data packet of a server Web Server with a specified URI, and business data of a server business module with a specified URI, wherein the specified URI is a URI for identifying a specified Web API;
[0006] Parse the http session and network data packets to obtain corresponding business data;
[0007] Compare the business data to determine whether the business request sent by the client is consistent with the business request received by the server.
[0008] According to the above aspects and any possible implementation, an implementation is further provided, wherein obtaining the service data of the URI specified by the client service module includes:
[0009] The client application records the business data corresponding to the specified URI and saves it as a business data file; so that the upgraded client application can upload the business data file to the server.
[0010] According to the above aspects and any possible implementation, an implementation is further provided, wherein the client application records the business data corresponding to the specified URI and saves it as a business data file, including:
[0011] The client application calls the HTTP interception filter configured in the user device to record the business data corresponding to the specified URI and save it as a business data file.
[0012] According to the above aspects and any possible implementation, an implementation is further provided, wherein obtaining the http session of the URI specified by the client HTTP Client library includes:
[0013] Based on the URI comparator configured in the client HTTP Client library interception filter, the httpsession of the specified URI is obtained and saved as an http session file, and the http session file is uploaded to the server.
[0014] According to the above aspects and any possible implementation, an implementation is further provided, wherein obtaining a network data packet of a URI specified by a server-side Web Server comprises:
[0015] A network packet capture tool developed based on the libpcap library to capture network data packets of the specified URI.
[0016] According to the above aspects and any possible implementation, an implementation is further provided, wherein parsing the http session to obtain corresponding business data includes:
[0017] The http session is parsed to obtain the request body, status code and message, and then further parsed to obtain the corresponding business data.
[0018] According to the above aspects and any possible implementation manner, an implementation manner is further provided, wherein parsing the network data packet to obtain corresponding service data includes:
[0019] The network data packet is parsed to obtain HTTP Session, and the HTTP Session is further parsed to obtain corresponding business data.
[0020] According to a second aspect of the present disclosure, a Web API defect analysis device based on network packet capture is provided. The device includes: a data acquisition module, which is used to acquire business data of a URI specified by a client business module, an http session of a URI specified by a client HTTP Client library, a network data packet of a URI specified by a server Web Server, and business data of a URI specified by a server business module within a preset time period, wherein the specified URI is a URI for identifying a specified Web API;
[0021] A parsing module, used to parse the http session and network data packets to obtain corresponding business data;
[0022] The comparison module is used to compare various business data to determine whether the business request sent by the client is consistent with the business request received by the server.
[0023] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the program, the method according to the first aspect and / or the second aspect of the present disclosure is implemented.
[0024] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method according to the first aspect and / or the second aspect of the present disclosure is implemented.
[0025] In the present disclosure, with this method, it is only necessary to obtain the business data of the URI specified by the client business module within a preset time period, the http session of the URI specified by the client HTTP Client library, the network data packet of the URI specified by the server Web Server, and the business data of the URI specified by the server business module, and parse the http session and the network data packet to obtain the corresponding business data. Finally, the business data are compared to determine whether the business request sent by the client is consistent with the business request received by the server. With this method, Web API defect troubleshooting can be implemented without changing the server business code. The URI can be specified for analysis, which does not affect the operating performance, reduces storage pressure, saves time costs, and reduces risks.
[0026] It should be understood that the contents described in the summary of the invention are not intended to limit the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0028] Figure 1 A flowchart of a Web API defect analysis method based on network packet capture according to an embodiment of the present disclosure is shown;
[0029] Figure 2 A flow chart showing a data acquisition process according to an embodiment of the present disclosure is shown;
[0030] Figure 3 A flow chart of a data parsing process according to an embodiment of the present disclosure is shown;
[0031] Figure 4 A block diagram of a Web API defect analysis device based on network packet capture according to an embodiment of the present disclosure is shown;
[0032] Figure 5 A block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0034] In addition, the term "and / or" in this article is only a description of the association relationship between the associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0035] Figure 1 A flowchart of a flowchart 100 of a Web API defect analysis method based on network packet capture according to an embodiment of the present disclosure is shown. The method 100 includes:
[0036] S110, obtaining business data of a URI specified by a client business module, an http session of a URI specified by a client HTTPClient library, a network data packet of a URI specified by a server Web Server, and business data of a URI specified by a server business module within a preset time period.
[0037] In some possible implementations, the specified URI is a URI that identifies a specified Web API.
[0038] In one possible implementation, the client application records the business data corresponding to the specified URI and saves it as a business data file, so that the upgraded client application can upload the business data file to the server. In one possible implementation, the client application calls the HTTP interception filter configured in the user device to record the business data corresponding to the specified URI and save it as a business data file.
[0039] In a possible implementation, the client application calls an HTTP interception filter configured in the user device to record the business data corresponding to the specified URI and save it as a business data file, and upload the business data file to the server.
[0040] In some possible implementations, based on a URI comparator configured in an interception filter of a client HTTP Client library, an http session of a specified URI is obtained and saved as an http session file, and the http session file is uploaded to a server.
[0041] In a possible implementation, a network packet capture tool developed based on the libpcap library captures network data packets of a specified URI.
[0042] In one possible implementation, the network packet capture tool only analyzes http traffic and filters out other protocols; it also supports specified URI filtering to avoid capturing all URIs of all Web APIs and reduce HTTP traffic; the captured network data packets are saved to files and analyzed with specialized tools afterwards to avoid performance impact on the production environment.
[0043] In one possible implementation, the operation and maintenance personnel or developers log in to the Web Server, use a network packet capture tool to capture packets, and save these original HTTP data packets. Afterwards, they use special tools to analyze them, and check the business data of the client business module, the business data of the server business module, and the interception filter of the HTTP Client library to record the HTTP conversation content of the specified URI, reconcile the business contents of these modules, and locate which module the defect occurred in.
[0044] In a possible implementation, the network data packet is in pcap format.
[0045] In a possible implementation, based on the libpcap library and with reference to the tcpdump source code, a network packet capture tool is developed using C language to obtain network data packets of a URI specified by the server-side Web Server.
[0046] In some possible implementations, for each HTTP request, the network packet capture tool checks the request line, analyzes the URI in the request, and saves the relevant network data packet to a file if it is the same as the specified Web API. In some possible implementations, the network packet is captured for the server-side Web Server, and there is an HTTP reverse proxy server in front, which directly analyzes the network data packet.
[0047] In a possible implementation, an HTTP interception filter is configured on the user device, the designated URI is recorded, a service data switch is added, and the client application is upgraded, so that the designated service data can be uploaded to a dedicated server.
[0048] S120, parsing the http session and network data packets to obtain corresponding business data.
[0049] In some possible implementations, a parser is developed using Python or Go to perform parsing.
[0050] In a possible implementation, the parser is a pcap file parser or a business data parser.
[0051] In some possible implementations, the http session is parsed to obtain the request body, status code, and message (body), which are then further parsed to obtain corresponding business data.
[0052] In some possible implementations, the network data packet is parsed to obtain the HTTP Session, and the HTTP Session is further parsed to obtain corresponding business data.
[0053] In a possible implementation, the network data packet is parsed to obtain the HTTP Session, which is then further parsed to obtain the request body, status code, and message (body), which are then further parsed to obtain the corresponding business data.
[0054] In a possible implementation, the business data includes commands, query parameters, and return values.
[0055] In a possible implementation, a parser is used to parse the http session and network data packets.
[0056] S130, comparing each service data to determine whether the service request sent by the client is consistent with the service request received by the server.
[0057] In one possible implementation, the business data of the URI specified by the client business module, the parsed business data of the URI specified by the client HTTP Client library, the parsed business data of the URI specified by the server Web Server, and the business data of the URI specified by the server business module collected within a preset time period are combined for comparison to determine whether the business request sent by the client is consistent with the business request received by the server.
[0058] In a possible implementation, the analysis tool is tcpdump or wireshark.
[0059] In a possible implementation, HTTPS is used in a production environment to ensure that it will not be tampered with by the communication link intermediate device. The communication data between the client device and the Nginx reverse proxy server is encrypted content. The Nginx reverse proxy server and the subsequent Web Server are located in a data center and communicate using HTTP.
[0060] In the present disclosure, it is only necessary to obtain the business data of the URI (Uniform Resource Identifier) specified by the client business module within a preset time period, the httpsession of the URI specified by the client HTTP Client library, the network data packet of the URI specified by the server Web Server, and the business data of the URI specified by the server business module, and parse the http session and the network data packet to obtain the corresponding business data. Finally, the business data are compared to determine whether the business request sent by the client is consistent with the business request received by the server. Web API defect troubleshooting can be implemented without changing the server business code, and the URI can be specified for analysis, which does not affect the operating performance, reduces storage pressure, saves time costs and reduces risks.
[0061] Figure 2 FIG. 4 shows a flow chart of a data acquisition process according to an embodiment of the present disclosure; Figure 2 As shown:
[0062] The client business module C sends a request through the HTTP Client library, which passes through the reverse proxy server and WebServer HTTP to the server business module S. After the server business module S completes the processing, it returns a response to the client business module C. In this process, the client business module C configured with an interception filter records the business data C1 of the specified URI; the HTTP Client library interception filter configured with a URI comparator records the http session C2 of the specified URI; the network packet capture tool is used to capture the network packet between the reverse server and the Web Server HTTP to generate a network data packet S1 in pcap format; the server business module S saves the business data S2.
[0063] In one possible implementation, the HTTP client library receives the response, parses the status code and the response body, and then passes this information to the client application.
[0064] In a possible implementation, the interception filter is an HTTP interception filter.
[0065] Figure 3 : shows a flow chart of a data parsing process according to an embodiment of the present disclosure; Figure 3 As shown:
[0066] Parse the Http session C2 into business data including API.json and response, and further parse it into business data C2 including API.data;
[0067] Parse the network data packet S1 in pcap format into business data S1 containing API.data;
[0068] In a possible implementation, the network data packet S1 in pcap format is parsed into an Http session, further parsed into business data including API.json and response, and further parsed into business data S1 including API.data;
[0069] In a possible implementation, the business data C1, business data C2, business data S1, and business data S2 are reconciled to locate the module where the defect occurs.
[0070] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.
[0071] The above is an introduction to the method embodiment. The following is a further explanation of the scheme disclosed in the present invention through an apparatus embodiment.
[0072] Figure 4 FIG. 4 is a block diagram of a Web API defect analysis device 400 based on network packet capture according to an embodiment of the present disclosure. Figure 4 As shown, the device 400 includes:
[0073] The data acquisition module 410 is used to acquire the business data of the URI specified by the client business module, the http session of the URI specified by the client HTTP Client library, the network data packet of the URI specified by the server Web Server, and the business data of the URI specified by the server business module within a preset time period, wherein the specified URI is a URI for identifying a specified Web API;
[0074] The parsing module 420 is used to parse the http session and network data packets to obtain corresponding business data;
[0075] The comparison module 430 is used to compare each service data to determine whether the service request sent by the client is consistent with the service request received by the server.
[0076] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the described module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0077] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0078] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0079] Figure 5 A schematic block diagram of an electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0080] The electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a ROM 502 or a computer program loaded from a storage unit 508 into a RAM 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An I / O interface 505 is also connected to the bus 504.
[0081] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0082] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as method 100. For example, in some embodiments, the method 100 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. When the computer program is loaded into RAM 503 and executed by the computing unit 501, one or more steps of the method 100 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 100 in any other appropriate manner (e.g., by means of firmware).
[0083] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0084] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0085] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0086] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0087] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0088] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0089] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0090] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A Web API defect analysis method based on network packet capture, characterized in that: The method comprises: Obtain the business data of the client business module's specified URI within a preset time period, the http session of the client HTTP Client library's specified URI, the network data packet of the server Web Server's specified URI, and the business data of the server business module's specified URI, wherein the specified URI is the URI that identifies the specified Web API; Parse the http session and network data packets to obtain corresponding business data; Compare the business data to determine whether the business request sent by the client is consistent with the business request received by the server.
2. The method according to claim 1, characterized in that The method of obtaining the service data of the URI specified by the client service module includes: The client application records the business data corresponding to the specified URI and saves it as a business data file; so that the upgraded client application can upload the business data file to the server.
3. The method according to claim 2, characterized in that The client application records the business data corresponding to the specified URI and saves it as a business data file, including: The client application calls the HTTP interception filter configured in the user device to record the business data corresponding to the specified URI and save it as a business data file.
4. The method according to claim 1, characterized in that: The method of obtaining the http session of the URI specified by the client HTTP Client library includes: Based on the URI comparator configured in the client HTTP Client library interception filter, the httpsession of the specified URI is obtained and saved as an http session file, and the http session file is uploaded to the server.
5. The method according to claim 1, characterized in that The method of obtaining the network data packet of the URI specified by the server-side Web Server includes: A network packet capture tool developed based on the libpcap library to capture network data packets of the specified URI.
6. The method according to claim 1, characterized in that The http session is parsed to obtain corresponding business data including: The http session is parsed to obtain the request body, status code and message, and then further parsed to obtain the corresponding business data.
7. The method according to claim 1, characterized in that The parsing of the network data packet to obtain corresponding business data includes: The network data packet is parsed to obtain HTTP Session, and the HTTP Session is further parsed to obtain corresponding business data.
8. A Web API defect analysis device based on network packet capture, characterized in that: include: A data acquisition module is used to acquire the business data of the URI specified by the client business module within a preset time period, the http session of the URI specified by the client HTTP Client library, the network data packet of the URI specified by the server Web Server, and the business data of the URI specified by the server business module, wherein the specified URI is a URI for identifying a specified Web API; A parsing module, used to parse the http session and network data packets to obtain corresponding business data; The comparison module is used to compare various business data to determine whether the business request sent by the client is consistent with the business request received by the server.
9. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.