CN109996201B - Network access method and network equipment - Google Patents

Network access method and network equipment Download PDF

Info

Publication number
CN109996201B
CN109996201B CN201810000824.7A CN201810000824A CN109996201B CN 109996201 B CN109996201 B CN 109996201B CN 201810000824 A CN201810000824 A CN 201810000824A CN 109996201 B CN109996201 B CN 109996201B
Authority
CN
China
Prior art keywords
address
service request
request
service
cache server
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
Application number
CN201810000824.7A
Other languages
Chinese (zh)
Other versions
CN109996201A (en
Inventor
房雅丁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201810000824.7A priority Critical patent/CN109996201B/en
Publication of CN109996201A publication Critical patent/CN109996201A/en
Application granted granted Critical
Publication of CN109996201B publication Critical patent/CN109996201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • G06F16/9566URL specific, e.g. using aliases, detecting broken or misspelled links
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M15/00Arrangements for metering, time-control or time indication ; Metering, charging or billing arrangements for voice wireline or wireless communications, e.g. VoIP
    • H04M15/47Fraud detection or prevention means
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/24Accounting or billing

Abstract

The invention provides a network access method and network equipment, wherein the method comprises the following steps: detecting whether an IP address exists in a header field of a service request sent by a user terminal; if the request exists, the IP address is extracted, and when the preset condition is met, the service request is determined to be a redirection request; according to the IP address, the redirection request is recovered to an initial service request; and determining whether the target service requested by the initial service request is a charging service or not according to a preset charging matching rule. The network equipment detects whether the IP address exists in the head field of the service request of the user terminal, and if so, identifies the redirection request according to the IP address. The network equipment can also restore the redirection request to the initial service request, and then determine whether the target service is the charging service according to the initial service request so as to solve the charging matching problem of the redirection service request, ensure the correct matching of the redirection service request, and can continue the current charging matching rule to avoid the flow fraud behavior.

Description

Network access method and network equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a network access method and a network device.
Background
Service charging is one of core functions of a gateway of a core network of an operator, wherein a gateway entity with the charging function comprises: a Packet Data Network Gateway (PGW) entity and a General Packet Radio Service (GPRS) Gateway Support Node (GGSN) entity. The service charging is initially applied to the core reduction of the own service flow of an operator, namely the own service exempts flow, so as to promote the own service attraction and competitiveness. In recent years, operators provide a plurality of special services such as directional flow package (such as seeing at anyi) and traffic backward payment (such as a content provider buying a bill for user flow), and the like to improve the flow value, wherein the services need to identify the service class of users and perform differentiated charging, and the content charging function of the core network gateway of the operator is adopted.
The service charging function is realized based on Deep Packet Inspection (DPI) capability of a gateway. Specifically, the DPI technology may extract a Uniform Resource Locator (URL) field in a hypertext Transfer Protocol (HTTP) header in a seven-layer Protocol of a service data packet, and match the URL field with a predefined service URL rule, thereby implementing the identification of the service type. Take the traffic backward statistical payment service as an example: assuming that the business promotion is carried out in the Xinlang sports, a user can access the Xinlang sports page without flow, and the URL rule of the business is as follows: the core network gateway analyzes a URL field in an HTTP header of a user data packet, when the URL of the user can be matched with the URL field, the core network gateway identifies the Service data stream as traffic of the Xinlang sports and then pays the Business to the Xinlang sports, a specific Service identifier (Service ID) is identified in a ticket (the core network gateway is responsible for generating the traffic ticket) of the data stream, and a Business Operation Support System (Business & Operation Support System, BOSS) System receives the ticket and then carries out free charge on the user traffic according to the Service ID and generates the traffic to the Xinlang.
To avoid illegitimate website construction URLs from spoofing free/third party paid traffic, for example: if the URL rule of the backward payment charging is as follows: "ports. sina. com. cn", when the URL of the access service is: "http:// www.fakesite.com/fakedir/sports.sina.com.cn/fakecontent" can also match the above-mentioned backward statistical charging rules. In order to avoid the situation, the charging rule matching mode is as follows: the HOST part in the URL may not be replaced with wildcard "+" and the wildcard "+" in HOST may not be wildcard "/" to avoid the situation that the content in the path of the service request URL matches the keyword in the URL HOST in the content charging rules.
Further, in order to improve the access speed of the user to access the network content, the core network stores the network content which the user needs to frequently access in a network node which is closer to the user and has a higher access speed, wherein a cache (cache) server is a server storing the frequently-accessed content. A Content Delivery Network (CDN) depends on edge servers deployed in various regions, and through functional modules of load balancing, Content Delivery, scheduling and the like of a central platform, a user can obtain required Content nearby, Network congestion is reduced, and the access response speed and hit rate of the user are improved. The basic principle of the CDN is to widely adopt various cache servers, distribute the cache servers to a region or a network where user access is relatively concentrated, and when a user accesses a website, point the user access to a cache server that is closest to and works normally by using a global load technology, and have the cache server to directly respond to a user request.
The cache or CDN of the video traffic usually redirects an access request of a user to a nearby cache server or CDN node in a redirection manner, which specifically includes: and intercepting the user access request, and replying 302 a jump message to the user, wherein the message comprises the modified redirection URL. The modification mode of the redirection URL is to keep the original URL and add the IP address of a cache server or a CDN node at the beginning of the URL. Assume the original URL for the request is: "http:// apk.r1. mark.hiapk.com/data/upload/apkres/2017/6 _28/12/com. hnzx. hnrb _122813. apk", then the modified redirect URL is: 'http:// 112.17.27.140/apk.r1. mark.hiapk.com/data/upload/apkres/2017/6 _28/12/com.hnzx.hnrb _122813. apkwspihost ═ local', adding '112.17.27.140/' before the original URL, the IP address is the IP address of the cache server or CDN node, after the cache server or CDN node receives the redirection request, returning the cache content required by the user according to the URL after the IP address.
When the charging URL rule is "apk.r 1. mark.hip.com/. apk", the original URL can be correctly matched, but the URL modified by redirection by the cache server or CDN node is "http:// 112.17.27.140/apk.r1. mark.hip.com/data/upload/appkres/2017/6 _28/12/com.hnzx.hnrb _122813. appkwpshot ═ local", and cannot be correctly matched. If the charging URL rule is modified to be "r 1". mark.hiapk.com/. apk "", the redirected URL can be correctly matched, but the traffic fraud can not be avoided, and the charging matching rule that the HOST part in the URL can not be replaced by "" is not met. Therefore, a new charging matching method is needed to ensure the correct matching of the redirect URL and avoid the traffic fraud.
Disclosure of Invention
The invention provides a network access method and network equipment, which solve the problem of matching of redirection URL identification and charging in the prior art.
An embodiment of the present invention provides a network access method, including:
detecting whether an IP address exists in a header field of a service request sent by a user terminal;
if the IP address meets the preset condition, the service request is determined to be a redirection request;
according to the IP address, the redirection request is recovered to an initial service request;
and determining whether the target service requested by the initial service request is a charging service or not according to a preset charging matching rule.
The step of detecting whether an IP address exists in a header field of a service request sent by a user terminal comprises the following steps:
receiving a service request for requesting a target service, which is sent by a user terminal;
it is detected whether an indication character indicating an IP address exists in a header field of the service request.
After the step of detecting whether an IP address exists in a header field of a service request sent by a user terminal, the method further includes:
and if not, forwarding the service request.
When the IP address meets the preset condition, the step of determining the service request as a redirection request comprises the following steps:
detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
if yes, determining the service request as a redirection request; otherwise, the service request is forwarded.
Before the step of detecting whether the IP address exists in the preset IP address list, the method further includes:
acquiring IP addresses of each cache server and/or CDN node;
and generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
Wherein, according to the IP address, the step of recovering the redirection request to the initial service request comprises:
determining parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to a preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
detecting whether the redirection request carries a parameter field indicating parameter information of a target cache server and/or a target CDN node;
if the parameter field is carried, removing the head field and the parameter field of the redirection request to obtain the initial service request.
Before the step of determining the parameter information of the target cache server and/or the target CDN node corresponding to the redirection request according to the preset corresponding relationship between the IP address of the cache server and/or the CDN node and the parameter information, the method further includes:
acquiring IP addresses and parameter information of each cache server and/or CDN node;
and generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
The step of determining whether the target service requested by the initial service request is a charging service according to a preset charging matching rule includes:
detecting whether a charging mark field defined by a preset charging matching rule exists in the initial service request;
if yes, determining whether the target service requested by the initial service request is a charging service, otherwise determining whether the target service requested by the initial service request is a free service.
An embodiment of the present invention further provides a network device, including:
the first detection module is used for detecting whether an IP address exists in a head field of a service request sent by a user terminal;
the first processing module is used for extracting the IP address if the IP address exists, and determining the service request as a redirection request when the IP address meets a preset condition;
the recovery module is used for recovering the redirection request into an initial service request according to the IP address;
and the charging module is used for determining whether the target service requested by the initial service request is a charging service according to a preset charging matching rule.
Wherein, first detection module includes:
the first receiving submodule is used for receiving a service request which is sent by a user terminal and requests a target service;
and the first detection submodule is used for detecting whether the header field of the service request has an indication character indicating the IP address.
Wherein, the network equipment still includes:
and the first forwarding module is used for forwarding the service request if the service request does not exist.
Wherein, the first processing module includes:
the second detection submodule is used for detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
the first processing submodule is used for determining that the service request is a redirection request if the service request is the redirection request; otherwise, the service request is forwarded.
Wherein, the first processing module further comprises:
the first obtaining submodule is used for obtaining the IP address of each cache server and/or CDN node;
and the first generation submodule is used for generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
Wherein, the recovery module includes:
the second processing submodule is used for determining the parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to the preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
a third detection submodule, configured to detect whether the redirection request carries a parameter field indicating parameter information of the target cache server and/or the target CDN node;
and the recovery submodule is used for removing the head field and the parameter field of the redirection request if the parameter field is carried by the recovery submodule to obtain the initial service request.
Wherein, the recovery module further comprises:
the second obtaining submodule is used for obtaining the IP address and the parameter information of each cache server and/or CDN node;
and the second generation submodule is used for generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
Wherein, the charging module includes:
the fourth detection submodule is used for detecting whether a charging mark field defined by the preset charging matching rule exists in the initial service request;
and the charging submodule is used for determining whether the target service requested by the initial service request is a charging service if the target service requested by the initial service request exists, and otherwise determining whether the target service requested by the initial service request is a free service.
An embodiment of the present invention further provides a network device, including: a processor; a memory coupled to the processor, and a transceiver coupled to the processor; the processor is used for calling and executing the program and the data stored in the memory to realize the steps of the network access method.
The technical scheme of the invention has the beneficial effects that: after receiving the service request, the network device detects whether an IP address exists in a head field of the service request of the user terminal, and determines whether the service request is a redirection request according to the IP address when the IP address exists in the head field of the service request so as to realize the identification of the redirection request. In addition, the network equipment can also restore the redirection request to the initial service request, and then determine whether the requested target service is the charging service according to the initial service request, thereby solving the charging matching problem of the redirection service request, ensuring the correct matching of the redirection service request, and also being capable of continuing the current charging matching rule, and avoiding the flow fraud behavior.
Drawings
FIG. 1 is a flow chart illustrating a network access method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a network device according to an embodiment of the invention;
fig. 3 shows a block diagram of a network device according to an embodiment of the invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments. In the following description, specific details such as specific configurations and components are provided only to help the full understanding of the embodiments of the present invention. Thus, it will be apparent to those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In addition, the terms "system" and "network" are often used interchangeably herein.
In the embodiments provided herein, it should be understood that "B corresponding to a" means that B is associated with a from which B can be determined. It should also be understood that determining B from a does not mean determining B from a alone, but may be determined from a and/or other information.
As shown in fig. 1, an embodiment of the present invention provides a network access method, which specifically includes the following steps:
step 11: whether an IP address exists in a header field of a service request sent by a user terminal is detected.
When receiving a service request sent by a user terminal, the network device detects whether an IP address exists in a header field of the service request. The network device particularly refers to a GGSN entity or a P-GW entity having a charging function. The service request is analyzed by the GGSN entity or the P-GW entity to obtain a Uniform Resource Locator (URL), when a service request occurs at the user terminal, particularly when an HTTP request occurs, the GGSN entity or the P-GW entity obtains the URL of a target access address of the HTTP request by analyzing seven layers of URLs, and can judge which service the HTTP request belongs to according to the target access address and classify the HTTP request into corresponding charging service or free service. In the embodiment of the present invention, the GGSN entity or the P-GW entity, in addition to the above parsing capability, further has a function of detecting whether an IP address in a character-type IP address format exists in the HOST field (header field) of the URL.
Step 12: and if the service request exists, extracting the IP address, and determining the service request as a redirection request when the IP address meets a preset condition.
If the target service is the charging service, the service request is forwarded. The redirection request identification process comprises the following steps: and the GGSN entity or the P-GW entity extracts the IP address in the HOST field in the URL and determines the service request as a redirection request when the IP address meets a preset condition.
Step 13: and recovering the redirection request into an initial service request according to the IP address.
Here, the network device has a function of restoring the redirected request to the original service request in addition to the function of identifying the redirected request. Specifically, the GGSN entity or the P-GW entity extracts an IP address from the redirection request, and restores the redirection request to the initial service request.
Step 14: and determining whether the target service requested by the initial service request is a charging service or not according to a preset charging matching rule.
The preset charging matching rule is a matching rule with traffic fraud prevention, for example, the HOST field in the URL mentioned in the background art may not be replaced by a wildcard "×", and the wildcard "×" in the HOST may not be wildcard "/", so as to avoid the situation that the content in the path of the service request URL matches with the keyword in the URL HOST in the content charging rule. And matching the initial service request of the redirection request according to a preset charging matching rule, and determining whether the service requested by the redirection request is a charging service.
Specifically, step 11 specifically includes: receiving a service request for requesting a target service, which is sent by a user terminal; it is detected whether an indication character indicating an IP address exists in a header field of the service request. When a service request occurs at a user terminal, particularly when an HTTP request occurs, a GGSN entity or a P-GW entity receives a TTTP request sent by the user terminal, and obtains a URL (uniform resource locator) of a target access address of the HTTP request by analyzing seven layers of URLs, and the GGSN entity or the P-GW entity further detects whether an IP address in a character type IP address format exists in a HOST field (head field) of the URL. If the charging request exists, the redirection request identification function is triggered, and if the charging request does not exist, the common charging matching function is triggered.
Specifically, step 12 includes: detecting whether the IP address exists in a preset IP address list or not; if yes, determining the service request as a redirection request; otherwise, the service request is forwarded. The preset IP address list comprises IP addresses of all cache servers and/or CDN nodes. That is to say, when detecting that an IP address in a character-type IP address format exists in the HOST field of the URL, the GGSN entity or the P-GW entity extracts the character-type IP address in the HOST of the URL, compares the extracted character-type IP address with a preset IP address list of the CACHE server and/or the CDN node after processing, and triggers a general charging matching function if the IP address is not in the list; if the IP address is in the list, it indicates that the URL is the URL redirected by CACHE/CDN, and triggers the recovery function of the initial service request, i.e., invokes the URL restoring function.
Wherein, it is worth pointing out that, before the step of detecting whether the IP address exists in the preset IP address list, the method further includes: acquiring IP addresses of each cache server and/or CDN node; and generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node. That is, the content charging gateway entity, i.e., the GGSN entity or the P-GW entity, sets a preset IP address list of the CACHE server and the CDN node, and the preset IP address list is updated in real time according to the CACHE server and the CDN node address list.
After the recovery function of the initial service request is triggered, namely the URL recovery function is called, the GGSN entity or the P-GW entity recovers the redirection request into the initial service request according to the IP address. Specifically, step 14 includes: determining parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to a preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; detecting whether the redirection request carries a parameter field indicating parameter information of a target cache server and/or a target CDN node; if the parameter field is carried, removing the head field and the parameter field of the redirection request to obtain an initial service request, otherwise, removing the head field of the redirection request to obtain the initial service request. The IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node.
Specifically, in order to better match to the cache server and/or the CDN node, a parameter field indicating parameter information of the target cache server and/or the target CDN node is added to the redirection request. A CACHE server or CDN node has a unique IP address and may have at least one parameter information. The IP address of a CACHE server or CDN node has a preset correspondence with the parameter information, that is, the IP address of a CACHE server or CDN node corresponds to the parameter information of the same CACHE server or CDN node. In the initial service request recovery process, a GGSN entity or a P-GW entity determines parameter information possibly carried by a redirection request according to a preset corresponding relation between an IP address and the parameter information; detecting whether a parameter field only containing the parameter information exists in the received redirection request; if yes, removing a head field indicating the IP address and a parameter field indicating the parameter information in the redirection request to obtain an initial service request; if not, only removing the header field indicating the IP address in the redirection request to obtain the initial service request.
The step of determining the parameter information of the target cache server and/or the target CDN node corresponding to the redirection request according to the preset corresponding relationship between the IP address of the cache server and/or the CDN node and the parameter information further includes, before the step of: acquiring IP addresses and parameter information of each cache server and/or CDN node; and generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node. That is, the content charging gateway entity, i.e., the GGSN entity or the P-GW entity, sets a preset correspondence between the IP addresses of the CACHE server and the CDN node and the parameter information, and the preset correspondence is updated in real time according to the address lists of the CACHE server and the CDN node.
Step 14 specifically comprises: detecting whether a charging mark field defined by a preset charging matching rule exists in the initial service request; if yes, determining whether the target service requested by the initial service request is a charging service, otherwise determining whether the target service requested by the initial service request is a free service. Assume that the preset charging matching rule is: the HOST field in the URL of the service request may not be replaced with a wildcard "# all, the wildcard" # in the HOST may not be wildcard "/", and the backward traditional charging flag field is "ports. And when the http is/www.fakesite.com/fakedir/sports.sina.com.cn/fakecontent, the backward statistical payment charging rule can not be matched, so that the condition that the content in the path of the service request URL is matched with the keyword in the URL HOST in the content charging rule is avoided.
In the network access method, after receiving a service request, a network device detects whether an IP address exists in a head field of the service request of a user terminal, and when the IP address exists in the head field of the service request, the network device determines whether the service request is a redirection request according to the IP address so as to realize the identification of the redirection request. In addition, the network equipment can also restore the redirection request to the initial service request, and then determine whether the requested target service is the charging service according to the initial service request, thereby solving the charging matching problem of the redirection service request, ensuring the correct matching of the redirection service request, and also being capable of continuing the current charging matching rule, and avoiding the flow fraud behavior.
The foregoing embodiments are respectively described with respect to the network access method of the present invention, and the following embodiments will further describe the corresponding network device with reference to the accompanying drawings.
Specifically, as shown in fig. 2, the network device 200 according to the embodiment of the present invention includes:
a first detecting module 210, configured to detect whether an IP address exists in a header field of a service request sent by a user equipment;
the first processing module 220 is configured to extract the IP address if the service request exists, and determine that the service request is a redirection request when the IP address meets a preset condition;
a recovery module 230, configured to recover the redirection request to an initial service request according to the IP address;
and the charging module 240 is configured to determine whether the target service requested by the initial service request is a charging service according to a preset charging matching rule.
Wherein the first detection module 210 includes:
the first receiving submodule is used for receiving a service request which is sent by a user terminal and requests a target service;
and the first detection submodule is used for detecting whether the header field of the service request has an indication character indicating the IP address.
Wherein, the network device 200 further includes:
and the first forwarding module is used for forwarding the service request if the IP address does not exist in the head field of the service request.
The first processing module 220 includes:
the second detection submodule is used for detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
the first processing submodule is used for determining that the service request is a redirection request if the service request is the redirection request; otherwise, the service request is forwarded.
The first processing module 220 further includes:
the first obtaining submodule is used for obtaining the IP address of each cache server and/or CDN node;
and the first generation submodule is used for generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
Wherein, the recovery module 230 includes:
the second processing submodule is used for determining the parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to the preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
a third detection submodule, configured to detect whether the redirection request carries a parameter field indicating parameter information of the target cache server and/or the target CDN node;
and the recovery submodule is used for removing the head field and the parameter field of the redirection request if the parameter field is carried by the recovery submodule to obtain the initial service request.
Wherein, the recovery module 230 further comprises:
the second obtaining submodule is used for obtaining the IP address and the parameter information of each cache server and/or CDN node;
and the second generation submodule is used for generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
The charging module 240 includes:
the fourth detection submodule is used for detecting whether a charging mark field defined by the preset charging matching rule exists in the initial service request;
and the charging submodule is used for determining whether the target service requested by the initial service request is a charging service if the target service requested by the initial service request exists, and otherwise determining whether the target service requested by the initial service request is a free service.
The embodiment of the network equipment of the invention is corresponding to the embodiment of the method, all the implementation means in the embodiment of the method are suitable for the embodiment of the network equipment, and the same technical effect can be achieved. The network equipment detects whether an IP address exists in a head field of a service request of a user terminal after receiving the service request, and determines whether the service request is a redirection request according to the IP address when the IP address exists in the head field of the service request so as to realize the identification of the redirection request. In addition, the network equipment can also restore the redirection request to the initial service request, and then determine whether the requested target service is the charging service according to the initial service request, thereby solving the charging matching problem of the redirection service request, ensuring the correct matching of the redirection service request, and also being capable of continuing the current charging matching rule, and avoiding the flow fraud behavior.
To better achieve the above object, as shown in fig. 3, an embodiment of the present invention further provides a network device, including: a processor 300; a memory 320 connected to the processor 300 through a bus interface, and a transceiver 310 connected to the processor 300 through a bus interface; the memory 320 is used for storing programs and data used by the processor in performing operations; transmitting data information or pilot frequency through the transceiver 310, and receiving an uplink control channel through the transceiver 310; when the processor 300 calls and executes the programs and data stored in the memory 320, the following functions are implemented:
the processor 300 is used for reading the program in the memory 320 and executing the following processes: detecting whether an IP address exists in a header field of a service request sent by a user terminal;
if the IP address meets the preset condition, the service request is determined to be a redirection request;
according to the IP address, the redirection request is recovered to an initial service request;
and determining whether the target service requested by the initial service request is a charging service or not according to a preset charging matching rule.
A transceiver 310 for receiving and transmitting data under the control of the processor 300.
In particular, the transceiver 310 is configured to receive and transmit data under the control of the processor 300, and is specifically configured to: receiving a service request for requesting a target service, which is sent by a user terminal;
the processor 300 is further configured to: it is detected whether an indication character indicating an IP address exists in a header field of the service request.
Specifically, the processor 300 is further configured to: and if the IP address does not exist in the head field of the service request, forwarding the service request.
Specifically, the processor 300 is further configured to: detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
if yes, determining the service request as a redirection request; otherwise, the service request is forwarded.
Specifically, the processor 300 is further configured to: acquiring IP addresses of each cache server and/or CDN node;
and generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
Specifically, the processor 300 is further configured to: determining parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to a preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
detecting whether the redirection request carries a parameter field indicating parameter information of a target cache server and/or a target CDN node;
if the parameter field is carried, removing the head field and the parameter field of the redirection request to obtain the initial service request.
Specifically, the processor 300 is further configured to: acquiring IP addresses and parameter information of each cache server and/or CDN node;
and generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
Specifically, the processor 300 is further configured to: detecting whether a charging mark field defined by a preset charging matching rule exists in the initial service request;
if yes, determining whether the target service requested by the initial service request is a charging service, otherwise determining whether the target service requested by the initial service request is a free service.
Where in fig. 3, the bus architecture may include any number of interconnected buses and bridges, with various circuits being linked together, particularly one or more processors represented by processor 300 and memory represented by memory 320. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver 310 may be a number of elements including a transmitter and a transceiver providing a means for communicating with various other apparatus over a transmission medium. The processor 300 is responsible for managing the bus architecture and general processing, and the memory 320 may store data used by the processor 300 in performing operations.
Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be performed by hardware, or may be instructed to be performed by associated hardware by a computer program that includes instructions for performing some or all of the steps of the above methods; and the computer program may be stored in a readable storage medium, which may be any form of storage medium.
Furthermore, it is to be noted that in the device and method of the invention, it is obvious that the individual components or steps can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of performing the series of processes described above may naturally be performed chronologically in the order described, but need not necessarily be performed chronologically, and some steps may be performed in parallel or independently of each other. It will be understood by those skilled in the art that all or any of the steps or elements of the method and apparatus of the present invention may be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or any combination thereof, which can be implemented by those skilled in the art using their basic programming skills after reading the description of the present invention.
Thus, the objects of the invention may also be achieved by running a program or a set of programs on any computing device. The computing device may be a general purpose device as is well known. The object of the invention is thus also achieved solely by providing a program product comprising program code for implementing the method or the apparatus. That is, such a program product also constitutes the present invention, and a storage medium storing such a program product also constitutes the present invention. It is to be understood that the storage medium may be any known storage medium or any storage medium developed in the future. It is further noted that in the apparatus and method of the present invention, it is apparent that each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be regarded as equivalents of the present invention. Also, the steps of executing the series of processes described above may naturally be executed chronologically in the order described, but need not necessarily be executed chronologically. Some steps may be performed in parallel or independently of each other.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (15)

1. A network access method, comprising:
detecting whether an IP address exists in a header field of a service request sent by a user terminal;
if the IP address exists, the IP address is extracted, and when the IP address meets a preset condition, the service request is determined to be a redirection request;
according to the IP address, the redirection request is recovered to an initial service request;
determining whether the target service requested by the initial service request is a charging service according to a preset charging matching rule, wherein the method comprises the following steps:
detecting whether a charging mark field defined by the preset charging matching rule exists in the initial service request;
if yes, determining whether the target service requested by the initial service request is a charging service, otherwise determining whether the target service requested by the initial service request is a free service.
2. The network access method according to claim 1, wherein the step of detecting whether the IP address exists in a header field of the service request sent by the user terminal comprises:
receiving a service request for requesting a target service, which is sent by a user terminal;
and detecting whether an indication character indicating an IP address exists in a header field of the service request.
3. The network access method according to claim 1, wherein after the step of detecting whether the IP address exists in a header field of the service request sent by the user terminal, the method further comprises:
and if not, forwarding the service request.
4. The network access method according to claim 1, wherein the step of determining that the service request is a redirection request when the IP address satisfies a preset condition comprises:
detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
if so, determining the service request as a redirection request; otherwise, the service request is forwarded.
5. The method according to claim 4, wherein the step of detecting whether the IP address exists in a preset IP address list further comprises:
acquiring IP addresses of each cache server and/or CDN node;
and generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
6. The method according to claim 1, wherein the step of recovering the redirection request to the original service request according to the IP address comprises:
determining parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to a preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
detecting whether the redirection request carries a parameter field indicating parameter information of a target cache server and/or a target CDN node;
and if the parameter field is carried, removing the head field and the parameter field of the redirection request to obtain an initial service request.
7. The network access method according to claim 6, wherein before the step of determining the parameter information of the target cache server and/or the target CDN node corresponding to the redirection request according to the preset correspondence between the IP address of the cache server and/or the CDN node and the parameter information, the method further comprises:
acquiring IP addresses and parameter information of each cache server and/or CDN node;
and generating a preset corresponding relation of the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
8. A network device, comprising:
the first detection module is used for detecting whether an IP address exists in a head field of a service request sent by a user terminal;
the first processing module is used for extracting the IP address if the IP address exists, and determining the service request as a redirection request when the IP address meets a preset condition;
a recovery module, configured to recover the redirection request to an initial service request according to the IP address;
the charging module is used for determining whether the target service requested by the initial service request is a charging service according to a preset charging matching rule;
the charging module comprises:
a fourth detection sub-module, configured to detect whether a charging flag field defined by the preset charging matching rule exists in the initial service request;
and the charging submodule is used for determining whether the target service requested by the initial service request is a charging service if the target service requested by the initial service request exists, and otherwise determining whether the target service requested by the initial service request is a free service.
9. The network device of claim 8, wherein the first detection module comprises:
the first receiving submodule is used for receiving a service request which is sent by a user terminal and requests a target service;
and the first detection submodule is used for detecting whether an indication character indicating an IP address exists in a header field of the service request.
10. The network device of claim 8, wherein the network device further comprises:
a first forwarding module, configured to forward the service request if an IP address does not exist in a header field of the service request.
11. The network device of claim 8, wherein the first processing module comprises:
the second detection submodule is used for detecting whether the IP address exists in a preset IP address list or not; the preset IP address list comprises IP addresses of all cache servers and/or CDN nodes;
the first processing submodule is used for determining that the service request is a redirection request if the service request is the redirection request; otherwise, the service request is forwarded.
12. The network device of claim 11, wherein the first processing module further comprises:
the first obtaining submodule is used for obtaining the IP address of each cache server and/or CDN node;
and the first generation submodule is used for generating a preset IP address list according to the IP addresses of the cache server and/or the CDN node.
13. The network device of claim 8, wherein the recovery module comprises:
the second processing submodule is used for determining the parameter information of a target cache server and/or a target CDN node corresponding to the redirection request according to the preset corresponding relation between the IP address of the cache server and/or the CDN node and the parameter information; the IP address of one cache server or CDN node in the preset corresponding relation corresponds to the parameter information of the same cache server or CDN node;
a third detection submodule, configured to detect whether the redirection request carries a parameter field indicating parameter information of a target cache server and/or a target CDN node;
and the recovery submodule is used for removing the head field and the parameter field of the redirection request if the parameter field is carried by the recovery submodule to obtain an initial service request.
14. The network device of claim 13, wherein the recovery module further comprises:
the second obtaining submodule is used for obtaining the IP address and the parameter information of each cache server and/or CDN node;
and the second generation submodule is used for generating a preset corresponding relation between the IP address and the parameter information according to the IP address and the parameter information of the cache server and/or the CDN node.
15. A network device, comprising: a processor; a memory coupled to the processor, and a transceiver coupled to the processor; wherein the processor is configured to call and execute the programs and data stored in the memory to implement the steps of the network access method according to any one of claims 1 to 7.
CN201810000824.7A 2018-01-02 2018-01-02 Network access method and network equipment Active CN109996201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810000824.7A CN109996201B (en) 2018-01-02 2018-01-02 Network access method and network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810000824.7A CN109996201B (en) 2018-01-02 2018-01-02 Network access method and network equipment

Publications (2)

Publication Number Publication Date
CN109996201A CN109996201A (en) 2019-07-09
CN109996201B true CN109996201B (en) 2021-01-15

Family

ID=67128326

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810000824.7A Active CN109996201B (en) 2018-01-02 2018-01-02 Network access method and network equipment

Country Status (1)

Country Link
CN (1) CN109996201B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705978A (en) * 2019-08-30 2020-01-17 深圳壹账通智能科技有限公司 Interface service method and device
CN110830564B (en) * 2019-10-30 2022-11-01 北京金山云网络技术有限公司 CDN scheduling method, device, system and computer readable storage medium
CN111224952B (en) * 2019-12-24 2022-06-03 中移(杭州)信息技术有限公司 Network resource acquisition method and device for directional flow and storage medium
CN111953761B (en) * 2020-08-04 2023-07-25 Oppo广东移动通信有限公司 Data processing method, device, electronic equipment and storage medium
CN114785778B (en) * 2022-03-10 2023-09-01 聚好看科技股份有限公司 Gateway device and content distribution method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585346A (en) * 2004-05-28 2005-02-23 南京邮电学院 Method for realizing chaff network data flow heavy orientation
WO2011140419A1 (en) * 2010-05-06 2011-11-10 Desvio, Inc. Method and system for monitoring and redirecting http requests away from unintended web sites
CN102970669A (en) * 2012-11-15 2013-03-13 大唐移动通信设备有限公司 Phone bill sending and processing method and device
CN104243344A (en) * 2014-10-11 2014-12-24 网宿科技股份有限公司 Effective data packet capturing method and request redirection server
CN105338187A (en) * 2015-11-16 2016-02-17 联想(北京)有限公司 Information processing method and electronic equipment
CN105516165A (en) * 2015-12-22 2016-04-20 华为技术有限公司 Method, device and system for identifying illegal proxy for charging fraud

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1585346A (en) * 2004-05-28 2005-02-23 南京邮电学院 Method for realizing chaff network data flow heavy orientation
WO2011140419A1 (en) * 2010-05-06 2011-11-10 Desvio, Inc. Method and system for monitoring and redirecting http requests away from unintended web sites
CN102970669A (en) * 2012-11-15 2013-03-13 大唐移动通信设备有限公司 Phone bill sending and processing method and device
CN104243344A (en) * 2014-10-11 2014-12-24 网宿科技股份有限公司 Effective data packet capturing method and request redirection server
CN105338187A (en) * 2015-11-16 2016-02-17 联想(北京)有限公司 Information processing method and electronic equipment
CN105516165A (en) * 2015-12-22 2016-04-20 华为技术有限公司 Method, device and system for identifying illegal proxy for charging fraud

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
僵尸网络的类型、危害及防范措施;袁春阳、徐娜、王明华;《现代电信科技》;20090430;全文 *
基于综合网关的移动互联网缓存新方案;阮一荻;《电信技术》;20150430;全文 *

Also Published As

Publication number Publication date
CN109996201A (en) 2019-07-09

Similar Documents

Publication Publication Date Title
CN109996201B (en) Network access method and network equipment
US9659305B2 (en) Click quality classification and delivery
US20210004628A1 (en) Method and system for website detection
JP5259412B2 (en) Identification of fake information requests
US7421515B2 (en) Method and system for communications network
WO2017019419A1 (en) Methods and systems for preventing advertisements from being delivered to untrustworthy client devices
WO2017107780A1 (en) Method, device and system for recognizing illegitimate proxy for charging fraud
CN108259425A (en) The determining method, apparatus and server of query-attack
US9596313B2 (en) Method, terminal, cache server and system for updating webpage data
CN106453669A (en) Load balancing method and server
CN107135249B (en) Data downloading method and device
US7782881B1 (en) Method and apparatus for traffic quality and billing authorization by request token insertion
US20140086151A1 (en) Quality of service level adaptation for visual services in mobile communication networks
CN106790593B (en) Page processing method and device
WO2022007008A1 (en) Resource request response method, redirection server and decision distribution server
CN104219230A (en) Method and device for identifying malicious websites
WO2014101663A1 (en) Method, apparatus, and system for adjusting user service access
US10225358B2 (en) Page push method, device, server and system
CN106856456B (en) Processing method and system for cache cluster service
WO2016101595A1 (en) Method, apparatus and system for accessing third-party resource through application
CN108664493B (en) Method and device for counting validity of URL (Uniform resource locator), electronic equipment and storage medium
US20070245031A1 (en) ICAP processing of partial content to identify security issues
CN112825524B (en) Method, device and system for determining network service node
US7533414B1 (en) Detecting system abuse
CN111786940A (en) Data processing method and device

Legal Events

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