CN110855784A - Proxy server node selection method, electronic device, system and medium - Google Patents

Proxy server node selection method, electronic device, system and medium Download PDF

Info

Publication number
CN110855784A
CN110855784A CN201911121334.3A CN201911121334A CN110855784A CN 110855784 A CN110855784 A CN 110855784A CN 201911121334 A CN201911121334 A CN 201911121334A CN 110855784 A CN110855784 A CN 110855784A
Authority
CN
China
Prior art keywords
node
proxy
proxy server
server node
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911121334.3A
Other languages
Chinese (zh)
Inventor
刘杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201911121334.3A priority Critical patent/CN110855784A/en
Publication of CN110855784A publication Critical patent/CN110855784A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1008Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004Server selection for load balancing
    • H04L67/1021Server selection for load balancing based on client or server locations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a proxy server node selection method, electronic equipment, a system and a medium, wherein the method comprises the following steps: when a user wants to select a proxy server node, the user joins the decentralized network; traversing a routing table stored by the node, and obtaining the performance parameters of each proxy server node in the decentralized network; and determining the target proxy server node from each proxy server node according to the performance parameters. The invention can solve the problem of limited number of the proxy server nodes, and can acquire the proxy server node with the best performance from the decentralized network to provide the proxy service.

Description

Proxy server node selection method, electronic device, system and medium
Technical Field
The present invention relates to the field of internet technologies, and in particular, to a method, an electronic device, a system, and a medium for selecting a proxy server node.
Background
In the prior art, a centralized server mode is usually adopted to designate a proxy server node, that is, a manufacturer provides a proxy server node, and a user only needs to set the address of the proxy server node of the user as the address of the proxy server node provided by the manufacturer.
However, the number of proxy nodes provided by manufacturers is limited, and the address of a proxy node is not changed whenever it is published, so that many users use the same proxy node, and when the proxy node is attacked, all users using the proxy node cannot use the proxy service normally.
Disclosure of Invention
The invention mainly aims to provide a method, an electronic device, a system and a medium for selecting a proxy server node, which can solve the problem of limited number of the proxy server nodes and can acquire the proxy server node with the optimal performance from a decentralized network to provide proxy service.
In order to achieve the above object, the present invention provides a method for selecting a proxy server node, where the method includes:
when a user wants to select a proxy server node, the user joins the decentralized network;
traversing a routing table stored by the node, and obtaining the performance parameters of each proxy server node in the decentralized network;
and determining the target proxy server node from each proxy server node according to the performance parameters.
Preferably, the decentralized network comprises a plurality of proxy server nodes with external network IP.
Preferably, the determining the target proxy server node from each proxy server node according to the performance parameter comprises:
determining a weight for each performance parameter;
calculating a weighted sum of the performance parameters of each proxy node based on the weight of each performance parameter;
and selecting the proxy server node with the minimum weighted sum as the target proxy server node.
Preferably, the method further comprises:
traversing a routing table stored by the node, and obtaining the position data of each proxy server node in the decentralized network;
acquiring a proxy server node having the same location data as the user;
detecting the performance parameters of the obtained proxy server nodes;
and determining the target proxy server node according to the detected performance parameters.
Preferably, the method further comprises:
when detecting that the target proxy server node exits the decentralized network, determining whether the target proxy server node is in a service state;
and when the target proxy server node is in a service state, re-determining the proxy server node to replace the target proxy server node.
Preferably, the method further comprises:
when the decentralized network is detected to be attacked, determining whether to disconnect from the target proxy server node;
re-determining a proxy node to replace the target proxy node when disconnected from the target proxy node.
To achieve the above object, the present invention further provides an electronic device, comprising:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the proxy server node selection method.
Preferably, the electronic device is a node constituting a content distribution network or a blockchain network.
To achieve the above object, the present invention further provides a proxy server node selection system, comprising:
the joining unit is used for joining the decentralized network when a user selects the proxy server node;
the traversal unit is used for traversing the routing table stored by the traversal unit to obtain the performance parameters of each proxy server node in the decentralized network;
and the determining unit is used for determining the target proxy server node from each proxy server node according to the performance parameters.
Preferably, the decentralized network comprises a plurality of proxy server nodes with external network IP.
Preferably, the determining, by the determining unit, the target proxy server node from each proxy server node according to the performance parameter includes:
determining a weight for each performance parameter;
calculating a weighted sum of the performance parameters of each proxy node based on the weight of each performance parameter;
and selecting the proxy server node with the minimum weighted sum as the target proxy server node.
Preferably, the traversal unit is further configured to traverse a routing table stored in the traversal unit, so as to obtain location data of each proxy server node in the decentralized network;
the system further comprises:
an acquisition unit configured to acquire a proxy server node having the same location data as the user;
the detection unit is used for detecting the acquired performance parameters of the proxy server nodes;
the determining unit is further configured to determine the target proxy server node according to the detected performance parameter.
Preferably, the determining unit is further configured to determine whether the target proxy server node is in a service state when it is detected that the target proxy server node exits the decentralized network;
the determining unit is further configured to re-determine that the proxy node replaces the target proxy node when the target proxy node is in a service state.
Preferably, the determining unit is further configured to determine whether to disconnect from the target proxy server node when it is detected that the decentralized network is attacked;
the determining unit is further configured to re-determine a proxy node to replace the target proxy node when the target proxy node is disconnected.
In summary, the present invention can obtain proxy server nodes to construct a decentralized network, and each node in the decentralized network can be used as a proxy server node, so as to solve the problem of limited number of proxy server nodes.
Drawings
FIG. 1 is a schematic flow chart of an embodiment of the present invention;
fig. 2 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the disclosure;
FIG. 3 is a functional block diagram of a proxy node selection system according to the present invention;
description of the main elements
Figure BDA0002275546820000041
Figure BDA0002275546820000051
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings (if any) are used for distinguishing between similar elements and not necessarily for describing a sequential or chronological order, but rather for indicating or implying any relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include at least one of the feature and not necessarily for describing a particular order or sequence. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
The invention provides a method for selecting a proxy server node.
Referring to fig. 1, fig. 1 is a schematic flow chart according to an embodiment of the invention. The order of the steps in the flow diagram can be changed and some steps can be omitted according to different requirements.
The method for selecting the proxy server node is applied to one or more electronic devices, wherein the electronic devices are devices capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and hardware devices of the electronic devices include but are not limited to microprocessors, Application Specific Integrated Circuits (ASICs), Programmable Gate arrays (FPGAs), Digital Signal Processors (DSPs), embedded devices and the like.
The electronic device may be any electronic product capable of performing human-computer interaction with a user, for example, a Personal computer, a tablet computer, a smart phone, a Personal Digital Assistant (PDA), a game machine, an interactive Internet Protocol Television (IPTV), an intelligent wearable device, and the like.
The electronic device may also include a network device and/or a user device. The network device includes, but is not limited to, a single network server, a server group consisting of a plurality of network servers, or a cloud computing (cloud computing) based cloud consisting of a large number of hosts or network servers.
The Network where the electronic device is located includes, but is not limited to, the internet, a wide area Network, a metropolitan area Network, a local area Network, a Virtual Private Network (VPN), and the like.
In one embodiment, the method comprises:
s11, when the user wants to select a proxy node, add a Decentralized HashTable (DHT).
In at least one embodiment of the present invention, the user, i.e., the electronic device, needs the Proxy Server node (Proxy Server) to provide a Proxy service.
In at least one embodiment of the present invention, the decentralized network includes a plurality of proxy server nodes with an external network ip (internet protocol).
It can be understood that, since the proxy node is used for acting as a relay station for proxy network users to obtain network information, the proxy node in the decentralized network needs to have an extranet service function, and the premise of having the extranet service function is to have an extranet IP, when it is detected that a server has the extranet IP, the server is determined as an available proxy node, and the decentralized network is constructed by using the proxy node to provide network services.
Through the implementation mode, the electronic equipment adds the server with the external service function into the decentralized network, so that each node in the decentralized network has the condition of being used as a proxy server node, the external network service can be provided, and the problem that the number of the proxy server nodes is limited in the prior art is solved.
In at least one embodiment of the invention, the electronic device joining the decentralized network comprises:
the electronic device communicates with a network for protocol interaction, and further, the electronic device joins the decentralized network.
In particular, the electronic device may join the decentralized network via any available network protocol.
It can be understood that, only when joining a decentralized network, the electronic device can acquire relevant parameters of each proxy server node in the decentralized network so as to further determine available proxy server nodes.
S12, traversing the route table stored by the node, and obtaining the performance parameter of each proxy server node in the decentralized network.
In at least one embodiment of the invention, the routing table stores the IP addresses of the various proxy nodes in the decentralized network to provide communication addresses. And traversing to each proxy server node in the decentralized network through the routing table.
In at least one embodiment of the invention, before traversing its own stored routing table, the method further comprises:
the electronic device creates the routing table.
Specifically, the creating, by the electronic device, the routing table includes:
when detecting that a proxy server node joins the decentralized network, the electronic device acquires an IP address of the proxy server node, and further adds the acquired IP address to the routing table.
In at least one embodiment of the present invention, the performance parameters include, but are not limited to: time delay, packet loss rate, etc.
Specifically, the service quality of each proxy server node in proxy service can be reflected by the performance parameters.
The time delay refers to the time required for transmitting a message or a packet from one end of a network to the other end, and can represent whether each proxy server node can respond in time when performing proxy service.
The packet loss rate refers to the ratio of the number of lost data packets to the sent data group, the packet loss rate of the network during normal transmission should be controlled within a certain range, and if the packet loss rate is too high, the network service is not good.
In at least one embodiment of the present invention, the electronic device may traverse a routing table stored in the electronic device through an IP address of each proxy node to obtain the performance parameter of each proxy node in the decentralized network.
Through the performance parameters, the electronic device is capable of determining service performance of each proxy server node in the decentralized network.
S13, according to the performance parameter, the target proxy server node is determined from each proxy server node.
In at least one embodiment of the present invention, the electronic device determining the target proxy server node from each proxy server node according to the performance parameter comprises:
the electronic device determines a weight for each performance parameter and calculates a weighted sum of the performance parameters for each proxy node based on the weight for each performance parameter, the electronic device selecting the proxy node with the smallest weighted sum as the target proxy node.
For example: the electronic device determines that the weight of the time delay in the performance parameters is 80% and the weight of the packet loss rate is 20%, when a proxy node A and a proxy node B exist, the electronic equipment determines that the time delay of the proxy node A is x, the packet loss rate is y, the time delay of the proxy node B is m, and the packet loss rate is n, the weighted sum of the performance parameters of said proxy node a is (80% × + 20% × y), the weighted sum of the performance parameters of said proxy node B is (80% × m + 20% × n), said electronic device comparing the magnitudes of said (80% × + 20% × y) and said (80% + 20% × n), when the (80% × x + 20% × y) is less than the (80% × m + 20% × n), the electronic device determines the proxy node a as the target proxy node.
Through the implementation mode, the electronic equipment can comprehensively process the service performance of each proxy server node in the decentralized network according to the weight of each performance parameter, and then a server with the best performance is selected from the proxy server nodes of the decentralized network to serve as the target server, so that the proxy server node with the best performance provides proxy service for the electronic equipment, the service quality is improved, and the user experience is better.
In at least one embodiment of the invention, the method further comprises:
the electronic equipment traverses a routing table stored in the electronic equipment to obtain position data of each proxy server node in the decentralized network, and obtains the proxy server node with the same position data as the user, the electronic equipment detects performance parameters of the obtained proxy server node, and further the electronic equipment determines the target proxy server node according to the detected performance parameters.
Specifically, the determining, by the electronic device, the target proxy server node according to the detected performance parameter includes:
the electronic device determines a weight of each detected performance parameter and calculates a weighted sum of the performance parameters of each of the obtained proxy server nodes based on the weight of each detected performance parameter, and the electronic device obtains the proxy server node with the smallest weighted sum and selects the proxy server node as the target proxy server node.
For example: after obtaining the routing table of the electronic device, the electronic device traverses the routing table stored in the electronic device to obtain location data of each proxy node in the decentralized network, and further obtains proxy nodes having the same location data as the user, when the obtained proxy nodes having the same location data as the user are a proxy node C and a proxy node D, respectively, the electronic device detects performance parameters of the proxy node C and the proxy node D, further, the electronic device determines that a time delay in the performance parameters is 80%, a packet loss rate is 20%, the electronic device further determines that a time delay of the proxy node C is p, a packet loss rate is q, and a time delay of the proxy node D is k, and when the packet loss rate is t, the weighted sum of the performance parameters of the proxy node C is (80% × p + 20% × q), the weighted sum of the performance parameters of the proxy node D is (80% × k + 20% × t), the electronic device compares the magnitudes of the (80% × p + 20% × q) and the (80% × k + 20% × t), and when the (80% × p + 20% + q) is smaller than the (80% × k + 20% × t), the electronic device determines the proxy node C as the target proxy node.
It will be appreciated that typically the network quality with the same location and the same operator will be better than across provinces, and therefore typically operators will establish private networks within the same area. In the scheme, the electronic device firstly screens out proxy server nodes with the same position data as the user from the proxy server nodes of the decentralized network to eliminate the influence of different positions on network services, and then further determines the proxy server node with the best performance as the target server by combining the acquired performance parameters of the proxy server nodes, so that the proxy server node with the best performance can be acquired from the decentralized network to provide the proxy services.
In at least one embodiment of the invention, the method further comprises:
when detecting that the target proxy server node exits the decentralized network, the electronic device first determines whether the target proxy server node is in a service state, and further, when the target proxy server node is in the service state, the electronic device re-determines that a proxy server node replaces the target proxy server node.
Specifically, the manner in which the electronic device determines the proxy server node of the electronic device has been described in detail above, and is not described herein again.
When the connected proxy server nodes generate the conditions of poor network quality and the like, the proxy service of the target proxy server node is abnormal, and at this time, the target proxy server node is likely to exit the decentralized network.
In at least one embodiment of the invention, the method further comprises:
when the decentralized network is detected to be attacked, the electronic equipment determines whether to disconnect from the target proxy node, and when the electronic equipment disconnects from the target proxy node, the electronic equipment re-determines that the proxy node replaces the target proxy node.
For example: when the network service abnormality is detected, the electronic device determines that the decentralized network is under attack.
Specifically, the manner in which the electronic device determines the proxy server node of the electronic device has been described in detail above, and is not described herein again.
It can be understood that, when the decentralized network is attacked by DDoS (Distributed Denial of service), the existing solutions have fewer countermeasures, generally adopt a method of manually blocking traffic, and under the traditional server, the impact of beating one proxy server node is great, but under the scene of the decentralized network, because there are many proxy server nodes, the impact of beating one proxy server node is not great.
Therefore, through the above embodiment, the electronic device can automatically select an available proxy server node to execute the proxy service instead of the attacked proxy server node when the decentralized network is attacked, so that each electronic device can normally use the proxy service.
In summary, the present invention can obtain proxy server nodes to construct a decentralized network, and each node in the decentralized network can be used as a proxy server node, so as to solve the problem of limited number of proxy server nodes.
Referring to fig. 2, in the present embodiment, the electronic device 1 may be a node constituting a content distribution network or a blockchain network.
The electronic device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program, such as a proxy node selection program, stored in the memory 12 and executable on the processor 13.
It will be understood by those skilled in the art that the schematic diagram is merely an example of the electronic device 1, and does not constitute a limitation to the electronic device 1, the electronic device 1 may have a bus-type structure or a star-type structure, the electronic device 1 may further include more or less hardware or software than those shown in the figures, or different component arrangements, for example, the electronic device 1 may further include an input and output device, a network access device, and the like.
It should be noted that the electronic device 1 is only an example, and other existing or future electronic products, such as those that can be adapted to the present invention, should also be included in the scope of the present invention, and are included herein by reference.
The memory 12 includes at least one type of readable storage medium, which includes flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 12 may in some embodiments be an internal storage unit of the electronic device 1, for example a removable hard disk of the electronic device 1. The memory 12 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 12 may be used not only to store application software installed in the electronic device 1 and various types of data such as codes of a proxy node selection program, etc., but also to temporarily store data that has been output or is to be output.
The processor 13 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 13 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the electronic device 1 by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., executing a proxy node selection program, etc.) stored in the memory 12 and calling data stored in the memory 12.
The processor 13 executes an operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application program to implement the steps in the above-described respective proxy node selection method embodiments, such as steps S11, S12, S13, S14 shown in fig. 1.
Alternatively, the processor 13, when executing the computer program, implements the functions of the modules/units in the above device embodiments, for example:
when a user wants to select a proxy server node, the user joins the decentralized network;
traversing a routing table stored by the node, and obtaining the performance parameters of each proxy server node in the decentralized network;
and determining a target proxy server node from each proxy server node according to the performance parameters.
Illustratively, the computer program may be divided into one or more modules/units, which are stored in the memory 12 and executed by the processor 13 to accomplish the present invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition unit 110, a joining unit 111, a traversal unit 112, a determination unit 113, and a detection unit 114.
The integrated unit implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a computer device, or a network device) or a processor (processor) to execute parts of the methods according to the embodiments of the present invention.
The integrated modules/units of the electronic device 1 may be stored in a computer-readable storage medium if they are implemented in the form of software functional units and sold or used as separate products. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented.
Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM).
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one arrow is shown in FIG. 2, but this does not indicate only one bus or one type of bus. The bus is arranged to enable connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 13 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
Fig. 2 only shows the electronic device 1 with components 12-13, and it will be understood by a person skilled in the art that the structure shown in fig. 2 does not constitute a limitation of the electronic device 1 and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
With reference to fig. 1, the memory 12 of the electronic device 1 stores a plurality of instructions to implement a proxy server node selection method, and the processor 13 executes the plurality of instructions to implement:
when a user wants to select a proxy server node, the user joins the decentralized network;
traversing a routing table stored by the node, and obtaining the performance parameters of each proxy server node in the decentralized network;
and determining a target proxy server node from each proxy server node according to the performance parameters.
Specifically, the processor 13 may refer to the description of the relevant steps in the embodiment corresponding to fig. 1 for a specific implementation method of the instruction, which is not described herein again.
Referring to fig. 3, a functional module diagram of the proxy server node selection system of the present invention is shown. The proxy server node selection system 11 includes an acquisition unit 110, a joining unit 111, a traversal unit 112, a determination unit 113, and a probing unit 114. The module/unit referred to in the present invention refers to a series of computer program segments that can be executed by the processor 13 and that can perform a fixed function, and that are stored in the memory 12. In the present embodiment, the functions of the modules/units will be described in detail in the following embodiments.
When the user wants to select a proxy node, the joining unit 111 joins a Decentralized Hash Table (DHT).
In at least one embodiment of the present invention, the Proxy node selection system 11 requires the Proxy node (Proxy Server) to provide a Proxy service.
In at least one embodiment of the present invention, the decentralized network includes a plurality of proxy server nodes with an external network ip (internet protocol).
It can be understood that, since the proxy node is used for acting as a relay station for proxy network users to obtain network information, the proxy node in the decentralized network needs to have an extranet service function, and the extranet service function is provided on the premise of having an extranet IP, when it is detected that a server has an extranet IP, the joining unit 111 determines the server as an available proxy node, and constructs the decentralized network using the proxy node, so as to provide network services.
Through the above embodiment, the adding unit 111 adds the server having the external service function to the decentralized network, so that each node in the decentralized network has a condition of being a proxy server node, and can provide an external network service, thereby solving the problem of limited number of proxy server nodes in the prior art.
In at least one embodiment of the present invention, the joining unit 111 joins the decentralized network includes:
the joining unit 111 performs protocol interaction with network communication, and further, the joining unit 111 joins the decentralized network.
It is understood that, only when joining the decentralized network, the obtaining unit 110 can obtain the relevant parameters of each proxy server node in the decentralized network so as to further determine the available proxy server nodes.
The traversal unit 112 traverses the routing table stored in itself to obtain the performance parameter of each proxy server node in the decentralized network.
In at least one embodiment of the invention, the routing table stores the IP addresses of the various proxy nodes in the decentralized network to provide communication addresses. And traversing to each proxy server node in the decentralized network through the routing table.
In at least one embodiment of the invention, before traversing its own stored routing table, the method further comprises:
the routing table is created.
Specifically, the creating the routing table includes:
when detecting that a proxy server node joins the decentralized network, the obtaining unit 110 obtains an IP address of the proxy server node, and further, the joining unit 111 joins the obtained IP address to the routing table.
In at least one embodiment of the present invention, the performance parameters include, but are not limited to: time delay, packet loss rate, etc.
Specifically, the service quality of each proxy server node in proxy service can be reflected by the performance parameters.
The time delay refers to the time required for transmitting a message or a packet from one end of a network to the other end, and can represent whether each proxy server node can respond in time when performing proxy service.
The packet loss rate refers to the ratio of the number of lost data packets to the sent data group, the packet loss rate of the network during normal transmission should be controlled within a certain range, and if the packet loss rate is too high, the network service is not good.
In at least one embodiment of the present invention, the traversal unit 112 may traverse the routing table stored in the electronic device by controlling the electronic device to traverse the IP address of each proxy node, so as to obtain the performance parameter of each proxy node in the decentralized network.
From the performance parameters, the traversal unit 112 can determine the service performance of each proxy node in the decentralized network.
The determining unit 113 determines the target proxy server node from each proxy server node according to the performance parameter.
In at least one embodiment of the present invention, the determining unit 113 determines the target proxy server node from each proxy server node according to the performance parameter includes:
the determination unit 113 determines a weight of each performance parameter, and calculates a weighted sum of the performance parameters of each proxy node based on the weight of each performance parameter, and the determination unit 113 selects the proxy node with the smallest weighted sum as the target proxy node.
For example: the determining unit 113 determines that the weight of the delay in the performance parameter is 80%, the weight of the packet loss rate is 20%, when there exists a proxy node a and a proxy node B, the determining unit 113 determines that the delay of the proxy node a is x, the packet loss rate is y, the delay of the proxy node B is m, the packet loss rate is n, the weighted sum of the performance parameters of the proxy node a is (80% x + 20% y), the weighted sum of the performance parameters of the proxy node B is (80% m + 20% n), the determination unit 113 compares the magnitudes of the (80% × + 20% × y) and the (80% × m + 20% × n), when the (80% × x + 20% × y) is smaller than the (80% × m + 20% × n), the determination unit 113 determines the proxy node a as the target proxy node.
Through the above embodiment, the determining unit 113 can perform comprehensive processing on the service performance of each proxy server node in the decentralized network according to the weight of each performance parameter, and then select a server with the best performance from the proxy server nodes in the decentralized network as the target server, so that the proxy server node with the best performance provides proxy service for the electronic device, thereby improving the service quality and improving the user experience.
In at least one embodiment of the invention, the method further comprises:
the traversal unit 112 traverses a routing table stored in itself to obtain location data of each proxy server node in the decentralized network, the acquisition unit 110 acquires a proxy server node having the same location data as the user, the detection unit 114 detects performance parameters of the acquired proxy server node, and further, the determination unit 113 determines the target proxy server node according to the detected performance parameters.
Specifically, the determining unit 113 determining the target proxy server node according to the detected performance parameter includes:
the determination unit 113 determines a weight of each of the detected performance parameters and calculates a weighted sum of the performance parameters of each of the acquired proxy nodes based on the weight of each of the detected performance parameters, and the determination unit 113 acquires the proxy node having the smallest weighted sum and selects the proxy node as the target proxy node.
For example: after obtaining the routing table of the electronic device, the determining unit 113 traverses the routing table stored in itself to obtain location data of each proxy node in the decentralized network, and further obtains proxy nodes having the same location data as the user, when the obtained proxy nodes having the same location data as the user are a proxy node C and a proxy node D, respectively, the determining unit 113 detects performance parameters of the proxy node C and the proxy node D, further, the determining unit 113 determines that a weight of a time delay in the performance parameters is 80%, a weight of a packet loss rate is 20%, the determining unit 113 further determines that a time delay of the proxy node C is p, a packet loss rate is q, and a time delay of the proxy node D is k, when the packet loss rate is t, the weighted sum of the performance parameters of the proxy node C is (80% × p + 20% × q), the weighted sum of the performance parameters of the proxy node D is (80% × k + 20% × t), the determining unit 113 compares the magnitudes of the (80% × p + 20% × q) and the (80% × k + 20% × t), and when the (80% × p + 20% × q) is smaller than the (80% × k + 20% × t), the determining unit 113 determines the proxy node C as the target proxy node.
It will be appreciated that typically the network quality with the same location and the same operator will be better than across provinces, and therefore typically operators will establish private networks within the same area. In this case, the determining unit 113 firstly screens out proxy server nodes having the same location data as the user from the proxy server nodes of the decentralized network to eliminate the influence of different locations on the network service, and further determines the proxy server node with the best performance as the target server by combining the acquired performance parameters of the proxy server nodes, so as to acquire the proxy server node with the best performance from the decentralized network to provide the proxy service.
In at least one embodiment of the invention, the method further comprises:
when it is detected that the target proxy node exits the decentralized network, the determination unit 113 first determines whether the target proxy node is in a service state, and further, when the target proxy node is in the service state, the determination unit 113 re-determines that a proxy node replaces the target proxy node.
Specifically, the manner in which the determining unit 113 determines the proxy server node of the electronic device has been described in detail above, and is not described herein again.
When the connected proxy server nodes have poor network quality, etc., the proxy service of the target proxy server node is abnormal, which may cause the target proxy server node to exit the decentralized network, and through the above embodiment, the determining unit 113 may automatically select other proxy server nodes to replace the target proxy server node to execute the proxy service when the above problem occurs, so that each proxy server node in the decentralized network may join or exit the decentralized network at any time without having a great influence on the whole proxy service, thereby implementing dynamic adjustment on the proxy server node of the electronic device.
In at least one embodiment of the invention, the method further comprises:
when detecting that the decentralized network is attacked, the determining unit 113 determines a target electronic device disconnected from a corresponding proxy node, and further, the determining unit 113 re-determines a proxy node for the target electronic device.
For example: when a network service anomaly is detected, the determination unit 113 determines that the decentralized network is under attack.
Specifically, the manner in which the electronic device determines the proxy server node of the electronic device has been described in detail above, and is not described herein again.
It can be understood that, when the decentralized network is attacked by DDoS (Distributed Denial of service), the existing solutions have fewer countermeasures, generally adopt a method of manually blocking traffic, and under the traditional server, the impact of beating one proxy server node is great, but under the scene of the decentralized network, because there are many proxy server nodes, the impact of beating one proxy server node is not great.
Therefore, with the above-described embodiment, the determining unit 113 can automatically select an available proxy server node to execute a proxy service in place of the attacked proxy server node when the decentralized network is attacked, so that each electronic device can normally use the proxy service.
In summary, the present invention can obtain proxy server nodes to construct a decentralized network, and each node in the decentralized network can be used as a proxy server node, so as to solve the problem of limited number of proxy server nodes.
In the above embodiments, all or part may be implemented by software, hardware devices, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product.
The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can store or a data storage device, such as a server, a data center, etc., that is integrated with one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, removable hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in the form of a hardware device, and can also be realized in the form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a magnetic disk, or an optical disk.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for proxy node selection, the method comprising:
when a user wants to select a proxy server node, the user joins the decentralized network;
traversing a routing table stored by the node, and obtaining the performance parameters of each proxy server node in the decentralized network;
and determining a target proxy server node from each proxy server node according to the performance parameters.
2. The method of proxy node selection according to claim 1, wherein the decentralized network comprises a plurality of proxy nodes having an external network IP.
3. The proxy node selection method of claim 1, wherein said determining the target proxy node from each proxy node based on the performance parameter comprises:
determining a weight for each performance parameter;
calculating a weighted sum of the performance parameters of each proxy node based on the weight of each performance parameter;
and selecting the proxy server node with the minimum weighted sum as the target proxy server node.
4. The proxy node selection method of claim 1, wherein the method further comprises:
traversing a routing table stored by the node, and obtaining the position data of each proxy server node in the decentralized network;
acquiring a proxy server node having the same location data as the user;
detecting the performance parameters of the obtained proxy server nodes;
and determining the target proxy server node according to the detected performance parameters.
5. The proxy node selection method of claim 1, wherein the method further comprises:
when detecting that the target proxy server node exits the decentralized network, determining whether the target proxy server node is in a service state;
and when the target proxy server node is in a service state, re-determining the target proxy server node.
6. The proxy node selection method of claim 1, wherein the method further comprises:
determining whether to disconnect from the target proxy server node when it is detected that the decentralized network is under attack;
re-determining a proxy node to replace the target proxy node when disconnected from the target proxy node.
7. An electronic device, characterized in that the electronic device comprises:
a memory storing at least one instruction; and
a processor executing instructions stored in the memory to implement the proxy node selection method of any of claims 1 to 6.
8. The electronic device of claim 7, wherein the electronic device is a node that constitutes a content distribution network or a blockchain network.
9. A proxy node selection system, the system comprising:
the joining unit is used for joining the decentralized network when a user selects the proxy server node;
the traversal unit is used for traversing the routing table stored by the traversal unit to obtain the performance parameters of each proxy server node in the decentralized network;
and the determining unit is used for determining the target proxy server node from each proxy server node according to the performance parameters.
10. A computer-readable storage medium having stored thereon a proxy node selection program executable by one or more processors to implement a proxy node selection method as claimed in any one of claims 1 to 6.
CN201911121334.3A 2019-11-15 2019-11-15 Proxy server node selection method, electronic device, system and medium Pending CN110855784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911121334.3A CN110855784A (en) 2019-11-15 2019-11-15 Proxy server node selection method, electronic device, system and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911121334.3A CN110855784A (en) 2019-11-15 2019-11-15 Proxy server node selection method, electronic device, system and medium

