Method and device for searching optimal access node of cross-border website, equipment and medium
By dynamically selecting the optimal access node, combined with global access node IP collection and city-level speed measurement, the problem of unstable access speed to cross-border e-commerce websites is solved, the stability and speed of cross-border access are improved, and the user experience is improved , promoting the development of China’s cross-border e-commerce business and the global market.
Patent Information
- Application Number
- CN202410905909.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-18
AI Technical Summary
The access speed of cross-border e-commerce websites is unstable. Traditional CDN technology only selects nodes based on physical distance and cannot sense the optimal access node when the cross-border network is congested, resulting in unstable access speeds for Chinese users.
By creating a node list for the cross-border e-commerce website, collecting the access node IPs of each city, and using ping and head requests to measure the delay time, combined with a specific weight algorithm to calculate the total score of the test results for each city, and dynamically select the optimal access node entry node.
Significantly improve the stability and speed of cross-border access, especially when network congestion or cross-border dedicated lines are unstable, automatically adjust access nodes to provide more stable and efficient network access, improve user experience, and promote China's cross-border e-commerce. business and global market expansion.
Smart Images

Figure CN118802419A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method, device, equipment and medium for finding an optimal access node for a cross-border website. Background Art
[0002] Current websites usually use CDN (Content Distribution Network) technology to direct user requests to the CDN server (access node) that is physically closest. The basic idea of CDN (Content Distribution Network) technology is to place node servers everywhere in the network to form a layer of intelligent virtual network on the existing Internet. The CDN system can generally redirect user requests to the node that is physically closest to improve the response speed of users accessing websites.
[0003] However, the closest access node does not always work best, especially when the cross-border network is congested, CDN will not be aware of this situation, which ultimately leads to unstable speeds for Chinese users when accessing cross-border e-commerce websites. For example, a cross-border e-commerce website has access nodes in Singapore and Japan. The default access node in Guangzhou, China is the access node in Singapore, but in fact the fastest access node may be the access node in Japan. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method, device, equipment and medium for finding the optimal access node for cross-border websites. The optimal access node is dynamically selected through actual speed measurement data, which significantly improves the stability and speed of cross-border access.
[0005] In a first aspect, the present invention provides a method for finding an optimal access node for a cross-border website, which specifically comprises the following steps: Step 1: Create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; Step 2: Collect the access node IP addresses of each cross-border e-commerce website in each city, and record the access node IP addresses and corresponding cities into the node list; Step 3: Based on the node list, measure the speed of accessing each cross-border e-commerce website access node from the set city and obtain the corresponding delay time. The measurement methods include ping and head request; Step 4: Calculate the total score of the test results of each cross-border e-commerce website in the corresponding city according to the cross-border e-commerce website and the city name, and obtain the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
[0006] Furthermore, the step 2 is specifically as follows: by using the nslookup command to find the access node IP of each cross-border e-commerce website in each city, the access node IP and the corresponding city are recorded in the node list.
[0007] In a second aspect, the present invention provides a device for finding an optimal access node for a cross-border website, which specifically includes the following modules: Create a list module to create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; An IP collection module collects access node IPs of various cross-border e-commerce websites in various cities, and records the access node IPs and corresponding cities into a node list; The speed measurement module measures the speed of accessing each cross-border e-commerce website access node from a set city according to the node list, and obtains the corresponding delay time. The measurement methods include ping and head request; The optimal access node module calculates the total score of the test results of each cross-border e-commerce website corresponding to the city according to the cross-border e-commerce website and the city name, and obtains the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
[0008] Furthermore, the IP collection module specifically uses the nslookup command to find the access node IPs of various cross-border e-commerce websites in various cities, and records the access node IPs and corresponding cities into the node list.
[0009] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first aspect when executing the program.
[0010] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in the first aspect.
[0011] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The present invention effectively solves the problem of unstable access speed of cross-border e-commerce websites by combining global access node IP collection and city-level speed measurement. Traditional CDN technology selects nodes based only on physical distance, while the present invention dynamically selects the optimal access node based on actual speed measurement data, significantly improving the stability and speed of cross-border access.
[0012] The present invention acquires and reports the access node IP data of major cross-border e-commerce websites in different cities through the access node IP collection program deployed in major cities around the world. At the same time, through the city-level speed measurement program deployed in major cities in China, the delay of accessing these nodes is measured in real time, and the accuracy and comprehensiveness of the data are ensured by using ping and head requests.
[0013] The aggregation server collects and analyzes data, uses a specific weighting algorithm, comprehensively evaluates the performance of each node based on recent and historical ping and head request delays, and dynamically calculates the optimal access node for each city; ultimately, the system can select the top three access nodes with the lowest scores for users, thereby improving the response speed and user experience of cross-border e-commerce websites.
[0014] The present invention can automatically adjust and select a better access node, especially in the case of network congestion or unstable cross-border dedicated lines, to provide more stable and efficient network access for cross-border e-commerce, significantly improve user experience, and promote the development of China's cross-border e-commerce business and the expansion of the global market.
[0015] In summary, while improving the visiting experience of cross-border e-commerce websites, the present invention also provides solid technical support and guarantee for the expansion of China's cross-border e-commerce business and the development of international trade, and has significant social and economic benefits.
[0016] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.
[0018] Figure 1 is a flow chart of the method in Embodiment 1 of the present invention; Figure 2 It is a schematic diagram of the structure of the device in the second embodiment of the present invention. DETAILED DESCRIPTION
[0019] The technical solution in the embodiment of the present application has the following general idea: 1. Domain name list setting: Create a list of domain names of cross-border e-commerce websites that need to be optimized. This list is collected from the public e-commerce platform URLs on the Internet that support cross-border sales.
[0020] 2. Global access node IP collection program: Deploy a set of "Access Node IP Collection Servers" in major cities around the world. Generally, countries and cities with cross-border dedicated lines to China are selected to collect access node IPs of cross-border e-commerce websites in major cities around the world. For example, the access node collected for cross-border e-commerce website A in city M is IP1, and the access node in city N is IP2. The data is reported to the aggregation server. The data recorded by the server is as follows: Website Source City Access Point Collection date ACross-border e-commerce website W Country M City IP1 xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website E Country N City IP2 xxx year xx month xx day xx hour xx minute xx second The core code is as follows: import subprocess import json from datetime import datetime import requests def nslookup(url): try: result = subprocess.run(['nslookup', url], capture_output=True, text=True) output = result.stdout.splitlines() ip_lines = [line for line in output if 'Address:' in line] ips = [line.split('Address: ')[1] for line in ip_lines if 'Address:'in line] return ips if ips else None except Exception as e: print(f"nslookup failed for {url}: {e}") return None def get_url_list(server_url): try: response = requests.get(server_url + ' / get_urls') if response.status_code == 200: return response.json() else: print(f"Failed to get URL list: {response.status_code}") return [] except Exception as e: print(f"Error getting URL list: {e}") return [] def collect_ip_data(url_list, city, country): ip_data = [] for url in url_list: ips = nslookup(url) if ips: for ip in ips: ip_data.append({ 'website': url, 'city': city, 'country': country, 'ip': ip, 'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S') [[ID=7}} else: print(f"No IP found for {url}") return ip_data def report_to_server(ip_data, server_url): headers = {'Content-Type': 'application / json'} response = requests.post(server_url + ' / report', data=json.dumps(ip_data), headers=headers) if response.status_code == 200: print("Data reported successfully") else: print(f"Failed to report data: {response.status_code}") # Example usage server_url = 'http: / / server.com' city = 'Beijing' country = 'China' url_list = get_url_list(server_url) if url_list: ip_data = collect_ip_data(url_list, city, country) report_to_server(ip_data, server_url) Code explanation: nslookup(url): Use the nslookup command to find the IP address of a given URL.
[0021] get_url_list(server_url): Get the list of cross-border e-commerce websites that need to be collected from the server.
[0022] collect_ip_data(url_list, city, country): traverses the URL list, uses nslookup to obtain the IP address of each URL, and records the relevant information.
[0023] report_to_server(ip_data, server_url): Report the collected IP data to the specified server.
[0024] Example usage: server_url: The base URL of the server, used to obtain URL lists and report data.
[0025] city and country: Indicates the city and country where the IP collection is performed.
[0026] 3. City-level speed test program: Deploy speed test programs in major cities in China. Each city deploys a set of test programs, obtains the access node list of each cross-border website from the "aggregation server", measures the speed of accessing each cross-border e-commerce website access node from the current city, and reports these speed test results to the aggregation server. There are two speed test solutions: ping and head. In the end, data similar to the following will be recorded (a city also has one or more access points): Website Speed test city Access Node Speed measurement method Delay time Speed test time ACross-border e-commerce website X City IP1 access node ping 600 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website X City IP2 access node ping 20 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website X City IP1 access node head request 800 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website X City IP2 access node head request 100 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website Y City IP1 access node ping 30 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website Y City IP2 access node ping 100 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website Y City IP1 access node head request 80 ms xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website Y City IP2 access node head request 300 ms xxx year xx month xx day xx hour xx minute xx second The additional use of head requests for speed testing is to avoid the problem that the IP access node server is still alive but no longer provides services for the cross-border e-commerce website (for example, the website has been transferred to another node to provide services, but the CDN server is still alive).
[0027] The core code is as follows: import subprocess import requests import json from datetime import datetime def ping_test(ip): try: output = subprocess.run(['ping', '-c', '4', ip], capture_output=True,text=True) time = int(output.stdout.splitlines()[-1].split(' / ')[-3]) return time except Exception as e: print(f"Ping test failed for {ip}: {e}") return None def head_test(url): try: response = requests.head(url, timeout=10) time = response.elapsed.total_seconds() * 1000 return time except Exception as e: print(f"HEAD test failed for {url}: {e}") return None def get_access_node_list(server_url): try: response = requests.get(server_url + ' / get_access_nodes') if response.status_code == 200: return response.json() else: print(f"Failed to get access node list: {response.status_code}") return [] except Exception as e: print(f"Error getting access node list: {e}") return [] def test_speed(node_list, city): test_results = [] for node in node_list: url = node['website'] ip = node['ip'] ping_time = ping_test(ip) head_time = head_test(url) if ping_time is not None: test_results.append({ 'website': url, 'city': city, 'ip': ip, 'test_method': 'ping', 'latency': ping_time, 'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S') }) if head_time is not None: test_results.append({ 'website': url, 'city': city, 'ip': ip, 'test_method': 'head', 'latency': head_time, 'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S') }) return test_results def report_to_server(test_results, server_url): headers = {'Content-Type': 'application / json'} response = requests.post(server_url + ' / report_speed', data=json.dumps(test_results), headers=headers) if response.status_code == 200: print("Data reported successfully") else: print(f"Failed to report data: {response.status_code}") # Example usage server_url = 'http: / / server.com' city = 'Beijing' node_list = get_access_node_list(server_url) if node_list: test_results = test_speed(node_list, city) report_to_server(test_results, server_url) Code Explanation: ping_test(ip): Use the ping command to measure the latency of a given IP.
[0028] head_test(url): Measures the latency of a given URL using a HEAD request.
[0029] get_access_node_list(server_url): Get the access node list of each cross-border website from the server.
[0030] test_speed(node_list, city): traverse the access node list, use ping and HEAD requests to test the speed, and record the results.
[0031] report_to_server(test_results, server_url): Report the speed test results to the specified server.
[0032] Example usage: server_url: The basic URL of the server, used to obtain the access node list and report data.
[0033] city: Indicates the city where the speed measurement is performed.
[0034] 4. Aggregation Server: The aggregation server is used to record the data reported by the "Global Access Node IP Collection Program" and "City-level Speed Test Program", and use a specific weight algorithm to calculate the optimal access node for each cross-border e-commerce website in each city in China. The weight algorithm is as follows: Count each city by cross-border e-commerce website + city name; The score of the most recent ping speed test result [weight 20%] = the delay time of the most recent test * 0.2; The score of the most recent head speed test result [weight 30%] = the delay time of the most recent test * 0.3; The score of the ping speed test results from the second to the tenth time [weight 20%] = average value (delay time from the second to the tenth time) * 0.2; The score of the head speed test results from the second to the tenth time [weight 30%] = average value (delay time from the second to the tenth time) * 0.3; Total score = the score of the most recent ping speed test result [weight 20%] + the score of the most recent head speed test result [weight 30%] + the scores of the 2nd to 10th last ping speed test results [weight 20%] + the scores of the 2nd to 10th last head speed test results [weight 30%] The access node with the lowest total score is the best access node for this cross-border website in this city (and they are arranged in reverse order by score). The final data is as follows: Website Speed test city Optimal access node Calculation time ACross-border e-commerce website X City IP1 access node xxx year xx month xx day xx hour xx minute xx second ACross-border e-commerce website Y City IP2 access node xxx year xx month xx day xx hour xx minute xx second The core code of the aggregation service is as follows: import json from datetime import datetime import pandas as pd from flask import Flask, request, jsonify app = Flask(__name__) # Data storage ip_data = [] speed_data = [] @app.route(' / report', methods=['POST']) def report_ip(): global ip_data data = request.json ip_data.extend(data) return jsonify({"message": "IP data reported successfully"}), 200 @app.route(' / report_speed', methods=['POST']) def report_speed(): global speed_data data = request.json speed_data.extend(data) return jsonify({"message": "Speed data reported successfully"}), 200 def calculate_scores(data): if len(data) < 10: return float('inf') # If the data is less than 10 entries, return infinite score recent_ping = data[data['test_method'] == 'ping']['latency'].iloc[0]* 0.2 recent_head = data[data['test_method'] == 'head']['latency'].iloc[0]* 0.3 avg_ping = data[data['test_method'] == 'ping']['latency'].iloc[1:10].mean() * 0.2 avg_head = data[data['test_method'] == 'head']['latency'].iloc[1:10].mean() * 0.3 total_score = recent_ping + recent_head + avg_ping + avg_head return total_score @app.route(' / calculate_best_nodes', methods=['GET']) def calculate_best_nodes(): global speed_data df = pd.DataFrame(speed_data) results = [] grouped = df.groupby(['website', 'city', 'ip']) scores = grouped.apply(calculate_scores).reset_index(name='score') best_nodes = scores.sort_values(by='score').groupby(['website', 'city']).head(3) best_nodes['timestamp'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S') for (website, city), group in best_nodes.groupby(['website', 'city']): nodes = group.sort_values(by='score', ascending=True).to_dict('records') results.append({ 'website': website, 'city': city, 'best_nodes': [node['ip'] for node in nodes], 'timestamp': datetime.now().strftime('%Y-%m-%d %H:%M:%S') }) return jsonify(results), 200 if __name__ == '__main__': app.run(host='0.0.0.0', port=5000) Code Explanation: Report IP data: The / report endpoint receives data reported by the global access node IP collection program and stores the data in the ip_data list.
[0035] Report speed data: The / report_speed endpoint receives data reported by the city-level speed measurement program and stores the data in the speed_data list.
[0036] Calculate the best access nodes: / calculate_best_nodes endpoint calculates the best access nodes for each city. Use a specific weight algorithm to calculate the total score of each node and select the top 3 nodes with the lowest scores as the best access nodes.
[0037] Instructions for use: Deploy and run the Flask application server. The global access node IP collection program and the city-level speed test program report data to the server. Regularly call the / calculate_best_nodes endpoint to calculate and obtain the optimal access node. Example
[0038] Embodiment 1
[0039] like Figure 1 As shown, this embodiment provides a method for finding the optimal access node for a cross-border website, which specifically includes the following steps: Step 1: Create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; Step 2: Use the nslookup command to find the access node IP addresses of each cross-border e-commerce website in each city, and record the access node IP addresses and corresponding cities in the node list; Step 3: Based on the node list, measure the speed of accessing each cross-border e-commerce website access node from the set city and obtain the corresponding delay time. The measurement methods include ping and head request; Step 4: Calculate the total score of the test results of each cross-border e-commerce website in the corresponding city according to the cross-border e-commerce website and the city name, and obtain the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
[0040] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details.
[0041] Embodiment 2 like Figure 2 As shown, in this embodiment, a device for finding an optimal access node for a cross-border website is provided, which specifically includes the following modules: Create a list module to create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; The IP collection module uses the nslookup command to find the access node IPs of various cross-border e-commerce websites in various cities, and records the access node IPs and corresponding cities into the node list; The speed measurement module measures the speed of accessing each cross-border e-commerce website access node from a set city according to the node list, and obtains the corresponding delay time. The measurement methods include ping and head request; The optimal access node module calculates the total score of the test results of each cross-border e-commerce website corresponding to the city according to the cross-border e-commerce website and the city name, and obtains the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
[0042] Since the device introduced in the second embodiment of the present invention is a device used to implement the method of the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the device based on the method introduced in the first embodiment of the present invention, so it is not described here in detail. All devices used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.
[0043] Based on the same inventive concept, the present application provides an electronic device embodiment corresponding to the first embodiment, see the third embodiment for details.
[0044] Embodiment 3 This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any implementation method in the first embodiment can be implemented.
[0045] Since the electronic device introduced in this embodiment is a device used to implement the method in the first embodiment of the present application, based on the method introduced in the first embodiment of the present application, a person skilled in the art can understand the specific implementation of the electronic device of the present embodiment and its various variations, so how the electronic device implements the method in the embodiment of the present application is not described in detail here. As long as a person skilled in the art implements the device used by the method in the embodiment of the present application, it belongs to the scope of protection of the present application.
[0046] Based on the same inventive concept, the present application provides a storage medium corresponding to the first embodiment, see the fourth embodiment for details.
[0047] Embodiment 4 This embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, any implementation method in the first embodiment can be implemented.
[0048] The technical solution provided in the embodiments of the present application has at least the following technical effects or advantages: The present invention significantly improves the user's access experience by optimizing the access node selection of cross-border e-commerce websites, thereby promoting the development of China's cross-border e-commerce business. The response speed and stability of cross-border e-commerce websites are crucial to user experience, especially in the case of network congestion or unstable cross-border dedicated lines. By dynamically selecting the optimal access node, it ensures that users can quickly access cross-border e-commerce websites, reducing shopping interruptions and user loss caused by network problems.
[0049] For Chinese cross-border sellers, the system provides a more stable and efficient network environment, helping them to list their products on major global e-commerce platforms more conveniently, improving sales efficiency and market competitiveness. At the same time, consumers' experience in browsing and purchasing products has also been significantly improved, increasing their willingness to buy and satisfaction.
[0050] From a macroeconomic perspective, this not only promotes the sales of Chinese goods in the global market, but also drives the development of China's foreign trade and increases foreign exchange earnings. In addition, by improving network performance and user experience, the system also reduces the cost of customer service and technical support for enterprises and optimizes operational efficiency.
[0051] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, 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 disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0052] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks 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 generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0053] These computer program instructions may also be stored in a computer-readable memory capable of directing 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 an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0054] 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, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0055] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.
Claims
1. A method for finding the optimal access node for a cross-border website, characterized in that: The specific steps include: Step 1: Create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; Step 2: Collect the access node IP addresses of each cross-border e-commerce website in each city, and record the access node IP addresses and corresponding cities into the node list; Step 3: Based on the node list, measure the speed of accessing each cross-border e-commerce website access node from the set city and obtain the corresponding delay time. The measurement methods include ping and head request; Step 4: Calculate the total score of the test results of each cross-border e-commerce website in the corresponding city according to the cross-border e-commerce website and the city name, and obtain the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
2. A method for finding the optimal access node for a cross-border website according to claim 1, characterized in that: The step 2 is specifically as follows: by using the nslookup command to find the access node IP of each cross-border e-commerce website in each city, the access node IP and the corresponding city are recorded in the node list.
3. A device for finding the optimal access node for a cross-border website, characterized in that: The modules include: Create a list module to create a node list of cross-border e-commerce websites, which includes cross-border e-commerce websites; An IP collection module collects access node IPs of various cross-border e-commerce websites in various cities, and records the access node IPs and corresponding cities into a node list; The speed measurement module measures the speed of accessing each cross-border e-commerce website access node from a set city according to the node list, and obtains the corresponding delay time. The measurement methods include ping and head request; The optimal access node module calculates the total score of the test results of each cross-border e-commerce website corresponding to the city according to the cross-border e-commerce website and the city name, and obtains the optimal access node of the cross-border e-commerce website; the total score of the test results is: The score of the most recent ping speed test result = the delay time of the most recent test * 0.2; The score of the most recent head speed test result = the delay time of the most recent test * 0.3; The score of the ping speed test result for the countdown setting times = the average value of the delay time for the countdown setting times * 0.2; The head speed test result score of the countdown setting times = the average value of the delay time of the countdown setting times * 0.3; The total score of the test results = the score of the most recent ping speed test result + the score of the most recent head speed test result + the score of the ping speed test result for the countdown set number of times + the score of the head speed test result for the countdown set number of times; the city corresponding to the lowest total score of the test results is the optimal access node.
4. The device for finding the optimal access node for a cross-border website according to claim 3, characterized in that: The IP collection module specifically uses the nslookup command to find the access node IPs of various cross-border e-commerce websites in various cities, and records the access node IPs and corresponding cities into the node list.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 and 2 is implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 and 2 is implemented.
