Distributed network proxy communication method, device, system, equipment and medium
By generating proxy IP addresses and building communication links in a distributed network, and using proxy terminals for communication, the problem of terminal IP address leakage is solved and communication security and reliability are improved.
Patent Information
- Application Number
- CN202410757320.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-13
AI Technical Summary
In a distributed network, the IP address of the terminal is easily stolen, causing the terminal to be maliciously attacked and affecting normal use.
By obtaining the communication information and terminal information of the terminal, a proxy IP address is generated, and a communication link is built based on the terminal information. The proxy terminal is used to communicate on behalf of the actual terminal, hiding the real IP address and reducing the risk of IP address leakage.
It effectively improves the security of communication, protects both terminals, reduces the risk of IP address leakage, and improves the reliability of communication.
Smart Images

Figure CN118337846B_ABST
Abstract
Description
Background Art
[0002] A distributed network is composed of interconnected nodes with multiple terminals distributed in different locations. Any point in the network is connected to at least two lines. When any line fails, communication can be completed through other links, which has high reliability. At the same time, the network is easy to expand.
[0003] In a distributed network, the communication method of each terminal is: determine the IP address of the terminal corresponding to the communication object in the distributed network, then determine the communication link between the two parties in the distributed network based on the IP address, and finally perform communication interaction processing through the communication link.
[0004] However, the commonly used communication methods currently have the following technical problems: in a distributed network, the IP address of the terminal can be easily stolen during the communication process. Once the IP address is leaked, the terminal may be attacked maliciously, eventually causing the terminal to be paralyzed and affecting the normal use of the terminal. Summary of the invention
[0005] The present invention proposes a proxy communication method, device, system, equipment and medium for a distributed network, and the method solves one or more of the above-mentioned technical problems.
[0006] A first aspect of an embodiment of the present invention provides a proxy communication method for a distributed network, the method involving a plurality of intelligent terminals and a plurality of proxy terminals, the plurality of intelligent terminals and the plurality of proxy terminals being in a distributed network, the method comprising:
[0007] Acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of smart terminals;
[0008] After determining the second terminal based on the communication information, generating a proxy IP address corresponding to the first terminal using the terminal information, the second terminal being a smart terminal selected by a user of the first terminal from a plurality of smart terminals;
[0009] Screening a plurality of proxy addresses based on the terminal information, and using the plurality of proxy addresses to build a communication link, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network;
[0010] The second terminal is accessed according to the communication link and the communication information, so that the first terminal and the second terminal can perform proxy communication in the distributed network.
[0011] In a possible implementation manner of the first aspect, the using the terminal information to generate a proxy IP address corresponding to the first terminal includes:
[0012] Extracting a terminal ID from the terminal information, and obtaining a timestamp of the terminal information uploaded by the first terminal;
[0013] Splitting the terminal ID into a plurality of ID fields and splitting the timestamp into a plurality of time values;
[0014] After the plurality of ID fields and the plurality of time values are spliced to form a spliced field, the spliced field is format-converted according to a preset address format to obtain a proxy IP address.
[0015] In a possible implementation manner of the first aspect, the using the terminal information to generate a proxy IP address corresponding to the first terminal includes:
[0016] After extracting the terminal ID and authority information from the terminal information, querying the authority level value and personal code value of the terminal user based on the authority information, where the personal code value is a value added by the user of the first terminal when registering;
[0017] After determining the adjustment amount based on the numerical value of the permission level value, numerically converting the ID value of the terminal ID according to the adjustment amount to obtain a conversion address;
[0018] When the conversion address and the personal code value have the same format, the value of the personal code value is added to the conversion address to obtain the proxy IP address.
[0019] In a possible implementation manner of the first aspect, the using the plurality of proxy addresses to establish a communication link includes:
[0020] sorting and numbering the plurality of proxy addresses in order according to the screening order of the plurality of proxy addresses to obtain a plurality of numbered addresses;
[0021] Calculate the communication durations between two of the numbered addresses in sequence according to the order of each of the numbered addresses to obtain multiple communication durations;
[0022] The communication duration with the smallest value is extracted in sequence according to the order result of each of the numbered addresses, and a number of proxy terminals of the numbered addresses corresponding to the communication duration with the smallest value are connected to obtain a communication link.
[0023] In a possible implementation manner of the first aspect, screening a plurality of proxy addresses based on the terminal information includes:
[0024] Extracting a first bandwidth from the terminal information, and searching for a plurality of initial terminals in a distributed communication network according to the first bandwidth, wherein the initial terminals are proxy terminals in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth;
[0025] Obtaining the idle time of each of the initial terminals respectively, and selecting a number of time periods greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods;
[0026] The address of the initial terminal corresponding to the target duration is obtained to obtain a plurality of proxy addresses.
[0027] In a possible implementation manner of the first aspect, after the step of accessing the second terminal according to the communication link and the communication information, the method further includes:
[0028] The communication link is saved, and when the first terminal is disconnected from the second terminal and network communication is resumed within a preset time interval, the communication link is used for the first terminal and the second terminal to perform proxy communication in the distributed network.
[0029] A second aspect of an embodiment of the present invention provides a proxy communication device for a distributed network, involving a plurality of intelligent terminals and a plurality of proxy terminals, wherein the plurality of intelligent terminals and the plurality of proxy terminals are in a distributed network, and the device is applied to the proxy terminal, and the device includes:
[0030] An acquisition module, configured to acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of intelligent terminals;
[0031] an IP address generating module, configured to generate a proxy IP address corresponding to the first terminal by using the terminal information after determining the second terminal based on the communication information, wherein the second terminal is a smart terminal selected by a user of the first terminal from a plurality of smart terminals;
[0032] A communication link building module, used for screening a plurality of proxy addresses based on the terminal information, and building a communication link using the plurality of proxy addresses, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network;
[0033] The proxy communication module is used to access the second terminal according to the communication link and the communication information, so that the first terminal and the second terminal can perform proxy communication in the distributed network.
[0034] In a possible implementation manner of the second aspect, the using the terminal information to generate a proxy IP address corresponding to the first terminal includes:
[0035] Extracting a terminal ID from the terminal information, and obtaining a timestamp of the terminal information uploaded by the first terminal;
[0036] Splitting the terminal ID into a plurality of ID fields and splitting the timestamp into a plurality of time values;
[0037] After the plurality of ID fields and the plurality of time values are spliced to form a spliced field, the spliced field is format-converted according to a preset address format to obtain a proxy IP address.
[0038] In a possible implementation manner of the second aspect, the using the terminal information to generate a proxy IP address corresponding to the first terminal includes:
[0039] After extracting the terminal ID and authority information from the terminal information, querying the authority level value and personal code value of the terminal user based on the authority information, where the personal code value is a value added by the user of the first terminal when registering;
[0040] After determining the adjustment amount based on the numerical value of the permission level value, numerically converting the ID value of the terminal ID according to the adjustment amount to obtain a conversion address;
[0041] When the conversion address and the personal code value have the same format, the value of the personal code value is added to the conversion address to obtain the proxy IP address.
[0042] In a possible implementation manner of the second aspect, the using the plurality of proxy addresses to establish a communication link includes:
[0043] sorting and numbering the plurality of proxy addresses in order according to the screening order of the plurality of proxy addresses to obtain a plurality of numbered addresses;
[0044] Calculate the communication durations between two of the numbered addresses in sequence according to the order of each of the numbered addresses to obtain multiple communication durations;
[0045] The communication duration with the smallest value is extracted in sequence according to the order result of each of the numbered addresses, and a number of proxy terminals of the numbered addresses corresponding to the communication duration with the smallest value are connected to obtain a communication link.
[0046] In a possible implementation manner of the second aspect, screening a plurality of proxy addresses based on the terminal information includes:
[0047] Extracting a first bandwidth from the terminal information, and searching for a plurality of initial terminals in a distributed communication network according to the first bandwidth, wherein the initial terminals are proxy terminals in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth;
[0048] Obtaining the idle time of each of the initial terminals respectively, and selecting a number of time periods greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods;
[0049] The address of the initial terminal corresponding to the target duration is obtained to obtain a plurality of proxy addresses.
[0050] In a possible implementation manner of the second aspect, the apparatus further includes:
[0051] The communication link saving module is used to save the communication link. When the first terminal is disconnected from the second terminal and network communication is resumed within a preset time interval, the communication link is used for the first terminal and the second terminal to perform proxy communication in the distributed network.
[0052] A third aspect of an embodiment of the present invention provides an agent communication system of a distributed network, the system comprising: a plurality of agent terminals and a plurality of intelligent terminals;
[0053] The proxy terminal method is applicable to the proxy communication method of the distributed network as described above;
[0054] Each of the proxy terminals is communicatively connected to each other, and each of the proxy terminals is communicatively connected to each of the intelligent terminals respectively.
[0055] Compared with the prior art, the embodiment of the present invention provides a distributed network proxy communication method, device, system, equipment and medium, and its beneficial effect is that: the present invention can obtain the communication information and terminal information of the first terminal, and after determining the second terminal based on the communication information, use the terminal information to generate the proxy IP address corresponding to the first terminal and build a communication link based on the terminal information, so that the proxy terminal can send data to the second terminal on behalf of the first terminal, so that the first terminal and the second terminal can perform proxy communication according to the proxy IP address and communication link. Through the above-mentioned proxy communication method, not only can the risk of IP address leakage be reduced, but also the terminals of both parties can be protected, which can effectively improve the security of communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a flow chart of a proxy communication method of a distributed network provided by an embodiment of the present invention;
[0057] Figure 2 It is a structural diagram of a proxy communication device of a distributed network provided by an embodiment of the present invention;
[0058] Figure 3 It is a schematic diagram of the structure of a proxy communication system of a distributed network provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] In order to solve the above problems, a distributed network proxy communication method, device, system, equipment and medium provided in an embodiment of the present application will be introduced and explained in detail through the following specific embodiments.
[0061] Reference Figure 1 , showing a flow chart of a proxy communication method for a distributed network provided by an embodiment of the present invention.
[0062] In one embodiment, the method involves a number of intelligent terminals and a number of agent terminals, and the number of intelligent terminals and the number of agent terminals communicate in a distributed network.
[0063] In an actual operation mode, the method can be applied to any one of several agent terminals, and each agent terminal is connected to each other.
[0064] Wherein, as an example, the proxy communication method of the distributed network may include:
[0065] S11. Acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of intelligent terminals.
[0066] In one embodiment, it is assumed that there are five proxy terminals, namely A, B, C, D, and E, and five intelligent terminals, namely J, K, L, M, and N, and each terminal is connected to each other.
[0067] Assume that the method is applied in the proxy terminal A, the proxy terminal A can obtain the communication information and terminal information of the first terminal, and the first terminal is any smart terminal, assuming it is smart terminal J.
[0068] The communication information may be information related to the terminal that the smart terminal J needs to access and information that the smart terminal J needs to transmit. For example, the smart terminal J needs to send data to the smart terminal K, and the communication information may include the data sent by the smart terminal J to the smart terminal K, and may also include information related to the smart terminal K, such as the address and number.
[0069] The terminal information may be specific information of the intelligent terminal J, including ID, address, etc. The address may specifically be the address of the terminal in the distributed network.
[0070] In an actual application, proxy terminal A is connected to five smart terminals respectively and may receive information from the five smart terminals at the same time. At this time, the communication pressure of proxy terminal A increases. In order to reduce the communication pressure of proxy terminal A, proxy terminal A can transmit the received information to other proxy terminals, such as proxy terminal B and proxy terminal C, so that proxy terminal B and proxy terminal C can provide communication services for other smart terminals.
[0071] In an optional implementation, the agent terminal A can search and determine the idle time of each remaining agent terminal, which is the interval from the time node when the agent service was last completed to the current time node of each remaining agent terminal. Then, the idle time with the largest value is selected from multiple idle time nodes, and the agent terminal corresponding to the idle time with the largest value is selected as the selected agent terminal, and the received information is forwarded to the selected agent terminal, so that the selected agent terminal provides the agent service.
[0072] S12: After determining a second terminal based on the communication information, generate a proxy IP address corresponding to the first terminal using the terminal information, where the second terminal is a smart terminal selected by a user of the first terminal from a plurality of smart terminals.
[0073] In order to anonymously protect smart terminal J, a second terminal can be determined based on communication information. The second terminal is a smart terminal selected by the user of the first terminal from the remaining smart terminals except the first terminal. Using the above example, assume that it is smart terminal K.
[0074] The proxy terminal can provide data center proxy services to smart terminal J. Specifically, it can generate a proxy IP address corresponding to smart terminal J based on the terminal information of smart terminal J. The proxy IP address used is a specific IP address and is different from the actual address of smart terminal J. Therefore, the real IP address of smart terminal J can be hidden, thereby protecting the Internet privacy of smart terminal J.
[0075] In an optional embodiment, multiple smart terminals may be involved, and the communication time of different smart terminals is different. In order to combine the specific communication time of the smart terminal and avoid generating duplicate IP addresses, as an example, the use of the terminal information to generate the proxy IP address corresponding to the first terminal may include the following sub-steps:
[0076] S21. Extract a terminal ID from the terminal information, and obtain a timestamp of the terminal information uploaded by the first terminal.
[0077] S22: Split the terminal ID into several ID fields and split the timestamp into several time values.
[0078] S23. After splicing the several ID fields and the several time values to form a spliced field, format conversion is performed on the spliced field according to a preset address format to obtain a proxy IP address.
[0079] In one implementation, the terminal ID can be extracted from the terminal information, and the terminal ID can be its ID code, for example, xx00aabbcc. At the same time, the timestamp of the terminal information uploaded by the first terminal can be obtained. For example, if the first terminal is smart terminal J, and the terminal information is uploaded on 2024-03-01-12-22, the time can be obtained to obtain the timestamp.
[0080] Next, the terminal ID may be split into several ID fields, and the timestamp may also be split into several time values.
[0081] Finally, after splicing several ID fields and several time values to form a spliced field, the spliced field is formatted according to the preset address format to obtain the proxy IP address.
[0082] For example, the terminal ID is xx00aabbcc and the timestamp is 2024-03-01-12. Every two characters can be used as a field, and the terminal ID can be split into xx, 00, aa, bb and cc, a total of 5 ID fields. It should be noted that when splitting, the number of characters can be adjusted according to actual needs, and the splitting method can also be adjusted according to actual needs.
[0083] Similarly, you can also use each character as a numeric value to split the timestamp, and you can split the timestamp into: 2, 0, 2, 4, 0, 3, 0, 1, 1, and 2.
[0084] After the split is completed, you can first randomly select two time values and splice them together, then randomly select an ID field, and then splice the spliced time value and an ID field together to form a spliced field; then randomly select two more from the remaining time values and splice them together, and then splice them into the previous spliced field, and then randomly select an ID field from the remaining ID fields, and then splice the ID field into the spliced field, and so on.
[0085] Referring to the above example, the concatenated fields can be as follows:
[0086] 20-aa-24-00-03-bb-01-cc-12-xx.
[0087] It should be noted that the number of split ID fields is different from the number of time values. When any one of the numbers is gone, the splicing can be terminated.
[0088] After obtaining the concatenated field, it can be converted into binary, octal or decimal format to obtain the proxy IP address.
[0089] In addition, to facilitate format conversion and avoid errors, if the number of characters in the concatenated field is insufficient, zeros can be automatically added.
[0090] In another optional embodiment, each smart terminal has different users, but the authority or rights of different users are the same. For example, the user of the smart terminal is a business person of the enterprise, the authority of a basic employee is the first level, the authority of a department head is the second level, and the authority of a shareholder of the enterprise is the third level.
[0091] In order to generate a corresponding IP address in combination with the authority and ID of the smart terminal, as an example, the generating of the proxy IP address corresponding to the first terminal by using the terminal information may include the following sub-steps:
[0092] S31. After extracting the terminal ID and authority information from the terminal information, query the authority level value and personal code value of the terminal user based on the authority information, where the personal code value is a value added by the user of the first terminal when registering.
[0093] S32: After determining the adjustment amount based on the numerical value of the permission level value, numerically convert the ID value of the terminal ID according to the adjustment amount to obtain a conversion address.
[0094] S33: When the conversion address has the same format as the personal code value, add the value of the personal code value to the conversion address to obtain a proxy IP address.
[0095] In one implementation, the terminal ID and the authority information may be extracted from the terminal information. Referring to the above example, the terminal ID may be its ID code, for example, xx00aabbcc. The authority information may be the authority level of the user of the smart terminal.
[0096] The authority level value and personal code value of the user of the smart terminal can be queried based on the authority information, wherein the personal code value is a value added by the user of the smart terminal when registering.
[0097] When a user registers a personal account using a smart terminal, he or she can set a specific value, for example, 100, 99, 3, etc.
[0098] The permission level value may specifically be a numerical value of the level corresponding to the permission. For example, if the permission level is the first level, the permission level value is 1; if the permission level is the second level, the permission level value is 2; and if the permission level is the third level, the permission level value is 3.
[0099] Next, the adjustment amount is determined based on the numerical value of the permission level. For example, if the permission level is 1, the adjustment amount is 1; if the permission level is 2, the adjustment amount is 2. Optionally, a certain ratio may be set. For example, if the permission level is 1, the adjustment amount is 2; if the permission level is 2, the adjustment amount is 4; if the permission level is 3, the adjustment amount is 8. The specific method may be adjusted according to actual needs.
[0100] Then, the ID value of the terminal ID can be converted numerically according to the adjustment amount to obtain the conversion address. The numerical conversion method can be to swap the ID value of the terminal ID according to the adjustment amount. For example, if the adjustment amount is 2 and the terminal ID is xx00aabbcc, its ID value can be swapped to obtain the terminal ID x0x0aabbcc.
[0101] At this time, it can be determined whether the conversion address and the personal code value have the same format, specifically, whether the two are in the same base. If not, the personal code value can be converted into the conversion address. Until the conversion address and the personal code value have the same format, at this time, the value of the personal code value can be added to the conversion address to obtain the proxy IP address.
[0102] Adding can be done by adding the two values together or directly concatenating them. The specific operation method can also be adjusted according to actual needs.
[0103] S13. Filtering a plurality of proxy addresses based on the terminal information, and using the plurality of proxy addresses to build a communication link, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network.
[0104] In one embodiment, in order to further hide the user's communication and prevent the communication from being tracked, after the proxy IP address is generated, a specific communication link can be generated for each smart terminal for data interaction according to the specific communication link.
[0105] In order to utilize each proxy terminal, several proxy addresses can be selected based on the terminal information. Each proxy address can be the node address of an idle proxy terminal in the distributed communication network. Referring to the above example, suppose there are 5 proxy terminals, namely A, B, C, D, and E. Among them, proxy terminal A now receives the communication information and terminal information of intelligent terminal J, and proxy terminals B, C, D, and E are not working. Then the proxy addresses are proxy terminals B, C, D, and E, respectively, and 4 proxy addresses are obtained. Then use these 4 proxy addresses to build a communication link.
[0106] In one embodiment, there may be multiple proxy terminals. If the address of each proxy terminal is extracted and the communication link is constructed, more proxy terminals need to be used, and the communication delay is large. Moreover, after each proxy terminal is used, it may not be possible to use the proxy terminal to provide proxy communication services for other smart terminals. Moreover, the bandwidth of each proxy terminal may be different. Some proxy terminals may have low communication capabilities and small bandwidths, and can only provide proxy services to one or two smart terminals; some proxy terminals may have high communication capabilities and large bandwidths, and can provide proxy services to multiple smart terminals.
[0107] In order to filter out some idle proxy terminals that meet the bandwidth requirement, as an example, filtering out several proxy addresses based on the terminal information may include the following sub-steps:
[0108] S131. Extract a first bandwidth from the terminal information, and search for multiple initial terminals in a distributed communication network according to the first bandwidth, where the initial terminals are proxy terminals that are in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth.
[0109] S132: Obtain the idle time of each of the initial terminals respectively, and select a number of idle time periods that are greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods.
[0110] S133: Acquire the address of the initial terminal corresponding to the target duration to obtain a plurality of proxy addresses.
[0111] In an actual operation mode, the first bandwidth is extracted from the terminal information, and the first bandwidth is the required bandwidth required by the first terminal to transmit data. For example, the first terminal is a smart terminal J, and the data to be transmitted is x. The bandwidth required to transmit the data x can be calculated to obtain the first bandwidth.
[0112] Then, multiple initial terminals may be searched in the distributed communication network according to the first bandwidth, where the initial terminals are proxy terminals that are in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth.
[0113] Specifically, multiple proxy terminals currently in an idle state may be searched, and the communication bandwidth of each proxy terminal in an idle state may be obtained. Then, a communication bandwidth greater than or equal to the first bandwidth may be selected from the multiple communication bandwidths, and the proxy terminal corresponding to the communication bandwidth greater than or equal to the first bandwidth may be used as the initial terminal.
[0114] Optionally, each proxy terminal may be in working state or the communication bandwidth of no proxy terminal may be greater than or equal to the first bandwidth, resulting in screening of 0 initial terminals. At this time, a proxy error message may be sent to the first terminal (assuming smart terminal J) to notify the smart terminal that it cannot provide proxy service to it.
[0115] If multiple initial terminals are obtained through screening, the idle time of each initial terminal can be obtained respectively. The idle time refers to the interval time from the time node when the initial terminal last completed the proxy service to the current time node.
[0116] Then, a number of durations greater than a preset duration are selected from the plurality of idle durations to obtain a number of target durations, and then the addresses of the initial terminals corresponding to the target durations are obtained to obtain a number of proxy addresses.
[0117] If the idle time is longer, it means that the initial terminal has not performed proxy service for a long time. In order to reasonably call resources, the address of the terminal can be obtained to perform proxy service using the address of the terminal.
[0118] In one embodiment, there are multiple initial terminals, and the sending and receiving of data are all screened by the terminals, and the round-trip data transmission takes a long time. In order to shorten the data transmission time and improve the efficiency of data transmission, as an example, the use of several proxy addresses to build a communication link may include the following sub-steps:
[0119] S134. Sort and number the proxy addresses in sequence according to the screening order of the proxy addresses to obtain a plurality of numbered addresses.
[0120] S135 , calculating the communication durations between each of the numbered addresses in sequence according to the sequence results of each of the numbered addresses, to obtain multiple communication durations.
[0121] S136. Extract the communication duration with the smallest value in sequence according to the order of each of the numbered addresses, and connect several proxy terminals of the numbered addresses corresponding to the communication duration with the smallest value to obtain a communication link.
[0122] In an actual operation mode, the plurality of proxy addresses may be sorted and numbered in sequence according to the screening order of the plurality of proxy addresses to obtain a plurality of numbered addresses.
[0123] For example, referring to the above example, suppose there are 5 proxy terminals, namely A, B, C, D, and E, among which proxy terminal A now receives the communication information and terminal information of intelligent terminal J, and proxy terminals B, C, D, and E are not working as agents, and the proxy addresses obtained by screening are the addresses of proxy terminals B, C, D, and E. During the screening process, the screening order is proxy terminal B, proxy terminal C, proxy terminal D, and proxy terminal E, and then the order of proxy terminal B, proxy terminal C, proxy terminal D, and proxy terminal E can be sorted, and the proxy address of proxy terminal B is numbered 1, the proxy address of proxy terminal C is numbered 2, the proxy address of proxy terminal D is numbered 3, and the proxy address of proxy terminal E is numbered 4.
[0124] Then, the communication durations between the numbered addresses are calculated in sequence according to the order of each numbered address to obtain multiple communication durations.
[0125] For example, the proxy address of proxy terminal B is numbered 1, and the proxy address of proxy terminal B is calculated first. Specifically, a communication duration can be calculated based on the proxy address of proxy terminal B and the proxy address of proxy terminal C, a communication duration can be calculated based on the proxy address of proxy terminal B and the proxy address of proxy terminal D, and a communication duration can be calculated based on the proxy address of proxy terminal B and the proxy address of proxy terminal E, so that three communication durations of proxy terminal B can be calculated.
[0126] Next, the proxy address of the proxy terminal C is numbered 2, and the proxy address of the proxy terminal C is calculated second. Specifically, a communication duration can be calculated according to the proxy address of the proxy terminal C and the proxy address of the proxy terminal B, a communication duration can be calculated according to the proxy address of the proxy terminal C and the proxy address of the proxy terminal D, and a communication duration can be calculated according to the proxy address of the proxy terminal C and the proxy address of the proxy terminal E, so that three communication durations of the proxy terminal C can be calculated.
[0127] Next, the third one calculates the proxy address of proxy terminal D, and the fourth one calculates the proxy address of proxy terminal E.
[0128] Finally, the communication duration with the smallest value can be extracted in sequence according to the order of each numbered address. Referring to the above example, the first one is to calculate the three communication durations of proxy terminal B. The communication duration with the smallest value can be selected from the three communication durations. Assuming that the communication duration between proxy terminal B and proxy terminal C has the smallest value, the proxy address of proxy terminal C can be obtained to obtain the first numbered address.
[0129] Next, the second step is to calculate the three communication durations of the proxy terminal C. The communication duration with the smallest value can be selected from the three communication durations. Since the communication duration between the proxy terminal C and the proxy terminal B and the communication duration between the proxy terminal B and the proxy terminal C are the same and have been selected, this option can be eliminated, and the communication duration with the smallest value can be selected from the remaining two communication durations. Assuming that the communication duration between the proxy terminal C and the proxy terminal E has the smallest value, the proxy address of the proxy terminal E can be obtained to obtain the second numbered address.
[0130] Similarly, the third one is to calculate the three communication durations of the proxy terminal D. The communication duration with the smallest value can be selected from the three communication durations. Assuming that the communication duration between the proxy terminal D and the proxy terminal E has the smallest value, the proxy address of the proxy terminal E can be obtained to obtain the third numbered address. Since the third numbered address is the same as the second numbered address, the two can be used overlappingly.
[0131] Finally, the fourth is to calculate the three communication durations of the proxy terminal E. The communication duration with the smallest value can be selected from the three communication durations. Assuming that the communication duration between the proxy terminal E and the proxy terminal D has the smallest value, since the communication duration between the proxy terminal E and the proxy terminal D and the communication duration between the proxy terminal D and the proxy terminal E are the same and have been selected, this option can be eliminated. The communication duration with the smallest value is selected from the remaining two communication durations. Among the remaining two communication durations, the communication duration between the proxy terminal C and the proxy terminal E is the same as the communication duration between the proxy terminal E and the proxy terminal C and has been selected, so this option can also be eliminated. Then the remaining communication duration between the proxy terminal E and the proxy terminal B can be selected, so that the proxy address of the proxy terminal B can be obtained, and the fourth numbered address can be obtained.
[0132] Since the second and third numbered addresses are the same, the three numbered addresses after the overlap are the address of the proxy terminal C, the address of the proxy terminal E and the address of the proxy terminal B respectively.
[0133] By connecting the proxy terminals at these three addresses together, a communication link can be obtained, specifically, proxy terminal C-proxy terminal E-proxy terminal B.
[0134] S14. Access the second terminal according to the communication link and the communication information, so that the first terminal and the second terminal can perform proxy communication in the distributed network.
[0135] Since all proxy terminals are connected in the same way, assuming that the proxy terminal receiving the terminal information of the first terminal is A, the first terminal sending the terminal information is smart terminal J, and the second terminal is smart terminal K, the communication link constructed is proxy terminal C-proxy terminal E-proxy terminal B.
[0136] After determining the communication link, proxy terminal A can use the proxy IP address to send communication information to proxy terminal C on behalf of smart terminal J, proxy terminal C sends communication information to proxy terminal E, proxy terminal E sends communication information to proxy terminal B, and proxy terminal B sends communication information to smart terminal J, thereby completing the proxy service.
[0137] Similarly, if smart terminal J needs to transmit data to smart terminal J, the above communication link can also be called, and the data can be transmitted along the reverse path. For example, smart terminal J sends the communication information to proxy terminal B, proxy terminal B sends the communication information to proxy terminal E, proxy terminal E sends the communication information to proxy terminal C, proxy terminal C sends the communication information to proxy terminal A, and finally proxy terminal A sends it to smart terminal J. It can also be transmitted in the above manner. The specific reverse transmission method can be adjusted according to actual needs.
[0138] In one embodiment, the first terminal and the second terminal may be disconnected after completing the communication, but the two need to communicate again after the disconnection. If the communication link is rebuilt again after the communication is resumed, it will not only take a long time, but also be inefficient.
[0139] In order to improve the efficiency of proxy communication between the two, the method may further include the following steps as an example:
[0140] S15. Save the communication link, and when the first terminal is disconnected from the second terminal and resumes network communication within a preset time interval, use the communication link for the first terminal and the second terminal to perform proxy communication in the distributed network.
[0141] Specifically, each time the first terminal disconnects the communication with the second terminal, the communication link between the first terminal and the second terminal may be maintained.
[0142] Assuming that the data is saved for 5 hours, if within 5 hours, the first terminal (assuming it is smart terminal J) and the second terminal (assuming it is smart terminal K) need to re-establish communication. For example, 3 hours after smart terminal J and smart terminal K are disconnected from communication, smart terminal J re-sends communication information and terminal information to proxy terminal A, and determines that the second terminal is smart terminal K through the above information, indicating that smart terminal J and smart terminal K have re-established communication. At this time, the communication link can be directly used to allow smart terminal J and smart terminal K to perform proxy communication.
[0143] It should be noted that the above addresses are all addresses of terminals in the distributed network, allowing each terminal to communicate in the distributed network (especially the proxy terminal in the distributed network). Any point in the distributed network is connected to at least two lines. When any line fails, the communication can be completed via other links, which has high reliability and can effectively avoid interruption of proxy services.
[0144] In this embodiment, the embodiment of the present invention provides a proxy communication method for a distributed network, and its beneficial effect is that: the present invention can obtain the communication information and terminal information of the first terminal, and after determining the second terminal based on the communication information, use the terminal information to generate the proxy IP address corresponding to the first terminal and build a communication link based on the terminal information, so that the proxy terminal can send data to the second terminal on behalf of the first terminal, so that the first terminal and the second terminal can perform proxy communication according to the proxy IP address and the communication link. Through the above-mentioned proxy communication method, not only can the risk of IP address leakage be reduced, but also the terminals of both parties can be protected, which can effectively improve the security of communication.
[0145] The embodiment of the present invention also provides a proxy communication device for a distributed network, see Figure 2, showing a schematic diagram of the structure of a proxy communication device for a distributed network provided by an embodiment of the present invention.
[0146] In one embodiment, the proxy communication device of the distributed network involves a number of intelligent terminals and a number of proxy terminals, the number of intelligent terminals and the number of proxy terminals are in the distributed network, and the device is applied to the proxy terminals.
[0147] Wherein, as an example, the proxy communication device of the distributed network may include:
[0148] An acquisition module 201 is used to acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of smart terminals;
[0149] An IP address generating module 202, configured to generate a proxy IP address corresponding to the first terminal by using the terminal information after determining the second terminal based on the communication information, wherein the second terminal is a smart terminal selected by a user of the first terminal from a plurality of smart terminals;
[0150] A communication link building module 203 is used to screen a plurality of proxy addresses based on the terminal information and build a communication link using the plurality of proxy addresses, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network;
[0151] The proxy communication module 204 is used to access the second terminal according to the communication link and the communication information, so that the first terminal and the second terminal can perform proxy communication in the distributed network.
[0152] Optionally, the generating a proxy IP address corresponding to the first terminal by using the terminal information includes:
[0153] Extracting a terminal ID from the terminal information, and obtaining a timestamp of the terminal information uploaded by the first terminal;
[0154] Splitting the terminal ID into a plurality of ID fields and splitting the timestamp into a plurality of time values;
[0155] After the plurality of ID fields and the plurality of time values are spliced to form a spliced field, the spliced field is format-converted according to a preset address format to obtain a proxy IP address.
[0156] Optionally, the generating a proxy IP address corresponding to the first terminal by using the terminal information includes:
[0157] After extracting the terminal ID and authority information from the terminal information, querying the authority level value and personal code value of the terminal user based on the authority information, where the personal code value is a value added by the user of the first terminal when registering;
[0158] After determining the adjustment amount based on the numerical value of the permission level value, numerically converting the ID value of the terminal ID according to the adjustment amount to obtain a conversion address;
[0159] When the conversion address and the personal code value have the same format, the value of the personal code value is added to the conversion address to obtain the proxy IP address.
[0160] Optionally, the using a plurality of the proxy addresses to establish a communication link includes:
[0161] sorting and numbering the plurality of proxy addresses in order according to the screening order of the plurality of proxy addresses to obtain a plurality of numbered addresses;
[0162] Calculate the communication durations between two of the numbered addresses in sequence according to the order of each of the numbered addresses to obtain multiple communication durations;
[0163] The communication duration with the smallest value is extracted in sequence according to the order result of each of the numbered addresses, and a number of proxy terminals of the numbered addresses corresponding to the communication duration with the smallest value are connected to obtain a communication link.
[0164] Optionally, screening a plurality of proxy addresses based on the terminal information includes:
[0165] Extracting a first bandwidth from the terminal information, and searching for a plurality of initial terminals in a distributed communication network according to the first bandwidth, wherein the initial terminals are proxy terminals in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth;
[0166] Obtaining the idle time of each of the initial terminals respectively, and selecting a number of time periods greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods;
[0167] The address of the initial terminal corresponding to the target duration is obtained to obtain a plurality of proxy addresses.
[0168] Optionally, the device further comprises:
[0169] The communication link saving module is used to save the communication link. When the first terminal is disconnected from the second terminal and network communication is resumed within a preset time interval, the communication link is used for the first terminal and the second terminal to perform proxy communication in the distributed network.
[0170] The embodiment of the present invention also provides a distributed network proxy communication system, see Figure 3 , showing a schematic diagram of the structure of a distributed network proxy communication system provided by an embodiment of the present invention.
[0171] Wherein, as an example, the proxy communication system of the distributed network may include: a plurality of proxy terminals and a plurality of intelligent terminals;
[0172] The proxy terminal method is applicable to the proxy communication method of the distributed network as described in the above embodiment;
[0173] Each of the proxy terminals is communicatively connected to each other, and each of the proxy terminals is communicatively connected to each of the intelligent terminals respectively.
[0174] Those skilled in the art can clearly understand that, for the sake of convenience and brevity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0175] Furthermore, an embodiment of the present application also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the proxy communication method of the distributed network as described in the above embodiment is implemented.
[0176] Furthermore, an embodiment of the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the proxy communication method of the distributed network as described in the above embodiment.
[0177] Those skilled in the art will appreciate that the embodiments of the present application may also provide computer program products. Therefore, the present application may adopt the form of complete hardware embodiments, complete software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program codes.
[0178] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), apparatuses, and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the 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 generate 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.
[0179] 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.
[0180] 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.
[0181] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A distributed network proxy communication method, characterized in that: The method involves a plurality of intelligent terminals and a plurality of proxy terminals, wherein the plurality of intelligent terminals and the plurality of proxy terminals are in a distributed network, and the method comprises: Acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of smart terminals; After determining the second terminal based on the communication information, generating a proxy IP address corresponding to the first terminal using the terminal information, the second terminal being a smart terminal selected by a user of the first terminal from a plurality of smart terminals; Screening a plurality of proxy addresses based on the terminal information, and using the plurality of proxy addresses to build a communication link, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network; accessing the second terminal according to the communication link and the communication information, so that the first terminal and the second terminal perform proxy communication in the distributed network; The screening of a plurality of proxy addresses based on the terminal information includes: Extracting a first bandwidth from the terminal information, and searching for a plurality of initial terminals in a distributed communication network according to the first bandwidth, wherein the initial terminals are proxy terminals in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth; Obtaining the idle time of each of the initial terminals respectively, and selecting a number of time periods greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods; The address of the initial terminal corresponding to the target duration is obtained to obtain a plurality of proxy addresses.
2. The distributed network proxy communication method according to claim 1, characterized in that: The generating a proxy IP address corresponding to the first terminal by using the terminal information includes: Extracting a terminal ID from the terminal information, and obtaining a timestamp of the terminal information uploaded by the first terminal; Splitting the terminal ID into a plurality of ID fields and splitting the timestamp into a plurality of time values; After the plurality of ID fields and the plurality of time values are spliced to form a spliced field, the spliced field is format-converted according to a preset address format to obtain a proxy IP address.
3. The proxy communication method of a distributed network according to claim 1, characterized in that: The generating a proxy IP address corresponding to the first terminal by using the terminal information includes: After extracting the terminal ID and authority information from the terminal information, querying the authority level value and personal code value of the terminal user based on the authority information, where the personal code value is a value added by the user of the first terminal when registering; After determining the adjustment amount based on the numerical value of the permission level value, numerically converting the ID value of the terminal ID according to the adjustment amount to obtain a conversion address; When the conversion address and the personal code value have the same format, the value of the personal code value is added to the conversion address to obtain the proxy IP address.
4. The proxy communication method of a distributed network according to claim 1, characterized in that: The using of a plurality of the proxy addresses to establish a communication link comprises: sorting and numbering the plurality of proxy addresses in order according to the screening order of the plurality of proxy addresses to obtain a plurality of numbered addresses; Calculate the communication durations between two of the numbered addresses in sequence according to the order of each of the numbered addresses to obtain multiple communication durations; The communication duration with the smallest value is extracted in sequence according to the order result of each of the numbered addresses, and a number of proxy terminals of the numbered addresses corresponding to the communication duration with the smallest value are connected to obtain a communication link.
5. The proxy communication method of a distributed network according to any one of claims 1 to 4, characterized in that: After the step of accessing the second terminal according to the communication link and the communication information, the method further includes: The communication link is saved, and when the first terminal is disconnected from the second terminal and network communication is resumed within a preset time interval, the communication link is used for the first terminal and the second terminal to perform proxy communication in the distributed network.
6. A proxy communication device for a distributed network, characterized in that: It involves a plurality of intelligent terminals and a plurality of proxy terminals, wherein the plurality of intelligent terminals and the plurality of proxy terminals are in a distributed network, and the device is applied to the proxy terminals, and the device comprises: An acquisition module, configured to acquire communication information and terminal information of a first terminal, where the first terminal is any one of a plurality of intelligent terminals; an IP address generating module, configured to generate a proxy IP address corresponding to the first terminal by using the terminal information after determining the second terminal based on the communication information, wherein the second terminal is a smart terminal selected by a user of the first terminal from a plurality of smart terminals; A communication link building module, used for screening a plurality of proxy addresses based on the terminal information, and building a communication link using the plurality of proxy addresses, wherein the proxy addresses are node addresses of idle proxy terminals in the distributed communication network; a proxy communication module, configured to access the second terminal according to the communication link and the communication information, so that the first terminal and the second terminal can perform proxy communication in the distributed network; The screening of a plurality of proxy addresses based on the terminal information includes: Extracting a first bandwidth from the terminal information, and searching for a plurality of initial terminals in a distributed communication network according to the first bandwidth, wherein the initial terminals are proxy terminals in an idle state and whose communication bandwidth is greater than or equal to the first bandwidth; Obtaining the idle time of each of the initial terminals respectively, and selecting a number of time periods greater than a preset time period from the plurality of idle time periods to obtain a number of target time periods; The address of the initial terminal corresponding to the target duration is obtained to obtain a plurality of proxy addresses.
7. A distributed network proxy communication system, characterized in that: The system includes: a number of agent terminals and a number of intelligent terminals; The proxy terminal method is applicable to the proxy communication method of the distributed network as described in any one of claims 1 to 5; Each of the proxy terminals is communicatively connected to each other, and each of the proxy terminals is communicatively connected to each of the intelligent terminals respectively.
8. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the proxy communication method for a distributed network as described in any one of claims 1 to 5 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer-executable program, and the computer-executable program is used to enable a computer to execute the proxy communication method for a distributed network as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Agent decision system of intelligent terminal
CN108900587A
Proxy IP address allocation method and device, computer equipment and readable storage medium
CN111683163A
