Disclosure of Invention
The embodiment of the application provides a method and a device for directional flow charging, which are used for carrying out flow statistics through a plurality of sub domain names set corresponding to a SID (service identifier) when directional flow meter charges are carried out, so that the directional flow charging cost is reduced.
The embodiment of the application provides the following specific technical scheme:
in a first aspect, a method for directional traffic charging includes:
the method comprises the steps that a scheduling server receives an access request message containing a specified domain name sent by a user terminal;
acquiring a directional flow domain name corresponding to the designated domain name based on the association relationship between the preset designated domain name and the directional flow domain name, and returning a first response message containing the directional flow domain name to the user terminal, wherein the directional flow domain name is a sub-domain name of the scheduling server, and the domain name of the scheduling server and each sub-domain name correspond to the same domain name for directional flow charging;
receiving a first domain name resolution request message which is sent by a user terminal and contains a directional flow domain name;
sending a first domain name resolution response message containing the address of the node server to the user terminal based on the first domain name resolution request message, and triggering the user terminal to send a node request message containing the directional traffic domain name to the node server;
and receiving a traffic statistic result corresponding to the directional traffic domain name reported by the node server and an SID traffic charging list sent by the directional traffic service server, and determining the traffic cost of the directional traffic domain name based on the traffic statistic result and the SID traffic charging list.
Preferably, the receiving of the access request message containing the specified domain name sent by the user terminal through the domain name server specifically includes:
receiving a second domain name resolution request message which is sent by a user terminal through a domain name server and contains an appointed domain name;
sending a second domain name resolution response message containing the IP address of the scheduling server to the user terminal based on the specified domain name contained in the second domain name resolution request message;
and receiving an access request message sent by the user terminal based on the IP address of the scheduling server.
Preferably, before receiving a second domain name resolution request message containing a specified domain name sent by the user terminal through the domain name server, the method further includes:
receiving a directional flow service request message containing a specified domain name, which is sent by each enterprise user through an enterprise terminal;
respectively allocating a sub-domain name of a scheduling server to the specified domain name corresponding to each enterprise user as a directed flow domain name;
and establishing an association relation between each specified domain name and each directed flow domain name.
Preferably, before the scheduling server receives a directed traffic service request message containing a specified domain name sent by each enterprise user through the enterprise terminal, the method further includes:
sending a directional traffic service request message to a directional traffic service server;
receiving a directional flow response message which contains SID and is returned by a directional flow service server based on a directional flow request message;
and establishing a corresponding relation between the SID and the domain name and each sub-domain name of the scheduling server, wherein the domain name and each sub-domain name of the scheduling server correspond to one SID.
And sending the configuration message containing the corresponding relation to a directional traffic service server, and triggering the directional traffic service server to generate an SID traffic charging list aiming at the domain name of the scheduling server and the access traffic corresponding to each sub domain name based on the corresponding relation.
In a second aspect, a method for directional traffic charging includes:
sending an access request message containing an appointed domain name to a scheduling server, and triggering the scheduling server to acquire an oriented traffic domain name corresponding to the appointed domain name based on a preset incidence relation between the appointed domain name and the oriented traffic domain name, wherein the oriented traffic domain name is a sub-domain name of the scheduling server, and the domain name of the scheduling server and each sub-domain name correspond to the same domain name for oriented traffic charging;
receiving a first response message which is returned by a scheduling server and contains a directional flow domain name;
sending a first domain name resolution request message containing a directional flow domain name to a scheduling server, and receiving a first domain name resolution response message containing the address of a node server, which is returned by the scheduling server based on the first domain name resolution request message;
sending a node request message containing the directional traffic domain name to a node server, triggering the node server to report a traffic statistic result corresponding to the directional traffic domain name to a scheduling server, and triggering the scheduling server to determine the traffic cost of the directional traffic domain name based on the traffic statistic result and a received SID traffic charging list sent by a directional traffic service server.
In a third aspect, an apparatus for directional traffic charging includes:
a first receiving unit, configured to receive an access request message containing a specified domain name sent by a user terminal;
the first response unit is used for acquiring a directional traffic domain name corresponding to the designated domain name based on the association relationship between the preset designated domain name and the directional traffic domain name, and returning a first response message containing the directional traffic domain name to the user terminal, wherein the directional traffic domain name is a sub-domain name of the scheduling server, and the domain name of the scheduling server and each sub-domain name correspond to the same domain name for directional traffic charging;
a second receiving unit, configured to receive a first domain name resolution request message that includes a directional traffic domain name and is sent by a user terminal;
a second response unit, configured to send, to the user terminal, a first domain name resolution response message including an address of the node server based on the first domain name resolution request message, and trigger the user terminal to send, to the node server, a node request message including the directed traffic domain name;
and the determining unit is used for receiving the traffic statistic result corresponding to the directional traffic domain name reported by the node server and the SID traffic charging list sent by the directional traffic service server, and determining the traffic cost of the directional traffic domain name based on the traffic statistic result and the SID traffic charging list.
In a fourth aspect, an apparatus for directional traffic charging, comprises:
the system comprises a first sending unit, a second sending unit and a dispatching server, wherein the first sending unit is used for sending an access request message containing an appointed domain name to the dispatching server, and triggering the dispatching server to acquire an oriented traffic domain name corresponding to the appointed domain name based on the association relation between a preset appointed domain name and the oriented traffic domain name, the oriented traffic domain name is a sub-domain name of the dispatching server, and the domain name of the dispatching server and each sub-domain name correspond to the same domain name for oriented traffic charging;
the receiving unit is used for receiving a first response message which is returned by the dispatching server and contains the directional flow domain name;
the second sending unit is used for sending a first domain name resolution request message containing the directional flow domain name to the scheduling server and receiving a first domain name resolution response message which is returned by the scheduling server based on the first domain name resolution request message and contains the address of the node server;
and the determining unit is used for sending a node request message containing the directional traffic domain name to the node server, triggering the node server to report a traffic statistic result corresponding to the directional traffic domain name to the scheduling server, and triggering the scheduling server to determine the traffic cost of the directional traffic domain name based on the traffic statistic result and a received SID traffic charging list sent by the directional traffic service server.
In a fifth aspect, an electronic device comprises: one or more processors; and
one or more computer-readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, performs the steps of the method of any of the above first aspects.
In a sixth aspect, one or more computer readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, causes a communication device to perform the method of any of the above first aspects.
In a seventh aspect, an electronic device includes: one or more processors; and
one or more computer-readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, performs the steps of the method of any of the second aspects described above.
In an eighth aspect, one or more computer readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, causes a communication device to perform the method of any of the second aspects above.
In the embodiment of the application, a domain name and a sub-domain name of a scheduling server are bound with the same SID for directional traffic charging in advance, then the scheduling server acquires a directional traffic domain name set corresponding to a specified domain name based on an access request message containing the specified domain name sent by a user terminal, and allocates a node server for the user terminal based on the directional traffic domain name, then the user terminal sends the node request message to the node server, and the node server reports access traffic corresponding to the directional traffic domain name. Therefore, only one SID is applied, each sub-domain bound with the SID is respectively used as a directional flow domain after each appointed domain is redirected, the access flow of the directional flow domain counted by the node server and a SID flow charging list are based, the flow charge of the directional flow domain is obtained, each enterprise user does not need to be configured with a corresponding SID, a large amount of time cost and system resources consumed by applying a large number of SIDs and configuring the SIDs are reduced, the cost of directional flow service charging is reduced, and the efficiency of directional flow charging is improved.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without any creative effort belong to the protection scope of the present application.
In order to improve the efficiency of directional traffic charging and save system resources, in the embodiment of the application, a method for directional traffic charging is designed, the method is to apply for only one SID, bind the SID with the domain name of the scheduling server and each sub-domain name, then redirect the specified domain name to the assigned sub-domain name, count the access traffic of the sub-domain name, and determine the traffic cost of the sub-domain name based on the access traffic of the sub-domain name and the obtained SID traffic charging list.
The preferred embodiments of the present application will be described below with reference to the accompanying drawings of the specification, it being understood that the preferred embodiments described herein are merely for illustrating and explaining the present invention and are not intended to limit the present invention, and that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
Referring to fig. 1b, which is a schematic diagram of an architecture of a directional traffic charging system, in the embodiment of the present application, the directional traffic charging system includes a scheduling server, a node server, a directional traffic service server, a BOSS, a GGSN, a user terminal, and an enterprise terminal.
In the embodiment of the application, the scheduling server is a Content Delivery Network (CDN) scheduling server, the node server is a CDN node server, and the CDN server and each CDN node server form a CDN system. Optionally, the directional traffic service server is a server for an operator to process traffic services.
In the embodiment of the application, the steps of the directional traffic service application are as follows:
firstly, a scheduling server sends an application request of a directional traffic service to a directional traffic service server.
Then, the directional traffic service server allocates a SID for directional traffic charging to the scheduling server, binds the SID with the domain name and each sub-domain name of the scheduling server, establishes a corresponding relationship, and configures parameters of the SID and each corresponding domain name and sub-domain name in each BOSS and each GGSN.
Thirdly, the enterprise user applies for the directed flow service to the dispatching server through the enterprise terminal, and the dispatching server allocates a sub domain name for the specified domain name designated by the enterprise user as the directed flow domain name.
In the embodiment of the application, the steps of the user terminal accessing the specified domain name to obtain the response message are as follows:
first, the user terminal sends a second domain name resolution request message containing a designated domain name to the scheduling server through the GGSN, and obtains a second domain name resolution response message containing an Internet Protocol (IP) address of the scheduling server, which is returned by the scheduling server.
Then, the user terminal sends an access request message containing the specified domain name to the scheduling server, and obtains a first response message containing the directed traffic domain name returned by the scheduling server.
Thirdly, the user terminal sends a first domain name resolution request message containing the directional flow domain name to the scheduling server, and obtains a first domain name resolution response message containing the IP address of the node server and returned by the scheduling server.
Fourthly, the user terminal sends a node request message containing the directed flow domain name to the node server, and obtains a second response message returned by the node server.
In the embodiment of the application, the step of generating the directional flow telephone charge list is as follows:
firstly, a node server counts access flow corresponding to a directional flow domain name, and sends an obtained flow counting result to a scheduling server.
Then, the dispatching server determines a corresponding specified domain name according to the directed flow domain name, and determines an enterprise user corresponding to the specified domain name.
And finally, the scheduling server determines the directional flow cost corresponding to the enterprise user based on the flow statistical result.
Referring to fig. 1c, which is a flowchart of a directional traffic service application, in the embodiment of the present application, before a flow of directional traffic charging is performed, a directional traffic service is applied, and a specific flow of the directional traffic service application is as follows:
step 100: and the scheduling server sends a directional flow service request message to the directional flow service server.
Step 101: and the directional flow service server allocates an SID for directional flow charging to the scheduling server based on the received directional flow service request message.
Step 102: and the dispatching server receives the SID returned by the directional flow service server and establishes a corresponding relation between the SID and the domain name of the dispatching server and each sub-domain name of the dispatching server.
Specifically, when step 102 is executed, the domain name of the scheduling server and each sub-domain name correspond to the obtained SID.
Step 103: and the directional traffic service server receives the configuration message which is sent by the scheduling server and contains the corresponding relation to configure the parameters.
Specifically, the directed traffic service server receives the configuration message including the correspondence, and deploys the SID, the domain name of the scheduling server, and each sub-domain name of the scheduling server in each GGSN and each BOSS based on the correspondence, thereby completing parameter configuration.
The GGSN is used for determining a corresponding SID according to the appointed website and sending an SID ticket to the BOSS, and the BOSS is used for charging the flow charge used by the user for accessing the appointed website to the corresponding enterprise user based on the SID ticket.
Therefore, the GGSN and the BOSS can charge the domain name of the scheduling server and all access flows corresponding to the sub-domain names to one SID in the subsequent steps.
Step 104: and the scheduling server receives a second domain name resolution request message which is sent by each enterprise terminal and contains the specified domain name.
Specifically, when step 104 is executed, optionally, the specified domain name may be an IP address specified by the enterprise user, or may be a specified Uniform Resource Locator (URL). The designated domain name of one enterprise terminal may be one or more.
Step 105: and the dispatching server allocates a sub-domain name of the dispatching server to the specified domain name of each enterprise terminal as the directed flow domain name.
Step 106: the dispatching server establishes the association relationship between each appointed domain name and each directed flow domain name, and returns a service application response message containing the directed flow domain name to the enterprise terminal.
Specifically, when step 106 is executed, when a plurality of assigned domain names of one enterprise terminal are provided, the plurality of assigned domain names of the enterprise terminal correspond to sub-domain names of one scheduling server, that is, each assigned domain name of one enterprise terminal corresponds to one directed traffic domain name.
Therefore, the scheduling server only applies for one SID, and assigns a sub-domain name to each enterprise user, so that the traffic generated when the user accesses the specified domain name of the enterprise user can be determined through the sub-domain name in the subsequent steps, and the traffic charging is carried out through the SID.
Referring to fig. 2, which is a flowchart of directional traffic charging, in the embodiment of the present application, a specific flow of directional traffic charging is as follows:
step 200: and the user terminal sends a second domain name resolution request message containing the specified domain name to the scheduling server through the domain name server, and receives a second domain name resolution response message containing the IP address of the user terminal, which is returned by the scheduling server based on the second domain name resolution request message.
Specifically, first, the user terminal sends a second domain name resolution request message including the specified domain name to the domain name server.
Then, the domain name server obtains the directional traffic domain name set corresponding to the specified domain name based on the corresponding relation between the preset specified domain name and the directional traffic domain name, and obtains the scheduling server corresponding to the directional traffic domain name based on the directional traffic domain name.
Further, the domain name server calls a scheduling server to analyze the specified domain name, and the scheduling server sends a second domain name analysis response message containing the IP address of the scheduling server to the user terminal.
Thus, the domain name server can call the scheduling server to analyze the specified domain name to obtain the analysis
The result is self IP, and the self IP is sent to the user terminal.
Step 201: and the user terminal sends an access request message containing the specified domain name to the calling server based on the received second domain name resolution response message.
Specifically, the user terminal acquires the IP address of the scheduling server included in the second domain name resolution response message, and sends an access request message including the specified domain name to the scheduling server based on the IP address of the scheduling server.
Step 202: the scheduling server acquires the specified domain name contained in the access request message, determines the directional traffic domain name corresponding to the specified domain name based on the association relationship between the preset specified domain name and the directional traffic domain name, and returns a first response message containing the directional traffic domain name to the user terminal.
Step 203: the user terminal sends a first domain name resolution request message containing the directed traffic domain name to the scheduling server.
Step 204: the scheduling server receives a first domain name resolution request message sent by the user terminal, and allocates an IP address of a node server for a directed flow domain name contained in the first domain name resolution request message.
Step 205: and the dispatching server sends a first domain name resolution response message containing the IP address of the node server to the user terminal.
Step 206: and the user terminal sends a node request message containing the directed flow domain name to the node server based on the IP address of the node server contained in the received first domain name resolution response message.
Step 207: and the node server returns a corresponding target response message to the user terminal based on the received node request message.
Step 208: and the node server counts the flow corresponding to the directional flow domain name and sends the flow counting result to the scheduling server.
Step 209: the scheduling server determines a traffic fee for accessing the directed traffic domain name based on the received traffic statistics.
Specifically, the scheduling server receives a traffic statistic result corresponding to the directional traffic domain name, receives an SID traffic charging list sent by the directional traffic service server, determines a traffic charge corresponding to the directional traffic domain name, acquires an enterprise user corresponding to the specified domain name, and performs traffic charging on the enterprise user.
Therefore, the dispatching server only orders the directional flow through one SID, and does not need to configure the corresponding SID for each enterprise user, thereby avoiding the complex process of directional flow service application of each enterprise user, and also avoiding the process of SID configuration for each enterprise user in each BOSS and each GGSN, saving the system resources of BOSS and GGSN, improving the efficiency, reducing the cost of directional flow service application, and the dispatching server performs flow statistics for the appointed domain name of each enterprise user and performs flow charging for the enterprise user according to the flow statistical result.
In an embodiment of the present application, an electronic device includes: one or more processors; and
one or more computer-readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, performs the steps in the above-described embodiments.
In an embodiment of the present application, one or more computer-readable media having stored thereon a program for directed traffic charging, wherein the program, when executed by one or more processors, causes a communication device to perform the steps of the above embodiments.
Based on the foregoing embodiment, referring to fig. 3, a schematic structural diagram of a device for directional traffic charging is shown, in the embodiment of the present application, the device for directional traffic charging specifically includes:
a first receiving unit 30, configured to receive an access request message containing a specified domain name sent by a user terminal;
a first response unit 31, configured to obtain, based on an association relationship between a preset specified domain name and a directional traffic domain name, a directional traffic domain name corresponding to the specified domain name, and return a first response message including the directional traffic domain name to the user terminal, where the directional traffic domain name is a sub-domain name of the scheduling server, and the domain name of the scheduling server and each sub-domain name correspond to the same domain name for directional traffic charging;
a second receiving unit 32, configured to receive a first domain name resolution request message that includes a domain name of a directed traffic and is sent by a user terminal;
a second response unit 33, configured to send, to the user terminal, a first domain name resolution response message including an address of the node server based on the first domain name resolution request message, and trigger the user terminal to send, to the node server, a node request message including the directional traffic domain name;
the determining unit 34 is configured to receive a traffic statistic result corresponding to the directional traffic domain name reported by the node server and an SID traffic charging list sent by the directional traffic service server, and determine a traffic cost of the directional traffic domain name based on the traffic statistic result and the SID traffic charging list.
Preferably, when receiving an access request message containing a specified domain name sent by a user terminal through a domain name server, the first receiving unit 30 is specifically configured to:
receiving a second domain name resolution request message which is sent by a user terminal through a domain name server and contains an appointed domain name;
sending a second domain name resolution response message containing the IP address of the scheduling server to the user terminal based on the specified domain name contained in the second domain name resolution request message;
and receiving an access request message sent by the user terminal based on the IP address of the scheduling server.
Preferably, before the scheduling server receives the second domain name resolution request message containing the specified domain name sent by the user terminal through the domain name server, the first receiving unit 30 is further configured to:
receiving a directional flow service request message containing a specified domain name, which is sent by each enterprise user through an enterprise terminal;
respectively allocating a sub-domain name of a scheduling server to the specified domain name corresponding to each enterprise user as a directed flow domain name;
and establishing an association relation between each specified domain name and each directed flow domain name.
Preferably, before receiving the traffic oriented service request message containing the specified domain name sent by each enterprise user through the enterprise terminal, the first receiving unit 30 is further configured to:
sending a directional traffic service request message to a directional traffic service server;
receiving a directional flow response message which contains SID and is returned by a directional flow service server based on a directional flow request message;
and establishing a corresponding relation between the SID and the domain name and each sub-domain name of the scheduling server, wherein the domain name and each sub-domain name of the scheduling server correspond to one SID.
And sending the configuration message containing the corresponding relation to a directional traffic service server, and triggering the directional traffic service server to generate an SID traffic charging list aiming at the domain name of the scheduling server and the access traffic corresponding to each sub domain name based on the corresponding relation.
Based on the foregoing embodiment, referring to fig. 4, a schematic structural diagram of a device for directional traffic charging is shown, in the embodiment of the present application, the device for directional traffic charging specifically includes:
the first sending unit 40 is configured to send an access request message including an assigned domain name to the scheduling server, and trigger the scheduling server to obtain an directed traffic domain name corresponding to the assigned domain name based on an association relationship between a preset assigned domain name and the directed traffic domain name, where the directed traffic domain name is a sub-domain name of the scheduling server, and the domain name of the scheduling server and each sub-domain name correspond to the same domain name for directed traffic charging;
a receiving unit 41, configured to receive a first response message including a directed traffic domain name returned by the scheduling server;
a second sending unit 42, configured to send a first domain name resolution request message including the directional traffic domain name to the scheduling server, and receive a first domain name resolution response message including an address of the node server, which is returned by the scheduling server based on the first domain name resolution request message;
a determining unit 43, configured to send a node request message including the directional traffic domain name to the node server, trigger the node server to report a traffic statistic result corresponding to the directional traffic domain name to the scheduling server, and trigger the scheduling server to determine a traffic cost of the directional traffic domain name based on the traffic statistic result and a received SID traffic charging list sent by the directional traffic service server.
In the embodiment of the application, a domain name and a sub-domain name of a scheduling server are bound with the same SID for directional traffic charging in advance, then the scheduling server acquires a directional traffic domain name set corresponding to a specified domain name based on an access request message containing the specified domain name sent by a user terminal, and allocates a node server for the user terminal based on the directional traffic domain name, then the user terminal sends the node request message to the node server, and the node server reports access traffic corresponding to the directional traffic domain name. Therefore, only one SID is applied, each sub-domain bound with the SID is respectively used as a directional flow domain after each appointed domain is redirected, the access flow of the directional flow domain counted by the node server and a SID flow charging list are based, the flow charge of the directional flow domain is obtained, each enterprise user does not need to be configured with a corresponding SID, a large amount of time cost and system resources consumed by applying a large number of SIDs and configuring the SIDs are reduced, the cost of directional flow service charging is reduced, and the efficiency of directional flow charging is improved.
As will be appreciated by one of skill in the art, the embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present application.
It is apparent that those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if such modifications and variations of the embodiments of the present application fall within the scope of the claims of the embodiments of the present application and their equivalents, the embodiments of the present application are also intended to include such modifications and variations.