Publications (1)

Publication Number Publication Date
CN110855784A true CN110855784A (en) 2020-02-28

Family

ID=69601759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911121334.3A Pending CN110855784A (en) 2019-11-15 2019-11-15 Proxy server node selection method, electronic device, system and medium

Country Status (1)

Country Link
CN (1) CN110855784A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405039A (en) * 2020-03-16 2020-07-10 深圳市网心科技有限公司 Data transparent transmission method, device and system, client and server
CN112153036A (en) * 2020-09-18 2020-12-29 湖南联盛网络科技股份有限公司 Security defense method and system based on proxy server
CN114500278A (en) * 2021-12-30 2022-05-13 武汉思普崚技术有限公司 Method and device for upgrading feature library through proxy server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8782008B1 (en) * 2012-03-30 2014-07-15 Emc Corporation Dynamic proxy server assignment for virtual machine backup
CN106899681A (en) * 2017-03-10 2017-06-27 腾讯科技(深圳)有限公司 The method and server of a kind of information pushing
CN106921699A (en) * 2015-12-25 2017-07-04 北京奇虎科技有限公司 A kind of Network Access Method, device and system
CN109600683A (en) * 2018-12-05 2019-04-09 深圳市网心科技有限公司 A kind of VOD method, device and its relevant device
CN110071980A (en) * 2019-04-26 2019-07-30 宜人恒业科技发展(北京)有限公司 The distribution method and device of agent node
CN110113446A (en) * 2019-05-23 2019-08-09 竞技世界(成都)网络技术有限公司 A kind of client addressing method, apparatus and system
CN110138586A (en) * 2019-04-04 2019-08-16 平安科技(深圳)有限公司 Block chain node administration method, electronic device, system and readable storage medium storing program for executing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8782008B1 (en) * 2012-03-30 2014-07-15 Emc Corporation Dynamic proxy server assignment for virtual machine backup
CN106921699A (en) * 2015-12-25 2017-07-04 北京奇虎科技有限公司 A kind of Network Access Method, device and system
CN106899681A (en) * 2017-03-10 2017-06-27 腾讯科技(深圳)有限公司 The method and server of a kind of information pushing
CN109600683A (en) * 2018-12-05 2019-04-09 深圳市网心科技有限公司 A kind of VOD method, device and its relevant device
CN110138586A (en) * 2019-04-04 2019-08-16 平安科技(深圳)有限公司 Block chain node administration method, electronic device, system and readable storage medium storing program for executing
CN110071980A (en) * 2019-04-26 2019-07-30 宜人恒业科技发展(北京)有限公司 The distribution method and device of agent node
CN110113446A (en) * 2019-05-23 2019-08-09 竞技世界(成都)网络技术有限公司 A kind of client addressing method, apparatus and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111405039A (en) * 2020-03-16 2020-07-10 深圳市网心科技有限公司 Data transparent transmission method, device and system, client and server
CN112153036A (en) * 2020-09-18 2020-12-29 湖南联盛网络科技股份有限公司 Security defense method and system based on proxy server
CN114500278A (en) * 2021-12-30 2022-05-13 武汉思普崚技术有限公司 Method and device for upgrading feature library through proxy server
CN114500278B (en) * 2021-12-30 2024-04-09 武汉思普崚技术有限公司 Method and device for upgrading feature library through proxy server

