Data request processing method and apparatus, and device
Through the predetermined network correspondence, the CDN node directly determines the network type of the data request, solving the problem of extended processing time of the AI model, improving data request processing efficiency and reducing computing costs.
Patent Information
- Application Number
- PCT/CN2024/087554
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-23
- Filing Date
- 2024-04-12
- Publication Date
- 2024-10-31
AI Technical Summary
In the existing technology, content distribution network (CDN) nodes determine the network type of data requests through AI models, resulting in low efficiency in processing data requests.
By determining the correspondence between the network address range and network type based on multiple transmission logs in advance, the CDN node can directly determine the network type of the data request based on the source network address range, avoiding the impact of the AI calculation process on data request processing.
It improves the efficiency of CDN nodes in processing data requests, reduces the occupation and cost of computing resources, and realizes the separation of the AI computing process and the data request processing process.
Smart Images

Figure CN2024087554_31102024_PF_FP_ABST
Abstract
Description
Data request processing method, device and equipment
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 23, 2023, with application number 202310445009.2 and invention name “Data Request Processing Method, Device and Equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a data request processing method, apparatus, and device. Background Art
[0003] A Content Delivery Network (CDN) network may include multiple CDN nodes. A CDN node can identify a data request sent by a client, determine the network type corresponding to the data request, and thus select different network strategies for the data request.
[0004] In related technologies, an artificial intelligence (AI) model can be set up in a CDN node to determine the network type corresponding to a data request through the AI model. However, in this method, the AI model is used to determine the network type corresponding to the data request after the CDN node receives the data request, which prolongs the time it takes for the CDN node to process the data request, resulting in low efficiency in the CDN node's processing of data requests.
[0005] Summary of the Invention
[0006] Various aspects of the present application provide a data request processing method, apparatus, and device to improve the efficiency of processing data requests.
[0007] In a first aspect, an embodiment of the present application provides a data request processing method, which is applied to a first CDN node in a content delivery network (CDN), comprising:
[0008] Obtaining a first data request sent by a first client;
[0009] Obtain the network correspondence between multiple network address ranges and multiple network types;
[0010] determining a source network address of the first data request;
[0011] A first network type corresponding to the first data request is determined according to the network address interval in which the source network address is located and the network correspondence.
[0012] In a possible implementation, determining the first network type corresponding to the first data request according to the network address interval in which the source network address is located and the network correspondence includes:
[0013] Determine a first network address interval in which the source network address is located;
[0014] The first network type is determined according to the corresponding relationship between the first network address interval and the network, where the length of the first network address interval is M, and M is an integer greater than 1.
[0015] In a possible implementation, determining the first network type according to the first network address range and the network correspondence includes:
[0016] If the network type corresponding to the first network address interval exists in the network correspondence, determining the network type corresponding to the first network address interval as the first network type;
[0017] If the network type corresponding to the first network address interval does not exist in the network correspondence, the second network address interval where the source network address is located is determined, and the network type corresponding to the second network address interval is determined in the network correspondence, and the network type corresponding to the second network address interval is determined as the first network type, and the length of the second network address interval is N, where N is an integer greater than 1 and N is an integer less than M.
[0018] In one possible implementation, obtaining a network correspondence between multiple network address intervals and multiple network types includes:
[0019] The network correspondence is acquired in a preset storage space of the first CDN node, where the network correspondence is pre-acquired and stored in the preset storage space.
[0020] In a possible implementation manner, before acquiring the network correspondence in the preset storage space of the first CDN node, the method further includes:
[0021] receiving the network correspondence sent by a first device, where the first device is a first CDN node or an artificial intelligence (AI) server in the CDN network, and the network correspondence is generated by the first device;
[0022] The network correspondence is stored in the preset storage space.
[0023] In one possible implementation, the method further includes:
[0024] Get multiple transfer logs;
[0025] determining a plurality of source network addresses corresponding to the plurality of transmission logs;
[0026] Processing the multiple transmission logs through the AI model to obtain network types corresponding to the multiple transmission logs;
[0027] The network correspondence relationship is generated according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
[0028] In a possible implementation, generating the network correspondence relationship according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs includes:
[0029] Determine, from the multiple source network addresses, multiple source network address sets based on the N-bit network address intervals in which the multiple source network addresses are located, wherein the source network addresses in the source network address sets have the same N-bit network address interval, and the length of the N-bit network address interval is N;
[0030] Determining a network type corresponding to each source network address according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs;
[0031] The network correspondence is generated according to the multiple source network address sets and the network type corresponding to each source network address in the source network address sets.
[0032] In a possible implementation, generating the network correspondence relationship according to the multiple source network address sets and the network type corresponding to each source network address in the source network address sets includes:
[0033] For any source network address set, determine a sub-correspondence corresponding to the source network address set based on the source network address set and the network type corresponding to each source network address in the source network address set, where the sub-correspondence includes at least one network address interval and the network type corresponding to each network address interval;
[0034] The network correspondence is determined according to the sub-correspondences corresponding to the multiple source network address sets.
[0035] In a possible implementation, determining a sub-correspondence corresponding to the source network address set according to the source network address set and a network type corresponding to each source network address in the source network address set includes:
[0036] Determining, according to the network type corresponding to each source network address in the source network address set, a type proportion of each network type in multiple network types, where the multiple network types include at least one of the following: long term evolution (LTE) of general mobile communication technology, fifth generation mobile communication technology (5G), wireless network communication technology (WiFi), and fourth generation mobile communication technology (4G);
[0037] The sub-correspondence relationship corresponding to the source network address set is determined according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type.
[0038] In a possible implementation, determining a sub-correspondence corresponding to the source network address set according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type includes:
[0039] Determining a target network type among the multiple network types according to the type proportion of each network type, wherein the type proportion of the target network type is the largest;
[0040] Determine an initial network address interval corresponding to the source network address set, where the length of the initial network address interval is N;
[0041] If the type ratio of the target network type is greater than or equal to a first threshold, determining that the sub-correspondence includes a correspondence between the initial network address interval and the target network type;
[0042] If the type proportion of the target network type is less than a first threshold, determining a plurality of candidate source network addresses in the source network address set, and determining a plurality of source network address subsets in the plurality of candidate source network addresses, and generating the sub-correspondence relationship according to the initial network address interval, the target network type, the plurality of source network address subsets, and the network type corresponding to each source network address in the source network address subsets;
[0043] Among them, the network type corresponding to the selected source network address is a network type other than the target network type, the M-bit network address intervals of each source network address in the source network address subset are the same, and the length of the M-bit network address interval is M.
[0044] In one possible implementation, generating the sub-correspondence relationship according to the initial network address interval, the target network type, the multiple source network address subsets, and the network type corresponding to each source network address in the source network address subsets includes:
[0045] For any source network address subset, determine the extended network address interval corresponding to the source network address subset, and determine the network type corresponding to the extended network address interval based on the network type corresponding to each source network address in the source network address subset;
[0046] Determining the sub-correspondence includes: a correspondence between the initial network address interval and the target network type, and a correspondence between the extended network address interval and the corresponding network type.
[0047] In one possible implementation, the method further includes:
[0048] Determining a network policy according to a first network type corresponding to the first data request, the network policy comprising at least one of the following: a congestion control policy, a packet loss recovery policy, or a sprint policy;
[0049] The first data request is processed according to the network policy.
[0050] In a second aspect, an embodiment of the present application provides a data request processing device, which is applied to a first CDN node in a content delivery network (CDN). The device includes: a first acquisition module, a second acquisition module, a first determination module, and a second determination module, wherein:
[0051] The first acquisition module is used to obtain a first data request sent by a first client;
[0052] The second acquisition module is used to obtain a network correspondence between multiple network address intervals and multiple network types;
[0053] The first determining module is used to determine the source network address of the first data request;
[0054] The second determining module is configured to determine a first network type corresponding to the first data request according to the network address interval in which the source network address is located and the network correspondence.
[0055] In a possible implementation manner, the second determining module is specifically configured to:
[0056] Determine a first network address interval in which the source network address is located;
[0057] The first network type is determined according to the first network address interval, where a length of the first network address interval is M, and M is an integer greater than 1.
[0058] In a possible implementation manner, the second determining module is specifically configured to:
[0059] If the network type corresponding to the first network address interval exists in the network correspondence, determining the network type corresponding to the first network address interval as the first network type;
[0060] If the network type corresponding to the first network address interval does not exist in the network correspondence, the second network address interval where the source network address is located is determined, and the network type corresponding to the second network address interval is determined in the network correspondence, and the network type corresponding to the second network address interval is determined as the first network type, and the length of the second network address interval is N, where N is an integer greater than 1 and N is an integer less than M.
[0061] In a possible implementation manner, the second acquisition module is specifically configured to:
[0062] The network correspondence is acquired in a preset storage space of the first CDN node, where the network correspondence is pre-acquired and stored in the preset storage space.
[0063] In a possible implementation, the device further includes a receiving module and a storage module, wherein:
[0064] The receiving module is configured to receive the network correspondence sent by a first device, where the first device is a first CDN node or an artificial intelligence (AI) server in the CDN network, and the network correspondence is generated by the first device;
[0065] The storage module is used to store the network correspondence in the preset storage space.
[0066] In one possible implementation,
[0067] The first acquisition module is further configured to acquire a plurality of transmission logs;
[0068] The second determining module is further configured to determine a plurality of source network addresses corresponding to the plurality of transmission logs;
[0069] In a possible implementation, the device further includes a processing module and a generating module, wherein:
[0070] The processing module is configured to process the multiple transmission logs through an AI model to obtain network types corresponding to the multiple transmission logs;
[0071] The generating module is configured to generate the network correspondence according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
[0072] In a possible implementation, the generating module is specifically configured to:
[0073] Determine, from the multiple source network addresses, multiple source network address sets based on the N-bit network address intervals in which the multiple source network addresses are located, wherein the source network addresses in the source network address sets have the same N-bit network address interval, and the length of the N-bit network address interval is N;
[0074] Determining a network type corresponding to each source network address according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs;
[0075] The network correspondence is generated according to the multiple source network address sets and the network type corresponding to each source network address in the source network address sets.
[0076] In a possible implementation, the generating module is specifically configured to:
[0077] For any source network address set, determine a sub-correspondence corresponding to the source network address set based on the source network address set and the network type corresponding to each source network address in the source network address set, where the sub-correspondence includes at least one network address interval and the network type corresponding to each network address interval;
[0078] The network correspondence is determined according to the sub-correspondences corresponding to the multiple source network address sets.
[0079] In a possible implementation, the generating module is specifically configured to:
[0080] Determining, according to the network type corresponding to each source network address in the source network address set, a type proportion of each network type in multiple network types, where the multiple network types include at least one of the following: long term evolution (LTE) of general mobile communication technology, fifth generation mobile communication technology (5G), wireless network communication technology (WiFi), and fourth generation mobile communication technology (4G);
[0081] The sub-correspondence relationship corresponding to the source network address set is determined according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type.
[0082] In a possible implementation, the generating module is specifically configured to:
[0083] Determining a target network type among the multiple network types according to the type proportion of each network type, wherein the type proportion of the target network type is the largest;
[0084] Determine an initial network address interval corresponding to the source network address set, where the length of the initial network address interval is N;
[0085] If the type ratio of the target network type is greater than or equal to a first threshold, determining that the sub-correspondence includes a correspondence between the initial network address interval and the target network type;
[0086] If the type proportion of the target network type is less than a first threshold, determining a plurality of candidate source network addresses in the source network address set, and determining a plurality of source network address subsets in the plurality of candidate source network addresses, and generating the sub-correspondence relationship according to the initial network address interval, the target network type, the plurality of source network address subsets, and the network type corresponding to each source network address in the source network address subsets;
[0087] Among them, the network type corresponding to the selected source network address is a network type other than the target network type, the M-bit network address intervals of each source network address in the source network address subset are the same, and the length of the M-bit network address interval is M.
[0088] In a possible implementation, the generating module is specifically configured to:
[0089] For any source network address subset, determine the extended network address interval corresponding to the source network address subset, and determine the network type corresponding to the extended network address interval based on the network type corresponding to each source network address in the source network address subset;
[0090] Determining the sub-correspondence includes: a correspondence between the initial network address interval and the target network type, and a correspondence between the extended network address interval and the corresponding network type.
[0091] In one possible implementation,
[0092] The determining module is further configured to determine a network policy according to the first network type corresponding to the first data request, the network policy comprising at least one of the following: a congestion control policy, a packet loss recovery policy, or a sprint policy;
[0093] The processing module is further configured to process the first data request according to the network policy.
[0094] In a third aspect, an embodiment of the present application provides a CDN node, including: a memory and a processor;
[0095] The memory stores computer-executable instructions;
[0096] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the data request processing method described in any one of the first aspects.
[0097] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data request processing method described in any one of the first aspects.
[0098] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the data request processing method shown in any one of the first aspects.
[0099] The embodiments of the present application provide a data request processing method, apparatus, and device, which can obtain a first data request sent by a first client, and obtain the network correspondence between multiple network address intervals and multiple network types. The source network address of the first data request can be determined, and the first network type corresponding to the first data request can be determined based on the network address interval where the source network address is located and the network correspondence. Since the network correspondence is determined in advance based on multiple transmission logs, when the CDN node receives the data request, it can determine the network address interval corresponding to the data request, and can determine the network type corresponding to the data request based on the network correspondence. There is no need to calculate the network type corresponding to the data request through the AI model, which realizes the separation of the AI calculation process and the data request processing process, avoids the AI calculation process from affecting the data request processing process, and improves the efficiency of processing data requests. BRIEF DESCRIPTION OF THE DRAWINGS
[0100] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar components or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in this application and should not be construed as limiting the scope of this application.
[0101] FIG1 is a schematic diagram of an application scenario provided by an exemplary embodiment of the present application;
[0102] FIG2 is a flow chart of a data request processing method provided by an exemplary embodiment of the present application;
[0103] FIG3 is a flow chart of another data request processing method provided by an exemplary embodiment of the present application;
[0104] FIG4 is a process diagram of a data request processing method provided by an exemplary embodiment of the present application;
[0105] FIG5 is a schematic structural diagram of a data request processing device provided by an exemplary embodiment of the present application;
[0106] FIG6 is a schematic structural diagram of another data request processing device provided by an exemplary embodiment of the present application;
[0107] FIG7 is a schematic structural diagram of a CDN node provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0108] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0109] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0110] Figure 1 is a schematic diagram of an application scenario provided by an exemplary embodiment of the present application. Referring to Figure 1 , multiple clients and CDN nodes are included. The multiple clients can be client 1, client 2, ..., client n, where n is an integer greater than or equal to 1. Any client and CDN node can communicate with each other.
[0111] For any client, the client can send a data request to the CDN node.
[0112] After receiving the data request, the CDN node can determine the network type corresponding to the data request, and then determine the network policy corresponding to the data request based on the network type, and process the data request according to the corresponding network policy.
[0113] For example, client 1 can send data request 1 to the CDN node. After receiving data request 1, the CDN node can determine the network type corresponding to data request 1. Assuming that network type 1 is 4G, the network policy corresponding to the 4G type can be determined based on the 4G type, and the data request can be processed according to the network policy.
[0114] In related technologies, an AI model can be set up in a CDN node, and the AI model can be used to determine the network type corresponding to a data request. However, in this method, the AI model is used to determine the network type corresponding to the data request after the CDN node receives the data request, which prolongs the time it takes for the CDN node to process the data request, resulting in low efficiency in the CDN node's processing of data requests.
[0115] In an embodiment of the present application, the network correspondence between multiple network address intervals and multiple network types can be determined in advance based on multiple transmission logs in the CDN network. The network correspondence can be saved in the CDN node. After the CDN node receives a data request, it can determine the network address interval corresponding to the data request, and then determine the network type corresponding to the data request based on the network correspondence. There is no need to calculate the network type corresponding to the data request through the AI model, which realizes the separation of the AI calculation process and the data request processing process, avoids the AI calculation process from affecting the data request processing process, and improves the efficiency of processing data requests.
[0116] The technical solutions shown in this application are described in detail below through specific embodiments. It should be noted that the following embodiments can exist independently or in combination with each other, and the same or similar contents will not be repeated in different embodiments.
[0117] FIG2 is a flow chart of a data request processing method provided by an exemplary embodiment of the present application. Referring to FIG2 , the method may include:
[0118] S201: Obtain a first data request sent by a first client.
[0119] The execution entity of the embodiments of the present application may be the first CDN node, or a data request processing device provided in the first CDN node. The data request processing device may be implemented via software or a combination of software and hardware. The data request processing device may be a processor in the first CDN node. For ease of understanding, the following description will be based on the first CDN node as an example.
[0120] The CDN network may include multiple CDN nodes, and the multiple CDN nodes may include a first CDN node.
[0121] For the first CDN node, the first CDN node may correspond to multiple clients, and the first client may be any one of the multiple clients.
[0122] The first client and the first CDN node can communicate with each other. The first client can send a first data request to the first CDN node, and the first CDN node can obtain the first data request sent by the first client.
[0123] For example, if the multiple clients corresponding to the first CDN node are client 1, client 2, ..., client 10, if the first client is client 2, client 2 can send a first data request to the first CDN node, and the first CDN node can obtain the first data request sent by client 2.
[0124] S202: Obtain a network correspondence between multiple network address intervals and multiple network types.
[0125] The multiple network address intervals may include a first network address interval and / or a second network address interval. The length of the first network address interval may be M, and the length of the second network address interval may be N. N is an integer greater than 1 and N is an integer less than M.
[0126] For example, if M is 24 and the length of the first network address interval is 24, then the first network address interval can be a 24-bit network address interval, and the first network address interval can be 192.167.1; if N is 16 and the length of the second network address interval is 16, then the second network address interval can be a 16-bit network address interval, and the second network address interval can be 192.167.
[0127] The multiple network types may include at least one of the following: Long Term Evolution (LTE) of general mobile communication technology, 5th Generation Mobile Communication Technology (5G), Wireless Fidelity (WiFi), and 4th Generation Mobile Communication Technology (4G).
[0128] The network correspondence relationship may be determined based on multiple transmission logs in the CDN network. For example, the network correspondence relationship may be as shown in Table 1:
[0129] Table 1
[0130] As shown in Table 1, 192.167, 192.168, and 192.169 may be the second network address interval, and 192.169.1 and 192.169.5 may be the first network interval.
[0131] The network type corresponding to the second network address interval 192.167 can be 5G, and the network type corresponding to the second network address interval 192.168 can be LTE. Since the second network address interval 192.169 includes the first network address interval 192.169.1 and the first network address interval 192.169.5, wherein the network type corresponding to the first network address interval 192.169.1 can be 4G, and the network type corresponding to the first network address interval 192.169.5 can be 4G, in the second network address interval 192.169, except for the first network address interval 192.169.1 and the first network address interval 192.169.5, the network type corresponding to the other first network address intervals is WiFi. For example, in the second network address interval 192.169, the network types corresponding to the first network address intervals such as 192.169.2, 192.169.3, 192.169.4, 192.169.6, ..., 192.169.255 are all WiFi.
[0132] Optionally, the first CDN node may obtain the network correspondence in a preset storage space.
[0133] S203: Determine the source network address of the first data request.
[0134] Optionally, the source network address corresponding to the first data request can be determined in the following manner: the corresponding transmission log can be determined based on the first data request; the network address of the first client can be determined in the transmission log; and the network address of the first client can be determined as the source network address of the first data request.
[0135] The transmission log may be a Transmission Control Protocol (TCP) transmission log.
[0136] After receiving the first data request sent by the first client, the first CDN node may generate a transmission log corresponding to the first data request. The transmission log may include the network address of the first client that sent the first data request.
[0137] For example, if the first client is client 2, and the network address of client 2 is 192.169.1.1, after the first CDN node receives the first data request 1 sent by client 2, it can generate a corresponding transmission log 1 based on the first data request 1. The transmission log 1 can include the network address 192.169.1.1 of client 2. The first CDN node can determine the network address of client 2 from the transmission log 1 and determine the network address of client 2 as the source network address corresponding to the first data request 1, that is, the source network address corresponding to the first data request 1 is 192.169.1.1.
[0138] S204: Determine a first network type corresponding to the first data request according to the network address interval in which the source network address is located and the network correspondence.
[0139] In an optional embodiment, the first network type corresponding to the first data request may be determined in the following manner: determining a first network address interval in which the source network address is located; and determining the first network type based on the first network address interval.
[0140] After determining the source network address corresponding to the first data request, the first network address interval in which the source network address is located can be determined, and then the first network type can be determined based on the first network address interval in which the source network address is located.
[0141] For example, if the source network address corresponding to the first data request is 192.169.1.1, it can be determined that the first network address interval where the source network address is located is 192.169.1, and the first network type can be determined based on the first network address interval.
[0142] Optionally, determining the first network type may include the following two situations:
[0143] Case 1: There is a network type corresponding to the first network address range in the network correspondence relationship.
[0144] In this case, the network type corresponding to the first network address interval may be determined as the first network type.
[0145] For example, if the first network address interval corresponding to the first data request is 192.169.1, and if the network correspondence is as shown in Table 1, then since the network type corresponding to 192.169.1 in the network correspondence is 4G, it can be determined that the first network type is 4G.
[0146] Case 2: The network type corresponding to the first network address range does not exist in the network correspondence.
[0147] In this case, the second network address interval where the network address is located can be determined, and the network type corresponding to the second network address interval can be determined in the network correspondence, and the network type corresponding to the second network address interval can be determined as the first network type.
[0148] For example, if the source network address corresponding to the first data request is 192.169.2.1, and the first network address interval is 192.169.2, if the network correspondence is as shown in Table 1, then since the network type corresponding to the first network address interval 192.169.2 does not exist in the network correspondence, it can be determined that the second network address interval where the network address is located is 192.169, and since the network type corresponding to the second network 192.169 in the network correspondence is WiFi, it can be determined that the first network type is WiFi.
[0149] In an embodiment of the present application, the first CDN node can obtain the first data request sent by the first client, and obtain the network correspondence between multiple network address intervals and multiple network types. The first CDN node determines the source network address of the first data request, and can determine the first network type corresponding to the first data request based on the network address interval where the source network address is located and the network correspondence. Since the network correspondence is determined in advance based on multiple transmission logs, after the first CDN node receives the data request, it can determine the network address interval corresponding to the data request, and can determine the network type corresponding to the data request based on the network correspondence. There is no need to calculate the network type corresponding to the data request through the AI model, which realizes the separation of the AI calculation process and the data request processing process, avoids the AI calculation process affecting the data request processing process, and improves the efficiency of processing data requests.
[0150] Next, based on the embodiment shown in FIG. 2 and in combination with FIG. 3 , the above-mentioned data request processing method will be further described in detail.
[0151] FIG3 is a flow chart of another data request processing method provided by an exemplary embodiment of the present application. Referring to FIG3 , the method may include:
[0152] S301. Obtain multiple transmission logs.
[0153] Optionally, the first CDN node may obtain, in a preset storage space, a plurality of transmission logs corresponding to the plurality of data requests.
[0154] For example, the first CDN node may obtain transmission logs corresponding to 100 data requests, that is, 100 transmission logs.
[0155] S302: Determine multiple source network addresses corresponding to multiple transmission logs.
[0156] For any transmission log, the transmission log may include the network address of the client that sends the data request. The first CDN node may use the network address of the client to determine the source network address corresponding to the transmission log.
[0157] For example, if transmission log 1 is a log corresponding to data request 1, and data request 1 is sent by client 1 to the first CDN node, then transmission log 1 may include network address 1 of client 1, and network address 1 may be determined as the source network address corresponding to transmission log 1.
[0158] The first CDN node may respectively determine the corresponding multiple source network addresses in the multiple transmission logs.
[0159] For example, multiple source network addresses corresponding to multiple transmission logs may be as shown in Table 2:
[0160] Table 2
[0161] S303: Process the multiple transmission logs through the AI model to obtain network types corresponding to the multiple transmission logs.
[0162] The transmission log may also include TCP's advertised window, connection establishment duration, and maximum segment size (MSS).
[0163] The TCP advertised window refers to the amount of data that the first CDN node can receive. For example, the TCP advertised window may be 4095 bytes.
[0164] The connection establishment duration refers to the duration it takes for the first client to establish a connection with the first CDN node. For example, the connection establishment duration between the first client and the first CDN node may be 80 milliseconds (ms).
[0165] The Maximum Segment Size (MSS) is the maximum data length that can be carried in each segment, negotiated by the sender and receiver during TCP connection establishment. For example, the MSS can be 1370 bytes.
[0166] In an optional embodiment, the AI model can be used to determine the TCP notification window, connection establishment duration, and MSS in the transmission log, and then the network type corresponding to the transmission log can be determined based on the TCP notification window, connection establishment duration, and MSS.
[0167] For example, if the AI model determines in transmission log 1 that the TCP notification window is 4095 bytes, the connection establishment duration is 80ms, and the MSS is 1370 bytes, then the network type 1 corresponding to transmission log 1 can be determined based on the TCP notification window, connection establishment duration, and MSS. Assume that the network type 1 corresponding to transmission log 1 is 4G.
[0168] Optionally, multiple transmission logs are processed through an AI model to obtain network types corresponding to the multiple transmission logs.
[0169] For example, if multiple transmission logs are as shown in Table 2, the network types corresponding to the multiple transmission logs may be as shown in Table 3:
[0170] Table 3
[0171] S304: Generate a network correspondence relationship according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
[0172] In an optional embodiment, a network correspondence relationship can be generated in the following manner: based on the N-bit network address interval where the multiple source network addresses are located, multiple source network address sets are determined from the multiple source network addresses; based on the multiple source network addresses corresponding to the multiple transmission logs, and the network types corresponding to the multiple transmission logs, the network type corresponding to each source network address is determined; based on the multiple source network address sets, and the network type corresponding to each source network address in the network address set, a network correspondence relationship is generated.
[0173] The N-bit network address intervals where the source network addresses in the source network address set are located may be the same, and the length of the N-bit network address interval is N.
[0174] For example, if N is 16, source network address set 1 may include 300 source network addresses. These 300 source network addresses may be 192.167.0.1, 192.167.1.2, 192.167.2.1, 192.167.2.3, 192.167.2.3, ..., etc., and the 16-bit network address interval in which these 300 source network addresses are located is all 192.167, and the length of 192.167 is 16 bits.
[0175] Optionally, the first CDN node may determine a plurality of source network addresses, and determine a plurality of source network address sets from the plurality of source network addresses according to the N-bit network address intervals in which the plurality of source network addresses are located.
[0176] For example, the first CDN node may determine 2,000 source network addresses, and may determine 500 source network address sets from the 2,000 source network addresses, which may be source network address set 1, source network address set 2, ..., source network address set 500 respectively.
[0177] Since multiple source network addresses corresponding to multiple transmission logs are determined in step S302, and network types corresponding to multiple transmission logs are determined in step S303, the network type corresponding to each source network address can be determined based on the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
[0178] For example, if multiple source network addresses corresponding to multiple transmission logs are shown in Table 2, and multiple network types corresponding to multiple transmission logs are shown in Table 3, then the network type corresponding to each source network address can be determined as shown in Table 4:
[0179] Table 4
[0180] Optionally, for any source network address set, the sub-correspondence corresponding to the source network address set can be determined based on the source network address set and the network type corresponding to each source network address in the source network address set, and then the network correspondence can be determined based on the sub-correspondences corresponding to multiple source network address sets.
[0181] Since any source network address set may correspond to an N-bit network address interval, the sub-correspondence relationship corresponding to the source network address set includes at least one network address interval and a network type corresponding to each network address interval.
[0182] In an optional embodiment, the sub-correspondence corresponding to the source network address set can be determined in the following manner: based on the network type corresponding to each source network address in the source network address set, the type ratio of each network type in multiple network types is determined; based on the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type, the sub-correspondence corresponding to the source network address set is determined.
[0183] For example, if source network address set 1 includes 300 source network addresses, of which 290 source network addresses correspond to 5G network types, 6 source network addresses correspond to 4G network types, and 4 source network addresses correspond to WiFi network types, then it can be determined that among the 300 network types corresponding to the 300 source network addresses, 5G types account for approximately 97%, 4G types account for approximately 2%, and WiFi types account for approximately 1%.
[0184] After determining the type ratio of each network type, the target network type can be determined from the multiple network types based on the type ratio of each network type, and the initial network address interval corresponding to the source network address set can be determined.
[0185] The target network type may have the largest type ratio. For example, if source network address set 1 includes 300 source network addresses, and among the 300 network types corresponding to these 300 source network addresses, 5G types account for approximately 97%, 4G types account for approximately 2%, and WiFi types account for approximately 1%, then the target network type may be determined to be 5G.
[0186] The length of the initial network address interval may be N. For example, if N is 16, source network address set 1 includes 300 source network addresses, and the 16-bit network address intervals in which the 300 source network addresses are located are all 192.167, then it can be determined that the initial network address interval corresponding to source network address set 1 is 192.167, and the length of the initial network address interval may be 16.
[0187] Optionally, the sub-correspondence relationship is determined based on the target network type and the initial network, which may include the following two cases:
[0188] Case 1: The type ratio of the target network type is greater than or equal to the first threshold.
[0189] In this case, it can be determined that the sub-correspondence includes a correspondence between the initial network address interval and the target network type.
[0190] The first threshold may be preset manually, for example, 95%.
[0191] For example, if the target network type corresponding to the source network address set 1 is 5G, the type proportion of 5G is about 97%. If the first threshold is 95%, if the initial network address interval corresponding to the source network address set 1 is 192.167, then since the type proportion of the target network type is 97%, which is greater than the first threshold 95%, the sub-correspondence can be determined as follows: the initial network 192.167 corresponds to the network type 5G.
[0192] Case 2: The type ratio of the target network type is less than the first threshold.
[0193] In this case, multiple candidate source network addresses may be determined in the source network address set, and multiple source network address subsets may be determined in the multiple candidate source network addresses, and a sub-correspondence relationship may be generated based on the initial network address interval, the target network type, the multiple source network address subsets, and the network type corresponding to each source network address in the source network address subsets;
[0194] The network type corresponding to the candidate source network address may be other network types except the target network type.
[0195] The M-bit network address intervals where the source network addresses in the source network address subset are located are the same, and the length of the M-bit network address interval is M.
[0196] For example, if M is 24, the source network address subset includes 20 source network addresses, and the 20 source network addresses can be 192.169.1.1, 192.169.1.2, 192.169.1.4, 192.169.1.8, 192.169.1.25, etc., then the 24-bit network address interval where the 20 source network addresses are located is all 192.169.1, and the length of 192.169.1 is 24 bits.
[0197] For example, if the initial network address interval corresponding to source network address set 2 is 192.169, source network address set 2 includes 280 source network addresses. Among the 280 network types corresponding to the 280 source network addresses, WiFi types account for approximately 80%, 4G types account for approximately 9%, and 5G types account for approximately 11%. Since WiFi types account for the largest proportion, it can be determined that the target network type is WiFi, and it can be determined that the sub-correspondence includes: the initial network address interval 192.169 corresponds to WiFi.
[0198] If the first threshold is 95%, since the target network type WiFi accounts for 80%, which is less than the first threshold of 95%, the source network addresses corresponding to the network types of 4G and 5G can be determined as the candidate source network addresses in the source network address set 2, and then there are 280*(9%+11%)=56 candidate source network addresses. Among the 56 candidate source network addresses, 31 candidate source network addresses correspond to the network type of 5G, and 25 candidate source network addresses correspond to the network type of 4G. Assume that two source network address subsets can be determined from the 56 candidate source network addresses, which can be source network address subset 1 and source network address subset 2 respectively.
[0199] Optionally, for any source network address subset, the extended network address interval corresponding to the source network address subset can be determined, and the network type corresponding to the extended network address interval can be determined based on the network type corresponding to each source network address in the source network address subset, and then the sub-correspondence relationship can be determined, including: the correspondence between the initial network address interval and the target network type, and the correspondence between the extended network address interval and the corresponding network type.
[0200] The length corresponding to the extended network address interval may be M. For example, if M is 24, source network address subset 1 includes 20 source network addresses, and the 24-bit network address interval in which the 20 source network addresses are located is all 192.169.1, then it can be determined that the extended network address interval corresponding to source network address subset 1 is 192.169.1, and the length of 192.169.1 is 24 bits.
[0201] Optionally, the type proportion of each network type may be determined based on the network type corresponding to each source network address in the source network address subset, and the network type with the largest proportion may be determined as the network type corresponding to the extended network address interval.
[0202] For example, if the extended network address interval corresponding to source network address subset 1 is 192.169.1, and source network address subset 1 includes 20 source network addresses, of which 16 source network addresses correspond to 4G network types and 4 source network addresses correspond to 5G network types, it can be determined that among the 20 network types corresponding to these 20 source network addresses, 4G types account for 80% and 5G types account for 20%. Since 4G types account for the largest proportion, it can be determined that the network type corresponding to the extended network address interval 192.169.1 is 4G.
[0203] If the initial network address interval corresponding to source network address set 2 is 192.169, and the corresponding target network type is WiFi, there are two source network address subsets in source network address set 2, among which the extended network address interval corresponding to source network address subset 1 is 192.169.1, and the corresponding network type is 4G; the extended network address interval corresponding to source network address subset 2 is 192.169.5, and the corresponding network type is 4G, then it can be determined that the sub-correspondence relationship includes: the initial network address interval 192.169 corresponds to the network type WiFi, the extended network address interval 192.169.1 corresponds to the network type 4G, and the extended network address interval 192.169.5 corresponds to the network type 4G.
[0204] Optionally, after determining the sub-correspondences corresponding to the multiple source network address sets, the network correspondence may be determined. The network correspondence includes the sub-correspondences corresponding to the multiple source network address sets.
[0205] For example, if the sub-correspondence corresponding to the source network address set 1 is: the network address interval 192.167 corresponds to the network type 5G; the sub-correspondence corresponding to the source network address set 2 is: the network address interval 192.168 corresponds to the network type LTE; the sub-correspondence corresponding to the source network address set 3 is: the network address interval 192.169 corresponds to the network type WiFi; the sub-correspondence corresponding to the source network address subset 1 is: the network address interval 192.169.1 corresponds to the network type 4G; the sub-correspondence corresponding to the source network address subset 2 is: the network address interval 192.169.5 corresponds to the network type 4G; ..., then the network correspondence can be determined as shown in Table 1 based on the sub-correspondences corresponding to the multiple source network address sets.
[0206] It should be noted that steps S301 to S304 are the process of generating a network correspondence, and the network correspondence can be generated in the first device. The first device can be the first CDN node or the AI server. The AI server can be a server other than the multiple CDN nodes in the CDN network.
[0207] The network correspondence relationship may be generated periodically, for example, once every 30 minutes.
[0208] S305: Store the network correspondence in a preset storage space.
[0209] If the first device is a first CDN node, after generating the network correspondence, the first CDN node may pre-store the network correspondence in a preset storage space.
[0210] If the first device is an AI server different from the first CDN node, the network correspondence relationship can be periodically sent to the first CDN node, so that the first CDN node can receive the network correspondence relationship sent by the first device and pre-store the network correspondence relationship in a preset storage space.
[0211] Since the network correspondence can be generated through the first device and synchronized to any CDN node, there is no need to set up an AI model in each CDN node for AI calculation, which greatly reduces the occupied computing resources and reduces the computing cost.
[0212] S306: Obtain a first data request sent by the first client.
[0213] When a customer has a demand, the first client may send a first data request to the first CDN node, and the first CDN node may obtain the first data request sent by the first client.
[0214] S307: Obtain a network correspondence in a preset storage space of the first CDN node.
[0215] For example, if the network correspondence relationship 1 is stored in the preset storage space, the first CDN node may obtain the network correspondence relationship 1 from the preset storage space.
[0216] S308: Determine the source network address of the first data request.
[0217] It should be noted that the specific execution process of step S308 can refer to the specific execution process of step S203, which will not be repeated here.
[0218] S309: Determine a first network type corresponding to the first data request according to the network address interval in which the source network address is located and the network correspondence.
[0219] It should be noted that the specific execution process of step S309 can refer to the specific execution process of step S204, which will not be repeated here.
[0220] S310: Determine a network policy according to a first network type corresponding to the first data request.
[0221] The network policy may include at least one of the following: a congestion control policy, a packet loss recovery policy, or a sprint policy.
[0222] For example, if the first network type corresponding to the first data request is 4G, the first CDN node may determine the corresponding network policy according to the first network type 4G.
[0223] S311. Process the first data request according to the network policy.
[0224] For example, if the first network type corresponding to the first data request is 4G, after the first CDN node determines the network policy corresponding to the first network type 4G, it may process the first data request according to the corresponding network policy.
[0225] In an embodiment of the present application, multiple transmission logs can be obtained, and multiple source network addresses corresponding to the multiple transmission logs can be determined. The transmission log can be processed by an AI model to obtain the network type corresponding to the transmission log, and then a network correspondence can be generated based on the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs, and a preset storage space can be used to store the network correspondence. The first CDN node can obtain the first data request sent by the first client and obtain the network correspondence in the preset storage space. The first CDN node can determine the first network type corresponding to the first data request based on the network address interval and the network correspondence corresponding to the first data request, and determine the network policy based on the first network type corresponding to the first data request, and then process the first data request based on the network policy. Since the first device can periodically generate the network correspondence in advance, the CDN node can obtain the network correspondence in advance and save it in the preset storage space. After the first CDN node receives the data request, it can determine the network address range corresponding to the data request, and can determine the network type corresponding to the data request based on the network correspondence. There is no need to calculate the network type corresponding to the data request through the AI model, which realizes the separation of the AI calculation process and the data request processing process, avoids the AI calculation process affecting the data request processing process, and improves the efficiency of processing data requests.
[0226] Next, based on any of the above embodiments, the above data request processing process will be further described in detail with reference to FIG4 through a specific example.
[0227] FIG4 is a process diagram of a data request processing method provided by an exemplary embodiment of the present application. Referring to FIG4 , a model training device, a CDN network, and multiple clients are included. The CDN network may include multiple CDN nodes, which may be CDN node 1, CDN node 2, ..., CDN node k, where k is an integer greater than or equal to 1. The multiple clients may be client 1, client 2, ..., client m, where m is an integer greater than or equal to 1.
[0228] The model training device can communicate with the first CDN node. For example, the first CDN node can be CDN node 1, and the model training device can communicate with CDN node 1.
[0229] The first CDN node may have multiple corresponding clients. Any of these clients may communicate with the first CDN node. The client may send a first data request to the first CDN node. When the client sends the first data request to the first CDN node, the client may generate a client log corresponding to the first data request. After the first CDN node receives the first data request, it may generate a transmission log corresponding to the first data request.
[0230] Model training devices can be devices outside the CDN network and can be used to train AI models. For example, model training devices can be servers or computing devices.
[0231] Before training the AI model, you can manually send multiple client logs to the model training device through multiple clients so that the model training device can receive multiple client logs. The client logs may include the timestamp of the first data request, the client's network address and port number, and the network address and port number of the target CDN node, as well as the network type.
[0232] Multiple transmission logs can be sent to the model training device through multiple CDN nodes so that the model training device can receive multiple transmission logs. The transmission logs may include the timestamp of receiving the first data request, the network address and port number of the client, and the network address and port number of the CDN node.
[0233] After the model training device receives multiple client logs and multiple transmission logs, it can determine the timestamp, client network address and port number, and target CDN node network address and port number in the client log, as well as the timestamp, client network address and port number, and CDN node network address and port number in the transmission log, and perform correlation processing on the client log and the transmission log.
[0234] Optionally, the client log and the transmission log are correlated, which can include the following two situations:
[0235] Case 1: The timestamp, client network address and port number, and target CDN node network address and port number in the client log are consistent with the timestamp, client network address and port number, and CDN node network address and port number in the transmission log.
[0236] In this case, the client log and the transmission log can be correlated.
[0237] For example, if the model training device includes client log 1 and transmission log 1, if the model training device determines that the client log 1 includes a timestamp of 1679386411, the client's network address is 192.168.1.1, the port number is 3000, and the network address of the target CDN node is 192.168.2.6, and the port number is 2080; if the model training device determines that the transmission log 1 includes a timestamp of 1679386411, the client's network address is 192.168.1.1, the port number is 3000, and the CDN node's network address is 192.168.2.6, and the port number is 2080, then since the timestamps, the client's network address, the port number, and the network address and port number of the CDN node in the client log 1 and the transmission log 1 are consistent, it can be determined that the client log 1 and the transmission log 1 are logs corresponding to the same first data request, and the client log 1 and the transmission log 1 can be associated.
[0238] Case 2: The timestamp, client network address and port number, and target CDN node network address and port number in the client log are inconsistent with the timestamp, client network address and port number, and CDN node network address and port number in the transmission log.
[0239] In this case, there is no need to correlate the client logs and the transmission logs.
[0240] For example, if the model training device includes client log 1 and transmission log 1, if the model training device determines that the client log 1 includes a timestamp of 1679386309, the client's network address is 192.168.1.1, the port number is 3000, and the network address of the target CDN node is 192.168.2.6, and the port number is 2080; if the model training device determines that the transmission log 1 includes a timestamp of 1679386309, the client's network address is 192.168.2.1, the port number is 2095, and the CDN node's network address is 192.168.2.6, and the port number is 2080, then since the client's network address and port number in the client log 1 and the transmission log 1 are inconsistent, it can be determined that the client log 1 and the transmission log 1 are logs corresponding to different first data requests, and there is no need to associate the client log 1 and the transmission log 1.
[0241] Optionally, multiple client logs and multiple transmission logs are correlated to determine the transmission log associated with each client log. Since the client log may include the network type corresponding to the first data request, the network type can be determined in the client, and then the network type corresponding to the transmission log can be correlated.
[0242] For example, if the client log 1 is associated with the transmission log 1, and if it is determined in the client log 1 that the network type corresponding to the first data request is 4G, then the network type corresponding to the transmission log 1 may be associated with 4G.
[0243] Optionally, after associating the network type corresponding to the transmission log, multiple transmission logs associated with the network type can be used as training data to train the AI model.
[0244] Since the transmission log can also include TCP's notification window, connection establishment duration, and MSS, during the training process of the AI model, the AI model can identify and process the transmission log, that is, it can determine the TCP's notification window, connection establishment duration, and MSS in the transmission log, and then, based on the network type corresponding to the transmission log, it can determine the network type corresponding to the TCP's notification window, connection establishment duration, and MSS.
[0245] For example, if the network type corresponding to transmission log 1 is 4G, and if the AI model determines in transmission log 1 that the TCP notification window is 4095 bytes, the connection establishment time is 80 ms, and the MSS is 1370 bytes, since the network type corresponding to transmission log 1 is 4G, the AI model can determine that when the TCP notification window is 4095 bytes, the connection establishment time is 80 ms, and the MSS is 1370 bytes, the corresponding network type is 4G.
[0246] The AI model can be trained several times so that it can accurately determine the corresponding network type based on the TCP announcement window, connection establishment duration, and MSS in the transmission log.
[0247] After the model training device obtains the AI model, it can save the AI model in the preset storage space.
[0248] In step ①, the model training device can periodically send the AI model to the first device. The first device can be the first CDN node in the CDN network. For example, the first CDN node can be CDN node 1, and the model training device can send the AI model to CDN node 1. The AI model update cycle can be one year.
[0249] It should be noted that the multiple CDN nodes in a CDN network may include a first CDN node and multiple second CDN nodes, and the AI model only needs to be installed on the first CDN node. For example, if the CDN network includes k CDN nodes, the first CDN node may be CDN node 1, the second CDN node may be CDN node 2, ..., CDN node k, then the AI model can be installed on CDN node 1, but CDN nodes 2, ..., CDN node k do not need to be installed with an AI model.
[0250] In step 2, multiple second CDN nodes can send multiple transmission logs to the first CDN node in real time, allowing the first CDN node to obtain multiple transmission logs. These multiple transmission logs are transmission logs generated when the multiple second CDN nodes receive data requests. For example, CDN nodes 2, ..., and CDN node k can each send multiple transmission logs to CDN node 1.
[0251] In step ③, for any transmission log, the first CDN node can identify and process the transmission log through the AI model, that is, it can determine the TCP notification window, connection establishment duration and MSS in the transmission log, and then determine the network type corresponding to the transmission log based on the TCP notification window, connection establishment duration and MSS.
[0252] For example, if the AI model determines in transmission log 1 that the TCP notification window is 4095 bytes, the connection establishment duration is 80ms, and the MSS is 1370 bytes, then the network type 1 corresponding to transmission log 1 can be determined based on the TCP notification window, connection establishment duration, and MSS. Assume that the network type 1 corresponding to transmission log 1 is 4G.
[0253] Optionally, the AI model processes multiple transmission logs to obtain the network types corresponding to the multiple transmission logs. The multiple transmission logs may include transmission logs sent by multiple second CDN nodes and transmission logs generated by the first CDN node in response to data requests. For example, the network types corresponding to the multiple transmission logs may be as shown in Table 3.
[0254] For any transmission log, the first CDN node can use the client's network address to determine the source network address corresponding to the transmission log. For example, multiple source network addresses corresponding to multiple transmission logs can be as shown in Table 2.
[0255] The first CDN node can use an AI model to generate a network correspondence based on the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs. The execution process of generating the network correspondence can be seen in step S304 and will not be repeated here. For example, the network correspondence can be as shown in Table 1. The first CDN node can store the network correspondence in a preset storage space.
[0256] In step 4, the first CDN node can periodically send the network correspondence to multiple second CDN nodes, so that the multiple second CDN nodes can receive the network correspondence and store it in a preset storage space. For example, CDN node 1 can send the network correspondence to CDN nodes 2, ..., and CDN node k every 30 minutes, and CDN nodes 2, ..., and CDN node k can store the network correspondence.
[0257] Since network correspondences can be stored in multiple second CDN nodes, there is no need to deploy AI models in multiple second CDN nodes, which greatly reduces the occupied computing resources and reduces computing costs.
[0258] In step ⑤, when a client has a demand, the first client can send a first data request to the first CDN node, and the first CDN node can receive the first data request sent by the first client. For example, the first client can be client 2, and client 2 can send the first data request to CDN node 1.
[0259] In step ⑥, after obtaining the first data request, the first CDN node may obtain the network correspondence from the preset storage space and, based on the network address range corresponding to the first data request and the network correspondence, determine the first network type corresponding to the first data request. Furthermore, the first CDN node may determine a network policy based on the first network type corresponding to the first data request and process the first data request based on the network policy. For example, if the first CDN node determines, based on the network correspondence, that the first network type corresponding to the first data request is 4G, the first CDN node may determine a corresponding network policy based on the first network type 4G and process the first data request based on the corresponding network policy.
[0260] It should be noted that since the network correspondence is also stored in the second CDN node, similarly, after the second CDN node obtains the first data request, it can obtain the network correspondence in the preset storage space, and determine the first network type corresponding to the first data request based on the network address range and network correspondence corresponding to the first data request, and then determine the network policy based on the first network type corresponding to the first data request, and process the first data request according to the network policy.
[0261] The first CDN node or the second CDN node can determine the network type corresponding to the data request based on the network correspondence, thereby achieving the goal of determining the network type corresponding to each first data request while using a very small amount of computing resources (compared to 1 / 10-1 / 20 of the existing technology), with an accuracy rate of over 90%. Moreover, since the network correspondence is predetermined, it will not affect the processing process of the data request, making the task very less invasive.
[0262] In an embodiment of the present application, a model training device can obtain multiple client logs and multiple transmission logs, and can associate the multiple client logs with the multiple transmission logs, thereby determining the network types associated with the multiple transmission logs, and using the multiple transmission logs associated with the network types as training data to train the AI model. After obtaining the AI model, the AI model can be sent to the first CDN node. The first CDN node can obtain multiple transmission logs and determine the multiple source network addresses corresponding to the multiple transmission logs; the transmission logs can be identified and processed by the AI model to determine the network types corresponding to the transmission logs; and the AI model can be used to generate a network correspondence based on the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs, and a preset storage space can be used to store the network correspondence. The first CDN node can obtain a first data request sent by the first client and obtain a network correspondence in a preset storage space. The first CDN node can determine the first network type corresponding to the first data request based on the network address interval corresponding to the first data request and the network correspondence, and determine a network policy based on the first network type corresponding to the first data request, and then process the first data request based on the network policy. Because network correspondences can be pre- and periodically generated, they can be sent to multiple CDN nodes, allowing them to use the same network correspondences. Upon receiving a data request, a CDN node can determine the network address range corresponding to the data request and, based on the network correspondences, the corresponding network type. This eliminates the need to calculate the corresponding network type through an AI model. This allows for the separation of the AI calculation process from the data request processing process, preventing the AI calculation process from interfering with the data request processing process and improving the efficiency of processing data requests.
[0263] FIG5 is a schematic diagram of the structure of a data request processing device provided by an exemplary embodiment of the present application. Referring to FIG5 , the device can be applied to a first CDN node in a content delivery network (CDN) network. The device can include: a first acquisition module 11, a second acquisition module 12, a first determination module 13, and a second determination module 14, wherein:
[0264] The first acquisition module 11 is used to obtain a first data request sent by a first client;
[0265] The second acquisition module 12 is used to obtain a network correspondence relationship between multiple network address intervals and multiple network types, where the network correspondence relationship is determined based on multiple transmission logs in the CDN network;
[0266] The first determining module 13 is used to determine the source network address of the first data request;
[0267] The second determining module 14 is configured to determine a first network type corresponding to the first data request according to the network address interval in which the source network address is located and the network correspondence.
[0268] The data request processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0269] In a possible implementation manner, the second determining module 14 is specifically configured to:
[0270] Determine a first network address interval in which the source network address is located;
[0271] The first network type is determined according to the first network address interval, where a length of the first network address interval is M, and M is an integer greater than 1.
[0272] In a possible implementation manner, the second determining module 14 is specifically configured to:
[0273] If the network type corresponding to the first network address interval exists in the network correspondence, determining the network type corresponding to the first network address interval as the first network type;
[0274] If the network type corresponding to the first network address interval does not exist in the network correspondence, the second network address interval where the source network address is located is determined, and the network type corresponding to the second network address interval is determined in the network correspondence, and the network type corresponding to the second network address interval is determined as the first network type, and the length of the second network address interval is N, where N is an integer greater than 1 and N is an integer less than M.
[0275] In a possible implementation, the second acquisition module 12 is specifically configured to:
[0276] The network correspondence is acquired in a preset storage space of the first CDN node, where the network correspondence is pre-acquired and stored in the preset storage space.
[0277] The data request processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0278] FIG6 is a schematic diagram of the structure of another data request processing device provided by an exemplary embodiment of the present application. Referring to FIG6, based on the device shown in FIG5, the device may further include: a receiving module 15, a storage module 16, a processing module 17 and a generating module 18, wherein:
[0279] The receiving module 15 is configured to receive the network correspondence sent by a first device, where the first device is a first CDN node or an artificial intelligence (AI) server in the CDN network, and the network correspondence is generated by the first device;
[0280] The storage module 16 is configured to store the network correspondence in the preset storage space.
[0281] The data request processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0282] In one possible implementation,
[0283] The first acquisition module 11 is further configured to acquire a plurality of transmission logs;
[0284] The second determining module 14 is further configured to determine a plurality of source network addresses corresponding to the plurality of transmission logs;
[0285] In one possible implementation,
[0286] The processing module 17 is configured to process the multiple transmission logs through an AI model to obtain network types corresponding to the multiple transmission logs;
[0287] The generating module 18 is configured to generate the network correspondence according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
[0288] In a possible implementation, the generating module 18 is specifically configured to:
[0289] Determine, from the multiple source network addresses, multiple source network address sets based on the N-bit network address intervals in which the multiple source network addresses are located, wherein the source network addresses in the source network address sets have the same N-bit network address interval, and the length of the N-bit network address interval is N;
[0290] Determining a network type corresponding to each source network address according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs;
[0291] The network correspondence is generated according to the multiple source network address sets and the network type corresponding to each source network address in the source network address sets.
[0292] In a possible implementation, the generating module 18 is specifically configured to:
[0293] For any source network address set, determine a sub-correspondence corresponding to the source network address set based on the source network address set and the network type corresponding to each source network address in the source network address set, where the sub-correspondence includes at least one network address interval and the network type corresponding to each network address interval;
[0294] The network correspondence is determined according to the sub-correspondences corresponding to the multiple source network address sets.
[0295] In a possible implementation, the generating module 18 is specifically configured to:
[0296] Determining, according to the network type corresponding to each source network address in the source network address set, a type proportion of each network type in multiple network types, where the multiple network types include at least one of the following: long term evolution (LTE) of general mobile communication technology, fifth generation mobile communication technology (5G), wireless network communication technology (WiFi), and fourth generation mobile communication technology (4G);
[0297] The sub-correspondence relationship corresponding to the source network address set is determined according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type.
[0298] In a possible implementation, the generating module 18 is specifically configured to:
[0299] Determining a target network type among the multiple network types according to the type proportion of each network type, wherein the type proportion of the target network type is the largest;
[0300] Determine an initial network address interval corresponding to the source network address set, where the length of the initial network address interval is N;
[0301] If the type ratio of the target network type is greater than or equal to a first threshold, determining that the sub-correspondence includes a correspondence between the initial network address interval and the target network type;
[0302] If the type proportion of the target network type is less than a first threshold, determining a plurality of candidate source network addresses in the source network address set, and determining a plurality of source network address subsets in the plurality of candidate source network addresses, and generating the sub-correspondence relationship according to the initial network address interval, the target network type, the plurality of source network address subsets, and the network type corresponding to each source network address in the source network address subsets;
[0303] Among them, the network type corresponding to the selected source network address is a network type other than the target network type, the M-bit network address intervals of each source network address in the source network address subset are the same, and the length of the M-bit network address interval is M.
[0304] In a possible implementation, the generating module 18 is specifically configured to:
[0305] For any source network address subset, determine the extended network address interval corresponding to the source network address subset, and determine the network type corresponding to the extended network address interval based on the network type corresponding to each source network address in the source network address subset;
[0306] Determining the sub-correspondence includes: a correspondence between the initial network address interval and the target network type, and a correspondence between the extended network address interval and the corresponding network type.
[0307] In one possible implementation,
[0308] The second determining module 14 is further configured to determine a network policy according to the first network type corresponding to the first data request, the network policy comprising at least one of the following: a congestion control policy, a packet loss recovery policy, or a sprint policy;
[0309] The processing module 17 is further configured to process the first data request according to the network policy.
[0310] The data request processing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0311] The exemplary embodiment of the present application provides a schematic structural diagram of a CDN node, as shown in Figure 7 . The CDN node 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.
[0312] The memory 22 stores computer-executable instructions;
[0313] The processor 21 executes the computer-executable instructions stored in the memory 22 , so that the processor 21 performs the data processing method shown in the above method embodiment.
[0314] Accordingly, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the data request processing method described in any of the above method embodiments.
[0315] Accordingly, an embodiment of the present application may also provide a computer program product, including a computer program. When the computer program is executed by a processor, it can implement the data request processing method shown in any of the above method embodiments.
[0316] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0317] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0318] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0319] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0320] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0321] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0322] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0323] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0324] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A data request processing method, characterized in that: A first CDN node applied to a content delivery network CDN network includes: Obtaining a first data request sent by a first client; Obtain the network correspondence between multiple network address intervals and multiple network types; determining a source network address of the first data request; A first network type corresponding to the first data request is determined according to the network address interval where the source network address is located and the network correspondence.
2. The method according to claim 1, characterized in that Determining, according to the network address interval where the source network address is located and the network correspondence relationship, a first network type corresponding to the first data request, includes: Determine a first network address interval where the source network address is located; The first network type is determined according to the first network address interval and the network correspondence, where the length of the first network address interval is M, and M is an integer greater than 1.
3. The method according to claim 2, characterized in that Determining the first network type according to the first network address interval and the network correspondence includes: If the network type corresponding to the first network address interval exists in the network correspondence, determining the network type corresponding to the first network address interval as the first network type; If the network type corresponding to the first network address interval does not exist in the network correspondence relationship, the second network address interval where the source network address is located is determined, and the network type corresponding to the second network address interval is determined in the network correspondence relationship, and the network type corresponding to the second network address interval is determined as the first network type, and the length of the second network address interval is N, where N is an integer greater than 1, and N is an integer less than M.
4. The method according to any one of claims 1 to 3, characterized in that: Get the network correspondence between multiple network address ranges and multiple network types, including: The network correspondence is acquired in a preset storage space of the first CDN node, where the network correspondence is pre-acquired and stored in the preset storage space.
5. The method according to claim 4, characterized in that Before acquiring the network correspondence in the preset storage space of the first CDN node, the method further includes: receiving the network correspondence sent by a first device, where the first device is a first CDN node or an artificial intelligence AI server in the CDN network, and the network correspondence is generated by the first device; The network correspondence relationship is stored in the preset storage space.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Get multiple transfer logs; Determining a plurality of source network addresses corresponding to the plurality of transmission logs; Processing the multiple transmission logs through the AI model to obtain network types corresponding to the multiple transmission logs; The network correspondence relationship is generated according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs.
7. The method according to claim 6, characterized in that Generating the network correspondence relationship according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs includes: According to the N-bit network address intervals where the multiple source network addresses are located, determine multiple source network address sets from the multiple source network addresses, the source network addresses in the source network address sets are located in the same N-bit network address interval, and the length of the N-bit network address interval is the N; Determine the network type corresponding to each source network address according to the multiple source network addresses corresponding to the multiple transmission logs and the network types corresponding to the multiple transmission logs; The network correspondence relationship is generated according to the multiple source network address sets and the network type corresponding to each source network address in the source network address set.
8. The method according to claim 7, characterized in that Generating the network correspondence relationship according to the multiple source network address sets and the network type corresponding to each source network address in the source network address set includes: For any source network address set, determine a sub-correspondence corresponding to the source network address set according to the source network address set and the network type corresponding to each source network address in the source network address set, wherein the sub-correspondence includes at least one network address interval and the network type corresponding to each network address interval; The network correspondence relationship is determined according to the sub-correspondence relationships corresponding to the multiple source network address sets.
9. The method according to claim 8, characterized in that Determining, according to the source network address set and the network type corresponding to each source network address in the source network address set, a sub-correspondence relationship corresponding to the source network address set includes: Determine, according to the network type corresponding to each source network address in the source network address set, the type proportion of each network type in multiple network types, wherein the multiple network types include at least one of the following: long term evolution LTE of general mobile communication technology, fifth generation mobile communication technology 5G, wireless network communication technology WiFi, and fourth generation mobile communication technology 4G; The sub-correspondence relationship corresponding to the source network address set is determined according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type.
10. The method according to claim 9, characterized in that Determining a sub-correspondence relationship corresponding to the source network address set according to the source network address set, the network type corresponding to each source network address in the source network address set, and the type ratio of each network type includes: Determine a target network type from the plurality of network types according to the type proportion of each network type, the type proportion of the target network type being the largest; Determine an initial network address interval corresponding to the source network address set, where the length of the initial network address interval is the N; If the type proportion of the target network type is greater than or equal to a first threshold, determining that the sub-correspondence relationship includes a correspondence relationship between the initial network address interval and the target network type; If the type proportion of the target network type is less than the first threshold, a plurality of candidate source network addresses are determined in the source network address set, and a plurality of source network address subsets are determined in the plurality of candidate source network addresses, and the sub-correspondence relationship is generated according to the initial network address interval, the target network type, the plurality of source network address subsets, and the network type corresponding to each source network address in the source network address subset; Among them, the network type corresponding to the selected source network address is a network type other than the target network type, the M-bit network address intervals where the source network addresses in the source network address subset are located are the same, and the length of the M-bit network address interval is the M.
11. The method according to claim 10, characterized in that Generating the sub-correspondence relationship according to the initial network address interval, the target network type, the multiple source network address subsets, and the network type corresponding to each source network address in the source network address subsets includes: For any source network address subset, determine the extended network address interval corresponding to the source network address subset, and determine the network type corresponding to the extended network address interval according to the network type corresponding to each source network address in the source network address subset; Determining the sub-correspondence includes: the correspondence between the initial network address interval and the target network type, and the correspondence between the extended network address interval and the corresponding network type.
12. The method according to any one of claims 1 to 11, characterized in that: The method further comprises: Determine a network strategy according to a first network type corresponding to the first data request, the network strategy comprising at least one of the following: a congestion control strategy, a packet loss recovery strategy, or a sprint strategy; The first data request is processed according to the network policy.
13. A CDN node, characterized in that: include: Memory and processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the data request processing method according to any one of claims 1 to 12.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the data request processing method according to any one of claims 1 to 12 when the computer-executable instructions are executed by a processor.
Citation Information
Patent Citations
Webpage access method and device and storage medium
CN110598149A
Access network type identification method, server and device
CN111314489A
Access request processing method, electronic device, electronic equipment and medium
CN115412608A
Data request processing method, device and equipment
CN116455767A
Content delivery network, data processing method, apparatus and device, and storage medium
WO2021004384A1
