CN114238743A - Cost query method and related device for Content Delivery Network (CDN) - Google Patents

Cost query method and related device for Content Delivery Network (CDN) Download PDF

Info

Publication number
CN114238743A
CN114238743A CN202111547716.XA CN202111547716A CN114238743A CN 114238743 A CN114238743 A CN 114238743A CN 202111547716 A CN202111547716 A CN 202111547716A CN 114238743 A CN114238743 A CN 114238743A
Authority
CN
China
Prior art keywords
target
server
directory
information
query
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.)
Pending
Application number
CN202111547716.XA
Other languages
Chinese (zh)
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.)
Nanjing Opper Software Technology Co ltd
Original Assignee
Nanjing Opper Software Technology Co ltd
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 Nanjing Opper Software Technology Co ltd filed Critical Nanjing Opper Software Technology Co ltd
Priority to CN202111547716.XA priority Critical patent/CN114238743A/en
Publication of CN114238743A publication Critical patent/CN114238743A/en
Pending legal-status Critical Current

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/953Querying, e.g. by the use of web search engines
    • 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/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/14Charging, metering or billing arrangements for data wireline or wireless communications

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the application provides a cost query method and a related device for a CDN, wherein a directory generation server generates identification information according to resource request information of a client, then generates a directory according to the resource request information and the identification information, and then sends address information in the directory to the client, so that the client can send a resource acquisition request to a first electronic device according to the address information, and the first electronic device can generate log information according to the resource acquisition request, so that a service provider can determine CDN cost of each service according to the log information and the directory when querying CDN cost through the cost query server, and the CDN cost can be distributed to each service department according to the use condition, thereby facilitating cost control and service planning of the service provider.

Description