Similar Documents

Publication Publication Date Title
US11757932B2 (en) Event driven route control
US10191758B2 (en) Directing data traffic between intra-server virtual machines
CN109245984B (en) Message transmission method, information processing method and related equipment thereof
US8640239B2 (en) Network intrusion detection in a network that includes a distributed virtual switch fabric
CN110855784A (en) Proxy server node selection method, electronic device, system and medium
CN109716729A (en) The dynamically auto zoom network security micro services framework based on load
WO2021134928A1 (en) Method, device, system and apparatus for p2p network-based data transmission, and medium
CN109842694B (en) Method for synchronizing MAC addresses, network equipment and computer readable storage medium
CN111405052A (en) P2P penetration method based on port prediction, electronic device and medium
CN109309735B (en) Connection processing method, server, system and storage medium
CN108768985A (en) A kind of accessed node access distribution method and device
CN110708366A (en) Plug-in process management method, related method and related device
CN110177102A (en) Anti-attack method, electronic equipment, system and medium based on fringe node
CN110311861B (en) Method and device for guiding data flow
CN110417789B (en) Server connection method, electronic device, system and medium
CN110896362A (en) Fault detection method and device
CN109617817B (en) Method and device for generating forwarding table entry of MLAG networking
CN109783196B (en) Virtual machine migration method and device
US20140068088A1 (en) Systems and methods for processing media access control (mac) addresses
CN111245948A (en) DHT network connection method, electronic device, and medium
CN113114588B (en) Data processing method and device, electronic equipment and storage medium
CN109729043B (en) Method, device and system for preventing attack message
CN109068312A (en) carrier data switching method and device, electronic equipment and storage medium
JP2015103827A (en) Management device, method, and program
CN114978580B (en) Network detection method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200228