Response content anomaly detection method, device, electronic device and storage medium

Using natural language processing technology to perform semantic analysis and consistency judgment on the response content solves the problem in the existing technology of being unable to identify that the response content has been tampered with, enabling active anomaly detection of the API response content and improving the level of API security protection.

CN117493487BActive Publication Date: 2024-08-27GUANGZHOU ELECTRIC POWER COMM NETWORK LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311502293.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2024-08-27
Estimated Expiration
2043-11-10

AI Technical Summary

Technical Problem

The analysis of response content in the existing technology mainly relies on string matching, which cannot effectively identify abnormal situations where the response content has been tampered with, resulting in the inability to effectively respond to network attacks.

Method used

Use natural language processing technology to perform word segmentation, part-of-speech tagging, and sentence analysis on the response content to obtain semantic information and determine the consistency with the request parameters. If they are inconsistent, the response packet is determined to be abnormal, provide abnormal feedback, and improve detection by optimizing the semantic analysis model. Accuracy.

Benefits of technology

It implements active semantic layer anomaly detection on API response content, effectively responds to variants and new semantic attacks, and improves the level of API security protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117493487B
    Figure CN117493487B
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for detecting abnormalities in response content. The method includes: obtaining a response data packet received by an interface to be verified, and extracting the response content in the response data packet; analyzing and processing the response content based on natural language processing technology to obtain semantic information corresponding to the response content; determining whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; and providing abnormal feedback if the response data packet is abnormal. The solution provided by the embodiment of the present invention can obtain the semantic information corresponding to the corresponding content, and then associate the semantic information with the request parameters to further determine whether the response content is abnormal, thereby realizing active semantic layer abnormality detection of API response content, effectively responding to variants and new semantic attacks, and comprehensively improving the technical effect of API security protection level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for detecting anomalies in response content. Background Art

[0002] With the popularity of Web API interfaces, various network attacks can use API interfaces to spread threats. Existing attack detection mainly relies on request parameter verification, but ignores response content detection. Based on this, it is possible to bypass protection by modifying the response content. The response content can be tampered with through man-in-the-middle attacks, server-side vulnerability exploits, cross-site scripting attacks, HTTP response splitting, forged server certificates, hijacked domain name resolution, cache poisoning, and HTTP response hijacking.

[0003] The existing analysis of response content is limited to string matching and cannot effectively identify abnormal situations where the response content has been tampered with. Summary of the invention

[0004] The present invention provides a method, device, electronic device and storage medium for detecting abnormality of response content, so as to achieve the technical effect of effectively and accurately detecting the response content.

[0005] In a first aspect, an embodiment of the present invention provides a method for detecting anomalies in response content, the method comprising:

[0006] Obtaining a response data packet received by the interface to be verified, and extracting the response content in the response data packet;

[0007] Analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content;

[0008] Determining whether the response data packet is abnormal according to the semantic information and a data request corresponding to the response data packet;

[0009] If the response data packet is abnormal, abnormal feedback is performed.

[0010] Furthermore, the analyzing and processing the response content based on natural language processing technology to obtain semantic information corresponding to the response content includes:

[0011] Based on the natural language processing technology, word segmentation, part-of-speech tagging and sentence analysis are performed on the corresponding content to obtain semantic information of the corresponding content.

[0012] Further, determining whether the response data packet is abnormal according to the semantic information and a data request corresponding to the response data packet includes:

[0013] Obtaining request parameters in the data request corresponding to the response data packet;

[0014] Whether the response data packet is abnormal is determined by judging the consistency between the request parameters and the semantic information.

[0015] Further, determining whether the response data packet is abnormal by judging the consistency between the request parameter and the semantic information includes:

[0016] Performing consistency judgment on the semantic information based on the business logic of the request parameters;

[0017] If they are consistent, it is determined that the response data packet is normal;

[0018] If they are inconsistent, it is determined that the response data packet is abnormal.

[0019] Furthermore, the abnormal feedback includes:

[0020] generating abnormal feedback information based on the response data packet;

[0021] The abnormal feedback information includes an abnormal feedback identifier.

[0022] Furthermore, the method further comprises:

[0023] Based on the triggering operation of the abnormal feedback information, the response data packet and the corresponding data request are used as optimization samples;