Cost query method and related device for Content Delivery Network (CDN)
Technical Field
The application belongs to the field of data processing, and particularly relates to a cost query method for a CDN and a related device.
Background
A Content Delivery Network (CDN) is an intelligent virtual Network built on the basis of the existing Network, and a user can obtain required Content nearby by using functional modules of load balancing, Content Delivery, scheduling and the like of a central platform by means of edge servers deployed in various places, so that Network congestion is reduced, and the access response speed and hit rate of the user are increased. The CDN has a main function of caching content at different locations, and directs a request of a user to a most appropriate cache server to obtain the content by using a load balancing technique.
Disclosure of Invention
The embodiment of the application provides a cost query method and a related device for a CDN (content delivery network), which aim to realize query of CDN cost according to service types and facilitate cost control and service planning by a service provider.
In a first aspect, an embodiment of the present application provides a cost query method for a CDN, which is applied to a directory generation server of a cost query system, where the cost query system includes the directory generation server, a cost query server, a client device, and a first electronic device, and the method includes:
acquiring resource request information, wherein the resource request information comprises the service type of the service resource requested by the client equipment;
generating identification information according to the service type;
generating a directory according to the resource request information and the identification information, wherein the directory comprises address information of the service resource, and the address information comprises the identification information;
the address information is sent to the client device, the address information is used for indicating a resource obtaining request of the client device for the first electronic device, the resource obtaining request is used for indicating a query log of the first electronic device, the query log comprises the identification information, the directory and the query log are used for jointly indicating the cost in the cost query server, and the first electronic device is the electronic device of a CDN service provider.
In a second aspect, an embodiment of the present application provides a cost query method for a CDN, which is applied to a cost query server of a cost query system, where the cost query system includes a directory generation server, the cost query server, a client device, a directory acquisition server, a first electronic device, and a second electronic device, and the method includes:
acquiring cost inquiry information from the second electronic equipment, wherein the cost inquiry information comprises a target service type, and the second electronic equipment is electronic equipment of a service provider;
determining a target directory from the directory acquisition server according to the target service type, wherein the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory comprises target address information, and the target address information comprises the target identification information;
determining the target identification information according to the target service type;
obtaining at least one target query log from the first electronic device according to the cost query information and the target identification information, wherein the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request comprises the target address information, and the target query log comprises the target identification information;
determining a target cost corresponding to the target service type according to the target directory and the at least one target query log;
and sending the target fee to the second electronic equipment.
In a third aspect, an embodiment of the present application provides a fee inquiry method, which is applied to a fee inquiry system, where the fee inquiry system includes a directory generation server, a fee inquiry server, a directory acquisition server, a client device, a first electronic device, and a second electronic device, and the method includes:
the directory generation server acquires resource request information from the client equipment, wherein the resource request information comprises the service type of the service resource requested by the client equipment;
the directory generation server generates identification information according to the service type;
the directory generation server generates a directory according to the resource request information and the identification information, wherein the directory comprises address information of the service resource, and the address information comprises the identification information;
the directory generation server sends the address information to the client device;
the client device sends a resource obtaining request to the first electronic device according to the address information, wherein the first electronic device is an electronic device of the CDN service provider;
the first electronic equipment sends the service resource to the client equipment according to the resource acquisition request and generates a query log, wherein the query log comprises the identification information;
the second electronic equipment sends expense query information to the expense query server, wherein the query information comprises a target service type, and the second electronic equipment is electronic equipment of a service provider;
the expense query server determines a target directory from the directory acquisition server according to the target service type;
the expense query server determines target identification information according to the service type;
the expense query server acquires at least one target query log from the first electronic equipment according to the expense query information and the target identification information;
the expense query server determines target expense corresponding to the target service type according to the target directory and the at least one target query log;
and the expense inquiry server sends the target expense to the second electronic equipment.
In a fourth aspect, an embodiment of the present application provides a cost query apparatus for a CDN, which is applied to a directory generation server of a cost query system, where the cost query system includes the directory generation server, a cost query server, a client device, and a first electronic device, and the apparatus includes: an obtaining unit, configured to obtain resource request information, where the resource request information includes a service type of a service resource requested by the client device; the first generating unit is used for generating identification information according to the service type; a second generating unit, configured to generate a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information; the sending unit is configured to send the address information to the client device, where the address information is used to indicate a resource acquisition request of the client device for the first electronic device, the resource acquisition request is used to indicate a query log of the first electronic device, the query log includes the identification information, the directory and the query log are used to jointly indicate the cost in the cost query server, and the first electronic device is an electronic device of a CDN service provider.
In a fifth aspect, an embodiment of the present application provides a cost query apparatus for a CDN, which is applied to a cost query server of a cost query system, where the cost query system includes a directory generation server, the cost query server, a client device, a directory acquisition server, a first electronic device, and a second electronic device, and the apparatus includes: a first obtaining unit, configured to obtain cost query information from the second electronic device, where the cost query information includes a target service type, and the second electronic device is an electronic device of a service provider; a second obtaining unit, configured to determine a target directory from the directory obtaining server according to the target service type, where the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory includes target address information, and the target address information includes the target identification information; a first determining unit, configured to determine the target identifier information according to the target service type; a third obtaining unit, configured to obtain at least one target query log from the first electronic device according to the cost query information and the target identification information, where the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request includes the target address information, and the target query log includes the target identification information; a second determining unit, configured to determine, according to the target directory and the at least one target query log, a target cost corresponding to the target service type; a sending unit, configured to send the target fee to the second electronic device.
In a sixth aspect, an embodiment of the present application provides a cost query apparatus for a CDN, which is applied to a cost query system, where the cost query system includes a directory generation server, a cost query server, a directory acquisition server, a client device, a first electronic device, and a second electronic device, and the apparatus includes: a first obtaining unit, configured to obtain, by the directory generation server, resource request information from the client device, where the resource request information includes a service type of a service resource requested by the client device; the first generating unit is used for generating identification information by the directory generation server according to the service type; a second generating unit, configured to generate, by the directory generation server, a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information; a first sending unit, configured to send, by the directory generation server, the address information to the client device; a second sending unit, configured to send, by the client device, a resource acquisition request to the first electronic device according to the address information, where the first electronic device is an electronic device of the CDN service provider; a third sending unit, configured to send, by the first electronic device, the service resource to the client device according to the resource acquisition request, and generate a query log, where the query log includes the identification information; a fourth sending unit, configured to send, by the second electronic device, cost query information to the cost query server, where the query information includes a target service type, and the second electronic device is an electronic device of a service provider; a first determining unit, configured to determine, by the fee inquiry server, a target directory from the directory acquisition server according to the target service type; a second determining unit, configured to determine, by the fee inquiry server, target identification information according to the service type; a second obtaining unit, configured to obtain, by the expense query server, at least one target query log from the first electronic device according to the expense query information and the target identification information; a third determining unit, configured to determine, by the cost query server, a target cost corresponding to the target service type according to the target directory and the at least one target query log; a fifth sending unit, configured to send the target fee to the second electronic device by the fee inquiry server.
In a seventh aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect, the second aspect, or the third aspect of the embodiment of the present application.
In an eighth aspect, an embodiment of the present application provides a computer storage medium, which is characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform some or all of the steps described in the first aspect, the second aspect, or the third aspect of the present embodiment.
In a ninth aspect, embodiments of the present application provide a computer program product, where the computer program product comprises a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect, the second aspect, or the third aspect of embodiments of the present application. The computer program product may be a software installation package.
It can be seen that, in the embodiment of the present application, the directory generation server generates identification information according to the resource request information of the client, then generates a directory according to the resource request information and the identification information, and then sends the address information in the directory to the client, so that the client can send a resource acquisition request to the first electronic device according to the address information, so that the first electronic device generates log information according to the resource acquisition request, so that when a service provider queries CDN fees through the fee query server, the fee of each service can be determined according to the log information and the directory, so that the fee of the CDN can be distributed to each service department according to the use condition, and the service provider can perform cost control and service planning conveniently.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1a is a schematic diagram of an architecture of an expense query system according to an embodiment of the present application;
fig. 1b is a schematic structural diagram of a server provided in an embodiment of the present application;
FIG. 1c is a block diagram of a fee inquiry system according to an embodiment of the present invention;
FIG. 1d is a diagram illustrating a deployment architecture of a fee inquiry system according to an embodiment of the present application;
fig. 2a is a schematic flowchart of a cost query method for a CDN according to an embodiment of the present application;
FIG. 2b is a timing diagram for configuration acquisition according to an embodiment of the present application;
FIG. 2c is a timing diagram of a directory mapping process provided by an embodiment of the present application;
fig. 3 is a schematic flowchart of another cost query method for a CDN according to an embodiment of the present application;
fig. 4 is a schematic flowchart of another fee query method for a CDN according to an embodiment of the present application;
fig. 5 is a block diagram illustrating functional units of a cost query device for a CDN according to an embodiment of the present application;
fig. 6 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in an embodiment of the present application;
fig. 7 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in an embodiment of the present application;
fig. 8 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in an embodiment of the present application;
fig. 9 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in an embodiment of the present application;
fig. 10 is a block diagram of functional units of another fee inquiry apparatus for a CDN according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present application better understood, 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, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Currently, when a service party provides a service to a user through a CDN, a fee needs to be delivered to the CDN service provider according to rules, but the cost of each service department on the CDN cannot be determined according to the actual usage of each service currently, which is not favorable for statistics and cost control.
In view of the foregoing problems, embodiments of the present application provide a cost query method for a CDN and a related device, and the following describes the embodiments of the present application in detail with reference to the accompanying drawings.
Referring to fig. 1a, fig. 1a is a schematic diagram illustrating an architecture of a fee inquiry system according to an embodiment of the present disclosure. As shown in fig. 1a, the fee inquiry system 10 includes a client device 101, a catalog generation server 102, a catalog acquisition server 103, a fee inquiry server 104, a first electronic device 105, and a second electronic device 106. The client device 101 is configured to send resource request information and display the obtained service resources, and the directory generation server 102 is configured to generate a new directory according to the resource request information from the client device, so that the client device 101 can initiate a request to a CDN service provider, that is, the first electronic device 105, according to address information in the generated directory, and the first electronic device 105 returns corresponding service resources to the client device 101 according to a resource acquisition request of the client device 101. When the service provider needs to perform CDN cost query, the cost query information may be sent to the cost query server 104 through the second electronic device 106, and the cost query server 104 determines the cost according to the directory in the directory acquisition server 103 and the log information in the first electronic device 105.
The catalog generation server 102, the catalog acquisition server 103, and the fee inquiry server may be located in the same server cluster, and the structures of these servers may be as shown in fig. 1b, where fig. 1b is a schematic structural diagram of a server provided in this embodiment of the present application. The server 110 comprises a processor 120 memory 130, a communication interface 140, and one or more programs 131, wherein the one or more programs 131 are stored in the memory 130 and configured to be executed by the application processor 120, and the one or more programs 131 comprise instructions for performing any of the steps of the method embodiments described below. In a specific implementation, the processor 120 is configured to perform any one of the steps performed by the electronic device in the method embodiments described below, and when performing data transmission such as sending, optionally invokes the communication interface 140 to complete the corresponding operation. Here, the configurations of the client apparatus 101, the first electronic apparatus 105, and the second electronic apparatus 106 may be the same as the configuration of the server 110.
Referring to fig. 1c, fig. 1c is a schematic diagram of a framework of a fee inquiry system according to an embodiment of the present disclosure. As shown, the fee inquiry system includes an access layer, a service layer, and an infrastructure layer. The access stratum includes an operations platform and a directory generation server, which may also be referred to as a cost-accounting Software Development Kit (SDK). The service layer comprises a directory acquisition server and a cost query server, wherein the directory acquisition server can also be called a CDN cost accounting server, and the cost query server can also be called a CDN cost synchronization server, and is used for providing the capacity of counting CDN cost of each dimension according to different services and different attributes, exposing a query interface outwards and querying related service parties. The base device layer comprises a database, a CDN server and a message queue server, wherein the CDN server is used for providing CDN service.
The directory generation server and the directory acquisition server may include multiple servers, and each of the directory generation server and the directory acquisition server may be deployed at a location of the CDN server to achieve global multi-activity, thereby ensuring high availability of services and security of privacy. The expense query server can be deployed at a preset address, and the availability of the interface is ensured by reading the slave node data of the databases of all the local machine rooms and using the fragmentation function of the databases. For example, as shown in fig. 1d, fig. 1d is a deployment architecture diagram of a fee inquiry system according to an embodiment of the present application. Fig. 1d includes three directory generation servers deployed at different locations, where the directory generation servers at address a and address B share the directory acquisition server and the database at address a, and address C includes a separate directory acquisition server and database, where the directory generation servers at address a and address B send generated addresses to the directory acquisition server a, the directory acquisition server a stores the acquired directory in the database 1A, the directory generation server at address C sends the generated directory to the directory acquisition server C and stores the generated directory in the database C through the directory acquisition server C, and the cost inquiry server is located at a specific address, which may be any one of address a, address B, or address C, or a new address. For example, the fee inquiry server in this example is located in address a, and through the database sharding function, the fee inquiry server obtains information such as directories from database shard 1A and database shard C, and then stores the processed and obtained data into data 2A.
Referring to fig. 2a, fig. 2a is a schematic flowchart illustrating a cost query method for a CDN according to an embodiment of the present disclosure. As shown in the figure, the cost query method for the CDN is applied to a cost query system, where the cost query system includes a directory generation server, a cost query server, a directory acquisition server, a client device, a first electronic device, and a second electronic device, and the method includes the following steps:
step 201, the catalog generation server obtains resource request information from the client device.
Wherein the resource request information includes a service type of the service resource requested by the client device. In a specific implementation, the client may send Resource request information to a Resource distribution server of the CDN service provider, and the Resource distribution server performs Resource information detection according to the Resource request information to obtain attribute information of the Resource information, such as information of a service type, an original Uniform Resource Locator (URL), a version, and the like. The resource distribution server transmits the attribute information to the directory generation server.
In one possible example, before the directory generation server obtains the resource request information from the client device, the method further includes: the directory generation server acquires attribute configuration information from the directory acquisition server; caching the attribute configuration information.
After the service provider accesses the directory generation server, the directory generation server first queries attribute-related configuration and caches the acquired service attribute configuration. Particularly, the directory generation server may obtain the information of the attribute-related configuration from the directory acquisition server, and when the directory acquisition server is started, the directory acquisition server may pull the attribute configuration configured in advance by the service personnel and cache the attribute configuration locally. For example, as shown in fig. 2b, fig. 2b is a timing chart for acquiring a configuration according to an embodiment of the present application. The charge inquiry system can also comprise a configuration center, service personnel configure the service attribute information in advance and store the service attribute information in the configuration center, so that the directory acquisition server can pull the service attribute configuration information of the configuration center when being started and load the service attribute configuration information into a local cache, and the directory generation server can acquire the service attribute configuration from the directory acquisition server and cache the service attribute configuration.
Therefore, in the embodiment, the directory generation server can acquire the service attribute configuration information in advance, so that the efficiency and the accuracy of directory generation are improved when the directory is generated according to the service type.
Step 202, the directory generation server generates identification information according to the service type;
step 203, the catalog generation server generates a catalog according to the resource request information and the identification information, wherein the catalog includes address information of the service resource.
Wherein the address information includes the identification information. That is, after the directory generation service acquires the resource request information, it generates a corresponding unique identifier according to the service type, and then generates a directory according to the identifier, so that the directories generated by the same resource request are the same, and the directory includes address information, that is, a URL, so that the address information also includes the identifier information corresponding to the service type, that is, the identifier information and the address information can be spliced to obtain a new URL with a service type attribute.
In one possible example, the generating the identification information by the directory generation server according to the service type includes: determining target configuration information from the attribute configuration information according to the service type; generating the identification information according to the target configuration information; the directory generation server generates a directory according to the resource request information and the identification information, and the directory generation method includes: acquiring an original catalog according to the resource request information; and generating the catalog according to the original catalog and the identification information.
Wherein, the original directory includes original address information of the service resource corresponding to the resource request information. The target configuration information includes service type information, so that the address information included in the newly generated directory may be obtained by concatenating the original address information and the identification information.
As can be seen, in this example, the directory is generated according to the identification information, so that when querying the CDN cost, a specific service type can be located.
In one possible example, after the catalog generation server generates the catalog according to the resource request information and the identification information, the method further includes: the directory generation server determining whether the directory has been cached; if not, the directory generation server sends the directory to the directory acquisition server and caches the directory.
For example, as shown in fig. 2c, fig. 2c is a sequence diagram of directory mapping provided in the embodiment of the present application. As shown in the figure, after the directory is generated, it may be determined whether the directory is cached locally, if so, it may be indicated that the directory has been reported to the directory retrieval server, and if the directory is not cached locally, it means that the directory has not been reported to the directory retrieval server, so that the directory needs to be reported, and after reporting, the directory is written into the local cache. The directory acquisition server also consumes the directory information from the message queue server.
Therefore, in this example, whether to report the directory to the directory acquisition server is determined according to whether the directory exists in the local cache, so that occupation of system resources can be reduced.
In one possible example, the fee inquiry system further includes a message queue server, and the directory generation server sends the directory to the directory acquisition server, including: sending a registration request to the message queue server; and after the registration is successful, the directory is sent to the message queue server, so that the directory acquisition server acquires the directory from the message queue server.
For example, as shown in fig. 2b, after the business party accesses the directory generation server, the business party further obtains a Message Queue (MQ) and registers the MQ producer, so that after the directory generation server generates a directory and locally caches the directory, the directory generation server may encapsulate the directory into MQ messages and send the MQ messages to the directory acquisition server. The directory acquisition server is used as a consumer of the MQ, the MQ message of the directory generation server can be read, and then the directory information is written into the database after the operations of parameter verification, structure conversion and the like are carried out.
Therefore, in the embodiment, the flexibility and the stability of the system can be improved by sending and acquiring the message through the message queue.
Step 204, the directory generation server sends the address information to the client device;
step 205, the client device sends a resource obtaining request to the first electronic device according to the address information;
step 206, the first electronic device sends the service resource to the client device according to the resource obtaining request, and generates a query log.
The first electronic device is an electronic device of the CDN service provider.
In a possible example, before the first electronic device sends the target resource to the client device according to the resource obtaining request, the method further includes: the client device sends the resource obtaining request to a target CDN server in the CDN servers; the target CDN server determines whether to cache the service resource according to the resource acquisition request; if yes, the target CDN server sends the service resource to the client equipment; if not, the target CDN server determines source returning information according to the resource acquisition request; the target CDN server deletes information related to the service type in the source returning information to obtain target source returning information; the target CDN server sends the back source information to a higher-level CDN service server, wherein the higher-level CDN server is a CDN server in the CDN servers; the target CDN server acquires the service resources from the upper CDN server; and the target CDN server sends the service resource to the client equipment.
The target CDN server is used for providing CDN service, each CDN server can be located in different places, when the client device requests resources through the CDN, resource request information can be sent to the CDN server located at the same address as the client device, and if corresponding service resources are cached in the target CDN server, the service resources can be returned to the client device. If the local cache does not store the corresponding service resource, the resource is requested from a higher-level CDN server of the target CDN server, namely, the resource is returned to the source. The target CDN server may be a server at a primary node, and the upper CDN server may be a server at a secondary node or a source station server. When the CDN returns to the source, the directory encapsulated by the SDK is removed, that is, the directory when returning to the source does not include information related to the service attribute, so that transparent operation on the service party can be implemented.
Therefore, in this example, the CDN leaves the extra directory when returning to the source, and when the client device accesses the resource, the CDN leaves the spliced extra directory to take the actual path of the resource, so that the service side does not perceive it.
Step 207, the second electronic device sends the fee inquiry information to the fee inquiry server.
The query information includes a target service type, and the second electronic device is an electronic device of a service provider. The query information may also include a client device-defined query dimension, which may include time period-based CDN cost statistics, time period-based or domain name-based CDN traffic or broadband usage statistics, and so on. That is, all resources may be service-divided, and the capability of querying CDN traffic or cost according to a domain name is provided, and for an access cost accounting SDK, that is, a service party of a directory generation server, each service party is also supported to perform CDN traffic and cost query by customizing a query dimension.
Step 208, the expense query server determines a target directory from the directory acquisition server according to the target service type;
step 209, the fee inquiry server determines target identification information according to the service type;
step 210, the fee inquiry server obtains at least one target inquiry log from the first electronic device according to the fee inquiry information and the target identification information;
step 211, the fee inquiry server determines a target fee corresponding to the target service type according to the target directory and the at least one target inquiry log;
step 212, the fee inquiry server sends the target fee to the second electronic device.
The first electronic device records relevant logs each time the resource of the client device requests, and the logs can also carry corresponding identification information, so that the cost query server obtains the catalogue stored by the server according to the logs and the catalogue provided by the first electronic device to perform cost query, and the CDN cost of the daily active catalogue can be pulled to provide CDN data query capability for visual display.
In this example, the directory generation server generates identification information according to the resource request information of the client, then generates a directory according to the resource request information and the identification information, and then sends the address information in the directory to the client, so that the client can send a resource acquisition request to the first electronic device according to the address information, so that the first electronic device generates log information according to the resource acquisition request, so that a service provider can determine the cost of each service according to the log information and the directory when querying the CDN cost through the cost query server, so that the CDN cost can be distributed to each service department according to the use condition, and the service provider can perform cost control and service planning conveniently.
Referring to fig. 3, fig. 3 is a schematic flowchart of another fee query method for a CDN according to an embodiment of the present disclosure, where as shown in the figure, the fee query method for a CDN is applied to a directory generation server of a fee query system, where the fee query system includes the directory generation server, the fee query server, a client device, and a first electronic device, the method includes the following steps:
s301, acquiring resource request information, wherein the resource request information comprises the service type of the service resource requested by the client equipment;
s302, generating identification information according to the service type;
s303, generating a directory according to the resource request information and the identification information, wherein the directory comprises address information of the service resource, and the address information comprises the identification information;
s304, send the address information to the client device, where the address information is used to indicate a resource obtaining request of the client device for the first electronic device, the resource obtaining request is used to indicate a query log of the first electronic device, the query log includes the identification information, the directory and the query log are used to jointly indicate the cost in the cost query server, and the first electronic device is an electronic device of a CDN service provider.
In this example, the directory generation server generates identification information according to the resource request information of the client, then generates a directory according to the resource request information and the identification information, and then sends the address information in the directory to the client, so that the client can send a resource acquisition request to the first electronic device according to the address information, so that the first electronic device generates log information according to the resource acquisition request, so that a service provider can determine the cost of each service according to the log information and the directory when querying the CDN cost through the cost query server, so that the CDN cost can be distributed to each service department according to the use condition, and the service provider can perform cost control and service planning conveniently.
In one possible example, the fee inquiry system further includes a catalog retrieval server, and before retrieving the resource request information, the method further includes: acquiring attribute configuration information from the directory acquisition server; caching the attribute configuration information; the generating of the identification information according to the service type includes: determining target configuration information from the attribute configuration information according to the service type; generating the identification information according to the target configuration information; the generating a directory according to the resource request information and the identification information includes: acquiring an original catalog according to the resource request information; and generating the catalog according to the original catalog and the identification information.
Therefore, in this example, the directory generation server caches the configuration information in advance, so that after the resource request information is obtained, the identification information can be quickly generated according to the configuration information, and a new directory is generated according to the identification information and the original directory corresponding to the resource. Therefore, the efficiency of generating the directory can be improved, and when subsequent client equipment uses the address information in the directory to acquire resources, the log information generated by the first electronic equipment can include attribute information related to the service type, so that the subsequent fee inquiry according to the service type is facilitated.
In one possible example, after the generating the directory according to the original directory and the identification information, the method further includes: determining whether the directory has been cached; if not, the directory is sent to the directory acquisition server, and the directory is cached.
Therefore, if the newly generated directory is cached, the directory is not sent to the directory acquisition server any more, and system resources can be saved.
In one possible example, the fee inquiry system further includes a message queue server, and the sending the target directory to the directory acquisition server includes: sending a registration request to the message queue server; and after the registration is successful, the directory is sent to the message queue server, so that the directory acquisition server acquires the directory from the message queue server.
Therefore, in the embodiment, the generated catalog is encapsulated into the MQ message, and the MQ message is consumed and stored by the catalog acquisition server, so that the flexibility and the stability of catalog acquisition can be improved.
Referring to fig. 4, fig. 4 is a schematic flowchart illustrating another cost query method for a CDN according to an embodiment of the present application. As shown in the figure, the fee query method for the CDN is applied to a fee query server of a fee query system, where the fee query system includes a directory generation server, the fee query server, a client device, a directory acquisition server, a first electronic device, and a second electronic device, and the method includes the following steps:
s401, acquiring cost inquiry information from the second electronic equipment, wherein the cost inquiry information comprises a target service type, and the second electronic equipment is electronic equipment of a service provider;
s402, determining a target directory from the directory acquisition server according to the target service type, wherein the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory comprises target address information, and the target address information comprises the target identification information;
s403, determining the target identification information according to the target service type;
s404, obtaining at least one target query log from the first electronic device according to the cost query information and the target identification information, where the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request includes the target address information, and the target query log includes the target identification information;
s405, determining a target cost corresponding to the target service type according to the target directory and the at least one target query log;
s406, the target fee is sent to the second electronic device.
As can be seen, in this example, after the fee query server obtains the query information of the second electronic device, the fee query server obtains the directory information from the directory obtaining server, and obtains the log information from the first electronic device, so that the fee query server can calculate the CDN fee based on the service type, so that the CDN fee can be distributed to each service department according to the use situation, and the service provider can perform cost control and service planning conveniently.
In accordance with the foregoing embodiments, please refer to fig. 5, fig. 5 is a block diagram of functional units of a cost query apparatus for a CDN, where the cost query apparatus 50 for the CDN is applied to a cost query system, where the cost query system includes a directory generation server, a cost query server, a directory acquisition server, a client device, a first electronic device, and a second electronic device, and the apparatus 50 includes: a first obtaining unit 501, configured to obtain, by the directory generation server, resource request information from the client device, where the resource request information includes a service type of a service resource requested by the client device; a first generating unit 502, configured to generate, by the directory generation server, identification information according to the service type; a second generating unit 503, configured to generate, by the directory generation server, a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information; a first sending unit 504, configured to send the address information to the client device by the directory generation server; a second sending unit 505, configured to send, by the client device, a resource obtaining request to the first electronic device according to the address information, where the first electronic device is an electronic device of the CDN service provider; a third sending unit 506, configured to send, by the first electronic device, the service resource to the client device according to the resource acquisition request, and generate a query log, where the query log includes the identification information; a fourth sending unit 507, configured to send, by the second electronic device, cost query information to the cost query server, where the query information includes a target service type, and the second electronic device is an electronic device of a service provider; a first determining unit 508, configured to determine, by the fee inquiry server, a target directory from the directory acquisition server according to the target service type; a second determining unit 509, configured to determine, by the fee inquiry server, target identification information according to the service type; a second obtaining unit 510, configured to obtain, by the expense query server, at least one target query log from the first electronic device according to the expense query information and the target identification information; a third determining unit 511, configured to determine, by the cost query server, a target cost corresponding to the target service type according to the target directory and the at least one target query log; a fifth sending unit 512, configured to send the target fee to the second electronic device by the fee inquiry server.
In a possible example, before the fee inquiry system further includes a plurality of CDN servers, and the first electronic device sends the target resource to the client device according to the resource obtaining request, the apparatus 50 is further configured to: the client device sends the resource obtaining request to a target CDN server in the CDN servers; the target CDN server determines whether to cache the service resource according to the resource acquisition request; if yes, the target CDN server sends the service resource to the client equipment; if not, the target CDN server determines source returning information according to the resource acquisition request; the target CDN server deletes information related to the service type in the source returning information to obtain target source returning information; the target CDN server sends the back source information to a higher-level CDN service server, wherein the higher-level CDN server is a CDN server in the CDN servers; the target CDN server acquires the service resources from the upper CDN server; and the target CDN server sends the service resource to the client equipment.
In the case of using an integrated unit, as shown in fig. 6, fig. 6 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in the embodiment of the present application. In fig. 6, the fee inquiry apparatus 600 for the CDN includes: a processing module 612 and a communication module 611. The processing module 612 is used for controlling and managing actions of the operation log generation device, for example, executing steps of the first acquisition unit 501, the first generation unit 502, the second generation unit 503, the first transmission unit 504, the second transmission unit 505, the third transmission unit 506, the fourth transmission unit 507, the first determination unit 508, the second determination unit 509, the second acquisition unit 510, the third determination unit 511, and the fifth transmission unit 512, and/or other processes for executing the techniques described herein. The communication module 611 is used to query the interaction between the device and other devices for the cost of the CDN. As shown in fig. 6, the fee query device for the CDN may further include a storage module 613, and the storage module 613 is configured to store program codes and data of the fee query device for the CDN.
The Processing module 612 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 611 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 613 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The fee inquiry apparatus 600 for CDN may execute the fee inquiry method for CDN shown in fig. 2 a.
In accordance with the foregoing embodiments, please refer to fig. 7, fig. 7 is a block diagram of functional units of another fee query apparatus for a CDN provided in an embodiment of the present application, where the fee query apparatus 70 for a CDN is applied to a directory generation server of a fee query system, where the fee query system includes the directory generation server, a fee query server, a client device and a first electronic device, and the apparatus 70 includes: an obtaining unit 701, configured to obtain resource request information, where the resource request information includes a service type of a service resource requested by the client device; a first generating unit 702, configured to generate identification information according to the service type; a second generating unit 703, configured to generate a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information; a sending unit 704, configured to send the address information to the client device, where the address information is used to indicate a resource obtaining request of the client device for the first electronic device, the resource obtaining request is used to indicate a query log of the first electronic device, the query log includes the identification information, the directory and the query log are used to jointly indicate the cost in the cost query server, and the first electronic device is an electronic device of a CDN service provider.
In one possible example, before the fee inquiry system further includes a catalog retrieval server, the device 70 is further configured to: acquiring attribute configuration information from the directory acquisition server; caching the attribute configuration information; the generating of the identification information according to the service type includes: determining target configuration information from the attribute configuration information according to the service type; generating the identification information according to the target configuration information; the generating a directory according to the resource request information and the identification information includes: acquiring an original catalog according to the resource request information; and generating the catalog according to the original catalog and the identification information.
In one possible example, after the generating the catalog according to the original catalog and the identification information, the apparatus 70 is further configured to: determining whether the directory has been cached; if not, the directory is sent to the directory acquisition server, and the directory is cached.
In one possible example, in the aspect that the fee inquiry system further includes a message queue server, and the sending the target directory to the directory acquisition server, the apparatus 70 is further configured to: sending a registration request to the message queue server; and after the registration is successful, the directory is sent to the message queue server, so that the directory acquisition server acquires the directory from the message queue server.
In the case of using an integrated unit, as shown in fig. 8, fig. 8 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in the embodiment of the present application. In fig. 8, a fee inquiry apparatus 800 for a CDN includes: a processing module 812 and a communication module 811. The processing module 812 is used for controlling and managing actions of the operation log generation apparatus, for example, executing steps of the acquisition unit 701, the first generation unit 702, the second generation unit 703, and the transmission unit 704, and/or other processes for executing the techniques described herein. The communication module 811 is used to query the interaction between the device and other equipment for the cost of the CDN. As shown in fig. 8, the cost query device for the CDN may further include a storage module 813, and the storage module 813 is configured to store program codes and data of the cost query device for the CDN.
The Processing module 812 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 811 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 813 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The fee inquiry apparatus 800 for CDN may execute the fee inquiry method for CDN shown in fig. 3.
Referring to fig. 9, fig. 9 is a block diagram illustrating functional units of another fee inquiry apparatus for a CDN according to an embodiment of the present application. As shown in the figure, the fee inquiry apparatus for the CDN is applied to a fee inquiry server of a fee inquiry system, where the fee inquiry system includes a directory generation server, the fee inquiry server, a client device, a directory acquisition server, a first electronic device, and a second electronic device, and the apparatus 90 includes: a first obtaining unit 901, configured to obtain cost query information from the second electronic device, where the cost query information includes a target service type, and the second electronic device is an electronic device of a service provider; a second obtaining unit 902, configured to determine a target directory from the directory obtaining server according to the target service type, where the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory includes target address information, and the target address information includes the target identification information; a first determining unit 903, configured to determine the target identifier information according to the target service type; a third obtaining unit 904, configured to obtain, according to the cost query information and the target identification information, at least one target query log from the first electronic device, where the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request includes the target address information, and the target query log includes the target identification information; a second determining unit 905, configured to determine, according to the target directory and the at least one target query log, a target cost corresponding to the target service type; a sending unit 906, configured to send the target fee to the second electronic device.
In the case of using an integrated unit, as shown in fig. 10, fig. 10 is a block diagram of functional units of another fee inquiry apparatus for a CDN provided in an embodiment of the present application. In fig. 10, the fee inquiry apparatus 100 for a CDN includes: a processing module 112 and a communication module 111. The processing module 112 is used for controlling and managing actions of the operation log generation apparatus, for example, executing steps of the first acquisition unit 901, the second acquisition unit 902, the first determination unit 903, the third acquisition unit 904, the second determination unit 905, and the transmission unit 906, and/or other processes for executing the techniques described herein. The communication module 111 is used for interaction between the fee inquiry apparatus and other devices for the CDN. As shown in fig. 10, the fee inquiry apparatus for the CDN may further include a storage module 113, and the storage module 113 is configured to store program codes and data of the fee inquiry apparatus for the CDN.
The Processing module 112 may be a Processor or a controller, and may be, for example, a Central Processing Unit (CPU), a general-purpose Processor, a Digital Signal Processor (DSP), an ASIC, an FPGA or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others. The communication module 111 may be a transceiver, an RF circuit or a communication interface, etc. The storage module 113 may be a memory.
All relevant contents of each scene related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again. The fee inquiry apparatus 100 for the CDN may perform the fee inquiry method for the CDN shown in fig. 4.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. The procedures or functions according to the embodiments of the present application are wholly or partially generated when the computer instructions or the computer program are loaded or executed on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire or wirelessly. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more collections of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk.
Embodiments of the present application also provide a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, the computer program enabling a computer to execute part or all of the steps of any one of the methods described in the above method embodiments, and the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising an electronic device.
It should be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned 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 application.
In the several embodiments provided in the present application, it should be understood that the disclosed method, apparatus and system may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative; for example, the division of the unit is only a logic function division, and there may be another division manner in actual implementation; for example, various elements or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be physically included alone, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: u disk, removable hard disk, magnetic disk, optical disk, volatile memory or non-volatile memory. The non-volatile memory may be a read-only memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an electrically Erasable EPROM (EEPROM), or a flash memory. Volatile memory can be Random Access Memory (RAM), which acts as external cache memory. By way of example, but not limitation, many forms of Random Access Memory (RAM) are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct bus RAM (DR RAM). And the like, which may store program code.
Although the present invention is disclosed above, the present invention is not limited thereto. Various changes and modifications can be easily made by those skilled in the art without departing from the spirit and scope of the present invention, and it is within the scope of the present invention to include different functions, combination of implementation steps, software and hardware implementations.

