CN113014455B - Method for monitoring network request frequency - Google Patents
Method for monitoring network request frequency Download PDFInfo
- Publication number
- CN113014455B CN113014455B CN202110277675.0A CN202110277675A CN113014455B CN 113014455 B CN113014455 B CN 113014455B CN 202110277675 A CN202110277675 A CN 202110277675A CN 113014455 B CN113014455 B CN 113014455B
- Authority
- CN
- China
- Prior art keywords
- network request
- list
- network
- domain name
- current
- 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
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- 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
- H04L63/0236—Filtering by address, protocol, port number or service, e.g. IP-address or URL
-
- 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/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- 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
Abstract
The invention discloses a method for monitoring network request frequency, which comprises the following steps: applications installed on the same mobile device all specify the use of a unified network request toolkit; the network request tool packet is provided with a network request frequent monitoring interceptor; the network request frequent monitoring interceptor is used for monitoring the network requests of the same domain name, and if the network requests of the same domain name exceed the preset upper limit Count within the preset time period T1, the network requests are considered to be frequent. The invention can detect before the network request of the application is sent out, and can intercept when the network request is detected to be frequent, thereby solving the hidden trouble in advance and effectively avoiding the heating phenomenon of the mobile equipment caused by the frequent network request.
Description
Technical Field
The invention relates to the technical field of network monitoring, in particular to a method for monitoring network request frequency.
Background
With the continuous development of science and technology, more and more interactive APPs are on line, and most APPs all have network requests, and when a plurality of APPs that open on a mobile device (especially wearable device), or a plurality of APPs backstage operation, if network requests are very frequent in a period of time appearing, often can lead to the machine to generate heat, fall unusual such as power fast. For example, in many current telephone watch malls, a new version of power-on trigger detection is performed, and if a line is plugged and unplugged for many times due to poor charging, a network is continuously requested to detect the new version, so that heating is more serious, even the watch is damaged, and therefore it is very important to detect that the network request is frequent in the initial stage.
Disclosure of Invention
In view of the shortcomings of the prior art, the present invention is directed to a method for monitoring frequent network requests.
In order to achieve the purpose, the invention adopts the following technical scheme:
a method for monitoring network request frequency comprises the following specific processes:
applications installed on the same mobile device all specify the use of a unified network request toolkit; the network request tool packet is provided with a network request frequent monitoring interceptor;
the network request frequent monitoring interceptor is used for monitoring the network requests of the same domain name, and if the network requests of the same domain name exceed the preset upper limit Count within the preset time period T1, the network requests are considered to be frequent; the method specifically comprises the following steps:
when a certain application carries out a network request, a network request frequent monitoring interceptor firstly acquires domain name information of the network request, and inquires whether the domain name information exists in the current HashMap, if not, the domain name information is taken as key, and the current access time is stored in a list as a value to be stored, wherein the list is set to be arranged in an ascending order of the access time; if the current HashMap has the domain name information, acquiring a list corresponding to the domain name information, judging the length of the list, and if the length is smaller than the Count, storing the current access time into the list; if the current length is equal to the Count, further judging that the current access time is compared with the access time stored in the first element of the list, if the time difference value of the current access time and the access time stored in the first element of the list is greater than T1, deleting the first element of the list, and adding the current access time to the tail of the list; if the time difference is less than or equal to T1, the network request is determined to be frequent, at this time, the network request frequent monitoring interceptor acquires the information of the network request, including the current access time, the domain name information, the current application name and the application packet name, and throws out the abnormality of a specific error code to store the acquired information in a network abnormality dedicated log, and the network request fails and terminates.
Further, in the above method, the network request toolkit is provided with a timing task, a preset second time threshold T2 is used as a period, T2 > T1, a current HashMap is obtained every period of time, and an entry in each list header, in which a difference between access time and current time is greater than T1, is deleted.
Further, in the method, an interface for adding a white list is provided in the network request kit, the user adds the white list and domain name information in the white list in a user-defined manner according to specific service requirements, and the network request frequent monitoring interceptor does not monitor and intercept the network request.
The invention has the beneficial effects that: the invention can detect before the network request of the application is sent out, and can intercept when the network request is detected to be frequent, thereby solving the hidden trouble in advance and effectively avoiding the heating phenomenon of the mobile equipment caused by the frequent network request.
Detailed Description
The present invention will be further described below, and it should be noted that the present embodiment is based on the technical solution, and a detailed implementation manner and a specific operation process are provided, but the protection scope of the present invention is not limited to the present embodiment.
The embodiment provides a method for monitoring network request frequency, which specifically comprises the following processes:
applications installed on the same mobile device all specify the use of a unified network request toolkit; the network request tool packet is provided with a network request frequent monitoring interceptor;
the network request frequent monitoring interceptor is used for monitoring the network requests of the same domain name, and if the network requests of the same domain name exceed the preset upper limit Count within the preset time period T1, the network requests are considered to be frequent; the method specifically comprises the following steps:
when a certain application carries out a network request, a network request frequent monitoring interceptor firstly acquires domain name information of the network request, and inquires whether the domain name information exists in the current HashMap, if not, the domain name information is taken as key, and the current access time is stored in a list as a value to be stored, wherein the list is set to be arranged in an ascending order of the access time; if the current HashMap has the domain name information, a list corresponding to the domain name information is obtained, the length of the list is judged, and if the length is smaller than the Count, the current access time is stored in the list. If the current length is equal to the Count, further judging that the current access time is compared with the access time stored in the first element of the list, if the time difference value of the current access time and the access time stored in the first element of the list is greater than T1, deleting the first element of the list, and adding the current access time to the tail of the list. If the time difference is less than or equal to T1, the network request is determined to be frequent, at this time, the network request frequent monitoring interceptor acquires the information of the network request, including the current access time, the domain name information, the current application name and the application packet name, and throws out the abnormality of a specific error code to store the acquired information in a network abnormality dedicated log, and the network request fails and terminates, and cannot be sent out.
Further, in this embodiment, the network request kit is provided with a timing task, a preset second time threshold T2 is used as a period (T2 > T1), a current HashMap is obtained every time of one period, and an entry in a header (in ascending order, so that header data is invalid) of each list, where a difference between access time and current time is greater than T1, is deleted. By the processing, the memory space of the mobile equipment can be saved, and the access efficiency is higher after invalid data is removed.
It should be noted that some frequent network requests belong to the normal service category, and an interface for adding a white list is provided in the network request kit, so that a user can add the white list (dynamic data) in a customized manner according to specific service requirements, domain name information in the white list, and an interceptor does not intercept the network requests.
Various corresponding changes and modifications can be made by those skilled in the art based on the above technical solutions and concepts, and all such changes and modifications should be included in the protection scope of the present invention.
Claims (3)
1. A method for monitoring network request frequency is characterized in that the specific process is as follows:
applications installed on the same mobile device all specify the use of a unified network request toolkit; the network request tool packet is provided with a network request frequent monitoring interceptor;
the network request frequent monitoring interceptor is used for monitoring the network requests of the same domain name, and if the network requests of the same domain name exceed the preset upper limit Count within the preset time period T1, the network requests are considered to be frequent; the method specifically comprises the following steps:
when a certain application carries out a network request, a network request frequent monitoring interceptor firstly acquires domain name information of the network request, and inquires whether the domain name information exists in the current HashMap, if not, the domain name information is taken as key, and the current access time is stored in a list as a value to be stored, wherein the list is set to be arranged in an ascending order of the access time; if the current HashMap has the domain name information, acquiring a list corresponding to the domain name information, judging the length of the list, and if the length is smaller than the Count, storing the current access time into the list; if the current length is equal to the Count, further judging that the current access time is compared with the access time stored in the first element of the list, if the time difference value of the current access time and the access time stored in the first element of the list is greater than T1, deleting the first element of the list, and adding the current access time to the tail of the list; if the time difference is less than or equal to T1, the network request is determined to be frequent, at this time, the network request frequent monitoring interceptor acquires the information of the network request, including the current access time, the domain name information, the current application name and the application packet name, and throws out the abnormality of a specific error code to store the acquired information in a network abnormality dedicated log, and the network request fails and terminates.
2. The method as claimed in claim 1, wherein the network request toolkit is provided with a timing task, a preset second time threshold T2 is used as a period, T2 > T1, the current HashMap is obtained every period of time, and the entry with the difference between the access time and the current time being greater than T1 in each list header is deleted.
3. The method of claim 1, wherein an interface for adding a white list is provided in the network request kit, a user adds the white list, domain name information in the white list in a customized manner according to specific service requirements through the interface, and the network request frequent monitoring interceptor does not monitor and intercept the network request frequent monitoring interceptor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110277675.0A CN113014455B (en) | 2021-03-15 | 2021-03-15 | Method for monitoring network request frequency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110277675.0A CN113014455B (en) | 2021-03-15 | 2021-03-15 | Method for monitoring network request frequency |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113014455A CN113014455A (en) | 2021-06-22 |
CN113014455B true CN113014455B (en) | 2022-05-10 |
Family
ID=76407511
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110277675.0A Active CN113014455B (en) | 2021-03-15 | 2021-03-15 | Method for monitoring network request frequency |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113014455B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113852663A (en) * | 2021-08-18 | 2021-12-28 | 北京达佳互联信息技术有限公司 | Network request processing method and device and network request processing system |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107508840A (en) * | 2017-09-29 | 2017-12-22 | 烽火通信科技股份有限公司 | A kind of method that monitoring DNS domain name based on DNS Proxy is attacked |
CN108206814A (en) * | 2016-12-20 | 2018-06-26 | 腾讯科技(深圳)有限公司 | A kind of method, apparatus and system for defending DNS attacks |
CN108737327A (en) * | 2017-04-14 | 2018-11-02 | 阿里巴巴集团控股有限公司 | Intercept method, apparatus, system, processor and the memory of malicious websites |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106453266A (en) * | 2016-09-20 | 2017-02-22 | 微梦创科网络科技(中国)有限公司 | Abnormal networking request detection method and apparatus |
US11297077B2 (en) * | 2018-10-31 | 2022-04-05 | Hewlett Packard Enterprise Development Lp | Gain customer trust with early engagement through visualization and data driven configuration |
RU2708508C1 (en) * | 2018-12-17 | 2019-12-09 | Общество с ограниченной ответственностью "Траст" | Method and a computing device for detecting suspicious users in messaging systems |
CN111818029B (en) * | 2020-06-28 | 2022-06-03 | 广西民族大学 | Domain name request processing method and device |
-
2021
- 2021-03-15 CN CN202110277675.0A patent/CN113014455B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108206814A (en) * | 2016-12-20 | 2018-06-26 | 腾讯科技(深圳)有限公司 | A kind of method, apparatus and system for defending DNS attacks |
CN108737327A (en) * | 2017-04-14 | 2018-11-02 | 阿里巴巴集团控股有限公司 | Intercept method, apparatus, system, processor and the memory of malicious websites |
CN107508840A (en) * | 2017-09-29 | 2017-12-22 | 烽火通信科技股份有限公司 | A kind of method that monitoring DNS domain name based on DNS Proxy is attacked |
Also Published As
Publication number | Publication date |
---|---|
CN113014455A (en) | 2021-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10095576B2 (en) | Anomaly recovery method for virtual machine in distributed environment | |
CN104268055A (en) | Program exception monitoring method and device | |
CN105207806A (en) | Monitoring method and apparatus of distributed service | |
CN103023984B (en) | Terminal application server and application log filtering method thereof | |
CN102754394B (en) | Method for hash table storage, method for hash table lookup, and devices thereof | |
CN102387040B (en) | Method and system for keeping high-speed stable running of front-end processor | |
CN108228322B (en) | Distributed link tracking and analyzing method, server and global scheduler | |
CN113014455B (en) | Method for monitoring network request frequency | |
CN112527879A (en) | Kafka-based real-time data extraction method and related equipment | |
CN111562889B (en) | Data processing method, device, system and storage medium | |
CN112711493A (en) | Scenario root cause analysis application | |
CN104780062A (en) | Method for quickly acquiring IP address of BMC management network interface | |
CN112181830B (en) | Memory leak detection method, device, terminal and medium | |
CN108964854B (en) | Processing method based on carrier aggregation and base station | |
CN108111328B (en) | Exception handling method and device | |
US11940890B2 (en) | Timing index anomaly detection method, device and apparatus | |
CN113849160B (en) | Dynamic migration method and device for compiling tasks, electronic equipment and storage medium | |
CN113392079B (en) | Distributed storage cluster log storage optimization method, system and terminal | |
CN104268231A (en) | File access method, device and intelligent file system | |
CN110087232A (en) | A kind of call processing method based on smart machine, device and server | |
CN115033927A (en) | Method, device, equipment and medium for detecting data integrity | |
CN115729727A (en) | Fault repairing method, device, equipment and medium | |
CN113094233A (en) | Service resource identification and processing method | |
CN108810299B (en) | Information analysis method, medium and equipment | |
CN111030297A (en) | Method and device for monitoring power failure of machine room commercial power |
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 |