[0024] The semantic analysis model corresponding to the natural language processing technology is optimized based on the optimized sample, so as to analyze and process the response data packet received again based on the optimized semantic analysis model.

[0025] Furthermore, the optimizing the semantic analysis model corresponding to the natural language processing technology based on the optimized sample includes:

[0026] Inputting the response content in the response data packet into the semantic analysis model to obtain semantic description information corresponding to the response data packet;

[0027] Based on the semantic description information and the semantic information in the optimized sample, modifying the model parameters in the semantic analysis model;

[0028] The convergence of the loss function in the semantic analysis model is taken as a training goal to update the semantic analysis model.

[0029] In a second aspect, an embodiment of the present invention further provides a device for detecting abnormality of response content, the device comprising:

[0030] A content extraction module, used to obtain a response data packet received by the interface to be verified, and extract the response content in the response data packet;

[0031] A semantic information determination module, configured to analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content;

[0032] an anomaly detection module, used to determine whether the response data packet is abnormal based on the semantic information and a data request corresponding to the response data packet;

[0033] The abnormality feedback module is used to provide abnormality feedback if the response data packet is abnormal.

[0034] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0035] one or more processors;

[0036] a storage device for storing one or more programs,

[0037] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for detecting anomalies in response content as described in any one of the embodiments of the present invention.

[0038] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute the method for detecting anomalies in response content as described in any one of the embodiments of the present invention.

[0039] The technical solution provided by the embodiment of the present invention obtains the response data packet received by the interface to be verified, and extracts the response content in the response data packet; analyzes and processes the response content based on natural language processing technology to obtain semantic information corresponding to the response content; determines whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; if the response data packet is abnormal, abnormal feedback is performed, which solves the problem that the abnormal situation that the response content is tampered with cannot be effectively identified when the response content is analyzed and detected by string matching in the prior art, and realizes that the semantic information corresponding to the corresponding content can be obtained, and then the semantic information and request parameters are associated to further determine whether the response content is abnormal, thereby realizing active semantic layer anomaly detection of API response content, which can effectively deal with variants and new semantic attacks and comprehensively improve the technical effect of API security protection level. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A schematic diagram of a method for detecting abnormal response content provided by an embodiment of the present invention;

[0042] Figure 2 A schematic diagram of a method for detecting abnormal response content provided by an embodiment of the present invention;

[0043] Figure 3 A schematic diagram of the structure of a response content anomaly detection device provided by an embodiment of the present invention;

[0044] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0046] Figure 1 A flow chart of a method for detecting anomalies in response content provided in an embodiment of the present invention is provided. This embodiment is applicable to a scenario in which anomalies in response content are detected when a request is sent based on http. The method can be implemented by a response content anomaly detection device, which can be executed by software and / or hardware. The software can be a terminal device. Optionally, the terminal device can be a mobile terminal or a PC, etc.

[0047] like Figure 1 As shown, the method includes:

[0048] S110, obtaining a response data packet received by the interface to be verified, and extracting response content in the response data packet.

[0049] In this embodiment, the http protocol is an application layer protocol. Its messages are divided into request messages and response messages. When a client requests a web page, the content of the request will be encapsulated in the http request message through the http protocol. After receiving the request message, the server can parse the message according to the protocol specification and then return the response message to the client. The http response message mainly consists of three parts, namely the response line, the response header and the response body. The response line includes the protocol version, the status code and the description. The response header is used to describe the basic information of the server and the description of the data. The server can notify the client how to handle the data that will be sent later through the description of these data. The response body is the message body of the response. If it is pure data, the response body is the pure data returned. If the request is an HTML page, the returned response body is the HTML code. If it is JS, the response body is the JS code. The specific content of the response body is not limited in this embodiment.

[0050] The interface to be verified may be an interface for feeding back a response message after processing a protocol request. The response data packet may be understood as a data packet consisting of data content fed back after processing a protocol request. The response data packet may be understood as the above-mentioned http response message. The response content may be the above-mentioned response body.

[0051] Specifically, after receiving the http request, the server can analyze and process the http request to determine the feedback content corresponding to the http request. The feedback content can be encapsulated according to the requirements of http to obtain a response data packet. The content of the response data packet is extracted according to the corresponding parsing method to obtain a response body in the response data packet, and the response body is used as the response content.

