Request sending method, device and terminal based on data analysis
By analyzing users' historical browsing records and distance, we select appropriate content distribution network nodes to solve the network delay problem when CDN does not cache resources and improve user experience.
Patent Information
- Application Number
- CN201910427428.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-20
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-05-20
AI Technical Summary
When a CDN user accesses a website, if the nearest content distribution network node does not cache the web page resources the user needs, the CDN needs to send a resource acquisition request to the upper-level server, resulting in long network delays and affecting the user experience.
By obtaining the user's historical browsing records of different web page types, the target web page type and the corresponding content distribution network node are determined, and the target node is selected based on the distance between the nodes, and a web page resource acquisition request is sent to reduce network delay.
Through targeted selection of content distribution network nodes, the number of requests to the origin site for web page resources is reduced, user response speed to the Internet is improved, and network latency is reduced.
Smart Images

Figure CN110245313B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a method, device and terminal for sending a request based on data analysis. Background Art
[0002] The basic principle of CDN (Content Delivery Network) is to widely use various content delivery network nodes (composed of cache servers) and distribute these content delivery network nodes to areas or networks where user access is relatively concentrated. When a user visits a website, the global load technology is used to direct the user's access to the nearest content delivery network node, and the nearest content delivery network node directly responds to the user's request. During the operation of the content delivery network node, if the nearest content delivery network node has cached the web page resources required by the user, the resource will be sent directly to the user. However, if the nearest content delivery network node does not cache the web page resources required by the user, the content delivery network node will continue to send resource acquisition requests to the superior server (such as the source server) to obtain the cache required by the user. This process will cause a long network delay and affect the user experience.
[0003] Therefore, how to select appropriate content distribution network nodes to serve users and thus reduce network latency has become an urgent problem to be solved. Summary of the invention
[0004] The embodiments of the present invention provide a request sending method, device and terminal based on data analysis, which can select a suitable content distribution network node to serve the user based on the web page type preferred by the user, thereby reducing the network delay when the user surfs the Internet.
[0005] In a first aspect, an embodiment of the present invention provides a request sending method based on data analysis, the method comprising:
[0006] Obtaining a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration;
[0007] Determining a target webpage type from the at least one preset webpage type according to the historical browsing times and the historical browsing duration;
[0008] Determining at least one content distribution network node corresponding to the target webpage type;
[0009] Acquire the distance between each content distribution network node in the at least one content distribution network node, and determine a target content distribution network node from the at least one content distribution network node according to the distance;
[0010] When the webpage resource acquisition request instruction input by the user is received, the webpage resource acquisition request instruction is sent to the target content distribution network node.
[0011] In a second aspect, an embodiment of the present invention provides a request sending device based on data analysis, the device comprising:
[0012] An acquisition module, used to acquire a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration;
[0013] A determination module, configured to determine a target web page type from the at least one preset web page type according to the historical browsing times and the historical browsing duration;
[0014] The determination module is further used to determine at least one content distribution network node corresponding to the target webpage type;
[0015] The acquisition module is further configured to obtain a distance from each content distribution network node in the at least one content distribution network node;
[0016] The determination module is further configured to determine a target content distribution network node from the at least one content distribution network node according to the distance;
[0017] The sending module is used to send the webpage resource acquisition request instruction to the target content distribution network node when receiving the webpage resource acquisition request instruction input by the user.
[0018] In a third aspect, an embodiment of the present invention provides a terminal, comprising a processor, an input device, an output device and a memory, wherein the processor, input device, output device and memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method described in the first aspect.
[0019] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method described in the first aspect.
[0020] In the embodiment of the present invention, the terminal obtains the user's historical browsing records for different web page types, and determines the target web page type based on the historical browsing records. The terminal determines at least one content distribution network node corresponding to the target web page type, and selects the target content distribution network node based on the distance between the terminal and each content distribution network node. When receiving the web page resource acquisition request instruction input by the user, the terminal sends the web page resource acquisition request instruction to the target content distribution network node. In the above manner, a suitable content distribution network node can be selected to serve the user based on the web page type preferred by the user, so that the service of the content distribution network node is more targeted and the network delay when the user is surfing the Internet is reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0022] Figure 1 is a flowchart of a request sending method based on data analysis in an embodiment of the present invention;
[0023] Figure 2 is a flowchart of another method for sending a request based on data analysis in an embodiment of the present invention;
[0024] Figure 3 is a structural schematic diagram of a request sending device based on data analysis in an embodiment of the present invention;
[0025] Figure 4 It is a schematic diagram of the structure of a terminal in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Figure 1 FIG. 1 is a flow chart of a method for sending a request based on data analysis in an embodiment of the present invention. Figure 1 As shown, the process of the request sending method based on data analysis in this embodiment may include:
[0028] S101. A terminal obtains a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, where the historical browsing record includes a historical browsing count and a historical browsing duration.
[0029] In an embodiment of the present invention, when a user browses a web page on a terminal, the terminal can record the preset web page type corresponding to the web page browsed by the user, the browsing time and the number of browsing times for the preset web page type, and store the above data as the user's historical browsing record. The preset web page type can be sports, finance, fashion, automobile, game, other, etc.
[0030] The terminal obtains the user's historical browsing records for each type of web page in at least one preset web page type within a preset time period, wherein the preset time period can be pre-set by research and development personnel, such as one week, one month, one year, etc. The historical browsing records record the user's historical browsing times and historical browsing duration for each type of web page in at least one preset web page type.
[0031] It should be noted that the specific method for the terminal to determine the preset webpage type corresponding to the webpage browsed by the user can be that the preset webpage type corresponding to the webpage is pre-set by the webpage maker, and the terminal obtains the preset webpage type corresponding to the webpage pre-set by the webpage maker. Alternatively, when the terminal detects that the webpage is opened, it detects whether the webpage contains preset keywords, and determines the preset webpage type corresponding to the webpage according to the correspondence between the keywords and the preset webpage types. For example, the preset webpage type corresponding to the keyword "table tennis" is sports, and the preset webpage type corresponding to the keyword "stock" is finance.
[0032] S102: The terminal determines a target web page type from at least one preset web page type according to the number of historical browsing times and the historical browsing duration.
[0033] In an embodiment of the present invention, the target web page type may be a web page type that the user likes, and the target web page type may be a preset web page type, such as sports, finance, fashion, automobile, games, etc., or the target web page type may be a combination of multiple preset web page types, such as sports and finance, finance and fashion, etc., which is not limited here.
[0034] In a specific implementation, the specific determination method of the target web page type can be that the terminal determines the target weighting coefficient corresponding to the historical browsing time of each type of web page in at least one preset web page type according to the corresponding relationship between the browsing time and the weighting coefficient. Among them, the corresponding relationship between the weighting coefficient and the browsing time can be preset. For example, the weighting coefficient corresponding to the browsing time of 1 hour is 0.5, and the weighting coefficient corresponding to the browsing time of 2 hours is 0.6. After the terminal determines the target weighting coefficient corresponding to the historical browsing time, the target weighting coefficient is used to perform weighted processing on the historical browsing times of each type of web page to obtain the weighted browsing times of each type of web page. The terminal sorts at least one preset web page type in descending order of the weighted browsing times, and determines the preset web page type ranked in the top N as the target web page type, wherein N is a positive integer and can be preset by the R&D personnel. When N is 1, the target web page type corresponds to one preset web page type, and when N is greater than 1, the target web page type corresponds to multiple preset web page types.
[0035] For example, the preset web page types include sports, finance, and fashion. The target weighting coefficient corresponding to the historical browsing time of sports web pages is 0.5, the target weighting coefficient corresponding to the historical browsing time of finance web pages is 0.1, and the target weighting coefficient corresponding to the historical browsing time of fashion web pages is 2. The weighted browsing times of each web page type in at least one preset web page type recorded in the historical browsing record are shown in Table 1:
[0036] Table 1
[0037] Default page type Target weighting factor Historical Views Weighted Views Sorting Sports 0.5 100 50 3 Finance 1 200 200 2 Fashion 2 150 300 1
[0038] As shown in Table 1, the terminal sorts each preset web page type according to the weighted browsing times, and the fashion category is ranked first, the finance category is ranked second, and the sports category is ranked third. When N is 1, the target web page type is the fashion category. When N is 2, the target web page type is a combination of the fashion category and the finance category.
[0039] S103: The terminal determines at least one content distribution network node corresponding to the target webpage type.
[0040] In the embodiment of the present invention, after the terminal determines the target web page type, it will determine at least one content distribution network node corresponding to the target web page type. Specifically, multiple content distribution network nodes in the network are pre-configured with label attributes, wherein the label attributes have a corresponding relationship with the preset web page type, and the label attributes may be sports, finance, fashion, sports and finance, finance and fashion, etc. The corresponding relationship between the label attributes and the preset web page types may be that the sports label attribute corresponds to the preset web page type of the sports category, the finance label attribute corresponds to the preset web page type of the finance category, etc.
[0041] The terminal determines the target tag attribute corresponding to the target web page type based on the correspondence between the tag attribute and the preset web page type. The terminal determines the content distribution network node configured with the target tag attribute as the content distribution network node corresponding to the target web page type. For example, if the target web page type is sports, then the corresponding target tag attribute is determined to be sports, and the terminal determines the content distribution network node with the tag attribute of sports in the network as the content distribution network node corresponding to the target web page type.
[0042] S104: The terminal obtains a distance between itself and each content distribution network node in at least one content distribution network node, and determines a target content distribution network node from the at least one content distribution network node according to the distance.
[0043] In the embodiment of the present invention, after the terminal determines at least one content distribution network node corresponding to the target webpage type, it determines the distance between itself and each content distribution network node in the at least one content distribution network node, and determines the target content distribution network node from the at least one content distribution network node according to the distance.
[0044] In one implementation, the terminal may select a content distribution network node that is closest to itself from at least one content distribution network node corresponding to the target webpage type as the target content distribution network node, or the terminal may sort at least one content distribution network node corresponding to the target webpage type in the network in ascending order of distance, and determine the content distribution network node ranked in the top M positions as the target content distribution network node, where M is a positive integer.
[0045] In one implementation, after the terminal obtains the distance between itself and each content distribution network node corresponding to the target web page type, it will sort the content distribution network nodes in order of distance from small to large, and use the content distribution network nodes ranked in the top K positions as the content distribution network nodes to be selected, where K is a positive integer. The terminal continues to obtain the load of each content distribution network node to be selected and the terminal's historical access times to each content distribution network node to be selected, and selects the target content distribution network node based on the load and the historical access times. The load may be the number of network resource acquisition request instructions currently being processed by the content distribution network node to be selected, and the terminal's historical access times to the content distribution network node to be selected may be the number of times the terminal sends web resource acquisition request instructions to the content distribution network node to be selected within a preset time period. In a specific implementation, the terminal can determine the first weighting coefficient corresponding to the distance between the terminal and each candidate content distribution network node according to the corresponding relationship between the distance and the weighting coefficient, and determine the second weighting coefficient corresponding to the load of each candidate content distribution network node according to the corresponding relationship between the load and the weighting coefficient. The terminal uses the first weighting coefficient and the second weighting coefficient of each candidate content distribution network node to perform weighted processing on the historical access times corresponding to each candidate content distribution network node to obtain the weighted historical access times corresponding to each candidate content distribution network node. The terminal sorts the candidate content distribution network nodes in descending order of the weighted historical access times, and determines the candidate content distribution network node ranked first as the target content distribution network node.
[0046] S105: When the terminal receives the webpage resource acquisition request instruction input by the user, the terminal sends the webpage resource acquisition request instruction to a target content distribution network node.
[0047] In the embodiment of the present invention, a user can input a webpage resource acquisition request instruction in a terminal, wherein the webpage resource acquisition request instruction includes a domain name, a search term, etc., for acquiring corresponding webpage resources, and the webpage resources include CSS (Cascading Style Sheets) resources, JS (JavaScript, script) resources, and image resources, etc. After the terminal receives the webpage resource acquisition request instruction input by the user, it will send the webpage resource acquisition request instruction to the target content distribution network node.
[0048] After the target content distribution network node obtains the web resource acquisition request instruction sent by the terminal, it will detect whether it has cached the web resource corresponding to the web resource acquisition request instruction. If the target content distribution network node has cached the corresponding web resource, it will directly send the web resource to the terminal, and the terminal will display the content returned by the target content distribution network node. If the web resource is not cached, it will send a web resource acquisition request instruction to the source station server and receive the web resource returned by the source station server. The target content distribution network node sends the web resource to the terminal, and the terminal will display the content returned by the target content distribution network node. It should be noted that if the target content distribution network node has cached the web resource required by the user, it can quickly respond to the user's Internet access request, so that the user's Internet access delay is relatively small. If the target content distribution network node does not cache the web resource required by the user, the user's Internet access delay will be slightly larger.
[0049] In the embodiment of the present invention, the terminal obtains the user's historical browsing records for different web page types, and determines the target web page type based on the historical browsing records. The terminal determines at least one content distribution network node corresponding to the target web page type, and selects the target content distribution network node based on the distance between the terminal and each content distribution network node. When receiving the web page resource acquisition request instruction input by the user, the terminal sends the web page resource acquisition request instruction to the target content distribution network node. Through the above method, the content distribution network node can provide more targeted services for users. While the content cached by the content distribution network node is more called by the user, the number of times the content distribution network node requests to the source station to obtain web page resources is reduced, so that the user's Internet access request can be responded to more quickly, reducing the network delay when the user is online.
[0050] Figure 2 FIG. 1 is a flow chart of another method for sending a request based on data analysis in an embodiment of the present invention. Figure 2 As shown, the process of the request sending method based on data analysis in this embodiment may include:
[0051] S201. The terminal obtains a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, where the historical browsing record includes a historical browsing count and a historical browsing duration.
[0052] The terminal obtains the user's historical browsing records for each type of web page in at least one preset web page type within a preset time period, wherein the preset time period can be pre-set by research and development personnel, such as one week, one month, one year, etc. The historical browsing records record the user's historical browsing times and historical browsing duration for each type of web page in at least one preset web page type.
[0053] It should be noted that the specific method for the terminal to determine the preset web page type corresponding to the web page browsed by the user can be that the preset web page type corresponding to the web page is pre-set by the web page maker, and the terminal obtains the preset web page type corresponding to the web page pre-set by the web page maker. Alternatively, when the terminal detects that the web page is opened, it detects whether the web page contains preset keywords, and determines the target preset web page type corresponding to the web page according to the correspondence between the keywords and the preset web page types. For example, the target preset web page type corresponding to the keyword "table tennis" is sports, and the target preset web page type corresponding to the keyword "stock" is finance. If multiple groups of preset keywords are found in the web page, and each group of keywords corresponds to a different preset web page type, the preset web page type corresponding to the web page can be determined as a set of preset web page types corresponding to each group of keywords, such as the preset web page types corresponding to the web page containing the keywords "table tennis" and "stock" are sports and finance. Among them, the correspondence between keywords and preset web page types can be pre-set by R&D personnel, and is not limited here.
[0054] Furthermore, after the terminal determines that the target preset web page type corresponds to the web page opened by the user, the terminal updates the historical browsing times of the target preset web page type in the database. The specific updating method may be to add 1 to the historical browsing times of the target preset web page type stored in the database. When the terminal detects that the web page is closed, the terminal obtains the opening time of the web page, and updates the historical browsing time of the target preset web page type in the database based on the opening time. The specific updating method may be to add the historical browsing time of the target preset web page type stored in the database to the opening time to obtain the added time, and the terminal determines the added time as the new historical browsing time corresponding to the target web page type.
[0055] S202: The terminal determines a target web page type from at least one preset web page type according to the number of historical browsing times and the historical browsing duration.
[0056] In an embodiment of the present invention, the target web page type may be a web page type that the user likes, and the target web page type may be a preset web page type, such as sports, finance, fashion, automobile, games, etc., or the target web page type may be a combination of multiple preset web page types, such as sports and finance, finance and fashion, etc., which is not limited here.
[0057] The terminal can obtain the browsing time and browsing times of the user for different preset web page types from the historical browsing records, and determine the web page type that the user likes based on the browsing time and browsing times. In a specific implementation, the terminal can determine the target weighting coefficient corresponding to the historical browsing time of each type of web page in at least one preset web page type based on the corresponding relationship between the browsing time and the weighting coefficient, and use the target weighting coefficient to weight the historical browsing times of each type of web page to obtain the weighted browsing times of each type of web page. The terminal sorts each web page type in descending order of the weighted browsing times, and determines the preset web page types ranked in the top N as the target web page types, where N is a positive integer.
[0058] S203: The terminal determines at least one content distribution network node corresponding to the target webpage type.
[0059] In the embodiment of the present invention, the terminal determines the target tag attribute corresponding to the target web page type based on the correspondence between the tag attribute and the preset web page type, and the terminal determines the content distribution network node configured with the target tag attribute as the content distribution network node corresponding to the target web page type. There may be multiple content distribution network nodes configured with the target tag attribute in the network.
[0060] S204: The terminal obtains a distance between itself and each content distribution network node in at least one content distribution network node, and determines a target content distribution network node from the at least one content distribution network node according to the distance.
[0061] In the embodiment of the present invention, after the terminal determines at least one content distribution network node corresponding to the target webpage type, it determines the distance between itself and each content distribution network node in the at least one content distribution network node. And determines the target content distribution network node from the at least one content distribution network node according to the distance. The target content distribution network node may be one or more.
[0062] Specifically, the terminal may sort at least one content distribution network node corresponding to the target webpage type in the network in ascending order of distance, and determine the top M content distribution network nodes as the target content distribution network nodes, where M is a positive integer.
[0063] For example, the target web page type is sports, and its corresponding content distribution network nodes include content distribution network node 1, content distribution network node 2 and content distribution network node 3. The distance between the terminal and content distribution network node 1 is 100 meters, the distance between the terminal and content distribution network node 2 is 200 meters, and the distance between the terminal and content distribution network node 3 is 300 meters. When M is 1, the terminal determines content distribution network node 1 as the target content distribution network node, and when M is 2, the terminal determines content distribution network node 1 and content distribution network node 2 as the target content distribution network nodes.
[0064] S205: When the terminal receives the webpage resource acquisition request instruction input by the user, the terminal sends the webpage resource acquisition request instruction to the target content distribution network node.
[0065] In an embodiment of the present invention, the number of target content distribution network nodes may be one or more. In one implementation, the value of M is 1, that is, the number of target distribution network nodes is one, and the terminal directly sends the web resource acquisition request instruction input by the user to the target content distribution network node.
[0066] In one implementation, the value of M is 2, that is, the number of target content distribution network nodes is 2, and the target content distribution network nodes include a first target content distribution network node and a second target content distribution network node. When the terminal receives a webpage resource acquisition request instruction input by a user, the webpage resource acquisition request instruction can be split into an image resource acquisition request instruction and a code resource acquisition request instruction, wherein the image resource acquisition request instruction is used to acquire image resources in a webpage, and the image resources can be images and texts in a webpage, and the code resource acquisition request instruction is used to acquire code resources in a webpage, and the code resources can be script codes in a webpage, such as CSS, JS, etc. The first target content distribution network node can be the content distribution network node closest to the terminal, and the second target content distribution network node can be the content distribution network node that is second closest to the terminal. After the terminal determines the first target content distribution network node and the second target content distribution network node, the image resource acquisition request instruction can be sent to the first target content distribution network node, and the code resource acquisition request instruction can be sent to the second target content distribution network node.
[0067] It should be noted that when the number of nodes in the target distribution network is M, after the terminal receives the web page resource acquisition request instruction input by the user, it can split the web page resource acquisition request instruction into M resource acquisition request instructions according to preset rules, wherein the M different resource acquisition request instructions are used to obtain different types of web page resources. For example, if M is 3, the terminal can split the web page resource acquisition request instruction input by the user into an image resource acquisition request instruction, a CSS resource acquisition request instruction, and a JS resource acquisition request instruction, and then send the three resource acquisition request instructions to the three target content distribution network nodes respectively.
[0068] S206: The terminal receives the web page resources returned by the target content distribution network node, and displays the web page resources.
[0069] In one implementation, the value of M is 1, that is, the number of the target content distribution network node is 1, and the terminal will directly receive the web page resource returned by the target content distribution network node and display it.
[0070] In one implementation, the value of M is 2, the terminal receives the image resource returned by the first target content distribution network node and the code resource returned by the second target content distribution network node, the terminal integrates the received image resource and code resource, obtains the target web page resource, and displays the target web page resource. Through the above method, multiple target content distribution network nodes can simultaneously transmit web page resources to the terminal, the web page loading speed is faster, and the network delay is reduced. In a possible case, after receiving the image resource returned by the first target content distribution network node, if the terminal does not receive the code resource returned by the second target content distribution network node after the interval preset time length, the terminal sends a code resource acquisition request instruction to the first target content distribution network node, and receives the code resource returned by the first target content distribution network node. Alternatively, after receiving the code resource returned by the second target content distribution network node, if the terminal does not receive the image resource returned by the first target content distribution network node after the interval preset time length, the terminal sends an image resource acquisition request instruction to the second target content distribution network node, and receives the image resource returned by the second target content distribution network node.
[0071] It should be noted that when there are M nodes in the target content distribution network, the terminal will receive web page resources returned by each of the M target content distribution network nodes, and integrate each web page resource. The terminal will display the integrated web page resources.
[0072] In the embodiment of the present invention, the terminal selects multiple content distribution network nodes to serve the user according to the web page type preferred by the user, so that multiple content distribution network nodes send web page resources to the terminal at the same time, that is, the downlink bandwidth of the terminal is increased. Through the above method, the content distribution network node can be made to serve the user more targeted, and while the content cached by the content distribution network node is more frequently called by the user, the number of times the content distribution network node requests the source station to obtain web page resources is reduced. In addition, the terminal simultaneously receives the web page resources returned by multiple content distribution network nodes, which can make the web page resources received faster and reduce the network delay when the user is surfing the Internet.
[0073] The following will be combined with the attached Figure 3 The request sending device based on data analysis provided by the embodiment of the present invention is introduced in detail. Figure 3 The request sending device based on data analysis is used to execute the present invention Figure 1-Figure 2 For the convenience of explanation, only the part related to the embodiment of the present invention is shown, and the specific technical details are not disclosed. Figure 1-Figure 2 The embodiment shown.
[0074] See also Figure 3 , which is a structural diagram of a request sending device based on data analysis provided by the present invention. The request sending device 30 based on data analysis may include: an acquisition module 301, a determination module 302, a sending module 303, a detection module 304, an update module 305, and a display module 306.
[0075] An acquisition module 301 is used to acquire a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration;
[0076] A determination module 302, configured to determine a target web page type from the at least one preset web page type according to the historical browsing times and the historical browsing duration;
[0077] The determination module 302 is further configured to determine at least one content distribution network node corresponding to the target webpage type;
[0078] The acquisition module 301 is further configured to obtain a distance from each content distribution network node in the at least one content distribution network node;
[0079] The determination module 302 is further configured to determine a target content distribution network node from the at least one content distribution network node according to the distance;
[0080] The sending module 303 is configured to send the webpage resource acquisition request instruction to the target content distribution network node when receiving the webpage resource acquisition request instruction input by the user.
[0081] In one implementation, the determining module 302 is specifically configured to:
[0082] Determining a target weighting coefficient corresponding to the historical browsing time of each type of web page in the at least one preset web page type according to the corresponding relationship between the browsing time and the weighting coefficient;
[0083] Using the target weighting coefficient to perform weighted processing on the historical browsing times of each type of web page to obtain the weighted browsing times of each type of web page;
[0084] Sorting the at least one preset web page type in descending order according to the weighted browsing times;
[0085] The preset webpage types ranked in the top N positions are determined as the target webpage types, where N is a positive integer.
[0086] In one implementation, the detection module 304 is used to detect whether the webpage contains a preset keyword when it is detected that the webpage is opened;
[0087] The updating module 305 is specifically used for:
[0088] According to the correspondence between the keyword and the preset web page type, determine the target preset web page type corresponding to the web page, and update the historical browsing times of the target preset web page type in the database;
[0089] When it is detected that the webpage is closed, the opening time of the webpage is obtained, and the historical browsing time of the target preset webpage type is updated in the database based on the opening time.
[0090] In one implementation, a plurality of content distribution network nodes in the network are pre-configured with tag attributes, and the tag attributes have a corresponding relationship with the preset web page type. The determination module 302 is specifically configured to:
[0091] Based on the correspondence between the tag attributes and the preset web page types, determining the target tag attributes corresponding to the target web page type;
[0092] The content distribution network node configured with the target tag attribute is determined as the content distribution network node corresponding to the target webpage type.
[0093] In one implementation, the determining module 302 is specifically configured to:
[0094] Sorting each content distribution network node in the at least one content distribution network node in order of the distance from small to large;
[0095] The content distribution network nodes ranked in the top M positions are determined as target content distribution network nodes, where M is a positive integer.
[0096] In one implementation, the target content distribution network node includes a first target content distribution network node and a second target content distribution network node, and the sending module 303 is specifically configured to:
[0097] Splitting the webpage resource acquisition request instruction into an image resource acquisition request instruction and a code resource acquisition request instruction, wherein the image resource acquisition request instruction is used to acquire image resources in the webpage, and the code resource acquisition request instruction is used to acquire code resources in the webpage;
[0098] The image resource acquisition request instruction is sent to the first target content distribution network node, and the code resource acquisition request instruction is sent to the second target content distribution network node.
[0099] In one implementation, the display module 306 is specifically configured to:
[0100] Receiving the image resource returned by the first target content distribution network node and the code resource returned by the second target content distribution network node;
[0101] Integrate the image resource and the code resource to obtain a target webpage resource;
[0102] The target web page resource is displayed.
[0103] In the embodiment of the present invention, the acquisition module 301 acquires the user's historical browsing records for different web page types, the determination module 302 determines the target web page type according to the historical browsing records, and determines at least one content distribution network node corresponding to the target web page type, the determination module 302 selects the target content distribution network node according to the distance between the terminal and each content distribution network node, and the sending module 303 sends the web page resource acquisition request instruction to the target content distribution network node when receiving the web page resource acquisition request instruction input by the user. In the above manner, a suitable content distribution network node can be selected to serve the user based on the web page type preferred by the user, so that the service of the content distribution network node is more targeted and the network delay when the user is surfing the Internet is reduced.
[0104] See also Figure 4 , which is a schematic diagram of the structure of a terminal according to an embodiment of the present invention. Figure 4As shown, the terminal includes: at least one processor 401, an input device 403, an output device 404, a memory 405, and at least one communication bus 402. The communication bus 402 is used to realize the connection and communication between these components. The input device 403 can be a control panel or a microphone, etc., and the output device 404 can be a display screen, etc. The memory 405 can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The memory 405 can also be at least one storage device located away from the aforementioned processor 401. The processor 401 can be combined with Figure 3 In the described apparatus, a set of program codes is stored in the memory 405, and the processor 401, the input device 403, and the output device 404 call the program codes stored in the memory 405 to perform the following operations:
[0105] Processor 401, used to obtain a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration;
[0106] Processor 401, configured to determine a target webpage type from the at least one preset webpage type according to the historical browsing times and the historical browsing duration;
[0107] Processor 401, configured to determine at least one content distribution network node corresponding to the target webpage type;
[0108] Processor 401 is used to obtain the distance between each content distribution network node in the at least one content distribution network node, and determine a target content distribution network node from the at least one content distribution network node according to the distance;
[0109] The output device 404 is used to send the webpage resource acquisition request instruction to the target content distribution network node when receiving the webpage resource acquisition request instruction input by the user.
[0110] In one implementation, the processor 401 is specifically configured to:
[0111] Determining a target weighting coefficient corresponding to the historical browsing time of each type of web page in the at least one preset web page type according to the corresponding relationship between the browsing time and the weighting coefficient;
[0112] Using the target weighting coefficient to perform weighted processing on the historical browsing times of each type of web page to obtain the weighted browsing times of each type of web page;
[0113] Sorting the at least one preset web page type in descending order according to the weighted browsing times;
[0114] The preset webpage types ranked in the top N positions are determined as the target webpage types, where N is a positive integer.
[0115] In one implementation, the processor 401 is further configured to:
[0116] When it is detected that a web page is opened, detecting whether the web page contains a preset keyword;
[0117] According to the correspondence between the keyword and the preset web page type, determine the target preset web page type corresponding to the web page, and update the historical browsing times of the target preset web page type in the database;
[0118] When it is detected that the webpage is closed, the opening time of the webpage is obtained, and the historical browsing time of the target preset webpage type is updated in the database based on the opening time.
[0119] In one implementation, a plurality of content distribution network nodes in the network are pre-configured with tag attributes, and the tag attributes have a corresponding relationship with the preset web page type. The processor 401 is specifically configured to:
[0120] Based on the correspondence between the tag attributes and the preset web page types, determining the target tag attributes corresponding to the target web page type;
[0121] The content distribution network node configured with the target tag attribute is determined as the content distribution network node corresponding to the target webpage type.
[0122] In one implementation, the processor 401 is specifically configured to:
[0123] Sorting each content distribution network node in the at least one content distribution network node in order of the distance from small to large;
[0124] The content distribution network nodes ranked in the top M positions are determined as target content distribution network nodes, where M is a positive integer.
[0125] In one implementation, the target content distribution network node includes a first target content distribution network node and a second target content distribution network node.
[0126] Processor 401, used to split the webpage resource acquisition request instruction into an image resource acquisition request instruction and a code resource acquisition request instruction, wherein the image resource acquisition request instruction is used to acquire image resources in the webpage, and the code resource acquisition request instruction is used to acquire code resources in the webpage;
[0127] The output device 404 is used to send the image resource acquisition request instruction to the first target content distribution network node, and send the code resource acquisition request instruction to the second target content distribution network node.
[0128] In one implementation, the processor 401 is specifically configured to:
[0129] Receiving the image resource returned by the first target content distribution network node and the code resource returned by the second target content distribution network node;
[0130] Integrate the image resource and the code resource to obtain a target webpage resource;
[0131] The target web page resource is displayed.
[0132] In the embodiment of the present invention, the processor 401 obtains the user's historical browsing records for different web page types, the processor 401 determines the target web page type according to the historical browsing records, and determines at least one content distribution network node corresponding to the target web page type, the processor 401 selects the target content distribution network node according to the distance between the terminal and each content distribution network node, and when the output device 404 receives the web page resource acquisition request instruction input by the user, the terminal sends the web page resource acquisition request instruction to the target content distribution network node. In the above manner, a suitable content distribution network node can be selected to serve the user based on the web page type preferred by the user, so that the service of the content distribution network node is more targeted and the network delay when the user is surfing the Internet is reduced.
[0133] The modules described in the embodiments of the present invention may be implemented by a general integrated circuit, such as a CPU (Central Processing Unit), or by an ASIC (Application Specific Integrated Circuit).
[0134] It should be understood that in the embodiment of the present invention, the processor 401 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0135] The bus 402 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus 402 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The computer-readable storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0137] The above disclosure is only the preferred embodiment of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A request sending method based on data analysis, characterized in that: The method comprises: Obtaining a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration; Determining a target weighting coefficient corresponding to the historical browsing time of each type of web page in the at least one preset web page type according to the corresponding relationship between the browsing time and the weighting coefficient; Using the target weighting coefficient to perform weighted processing on the historical browsing times of each type of web page to obtain the weighted browsing times of each type of web page; Sorting the at least one preset web page type in descending order of the weighted browsing times; determining the preset web page types ranked in the top N positions as target web page types, where N is a positive integer; wherein a plurality of content distribution network nodes in the network are pre-configured with label attributes, and the label attributes have a corresponding relationship with the preset web page types; Based on the correspondence between the tag attribute and the preset web page type, determining the target tag attribute corresponding to the target web page type; determining the content distribution network node configured with the target tag attribute as at least one content distribution network node corresponding to the target web page type; Obtaining the distance between the terminal and each of the at least one content distribution network node, and determining a content distribution network node to be selected from the at least one content distribution network node according to the distance; obtaining the load of each of the content distribution network nodes to be selected and the number of historical visits of the terminal to each of the content distribution network nodes to be selected; determining a first weighting coefficient corresponding to the distance between the terminal and each of the content distribution network nodes to be selected according to the corresponding relationship between the distance and the weighting coefficient, and determining a second weighting coefficient corresponding to the load of each of the content distribution network nodes to be selected according to the corresponding relationship between the load and the weighting coefficient, performing weighted processing on the number of historical visits corresponding to each of the content distribution network nodes to be selected using the first weighting coefficient and the second weighting coefficient of each of the content distribution network nodes to be selected, obtaining the weighted number of historical visits corresponding to each of the content distribution network nodes to be selected, sorting the content distribution network nodes to be selected in descending order of the weighted number of historical visits, and determining the content distribution network node to be selected ranked first as the target content distribution network node; When receiving the webpage resource acquisition request instruction input by the user, sending the webpage resource acquisition request instruction to the target content distribution network node; The target content distribution network node includes a first target content distribution network node and a second target content distribution network node, and sending the webpage resource acquisition request instruction to the target content distribution network node includes: Splitting the webpage resource acquisition request instruction into an image resource acquisition request instruction and a code resource acquisition request instruction, wherein the image resource acquisition request instruction is used to acquire image resources in the webpage, and the code resource acquisition request instruction is used to acquire code resources in the webpage; Sending the image resource acquisition request instruction to the first target content distribution network node, and sending the code resource acquisition request instruction to the second target content distribution network node; After receiving the image resource returned by the first target content distribution network node, if the code resource returned by the second target content distribution network node is not received after a preset time interval, a code resource acquisition request instruction is sent to the first target content distribution network node, and the code resource returned by the first target content distribution network node is received; or, after receiving the code resource returned by the second target content distribution network node, if the image resource returned by the first target content distribution network node is not received after a preset time interval, an image resource acquisition request instruction is sent to the second target content distribution network node, and the image resource returned by the second target content distribution network node is received.
2. The method according to claim 1, characterized in that Before obtaining the historical browsing records of the user for each type of web page in at least one preset web page type within a preset time period, the method further includes: When it is detected that a web page is opened, detecting whether the web page contains a preset keyword; According to the correspondence between the keyword and the preset web page type, determine the target preset web page type corresponding to the web page, and update the historical browsing times of the target preset web page type in the database; When it is detected that the webpage is closed, the opening time of the webpage is obtained, and the historical browsing time of the target preset webpage type is updated in the database based on the opening time.
3. The method according to claim 1, characterized in that Determining a target content distribution network node from the at least one content distribution network node according to the distance includes: Sorting each content distribution network node in the at least one content distribution network node in order of the distance from small to large; The content distribution network nodes ranked in the top M positions are determined as target content distribution network nodes, where M is a positive integer.
4. The method according to claim 1, characterized in that: After sending the image resource acquisition request instruction to the first target content distribution network node and sending the code resource acquisition request instruction to the second target content distribution network node, the method further includes: Receiving the image resource returned by the first target content distribution network node and the code resource returned by the second target content distribution network node; Integrate the image resource and the code resource to obtain a target webpage resource; The target web page resource is displayed.
5. A request sending device based on data analysis, characterized in that: The device comprises: An acquisition module, used to acquire a user's historical browsing record for each type of web page in at least one preset web page type within a preset time period, wherein the historical browsing record includes a historical browsing count and a historical browsing duration; A determination module, configured to determine a target weighting coefficient corresponding to a historical browsing time of each type of web page in the at least one preset web page type according to a corresponding relationship between browsing time and weighting coefficient; weighting the historical browsing times of each type of web page using the target weighting coefficient to obtain a weighted browsing time of each type of web page; sorting the at least one preset web page type in descending order of the weighted browsing times; determining the preset web page type ranked in the top N positions as the target web page type, where N is a positive integer; wherein a plurality of content distribution network nodes in the network are pre-configured with label attributes, and the label attributes have a corresponding relationship with the preset web page type; The determination module is further configured to determine a target tag attribute corresponding to the target web page type based on a correspondence between the tag attribute and the preset web page type; and determine a content distribution network node configured with the target tag attribute as at least one content distribution network node corresponding to the target web page type; The acquisition module is further configured to obtain a distance from each content distribution network node in the at least one content distribution network node; The determination module is further used to determine a content distribution network node to be selected from the at least one content distribution network node according to the distance; obtain the load of each content distribution network node to be selected and the number of historical visits of the terminal to each content distribution network node to be selected; determine a first weighting coefficient corresponding to the distance between the terminal and each content distribution network node to be selected according to the corresponding relationship between the distance and the weighting coefficient, and determine a second weighting coefficient corresponding to the load of each content distribution network node to be selected according to the corresponding relationship between the load and the weighting coefficient, use the first weighting coefficient and the second weighting coefficient of each content distribution network node to perform weighted processing on the number of historical visits corresponding to each content distribution network node to be selected, obtain the weighted number of historical visits corresponding to each content distribution network node to be selected, sort the content distribution network nodes to be selected in descending order of the weighted number of historical visits, and determine the content distribution network node to be selected that is ranked first as the target content distribution network node; A sending module, configured to send the webpage resource acquisition request instruction to the target content distribution network node when receiving the webpage resource acquisition request instruction input by the user; The target content distribution network node includes a first target content distribution network node and a second target content distribution network node, and the sending module sends the webpage resource acquisition request instruction to the target content distribution network node, specifically for: Splitting the webpage resource acquisition request instruction into an image resource acquisition request instruction and a code resource acquisition request instruction, wherein the image resource acquisition request instruction is used to acquire image resources in the webpage, and the code resource acquisition request instruction is used to acquire code resources in the webpage; Sending the image resource acquisition request instruction to the first target content distribution network node, and sending the code resource acquisition request instruction to the second target content distribution network node; The sending module is further used to, after receiving the image resource returned by the first target content distribution network node, if the code resource returned by the second target content distribution network node is not received after a preset time interval, send a code resource acquisition request instruction to the first target content distribution network node and receive the code resource returned by the first target content distribution network node; or, after receiving the code resource returned by the second target content distribution network node, if the image resource returned by the first target content distribution network node is not received after a preset time interval, send an image resource acquisition request instruction to the second target content distribution network node and receive the image resource returned by the second target content distribution network node.
6. A terminal, characterized in that: The method comprises a processor, an input device, an output device and a memory, wherein the processor, the input device, the output device and the memory are interconnected, wherein the memory is used to store a computer program, the computer program comprises program instructions, and the processor is configured to call the program instructions to execute the method according to any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 4.