Claims (12)

1. A cost query method for a Content Delivery Network (CDN) is characterized by being applied to a catalog generation server of a cost query system, wherein the cost query system comprises the catalog generation server, the cost query server, a client device and a first electronic device, and the method comprises the following steps:
acquiring resource request information, wherein the resource request information comprises the service type of the service resource requested by the client equipment;
generating identification information according to the service type;
generating a directory according to the resource request information and the identification information, wherein the directory comprises address information of the service resource, and the address information comprises the identification information;
the address information is sent to the client device, the address information is used for indicating a resource obtaining request of the client device for the first electronic device, the resource obtaining request is used for indicating a query log of the first electronic device, the query log comprises the identification information, the directory and the query log are used for jointly indicating the cost in the cost query server, and the first electronic device is the electronic device of a CDN service provider.
2. The method of claim 1, wherein the fee inquiry system further comprises a directory retrieval server, and wherein prior to retrieving the resource request information, the method further comprises:
acquiring attribute configuration information from the directory acquisition server;
caching the attribute configuration information;
the generating of the identification information according to the service type includes:
determining target configuration information from the attribute configuration information according to the service type;
generating the identification information according to the target configuration information;
the generating a directory according to the resource request information and the identification information includes:
acquiring an original catalog according to the resource request information;
and generating the catalog according to the original catalog and the identification information.
3. The method of claim 2, wherein after generating the catalog based on the original catalog and the identification information, the method further comprises:
determining whether the directory has been cached;
if not, the directory is sent to the directory acquisition server, and the directory is cached.
4. The method of claim 3, wherein the fee inquiry system further comprises a message queue server, and wherein sending the target directory to the directory acquisition server comprises:
sending a registration request to the message queue server;
and after the registration is successful, the directory is sent to the message queue server, so that the directory acquisition server acquires the directory from the message queue server.
5. A cost query method for CDN is characterized in that the method is applied to a cost query server of a cost query system, the cost query system comprises a catalog generation server, the cost query server, a client device, a catalog acquisition server, a first electronic device and a second electronic device, and the method comprises the following steps:
acquiring cost inquiry information from the second electronic equipment, wherein the cost inquiry information comprises a target service type, and the second electronic equipment is electronic equipment of a service provider;
determining a target directory from the directory acquisition server according to the target service type, wherein the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory comprises target address information, and the target address information comprises the target identification information;
determining the target identification information according to the target service type;
obtaining at least one target query log from the first electronic device according to the cost query information and the target identification information, wherein the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request comprises the target address information, and the target query log comprises the target identification information;
determining a target cost corresponding to the target service type according to the target directory and the at least one target query log;
and sending the target fee to the second electronic equipment.
6. A cost query method for a CDN is applied to a cost query system, wherein the cost query system comprises a catalog generation server, a cost query server, a catalog acquisition server, a client device, a first electronic device and a second electronic device, and the method comprises the following steps:
the directory generation server acquires resource request information from the client equipment, wherein the resource request information comprises the service type of the service resource requested by the client equipment;
the directory generation server generates identification information according to the service type;
the directory generation server generates a directory according to the resource request information and the identification information, wherein the directory comprises address information of the service resource, and the address information comprises the identification information;
the directory generation server sends the address information to the client device;
the client device sends a resource obtaining request to the first electronic device according to the address information, wherein the first electronic device is an electronic device of the CDN service provider;
the first electronic equipment sends the service resource to the client equipment according to the resource acquisition request and generates a query log, wherein the query log comprises the identification information;
the second electronic equipment sends expense query information to the expense query server, wherein the query information comprises a target service type, and the second electronic equipment is electronic equipment of a service provider;
the expense query server determines a target directory from the directory acquisition server according to the target service type;
the expense query server determines target identification information according to the service type;
the expense query server acquires at least one target query log from the first electronic equipment according to the expense query information and the target identification information;
the expense query server determines target expense corresponding to the target service type according to the target directory and the at least one target query log;
and the expense inquiry server sends the target expense to the second electronic equipment.
7. The method of claim 6, wherein the fee inquiry system further comprises a plurality of CDN servers, and wherein before the first electronic device sends the target resource to the client device according to the resource acquisition request, the method further comprises:
the client device sends the resource obtaining request to a target CDN server in the CDN servers;
the target CDN server determines whether to cache the service resource according to the resource acquisition request;
if yes, the target CDN server sends the service resource to the client equipment;
if not, the target CDN server determines source returning information according to the resource acquisition request;
the target CDN server deletes information related to the service type in the source returning information to obtain target source returning information;
the target CDN server sends the back source information to a higher-level CDN service server, wherein the higher-level CDN server is a CDN server in the CDN servers;
the target CDN server acquires the service resources from the upper CDN server;
and the target CDN server sends the service resource to the client equipment.
8. A fee inquiry apparatus for a CDN, wherein the fee inquiry apparatus is applied to a directory generation server of a fee inquiry system, the fee inquiry system includes the directory generation server, a fee inquiry server, a client device, and a first electronic device, and the apparatus includes:
an obtaining unit, configured to obtain resource request information, where the resource request information includes a service type of a service resource requested by the client device;
the first generating unit is used for generating identification information according to the service type;
a second generating unit, configured to generate a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information;
the sending unit is configured to send the address information to the client device, where the address information is used to indicate a resource acquisition request of the client device for the first electronic device, the resource acquisition request is used to indicate a query log of the first electronic device, the query log includes the identification information, the directory and the query log are used to jointly indicate the cost in the cost query server, and the first electronic device is an electronic device of a CDN service provider.
9. The utility model provides a expense inquiry unit to CDN, characterized in that, is applied to expense inquiry server of expense inquiry system, expense inquiry system includes catalog generation server, expense inquiry server, client device, catalog acquisition server, first electronic equipment and second electronic equipment, the device includes:
a first obtaining unit, configured to obtain cost query information from the second electronic device, where the cost query information includes a target service type, and the second electronic device is an electronic device of a service provider;
a second obtaining unit, configured to determine a target directory from the directory obtaining server according to the target service type, where the target directory is generated by the directory generation server according to resource request information and target identification information, the target identification information is generated according to the target service type, the target directory includes target address information, and the target address information includes the target identification information;
a first determining unit, configured to determine the target identifier information according to the target service type;
a third obtaining unit, configured to obtain at least one target query log from the first electronic device according to the cost query information and the target identification information, where the first electronic device is an electronic device of a CDN service provider, the target query log is generated according to a resource obtaining request of the client device, the resource obtaining request includes the target address information, and the target query log includes the target identification information;
a second determining unit, configured to determine, according to the target directory and the at least one target query log, a target cost corresponding to the target service type;
a sending unit, configured to send the target fee to the second electronic device.
10. A fee inquiry apparatus for a CDN, which is applied to a fee inquiry system including a directory generation server, a fee inquiry server, a directory acquisition server, a client device, a first electronic device, and a second electronic device, the apparatus comprising:
a first obtaining unit, configured to obtain, by the directory generation server, resource request information from the client device, where the resource request information includes a service type of a service resource requested by the client device;
the first generating unit is used for generating identification information by the directory generation server according to the service type;
a second generating unit, configured to generate, by the directory generation server, a directory according to the resource request information and the identification information, where the directory includes address information of the service resource, and the address information includes the identification information;
a first sending unit, configured to send, by the directory generation server, the address information to the client device;
a second sending unit, configured to send, by the client device, a resource acquisition request to the first electronic device according to the address information, where the first electronic device is an electronic device of the CDN service provider;
a third sending unit, configured to send, by the first electronic device, the service resource to the client device according to the resource acquisition request, and generate a query log, where the query log includes the identification information;
a fourth sending unit, configured to send, by the second electronic device, cost query information to the cost query server, where the query information includes a target service type, and the second electronic device is an electronic device of a service provider;
a first determining unit, configured to determine, by the fee inquiry server, a target directory from the directory acquisition server according to the target service type;
a second determining unit, configured to determine, by the fee inquiry server, target identification information according to the service type;
a second obtaining unit, configured to obtain, by the expense query server, at least one target query log from the first electronic device according to the expense query information and the target identification information;
a third determining unit, configured to determine, by the cost query server, a target cost corresponding to the target service type according to the target directory and the at least one target query log;
a fifth sending unit, configured to send the target fee to the second electronic device by the fee inquiry server.
11. An electronic device comprising a processor, a memory, and one or more programs stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the method of any of claims 1-4 or 5 or 6-7.
12. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any of the claims 1-4 or 5 or any of the claims 6-7.
CN202111547716.XA 2021-12-16 2021-12-16 Cost query method and related device for Content Delivery Network (CDN) Pending CN114238743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111547716.XA CN114238743A (en) 2021-12-16 2021-12-16 Cost query method and related device for Content Delivery Network (CDN)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111547716.XA CN114238743A (en) 2021-12-16 2021-12-16 Cost query method and related device for Content Delivery Network (CDN)