[0052] S120: Analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content.

[0053] The natural language processing technology may be NLP technology. Based on this technology, the response content analysis process may be performed to obtain semantic information corresponding to the corresponding content. The semantic information may be understood as descriptive information of the corresponding content. The descriptive information may be textual description information.

[0054] Specifically, natural language processing technology can be used to perform semantic analysis on the response content to obtain semantic information corresponding to the corresponding content.

[0055] In this embodiment, the response content is analyzed and processed based on natural language processing technology to obtain semantic information corresponding to the response content, including: word segmentation, part-of-speech tagging and sentence analysis of the response content based on natural language processing technology to obtain semantic information of the response content.

[0056] Among them, natural language processing technology can perform word segmentation, part-of-speech tagging, syntactic analysis, etc. on the response content, extract keywords and semantic information, understand the meaning of the response content, and obtain semantic information.

[0057] S130: Determine whether the response data packet is abnormal according to the semantic information and the data request corresponding to the response data packet.

[0058] Among them, the user can trigger the client to initiate a corresponding request, which can be used as a data request.

[0059] Specifically, after obtaining the semantic information, the data request corresponding to the response data packet can be obtained. By associating the semantic information with the data request, it is determined whether the response data packet has been tampered with. In other words, it is determined whether the response data packet has an abnormality.

[0060] In this embodiment, determining whether the response data packet is abnormal is performed based on semantic information and a data request corresponding to the response data packet, including: obtaining request parameters in the data request corresponding to the response data packet; and determining whether the response data packet is abnormal by judging the consistency between the request parameters and the semantic information.

[0061] The encapsulated data request may be subjected to parameter extraction to obtain request parameters.

[0062] Specifically, the encapsulated data request can be parsed in a corresponding manner to extract the request parameters in the data request. Next, the request parameters and semantic information can be judged for consistency, that is, whether the response content matches the request parameters based on the semantic information. Based on the judgment result, it can be determined whether the response data packet is abnormal.

[0063] On the basis of the above technical solution, whether the response data packet is abnormal is determined by judging the consistency of the request parameters and the semantic information, including: judging the consistency of the semantic information based on the business logic of the request parameters; if they are consistent, the response data packet is determined to be normal; if they are inconsistent, the response data packet is determined to be abnormal.

[0064] Specifically, the business logic of the request parameters can be analyzed and processed to obtain the logic analysis results corresponding to the business logic. The consistency is judged by the logic analysis results and the semantic information. If they are consistent, it means that the response data has not been tampered with, indicating that the response data packet is normal. On the contrary, if they are inconsistent, it means that the response data packet may have been tampered with, or the feedback response data packet does not match the data request, which can indicate that the response data packet is abnormal.

[0065] S140: If the response data packet is abnormal, abnormal feedback is performed.

[0066] It can be understood that if the response data packet is abnormal, an abnormal feedback can be given to the client to remind the user corresponding to the client to determine that the response data packet is abnormal.

[0067] In this embodiment, after determining that the response data packet is abnormal, abnormal feedback may be performed. In this embodiment, the abnormal feedback includes: generating abnormal feedback information based on the response data packet; wherein the abnormal feedback information includes an abnormal feedback identifier.

[0068] Specifically, the abnormal feedback information may be generated according to the response data packet, and the abnormal feedback information may be sent to the client for display. At this time, the abnormal feedback information includes an abnormal feedback identifier.

[0069] In this embodiment, the method also includes: based on the trigger operation of the abnormal feedback information, taking the response data packet and the corresponding data request as optimization samples; optimizing the semantic analysis model corresponding to the natural language processing technology based on the optimization sample, so as to analyze and process the response data packet received again based on the optimized semantic analysis model.

[0070] It can be understood that after the abnormal feedback information is sent to the client, the user can trigger the corresponding abnormal feedback. Based on the user's triggering operation on the abnormal feedback, it can be determined whether to use the response data packet as an optimization sample. If so, the response data packet and the data request can be used as a set of optimization samples. The semantic analysis model corresponding to the natural language processing technology can be further trained based on the optimized sample to optimize the model parameters in the semantic analysis model. The advantage of this is that the large response data packet received again can be analyzed based on the optimized semantic analysis model to improve the accuracy of the processing.

[0071] In this embodiment, the semantic analysis model corresponding to the natural language processing technology is optimized based on the optimization sample, including: inputting the response content in the response data packet into the semantic analysis model to obtain semantic description information corresponding to the response data packet; based on the semantic description information and the semantic information in the optimization sample, the model parameters in the semantic analysis model are corrected; and the convergence of the loss function in the semantic analysis model is used as a training goal to update the semantic analysis model.

[0072] It can be understood that the response content in the response data packet can be input into the semantic analysis model, and the semantic description information corresponding to the response data packet can be obtained. According to the semantic description information and the semantic information in the optimized sample, the loss value is determined. Based on the loss value, the model parameters in the semantic analysis model can be corrected, achieving the effect of optimizing the semantic analysis model.

[0073] Furthermore, if the accuracy of the semantic analysis model is low, as many training samples as possible can be obtained to optimize the semantic analysis model based on the training samples. In this case, the convergence of the loss function can be used as a training goal to obtain the semantic analysis model.

[0074] The technical solution provided by the embodiment of the present invention obtains the response data packet received by the interface to be verified, and extracts the response content in the response data packet; analyzes and processes the response content based on natural language processing technology to obtain semantic information corresponding to the response content; determines whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; if the response data packet is abnormal, abnormal feedback is performed, which solves the problem that the abnormal situation that the response content is tampered with cannot be effectively identified when the response content is analyzed and detected by string matching in the prior art, and realizes that the semantic information corresponding to the corresponding content can be obtained, and then the semantic information and request parameters are associated to further determine whether the response content is abnormal, thereby realizing active semantic layer anomaly detection of API response content, which can effectively deal with variants and new semantic attacks and comprehensively improve the technical effect of API security protection level.

[0075] As an alternative embodiment of the above embodiment, Figure 2 A schematic diagram of a response content detection method provided by an embodiment of the present invention, wherein technical terms that are the same as or corresponding to the above embodiments are not repeated here.

[0076] Next, you can combine Figure 2 To understand the technical solution provided by the embodiment of the present invention:

[0077] The solution provided by the embodiment of the present invention can be applied to various core services that have certain requirements on the integrity and consistency of API response data packets. For example, the core service can be an API involving capital flow, such as the e-commerce transaction stage, bank account processing, and securities trading core interface. By detecting the semantic integrity of the corresponding content, it can effectively prevent service anomalies or asset losses caused by tampering with key data.

[0078] The specific process can be shown as follows:

[0079] Get the raw response content after the API request.

[0080] After the API request is returned, the response content data is extracted from the returned response data packet and stored as a sample to be analyzed. In other words, the response data content can be used as an optimized sample.

[0081] Next, deep semantic analysis can be performed to extract response keywords and meanings.

[0082] Specifically, natural language processing technology is used to perform word segmentation, part-of-speech tagging, syntactic analysis, etc. on the response content to extract keywords and semantic information and understand the meaning of the response content, that is, the semantic information corresponding to the response data content can be determined.

[0083] After determining the semantic information, the extracted semantic information can be associated with the request to determine consistency.

[0084] The semantic information in the response content is associated and compared with the semantic parameters of the request to determine whether the response semantics are consistent with the request.

[0085] If they are inconsistent, it is considered as an abnormal response.

[0086] If the semantic information of the response is inconsistent with the request parameters in terms of business logic, it can be determined that the response is abnormal and may have been tampered with.

[0087] Feedback adjusts the semantic analysis model to optimize the effect.

[0088] Collect samples with incorrect judgments and feed them back to the semantic analysis model, continuously optimize the model through manual annotation and other methods to improve the accuracy of semantic extraction and association judgment.

[0089] This approach can effectively prevent threats that exploit response content attacks, improve semantic content analysis capabilities, reduce reliance on string matching, support incremental optimization and learning, improve detection rates, protect service reliability, and enhance user experience.