Publications (1)

Publication Number Publication Date
CN114238743A true CN114238743A (en) 2022-03-25

Family

ID=80757558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111547716.XA Pending CN114238743A (en) 2021-12-16 2021-12-16 Cost query method and related device for Content Delivery Network (CDN)

Country Status (1)

Country Link
CN (1) CN114238743A (en)

Similar Documents

Publication Publication Date Title
WO2019165665A1 (en) Domain name resolution method, server and system
WO2017114206A1 (en) Method and device for processing short link, and short link server
CN109547286B (en) CDN node selection method, device and storage medium
CN111885216B (en) DNS query method, device, equipment and storage medium
CN114338594B (en) ARP (Address resolution protocol) response-substituting method, device, equipment and storage medium in Kubernetes environment
CN113010818A (en) Access current limiting method and device, electronic equipment and storage medium
CN104866976A (en) Multi-tenant-oriented information managing system
KR20210043865A (en) NGSI-LD API Wrapping Method
CN111680210B (en) Information searching method, device, searching gateway and storage medium
CN111310230B (en) Spatial data processing method, device, equipment and medium
CN113395340A (en) Information updating method, device, equipment, system and readable storage medium
CN111427613B (en) Application program interface API management method and device
CN112948498A (en) Method and device for generating global identification of distributed system
CN113067803A (en) Resource isolation system, request processing method and request processing device
CN109862134B (en) Lease time configuration method and system of IP address and DHCP client
US10327133B2 (en) Making subscriber data addressable as a device in a mobile data network
CN114238743A (en) Cost query method and related device for Content Delivery Network (CDN)
CN112491943A (en) Data request method, device, storage medium and electronic equipment
WO2021232860A1 (en) Communication method, apparatus and system
CN103685367A (en) Offline download system and offline download method
WO2021155498A1 (en) Data reading method and terminal
CN114666841A (en) Flow-free method and flow-free system for directional flow
WO2015192497A1 (en) Communication link sending method and apparatus, and terminal
CN111352748B (en) Interface calling method and device, electronic equipment and storage medium
CN116155890B (en) Method and device for realizing distributed file system

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