[0090] The technical solution provided by the embodiment of the present invention obtains the response data packet received by the interface to be verified, and extracts the response content in the response data packet; analyzes and processes the response content based on natural language processing technology to obtain semantic information corresponding to the response content; determines whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; if the response data packet is abnormal, abnormal feedback is performed, which solves the problem that the abnormal situation that the response content is tampered with cannot be effectively identified when the response content is analyzed and detected by string matching in the prior art, and realizes that the semantic information corresponding to the corresponding content can be obtained, and then the semantic information and request parameters are associated to further determine whether the response content is abnormal, thereby realizing active semantic layer anomaly detection of API response content, which can effectively deal with variants and new semantic attacks and comprehensively improve the technical effect of API security protection level.

[0091] Figure 3The present invention provides a structural diagram of a response content anomaly detection device, which includes: a content extraction module 310, a semantic information determination module 320, an anomaly detection module 330 and an anomaly feedback module 340.

[0092] The content extraction module 310 is used to obtain the response data packet received by the interface to be verified and extract the response content in the response data packet; the semantic information determination module 320 is used to analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content; the anomaly detection module 330 is used to determine whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; the anomaly feedback module 340 is used to provide anomaly feedback if the response data packet is abnormal.

[0093] On the basis of the above technical solution, the semantic information determination module is also used to perform word segmentation, part-of-speech tagging and sentence analysis on the corresponding content based on the natural language processing technology to obtain the semantic information of the response content.

[0094] On the basis of the above technical solutions, the anomaly detection module includes:

[0095] A parameter acquisition unit, used to acquire a request parameter in a data request corresponding to the response data packet;

[0096] The anomaly detection unit is used to determine whether the response data packet is abnormal by judging the consistency between the request parameters and the semantic information.

[0097] On the basis of the above technical solutions, the anomaly detection unit includes: a consistency judgment subunit, which is used to make consistency judgment on the semantic information based on the business logic of the request parameter;

[0098] A normal determination subunit, used for determining that the response data packet is normal if the two data packets are consistent;

[0099] The abnormality judgment subunit is used to determine that the response data packet is abnormal if there is inconsistency.

[0100] Based on the above technical solutions, abnormal feedback is performed, including:

[0101] generating abnormal feedback information based on the response data packet;

[0102] The abnormal feedback information includes an abnormal feedback identifier.

[0103] On the basis of the above technical solutions, the device further includes: a sample updating module, which is used to use the response data packet and the corresponding data request as an optimized sample based on the triggering operation of the abnormal feedback information;

[0104] A model optimization module is used to optimize the semantic analysis model corresponding to the natural language processing technology based on the optimization sample, so as to analyze and process the response data packet received again based on the optimized semantic analysis model.

[0105] On the basis of the above technical solutions, the model optimization module includes: a semantic description information determination unit, which is used to input the response content in the response data packet into the semantic analysis model to obtain semantic description information corresponding to the response data packet;

[0106] A model correction unit, used for correcting model parameters in the semantic analysis model based on the semantic description information and the semantic information in the optimized sample;

[0107] The model update element is used to update the semantic analysis model by taking the convergence of the loss function in the semantic analysis model as a training target.

[0108] The technical solution provided by the embodiment of the present invention obtains the response data packet received by the interface to be verified, and extracts the response content in the response data packet; analyzes and processes the response content based on natural language processing technology to obtain semantic information corresponding to the response content; determines whether the response data packet is abnormal based on the semantic information and the data request corresponding to the response data packet; if the response data packet is abnormal, abnormal feedback is performed, which solves the problem that the abnormal situation that the response content is tampered with cannot be effectively identified when the response content is analyzed and detected by string matching in the prior art, and realizes that the semantic information corresponding to the corresponding content can be obtained, and then the semantic information and request parameters are associated to further determine whether the response content is abnormal, thereby realizing active semantic layer anomaly detection of API response content, which can effectively deal with variants and new semantic attacks and comprehensively improve the technical effect of API security protection level.

[0109] The device for detecting anomalies in response content provided in the embodiment of the present invention can execute the method for detecting anomalies in response content provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiment of the present invention.

[0110] Figure 4A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 A block diagram of an exemplary apparatus 40 suitable for use in implementing exemplary embodiments of the present invention is shown. Figure 4 The device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0111] like Figure 4 As shown, the device 40 is in the form of a general-purpose computing device. The components of the device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).

[0112] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0113] Device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by device 40, including volatile and non-volatile media, removable and non-removable media.

[0114] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0115] A program / utility 408 having a set (at least one) of program modules 407 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.

[0116] The device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the device 40, and / or may communicate with any device that enables the device 40 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with the other modules of the device 40 via the bus 403. It should be understood that although Figure 4 Not shown, other hardware and / or software modules may be used in conjunction with device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0117] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the abnormality detection method of the response content provided in the embodiment of the present invention.

[0118] An embodiment of the present invention further provides a storage medium including computer executable instructions, wherein the computer executable instructions are used to execute a method for detecting anomalies in response content when executed by a computer processor, the method comprising:

[0119] Obtaining a response data packet received by the interface to be verified, and extracting the response content in the response data packet;

[0120] Analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content;

[0121] Determining whether the response data packet is abnormal according to the semantic information and a data request corresponding to the response data packet;

[0122] If the response data packet is abnormal, abnormal feedback is performed.

[0123] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, 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 above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0124] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0125] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0126] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0127] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for detecting abnormality of response content, characterized in that: include: Obtaining a response data packet received by the interface to be verified, and extracting the response content in the response data packet; Analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content; Determining whether the response data packet is abnormal according to the semantic information and a data request corresponding to the response data packet; If the response data packet is abnormal, abnormal feedback is performed; Wherein, determining whether the response data packet is abnormal according to the semantic information and the data request corresponding to the response data packet includes: Obtaining request parameters in the data request corresponding to the response data packet; By judging the consistency between the request parameters and the semantic information, it is determined whether the response data packet is abnormal, so as to remind the user corresponding to the client to determine that the response data packet is abnormal.

2. The method according to claim 1, characterized in that The analyzing and processing the response content based on the natural language processing technology to obtain semantic information corresponding to the response content includes: Based on the natural language processing technology, the response content is segmented, part-of-speech tagged, and sentence analyzed to obtain semantic information of the response content.

3. The method according to claim 1, characterized in that: The determining whether the response data packet is abnormal by judging the consistency between the request parameter and the semantic information includes: Performing consistency judgment on the semantic information based on the business logic of the request parameters; If they are consistent, it is determined that the response data packet is normal; If they are inconsistent, it is determined that the response data packet is abnormal.

4. The method according to claim 1, characterized in that: The abnormal feedback comprises: generating abnormal feedback information based on the response data packet; The abnormal feedback information includes an abnormal feedback identifier.

5. The method according to claim 4, characterized in that Also includes: Based on the triggering operation of the abnormal feedback information, the response data packet and the corresponding data request are used as optimization samples; The semantic analysis model corresponding to the natural language processing technology is optimized based on the optimized sample, so as to analyze and process the response data packet received again based on the optimized semantic analysis model.

6. The method according to claim 5, characterized in that The optimizing the semantic analysis model corresponding to the natural language processing technology based on the optimized sample includes: Inputting the response content in the response data packet into the semantic analysis model to obtain semantic description information corresponding to the response data packet; Based on the semantic description information and the semantic information in the optimized sample, modifying the model parameters in the semantic analysis model; The convergence of the loss function in the semantic analysis model is taken as a training goal to update the semantic analysis model.

7. A response content anomaly detection device, characterized in that: include: A content extraction module, used to obtain a response data packet received by the interface to be verified, and extract the response content in the response data packet; A semantic information determination module, configured to analyze and process the response content based on natural language processing technology to obtain semantic information corresponding to the response content; an anomaly detection module, used to determine whether the response data packet is abnormal based on the semantic information and a data request corresponding to the response data packet; An abnormality feedback module, used for providing abnormality feedback if the response data packet is abnormal; Wherein, the anomaly detection module includes a parameter acquisition unit and an anomaly detection unit; The parameter acquisition unit is used to acquire the request parameters in the data request corresponding to the response data packet; The anomaly detection unit is used to determine whether the response data packet is abnormal by judging the consistency between the request parameters and the semantic information, so as to remind the user corresponding to the client to determine whether the response data packet is abnormal.

8. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to at least one processor; wherein, The memory stores a computer program executable by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the method for detecting abnormalities in response content as described in any one of claims 1-6.