CN116708532B - Local area network connection method, device, computer equipment and readable storage medium - Google Patents

Local area network connection method, device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN116708532B
CN116708532B CN202310968065.4A CN202310968065A CN116708532B CN 116708532 B CN116708532 B CN 116708532B CN 202310968065 A CN202310968065 A CN 202310968065A CN 116708532 B CN116708532 B CN 116708532B
Authority
CN
China
Prior art keywords
terminal
internet protocol
screening
original
application
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.)
Active
Application number
CN202310968065.4A
Other languages
Chinese (zh)
Other versions
CN116708532A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310968065.4A priority Critical patent/CN116708532B/en
Publication of CN116708532A publication Critical patent/CN116708532A/en
Application granted granted Critical
Publication of CN116708532B publication Critical patent/CN116708532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0236Filtering by address, protocol, port number or service, e.g. IP-address or URL
    • 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/08Protocols specially adapted for terminal emulation, e.g. Telnet
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/142Managing session states for stateless protocols; Signalling session states; State transitions; Keeping-state mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session

Abstract

The present application relates to a local area network connection method, apparatus, computer device, storage medium and computer program product. The method comprises the following steps: acquiring at least two original internet protocol addresses of a first terminal; screening at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address; acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account on a first terminal; pairing each of the plurality of candidate port numbers with each candidate internet protocol address respectively to obtain a plurality of connection combinations; transmitting the plurality of connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using a target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in the local area network based on the plurality of connection combinations respectively; any connection successfully established with the second terminal is reserved. The method can improve the direct connection power.

Description

Local area network connection method, device, computer equipment and readable storage medium
Technical Field
The present application relates to the field of computer technology, and in particular, to a local area network connection method, apparatus, computer device, computer readable storage medium, and computer program product.
Background
With the development of computer technology, a local area network (Local Area Network, LAN) has emerged, where a local area network refers to a computer group formed by interconnecting a plurality of computers in a certain area, and can implement functions such as file management, application software sharing, email service, and the like.
While one computer in the lan is required to realize some application service with another computer, it is necessary to know the IP (Internet Protocol ) address of the other computer and the port number of the application service in the computer, and connect the application service through the IP address and the port number.
However, in the conventional scheme, an application service on a computer is attempted to be connected by using a recently connected IP address and port number, however, the used IP address may be virtual, and a connection with the computer cannot be successfully established, resulting in a low connection success rate.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a local area network connection method, apparatus, computer device, computer-readable storage medium, and computer program product that can improve connection success rate.
The application provides a local area network connection method, which comprises the following steps:
acquiring at least two original internet protocol addresses of a first terminal;
screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal;
pairing each of the plurality of candidate port numbers with each of the candidate internet protocol addresses respectively to obtain a plurality of connection combinations;
transmitting the connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations;
and reserving any connection successfully established with the second terminal.
The application also provides a local area network connecting device, which comprises:
an address acquisition module, configured to acquire at least two original internet protocol addresses of a first terminal;
the screening module is used for screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
The port number acquisition module is used for acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account on the first terminal;
a pairing module, configured to pair each of the plurality of candidate port numbers with each of the candidate internet protocol addresses, respectively, to obtain a plurality of connection combinations;
the connection module is used for sending the connection combinations to a second terminal through the Internet, and a second application on the second terminal logs in with the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations; and reserving any connection successfully established with the second terminal.
In one embodiment, the at least two address screening policy conditions include at least one of a hop count screening condition or a match screening condition; the hop screening condition is a constraint condition for the hop corresponding to the candidate internet protocol address screened according to the hop screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
In one embodiment, the screening module is further configured to obtain a number of hops corresponding to each of the plurality of original internet protocol addresses, and screen the at least two original internet protocol addresses based on each of the number of hops and the hop screening condition, so as to obtain a first screening result; acquiring a target internet protocol address of the second terminal through the internet, and determining the address matching degree between each of the plurality of original internet protocol addresses and the target internet protocol address respectively; screening the at least two original internet protocol addresses based on the address matching degree and the matching degree screening condition to obtain a second screening result; and combining the first screening result and the second screening result to obtain at least one candidate internet protocol address.
In one embodiment, the screening module is further configured to determine, for each of the original internet protocol addresses, a plurality of original masks corresponding to the original internet protocol addresses; determining a plurality of target masks corresponding to the target internet protocol addresses; and carrying out bit-by-bit matching on the multiple original masks corresponding to each original internet protocol address and the multiple target masks to obtain mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
In one embodiment, the screening module is further configured to screen, according to the historical address screening condition, a historical internet protocol successfully connected with the first application from the at least two original internet protocol addresses, so as to obtain a third screening result; and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
In one embodiment, the port number obtaining module is further configured to obtain a plurality of original port numbers corresponding to the first terminal; and screening the plurality of original port numbers according to preset at least two port number screening strategy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by a target account number on the first terminal.
In one embodiment, the port number obtaining module is further configured to determine a port property corresponding to each of the plurality of source port numbers, and determine a source port number whose port property meets the port property screening condition; screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers meeting the port property screening conditions; and screening candidate port numbers which are successfully connected with the first application from the plurality of original port numbers according to the historical port screening conditions.
In one embodiment, the port number obtaining module is further configured to screen, from the plurality of source port numbers, a source port number belonging to a recognized port and a source port number belonging to a registered port, respectively; screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers belonging to the recognized ports; and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
In one embodiment, the connection module is further configured to send the plurality of connection combinations to the signaling server through a first signaling channel between the first terminal and the signaling server when the first terminal is connected to the signaling server through the internet; and when the signaling server is connected with a second terminal through the Internet, the multiple connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal.
In one embodiment, the address obtaining module is further configured to obtain at least two original internet protocol addresses of the first terminal in response to a data migration request triggered by a first application logged in with a target account on the first terminal;
The apparatus further comprises:
and the migration module is used for acquiring application data corresponding to the first application and migrating the application data to the second application through a data transmission channel indicated by the connection successfully established with the second terminal.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring at least two original internet protocol addresses of a first terminal;
screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal;
pairing each of the plurality of candidate port numbers with each of the candidate internet protocol addresses respectively to obtain a plurality of connection combinations;
transmitting the connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations;
And reserving any connection successfully established with the second terminal.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
acquiring at least two original internet protocol addresses of a first terminal;
screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal;
pairing each of the plurality of candidate port numbers with each of the candidate internet protocol addresses respectively to obtain a plurality of connection combinations;
transmitting the connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations;
and reserving any connection successfully established with the second terminal.
The application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
acquiring at least two original internet protocol addresses of a first terminal;
screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal;
pairing each of the plurality of candidate port numbers with each of the candidate internet protocol addresses respectively to obtain a plurality of connection combinations;
transmitting the connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations;
and reserving any connection successfully established with the second terminal.
According to the local area network connection method, the local area network connection device, the computer equipment, the storage medium and the computer program product, at least two original internet protocol addresses of the first terminal are obtained, the at least two original internet protocol addresses are filtered according to the preset at least two address filtering strategy conditions, at least one candidate internet protocol address is obtained, and a plurality of candidate internet protocol addresses which can be connected to the first terminal can be filtered out by using different address filtering strategy conditions, so that the possibility of successfully connecting the first terminal can be improved. The method comprises the steps of obtaining a plurality of candidate port numbers corresponding to a first application logged in by a target account number on a first terminal, wherein the obtained candidate port numbers are port numbers with larger success rate of connection to the first application, and pairing each candidate port number with each candidate internet protocol address respectively, so that more connection combinations for connecting the first application on the first terminal can be obtained, more ways for connecting the first application are obtained, and the possibility of successful connection is effectively improved. And sending the plurality of connection combinations to the second terminal through the Internet, wherein a second application on the second terminal logs in by the target account, the plurality of connection combinations are used for indicating the second application to request to establish the connection with the first application in the local area network based on the plurality of connection combinations, and any connection successfully established with the second terminal is reserved, so that the second terminal tries to establish the connection with the first application by using the plurality of connection combinations, and the connection success rate of the local area network can be effectively improved.
The application provides a local area network connection method, which comprises the following steps:
receiving a plurality of connection combinations sent to a second terminal by a first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
requesting, by a second application on the second terminal that logs in with the target account, to establish a connection with the first application in a local area network based on the plurality of connection combinations, respectively;
and reserving any connection successfully established with the first terminal.
The application also provides a local area network connecting device, which comprises:
the receiving module is used for receiving a plurality of connection combinations sent to the second terminal by the first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
The request module is used for requesting to establish connection with the first application in a local area network based on the plurality of connection combinations through a second application logged in by the target account number on the second terminal; and reserving any connection successfully established with the first terminal.
In one embodiment, the apparatus further comprises:
a sending module, configured to obtain a target internet protocol address of the second terminal, and send the target internet protocol address to the first terminal through the internet;
wherein one of the at least two address screening policy conditions is a match screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
The application also provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
receiving a plurality of connection combinations sent to a second terminal by a first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
Requesting, by a second application on the second terminal that logs in with the target account, to establish a connection with the first application in a local area network based on the plurality of connection combinations, respectively;
and reserving any connection successfully established with the first terminal.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
receiving a plurality of connection combinations sent to a second terminal by a first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
requesting, by a second application on the second terminal that logs in with the target account, to establish a connection with the first application in a local area network based on the plurality of connection combinations, respectively;
And reserving any connection successfully established with the first terminal.
The application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
receiving a plurality of connection combinations sent to a second terminal by a first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
requesting, by a second application on the second terminal that logs in with the target account, to establish a connection with the first application in a local area network based on the plurality of connection combinations, respectively;
and reserving any connection successfully established with the first terminal.
The local area network connection method, the local area network connection device, the computer equipment, the storage medium and the computer program product receive a plurality of connection combinations sent to the second terminal by the first terminal through the Internet, wherein the received plurality of connection combinations are obtained by pairing one of a plurality of candidate port numbers and one of at least one candidate internet protocol address, the plurality of candidate port numbers correspond to a first application logged in by a target account number on the first terminal, and the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to preset at least two address screening policy conditions, so that more modes for connecting the first application are obtained. And respectively requesting to establish connection with the first application in the local area network based on a plurality of connection combinations through a second application logged in by the target account on the second terminal, and reserving any connection successfully established with the first terminal, so that the second terminal tries to establish connection with the first application by using the plurality of connection combinations, and the connection success rate of the local area network can be effectively improved.
Drawings
FIG. 1 is a diagram of an application environment for a LAN connection method in one embodiment;
FIG. 2 is a flow chart of a method of connecting a local area network in one embodiment;
FIG. 3 is a schematic diagram of pairing a candidate port number with a candidate Internet protocol address in one embodiment;
FIG. 4 is a schematic diagram of a second terminal concurrently with a first terminal requesting to establish a connection with a first application in one embodiment;
fig. 5 is a flow chart of screening at least two original internet protocol addresses according to at least two preset address screening policy conditions to obtain at least one candidate internet protocol address in one embodiment;
FIG. 6 is a schematic diagram of a routing table in one embodiment;
fig. 7 is an interaction diagram of a first terminal, a signaling server, and a second terminal in one embodiment;
fig. 8 is a flowchart of a lan connection method applied to the first terminal in one embodiment;
fig. 9 is an interaction schematic diagram of a first terminal, a signaling server, a transit server, and a second terminal in one embodiment;
FIG. 10 is a flow chart of a method of LAN connection in another embodiment;
FIG. 11 is a flowchart of a local area network connection method applied to a second terminal in one embodiment;
FIG. 12 is a timing diagram of an application scenario of a LAN connection in one embodiment;
FIG. 13 is a block diagram of a LAN connection device in one embodiment;
FIG. 14 is a block diagram of a LAN connection device in one embodiment;
fig. 15 is an internal structural view of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The local area network connection method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the first terminal 102 communicates with the server 104 via the internet and the second terminal 106 communicates with the server 104 via the internet. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on the cloud or other servers. The first terminal 102 obtains at least two original internet protocol addresses of the first terminal 102, and the first terminal 102 screens the at least two original internet protocol addresses according to preset at least two address screening policy conditions to obtain at least one candidate internet protocol address. The first terminal 102 obtains a plurality of candidate port numbers corresponding to a first application logged in with a target account number on the first terminal 102. The first terminal 102 pairs each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations. The first terminal 102 sends the plurality of connection combinations to the server 104 through the internet, the server 104 forwards the plurality of connection combinations to the second terminal 106, and a second application on the second terminal 106 logs in with a target account; the plurality of connection combinations are used for indicating the second application to request to establish the connection with the first application in the local area network based on the plurality of connection combinations respectively. The first terminal 102 retains any connection that was successfully established with the second terminal 106. The first terminal 102 and the second terminal 106 may be, but not limited to, various desktop computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a method for connecting a local area network is provided, and the method is applied to the first terminal in fig. 1 for illustration, and includes the following steps:
step S202, at least two original internet protocol addresses of the first terminal are acquired.
Wherein, the internet protocol address is an internet protocol address, abbreviated as IP address. The IP address is a unified address format provided by the IP protocol, which allocates a logical address to each network and each host on the internet, so as to mask the difference of physical addresses. The IP protocol is a protocol designed for communication over a computer network interconnect. In the internet, it is a set of rules that enables all computer networks connected to the network to communicate with each other, specifying the rules that the computer should follow when communicating over the internet.
The original internet protocol address refers to an address allocated to the first terminal, which is used to identify the first terminal, and the first terminal can be located by the original internet protocol address of the first terminal.
Specifically, the first terminal obtains at least two original internet protocol addresses locally.
Further, the first terminal may obtain a local address list in which a plurality of original internet protocol addresses of the first terminal itself are recorded. The first terminal may obtain at least two original internet protocol addresses from the address list, or the first terminal may obtain all original internet protocol addresses in the address list.
In this embodiment, the first terminal has at least two network cards, each network card has an original internet protocol address, and the first terminal traverses each network card of itself to obtain the original internet protocol address of each network card, thereby obtaining at least two original internet protocol addresses of the first terminal.
In this embodiment, acquiring at least two original internet protocol addresses of the first terminal includes: and responding to a connection request triggered by a first application logged in with a target account number on the first terminal, and acquiring at least two original Internet protocol addresses of the first terminal.
The user may log in through the target account to a first application running on the first terminal and log in through the target account to a second application running on the second terminal. When a user triggers a connection request between a first application and a second application, the first terminal acquires at least two original Internet protocol addresses of the first terminal.
In one embodiment, obtaining at least two original internet protocol addresses of a first terminal includes: and responding to a connection request triggered by a second application logged in with the target account number on the second terminal, and acquiring at least two original Internet protocol addresses of the first terminal.
The user may log in through the target account to a first application running on the first terminal and log in through the target account to a second application running on the second terminal. When the user triggers a connection request between the second application and the first application, the first terminal acquires at least two original Internet protocol addresses of the first terminal.
The first application and the second application may be different types of applications, for example, the first application is an instant messaging application, and the second application is a content sharing application. The first application and the second application may be the same type of application, for example both instant messaging applications.
The first application and the second application may each be presented to the user in the form of an application program. The application may refer to a client installed in the terminal. An application may also refer to an installation-free application, i.e. an application that can be used without downloading an installation, which may also be referred to as an applet, which is typically run as a sub-program in a client, which is then referred to as a parent application, and a sub-program running in the client is referred to as a child application. An application may also refer to a web application or the like that is opened through a browser.
The first application and the second application may also be cloud applications, where the cloud applications refer to applications running in the cloud. The cloud application is an application for interaction between the terminal and the cloud, and the cloud application operates in a mode of encoding an operating process into an audio and video stream through the strong computing capacity of the cloud simulator and transmitting the audio and video stream to the terminal through a network so as to realize interaction with a user.
The cloud end is a cloud server, which is also called a cloud server. Cloud servers are based on large-scale distributed computing systems that integrate computer resources through virtualization technology to provide services of the internet infrastructure. The network that provides the resources is referred to as the "cloud". Resources in the cloud are infinitely expandable in the sense of users, and can be acquired at any time, used as needed, expanded at any time and paid for use as needed. Cloud computing (clouding) is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to acquire computing power, storage space, and information services as needed.
In this embodiment, the first application and the second application both support login with the target account number at different terminals at the same time.
Step S204, screening at least two original Internet protocol addresses according to at least two preset address screening strategy conditions to obtain at least one candidate Internet protocol address.
The at least two screening strategy conditions comprise at least two of a jump number screening condition, a matching degree screening condition, a historical address screening condition and an idle address screening condition.
The number of hops screening condition is a constraint condition for the number of hops corresponding to the candidate internet protocol address screened according to the number of hops screening condition.
The matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
The historical address screening condition is a time constraint condition for candidate internet protocol addresses screened according to the historical address screening condition.
The idle address screening condition is a constraint condition on the use state of the candidate internet protocol address screened according to the idle address screening condition. The usage status characterizes whether the original internet protocol address is used or not, and if not, the original internet protocol address is idle, so that idle candidate internet protocol addresses can be screened from the original internet protocol addresses.
Specifically, the first terminal presets a plurality of address screening policy conditions. The terminal can acquire at least two from a plurality of preset address screening strategy conditions, and screen at least two original internet protocol addresses according to the acquired at least two address screening strategy conditions to acquire at least one candidate internet protocol address.
In this embodiment, the terminal may obtain at least two of a hop count screening condition, a matching degree screening condition, a history address screening condition, and an idle address screening condition, and screen at least two original internet protocol addresses according to at least two of the hop count screening condition, the matching degree screening condition, the history address screening condition, and the idle address screening condition, to obtain at least one candidate internet protocol address.
Step S206, a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal are obtained.
Wherein the port number is used to identify services provided by a particular process in a computer. A computer in the network is represented by an IP address, which can only represent a specific computer, but a plurality of services such as a database service, an FTP (File Transfer Protocol ) service, a Web service, etc. can be simultaneously provided on one computer, and these different services provided by the same computer can be distinguished by a port number, such as a common port number 21 represents an FTP service, a port number 23 represents a Telnet (remote terminal protocol) service, a port number 25 represents an SMTP (Simple Mail Transfer Protocol ) service, etc.
Specifically, a user runs a first application on a first terminal and logs in the first application with a target account. The first terminal obtains a plurality of candidate port numbers corresponding to the first application. The plurality is at least two.
In this embodiment, the first terminal obtains a plurality of initial port numbers corresponding to the first application, and screens a plurality of candidate port numbers from the plurality of initial port numbers. Further, the first terminal may obtain at least one preset screening policy condition, and screen the plurality of source port numbers according to the at least one screening policy condition to obtain a plurality of candidate port numbers.
Wherein the at least one screening policy condition includes at least one of a port property screening condition, a historical port screening condition, and an idle port screening condition.
Step S208, pairing each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations.
Specifically, the first terminal pairs each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations.
As shown in fig. 3, candidate port number 1 and candidate port number 2 are paired with candidate internet protocol address 1 and candidate internet protocol address 2, respectively, to obtain a connection combination (candidate internet protocol address 1: candidate port number 1), a connection combination (candidate internet protocol address 1: candidate port number 2), a connection combination (candidate internet protocol address 2: candidate port number 1), and a connection combination (candidate internet protocol address 2: candidate port number 2).
Step S210, transmitting the plurality of connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using a target account number; the plurality of connection combinations are used for indicating the second application to request to establish the connection with the first application in the local area network based on the plurality of connection combinations respectively.
Specifically, the terminal transmits the plurality of connection combinations to a second terminal through the internet, and a second application on the second terminal logs in with the target account number. The second terminal receives the plurality of connection combinations through the Internet, and requests to establish a connection with the first application in the local area network based on the plurality of connection combinations through the second application on the second terminal.
In this embodiment, the plurality of connection combinations are used to instruct the second application to concurrently request to establish a connection with the first application in the local area network based on the plurality of connection combinations, respectively. That is, the second terminal receives a plurality of connection combinations through the internet, and through a second application on the second terminal, requests to establish a connection with the first application in the local area network based on the plurality of connection combinations, respectively, concurrently.
For example, each time 2 connection combinations are used while requesting to establish a connection with the first application, the request may be stopped when any connection with the second terminal is successfully established, and when all of the requests of the 2 connection combinations used this time fail, 2 requests from the unused connection combinations are selected again to be made a new round. Alternatively, all combinations of connections are used to simultaneously request establishment of a connection with the first application.
Step S212, reserving any connection successfully established with the second terminal.
Specifically, when the second application on the second terminal successfully establishes a connection with the first application on the first terminal, the first terminal reserves the connection.
When there are multiple successfully established connections, the first terminal may reserve the first successfully established connection, or the first terminal may randomly reserve either connection.
In this embodiment, when there is a successfully established connection, the first terminal may reject other requests initiated by the second application for establishing a connection with the first application.
As shown in fig. 4, the second terminal passes through connection combination 1, connection combination 2 to connection combination N, and requests the first terminal to establish a connection with the first application. Connection combination 1 comprises candidate internet protocol address 1 and candidate port number 1, the second terminal initiates a request to establish a connection with the first application to candidate internet protocol address 1 and candidate port 1 of the first terminal through connection combination 1, the candidate port number 1 being the port number of candidate port 1. Meanwhile, the connection combination 2 includes a candidate internet protocol address 2 and a candidate port number 2, and the second terminal initiates a request for establishing a connection with the first application to the candidate internet protocol address 2 and the candidate port 2 of the first terminal through the connection combination 2, where the candidate port number 2 is a port number of the candidate port 2. Similarly, N connection combinations may be used and a request may be made to the first terminal to establish a connection with the first application and to reserve the first successfully established connection.
In this embodiment, at least two original internet protocol addresses of the first terminal are obtained, and at least one candidate internet protocol address is obtained by screening the at least two original internet protocol addresses according to preset at least two address screening policy conditions, so that a plurality of candidate internet protocol addresses which can be connected to the first terminal can be screened out by using different address screening policy conditions, and the possibility of successfully connecting the first terminal can be improved. The method comprises the steps of obtaining a plurality of candidate port numbers corresponding to a first application logged in by a target account number on a first terminal, wherein the obtained candidate port numbers are port numbers with larger success rate of connection to the first application, and pairing each candidate port number with each candidate internet protocol address respectively, so that more connection combinations for connecting the first application on the first terminal can be obtained, more ways for connecting the first application are obtained, and the possibility of successful connection is effectively improved. And sending the plurality of connection combinations to the second terminal through the Internet, wherein a second application on the second terminal logs in with the target account, the plurality of connection combinations are used for indicating the second application to request to establish the connection with the first application in the local area network based on the plurality of connection combinations, and any connection successfully established with the second terminal is reserved, so that the second terminal uses the plurality of connection combinations to attempt to establish the connection with the first application, and the end-to-end connection success rate in the local area network can be effectively improved.
In one embodiment, the at least two address screening policy conditions include at least one of a hop count screening condition or a match screening condition; the method comprises the steps of selecting a candidate internet protocol address according to a threshold value, wherein the threshold value screening condition is a constraint condition for the threshold value corresponding to the candidate internet protocol address selected according to the threshold value screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
Specifically, at least two address screening policy conditions include at least one of a hop count screening condition or a matching degree screening condition, that is, one address screening policy condition includes a hop count screening condition, or one address screening policy condition includes a matching degree screening condition, or both a hop count screening condition and a matching degree screening condition.
When the at least two address screening policy conditions comprise a number of hops screening condition, the first terminal obtains the number of hops corresponding to each of the plurality of original internet protocol addresses, and screens the at least two original internet protocol addresses based on each number of hops and the number of hops screening condition, so as to obtain a first screening result. The first screening result may be null or there may be at least one candidate internet protocol address. The first screening result is null indicating that no candidate internet protocol addresses are screened out according to the hop count screening condition.
When the at least two address screening policy conditions comprise matching degree screening conditions, the target internet protocol address of the second terminal is obtained through the internet, and the address matching degree between each of the plurality of original internet protocol addresses and the target internet protocol address is determined. And screening at least two original Internet protocol addresses based on the matching degree of each address and the matching degree screening condition to obtain a second screening result. The second screening result is null or there is at least one candidate internet protocol address. The second screening result is null indicating that no candidate internet protocol addresses are screened out according to the match screening criteria.
In this embodiment, when the at least two address filtering policy conditions include a hop count filtering condition and a matching degree filtering condition, the first terminal merges the first filtering result and the second filtering result to obtain at least one candidate internet protocol address.
In this implementation, at least two address screening policy conditions, including at least one of a hop count screening condition or a matching degree screening condition, enable screening of an original internet protocol address based on at least one of the hop count screening condition or the matching degree screening condition, enable screening by different address screening policy conditions, and enable obtaining a screening result under different address screening policy conditions. The probability of successful connection of the first terminal is higher in the screening result under the condition of each address screening strategy, so that the success rate of connection of the first terminal can be effectively improved.
In one embodiment, as shown in fig. 5, filtering at least two original internet protocol addresses according to preset at least two address filtering policy conditions to obtain at least one candidate internet protocol address includes:
step S502, obtaining the number of the corresponding jump points of the plurality of original Internet protocol addresses, and screening at least two original Internet protocol addresses based on the number of the jump points and the jump point screening conditions to obtain a first screening result.
Wherein the hops are routes, and one route is a hop. During transmission, a plurality of networks are required to pass through, and each passed through network equipment point (capable of being routed) is called a jump point, and the address is ip. The number of hops is an accumulator of how many hops have passed in order to prevent unwanted packets from flowing over the network. An integer value of the number of hops required is specified for the route, which is used to select a route from a plurality of routes in the routing table that best matches the destination address in the forwarding packet. The selected route has the least number of hops. The number of hops can reflect the number of hops, the speed of the path, the path reliability, the path throughput, and the management attributes.
Specifically, the first terminal acquires the number of hops corresponding to each of the plurality of original internet protocol addresses. The first terminal acquires a number of hop screening condition, respectively matches the number of hops corresponding to each of the plurality of original Internet protocol addresses with the number of hop screening condition, judges whether the number of hops conforming to the number of hops screening condition exists, and acquires a first screening result. The first screening result may be null or there is at least one candidate internet protocol address. The number of hops corresponding to the candidate internet protocol address meets the hops screening condition.
For example, the hop count screening condition indicates that the original internet protocol address with the hop count less than or equal to the hop count threshold needs to be screened out, or indicates that the original internet protocol address with the smallest hop count needs to be screened out, and the screened out original internet protocol address is the candidate internet protocol address.
In this embodiment, the first terminal calculates the number of hops between each of the plurality of original internet protocol addresses and the gateway, and obtains the number of hops corresponding to each of the plurality of original internet protocol addresses. The gateway may be a default gateway.
As shown in fig. 6, there may be two network cards on the first terminal, and the first terminal may traverse to obtain the original IP addresses of all network cards, and the number of hops from each original IP address to the default gateway, and use the original IP address with smaller number of hops, because the smaller number of hops indicates that the connection to the default gateway can be faster. As shown in the routing table of fig. 6, if the number of hops from the two original IP addresses to the default gateway is 25 and 6, respectively, the original IP address with the number of hops of 6 is taken as the candidate IP address.
Step S504, the target Internet protocol address of the second terminal is obtained through the Internet, and the address matching degree between each of the plurality of original Internet protocol addresses and the target Internet protocol address is determined.
The target internet protocol address refers to an address allocated to the second terminal and is used for identifying the second terminal, and the second terminal can be located through the target internet protocol address of the second terminal.
The address matching degree refers to the matching degree between the original internet protocol address and the target internet protocol address, and specifically may be the similarity between the original internet protocol address and the target internet protocol address, or the mask matching length between the original internet protocol address and the target internet protocol address.
The address matching degree may also be obtained based on the similarity and the mask matching length, for example, the similarity and the mask matching length are weighted and summed to obtain the address matching degree.
Specifically, the first terminal obtains a target internet protocol address of the second terminal through the internet, and determines an address matching degree between each of the plurality of original internet protocol addresses and the target internet protocol address, respectively.
Further, the first terminal may calculate a similarity between each of the plurality of original internet protocol addresses and the target internet protocol address, respectively, as the address matching degree.
Alternatively, the first terminal may calculate a mask matching length between each of the plurality of original internet protocol addresses and the target internet protocol address, respectively, taking the mask matching length as the address matching degree.
Or after calculating each similarity and each mask matching length, weighting and summing the corresponding similarity and the mask matching length to obtain the address matching degree.
In this embodiment, the second terminal has at least one target internet protocol address. When the second terminal has a target internet protocol address, the first terminal obtains the target internet protocol address of the second terminal through the internet. When the second terminal has a plurality of target internet protocol addresses, the first terminal obtains at least one target internet protocol address of the second terminal through the internet.
In this embodiment, obtaining, through the internet, the target internet protocol address of the second terminal includes: when the first terminal is connected with the signaling server through the Internet, the target Internet protocol address of the second terminal is obtained through the signaling server.
Step S506, screening at least two original Internet protocol addresses based on the matching degree and the matching degree screening condition of each address to obtain a second screening result.
Specifically, the first terminal obtains a matching degree screening condition, matches each address matching degree with the matching degree screening condition, judges whether the address matching degree meeting the matching degree screening condition exists, and obtains a second screening result. The second screening result may be null or there is at least one candidate internet protocol address. The address matching degree corresponding to the candidate internet protocol address accords with the matching degree screening condition.
For example, the matching degree screening condition indicates that an original internet protocol address whose address matching degree is greater than or equal to a matching degree threshold needs to be screened out, or indicates that an original internet protocol address whose address matching degree is the largest needs to be screened out, and the screened-out original internet protocol address is the candidate internet protocol address.
Step S508, combining the first screening result and the second screening result to obtain at least one candidate Internet protocol address.
Specifically, the first terminal combines the first screening result and the second screening result to obtain at least one candidate internet protocol address.
In this embodiment, the number of hops corresponding to each of the plurality of original internet protocol addresses is obtained, and at least two original internet protocol addresses are filtered based on each number of hops and a hop filtering condition, so that a first filtering result under the hop filtering condition can be obtained. The target internet protocol address of the second terminal is obtained through the internet, the address matching degree between each of a plurality of original internet protocol addresses and the target internet protocol address is determined, at least two original internet protocol addresses are screened based on the address matching degree and the matching degree screening condition, so that a second screening result under the matching degree screening condition can be obtained, the first screening result and the second screening result are combined, at least one candidate internet protocol address can be obtained, and the obtained candidate internet protocol address is screened based on the number of jump point screening condition or the matching degree screening condition, so that the possibility of successfully connecting the first terminal is high.
In one embodiment, the address matching degree includes a mask matching length; determining an address match between each of the plurality of original internet protocol addresses and the target internet protocol address, respectively, comprises:
for each original internet protocol address, determining a plurality of original masks corresponding to the original internet protocol address; determining a plurality of target masks corresponding to the target internet protocol addresses; and for a plurality of original masks corresponding to each original internet protocol address, matching the plurality of original masks with a plurality of target masks bit by bit, and obtaining mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
The multiple original masks corresponding to the original internet protocol address are subnet masks (subnet masks) corresponding to the original internet protocol address. The subnet mask, also called network mask, address mask, subnet mask, is used to indicate which bits of an IP address identify the subnet in which the host is located, and which bits identify the bit mask of the host. Subnet masks need to be used in conjunction with IP addresses.
The subnet mask is a 32-bit address that masks a portion of the IP address to distinguish between network identifications and host identifications and to indicate whether the IP address is on a local area network or a wide area network.
The multiple target masks corresponding to the target internet protocol address are subnet masks corresponding to the target internet protocol address. The subnet mask corresponding to the original internet protocol address includes a plurality of original masks. The subnet mask corresponding to the target internet protocol address includes a plurality of target masks.
Bit-by-bit matching refers to matching the original mask and the target mask of the corresponding sequence bit.
Specifically, for each original internet protocol address, the first terminal determines a plurality of original masks corresponding to the original internet protocol address for which it is intended. The first terminal determines a plurality of target masks corresponding to the target internet protocol address. And aiming at a plurality of original masks corresponding to each original internet protocol address, carrying out bit-by-bit matching on the plurality of original masks and a plurality of target masks to obtain mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses, thereby obtaining the mask matching lengths between each original internet protocol address and the target internet protocol address.
In this embodiment, the first terminal determines a subnet mask corresponding to each original ip address and a subnet mask corresponding to the target ip address. And for the subnet mask of each original internet protocol address, carrying out bit-by-bit matching on a plurality of original masks included in the subnet mask of each original internet protocol address and a plurality of target masks included in the subnet mask of the target internet protocol address to obtain mask matching lengths between the original internet protocol address and the target internet protocol address.
In this embodiment, the first terminal may screen at least two original internet protocol addresses according to the longest mask matching manner, to obtain the second screening result. That is, the longest mask matching length is selected from the mask matching lengths, and the original internet protocol address corresponding to the mask matching length is used as the candidate internet protocol address.
In this embodiment, for each original internet protocol address, a plurality of original masks corresponding to the original internet protocol address are determined, a plurality of target masks corresponding to the target internet protocol address are determined, and for the plurality of original masks corresponding to each original internet protocol address, the plurality of original masks and the plurality of target masks are matched bit by bit, so that mask matching lengths between the corresponding original internet protocol address and the target internet protocol address can be accurately calculated, and candidate internet protocol addresses meeting matching degree screening conditions can be screened out based on the mask matching lengths.
In one embodiment, the at least two address screening policy conditions further comprise a historical address screening condition; the method further comprises the steps of: screening historical Internet protocols successfully connected with the first application from at least two original Internet protocol addresses according to historical address screening conditions to obtain a third screening result;
The merging of the first screening result and the second screening result to obtain at least one candidate internet protocol address includes: and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
The historical address screening condition is used for indicating that the historical Internet protocol successfully connected with the first terminal is screened out from at least two original Internet protocol addresses, or the historical Internet protocol successfully connected with the first application of the first terminal is screened out.
Specifically, the first terminal screens the historical Internet protocol successfully established with the first application from at least two original Internet protocol addresses according to historical address screening conditions to obtain a third screening result. The third screening result may be null or there may be at least one candidate internet protocol address. The third screening result is null, which indicates that no candidate internet protocol addresses are screened according to the historical address screening condition, i.e. no historical internet protocol successfully connected with the first terminal is established in each original internet protocol address, and no historical internet protocol successfully connected with the first application of the first terminal is established.
And the first terminal combines the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address. At least one candidate internet protocol address exists for at least one of the first screening result, the second screening result, and the third screening result.
In this embodiment, according to the historical address screening condition, the historical internet protocol address successfully connected with the first application is screened from at least two original internet protocol addresses, so that a third screening result under the historical address screening condition can be obtained. And combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address, wherein the obtained candidate internet protocol address is screened out based on a hop count screening condition or a matching degree screening condition or a historical address screening condition, and the probability of successfully connecting the first terminal is high.
In one embodiment, obtaining a plurality of candidate port numbers corresponding to a first application logged in with a target account on a first terminal includes:
acquiring a plurality of original port numbers corresponding to a first terminal; and screening the plurality of original port numbers according to preset at least two port number screening strategy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by the target account number on the first terminal.
Specifically, the first terminal has a plurality of ports, each port having a corresponding number, i.e., a port number. Each application on the first terminal corresponds to at least one port number, the first terminal can acquire a plurality of original port numbers possessed by the first terminal, and the plurality of original port numbers are screened according to preset at least two port number screening strategy conditions to acquire at least two candidate port numbers corresponding to the first application which is logged in by the target account number on the first terminal.
In this embodiment, the at least two port number screening policy conditions at least include at least one of a port property screening condition or a historical port screening condition. The port property screening condition is a constraint condition of port properties corresponding to candidate port numbers screened out according to the port property screening condition. The historical port screening condition is a time constraint condition corresponding to the candidate port number screened according to the historical port screening condition.
In this embodiment, the at least two port number screening policy conditions further include an idle port screening condition. The idle port screening condition is a constraint condition for the use state corresponding to the candidate port number screened out according to the idle port screening condition. And the idle port screening condition is used for indicating that the historical port number successfully connected with the first application is screened out from a plurality of original port numbers as a candidate port number.
In this embodiment, a plurality of initial port numbers corresponding to a first terminal are obtained, the plurality of initial port numbers are filtered according to preset at least two port number filtering policy conditions, at least two candidate port numbers corresponding to a first application logged in by a target account on the first terminal are obtained, and a plurality of candidate port numbers capable of being connected to the first application can be filtered using different port number filtering policy conditions, so that the success rate of connecting the first application can be improved.
In one embodiment, the at least two port number screening policy conditions include at least a port property screening condition and a historical port screening condition; screening the plurality of original port numbers according to preset at least two port number screening policy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by a target account number on a first terminal, wherein the method comprises the following steps:
determining port properties corresponding to the plurality of original port numbers respectively, and determining an original port number of which the port properties meet the port property screening conditions; screening at least one candidate port number corresponding to a first application logged in by a target account number on a first terminal from the original port numbers meeting the port property screening conditions; and screening candidate port numbers which are successfully connected with the first application from a plurality of original port numbers according to the historical port screening conditions.
Ports can be classified into recognized ports, dynamic ports, and registered ports according to port properties.
Specifically, the first terminal determines the port properties corresponding to each of the plurality of original port numbers, that is, determines whether the port indicated by the original port number belongs to a recognized port, a dynamic port or a registered port. And the terminal respectively matches the port properties corresponding to the plurality of original port numbers with the port property screening conditions to screen the original port numbers meeting the port property screening conditions. The first terminal screens at least one candidate port number corresponding to a first application on the first terminal from the original port numbers meeting the port property screening conditions.
The first terminal acquires historical port screening conditions, and screens out an original port number successfully established with the first application from a plurality of original port numbers as a candidate port number according to the historical port screening conditions.
In this embodiment, the first terminal screens at least one candidate port number corresponding to the first application on the first terminal from the original port numbers satisfying the port property screening condition according to the history port screening condition.
In this embodiment, the port property screening condition is used to instruct to screen out the port number belonging to the recognized port and the port number belonging to the registered port from the plurality of original port numbers.
In this embodiment, the port properties corresponding to the plurality of original port numbers are determined to determine the original port number whose port properties satisfy the port property screening condition, so that the original port number of the specific port property can be screened out according to the port property screening condition. And screening at least one candidate port number corresponding to the first application logged in by the target account number on the first terminal from the original port numbers meeting the port property screening conditions, so that the port number with higher success rate of connecting the first application can be screened. According to the historical port screening conditions, candidate port numbers which are successfully connected with the first application are screened out from a plurality of original port numbers, and the candidate port numbers which are successfully connected with the first application are more likely to be successfully connected with the first application, so that the success rate of connection is improved.
In one embodiment, determining a source port number for which the port property satisfies the port property screening condition includes: respectively screening a source port number belonging to a recognized port and a source port number belonging to a registered port from a plurality of source port numbers;
screening at least one candidate port number corresponding to a first application logged in by a target account number on a first terminal from a source port number meeting a port property screening condition, wherein the candidate port number comprises:
Screening at least one candidate port number corresponding to a first application logged in by a target account number on a first terminal from the original port numbers belonging to the recognized ports; and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
Specifically, the first terminal determines the port property corresponding to each original port number, screens out the original port number belonging to the recognized port, and screens out the original port number belonging to the registered port.
And the first terminal screens out at least one candidate port number corresponding to the first application logged in by the target account number on the first terminal from the original port numbers belonging to the recognized ports. The first terminal randomly selects a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application. The preset number may be set according to specific requirements, for example, 2, 3, etc., but is not limited thereto.
In one embodiment, the preset number may be determined based on the number of candidate port numbers screened from the original port numbers subordinate to the recognized ports, for example, when one candidate port number corresponding to the first application is screened from the original port numbers subordinate to the recognized ports, at least one candidate port number is randomly selected from the original port numbers subordinate to the registered ports, so that at least two candidate port numbers are finally obtained.
In this embodiment, from a plurality of initial port numbers, an initial port number belonging to a recognized port and an initial port number belonging to a registered port are respectively screened out, at least one candidate port number corresponding to a first application registered with a target account number on a first terminal is screened out from the initial port numbers belonging to the recognized ports, the screened candidate port number is a port number recognized to be allocated to the first application, and the first application is easier to connect with the port number. The preset number of original port numbers are randomly selected from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application, and the port numbers which are not acknowledged to be allocated to any application can be randomly selected from the original port numbers which are not acknowledged to be allocated to any application, so that the port numbers can be used by the first application, and the port numbers can be possibly connected to the first application, thereby being beneficial to improving the success rate of establishing connection with the first application.
In one embodiment, transmitting the plurality of connection combinations to the second terminal via the internet includes:
when the first terminal is connected with the signaling server through the Internet, a plurality of connection combinations are sent to the signaling server through a first signaling channel between the first terminal and the signaling server; when the signaling server is connected with the second terminal through the Internet, a plurality of connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal.
Wherein the signaling server forwards relevant data for establishing a connection between a first application on the first terminal and a second application on the second terminal, e.g. forwarding a connection combination, a candidate internet protocol address, a candidate port number, a target internet protocol address, etc.
Specifically, the first terminal is connected with the signaling server through the internet, and the second terminal is connected with the signaling server through the internet.
When the first terminal is connected with the signaling server through the Internet, the first terminal sends a plurality of connection combinations to the signaling server through a first signaling channel between the first terminal and the signaling server. The signaling server receives the plurality of connection combinations and transmits the plurality of connection combinations to the second terminal through a second signaling path with the second terminal. The second terminal receives the plurality of connection combinations forwarded by the signaling server through a second signaling channel.
As shown in fig. 7, a first signaling path between the first terminal and the signaling server is established, and a second signaling path between the signaling server and the second terminal is established. The first terminal transmits a plurality of connection combinations to the signaling server through a first signaling channel. The signaling server sends a plurality of connection combinations to the second terminal through the first signaling channel. The second terminal requests to establish a connection with the first application in the local area network through a plurality of connection combinations, respectively.
In this embodiment, when the first terminal is connected to the signaling server through the internet, a plurality of connection combinations are sent to the signaling server through a first signaling channel between the first terminal and the signaling server, so that the plurality of connection combinations can be forwarded to the second terminal, and the success rate of establishing connection with the first application can be effectively improved by the plurality of connection combinations. When the signaling server is connected with the second terminal through the Internet, a plurality of connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal, so that a second application of the second terminal requests to establish connection with the first application in the local area network based on the plurality of connection combinations, and data interaction between the first application and the second application can be directly realized after the connection is successfully established without forwarding through the server, and the data interaction efficiency between the two applications can be effectively improved.
As shown in fig. 8, there is provided a local area network connection method applied to a first terminal, including:
obtaining a target internet protocol address of the second terminal from the signaling server;
and obtaining the original internet protocol addresses of all network cards of the first terminal, filtering the virtual internet protocol addresses based on a local address blacklist of the second terminal, and obtaining a filtered address list, wherein the original internet protocol addresses in the address list are real internet protocol addresses.
And screening at least one candidate internet protocol address from at least two original internet protocol addresses by using a jump number screening condition, a matching degree screening condition and a historical address screening condition.
And screening at least two candidate port numbers from the plurality of original port numbers through port property screening conditions and historical port number screening conditions.
Pairing each candidate internet protocol address with each candidate port number respectively to obtain a plurality of connection combinations.
After the multiple connection combinations are sent to the second terminal, the second terminal uses the multiple connection combinations and sends a connection request to the first terminal to establish connection with the first application on the first terminal, and then the first terminal processes the multiple concurrent connection requests of the second terminal and returns a processing result.
When successfully connected to a first application on a first terminal, the first terminal retains a first successfully established connection.
In one embodiment, obtaining at least two original internet protocol addresses of a first terminal includes:
responding to a data migration request triggered by a first application logged in on a first terminal by a target account number, and acquiring at least two original Internet protocol addresses of the first terminal;
The method further comprises the steps of: and acquiring application data corresponding to the first application, and migrating the application data to the second application through a data transmission channel indicated by the connection successfully established with the second terminal.
Specifically, a user runs a first application on a first terminal and logs in the first application through a target account number. The user may trigger a data migration request at the first application, and the first terminal may obtain at least two original internet protocol addresses of the first terminal in response to the data migration request.
After the plurality of connection combinations are obtained, the plurality of connection combinations are transmitted to the second terminal through the internet. The second application on the second terminal logs in with the target account number, and the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in the local area network based on the plurality of connection combinations.
The first terminal reserves any connection successfully established with the second terminal, acquires application data corresponding to the first application, and migrates the application data to the second application through a data transmission channel indicated by the reserved connection successfully established.
In this embodiment, application data corresponding to the second application may also be obtained, and the application data corresponding to the second application may be migrated to the first application through a data transmission channel indicated by a connection successfully established with the second terminal. The data migration request may be triggered at the first application or the second application.
In this embodiment, the lan connection method is applied to a data migration scenario. And responding to a data migration request triggered by a first application logged in by a target account number on the first terminal, and acquiring at least two original Internet protocol addresses of the first terminal, so that when a user triggers the data migration request of application data, connection between the first application and the second application can be established according to each step of a local area network connection method, after the connection is successful, the application data can be directly migrated from the first application to the second application, forwarding through other equipment is not needed, the efficiency of application data migration can be effectively improved, and the condition of data loss caused by data forwarding can be avoided.
In one embodiment, when the connection with the first application, which is requested to be established in the local area network based on the plurality of connection combinations, fails, application data corresponding to the first application is migrated to the second application through the transit server.
As shown in fig. 9, a first signaling path between the first terminal and the signaling server is established, and a second signaling path between the signaling server and the second terminal is established. The first terminal transmits a plurality of connection combinations to the signaling server through a first signaling channel. The signaling server sends a plurality of connection combinations to the second terminal through the first signaling channel. The second terminal requests to establish a connection with the first application in the local area network through a plurality of connection combinations, respectively.
When each request for establishing connection fails, a first data transmission channel between the first terminal and the transfer server and a second data transmission channel between the signaling server and the second terminal are established. And sending the application data corresponding to the first application to the transit server through a first data transmission channel between the first application and the transit server. The transfer server transmits the application data to the second application through a second data transmission channel between the transfer server and the second terminal.
In one embodiment, after a connection is successfully established with the first application, interaction between the first application and the second application may be performed through a data transmission channel indicated by the successfully established and reserved connection. Such as application data migration, file transfer, etc.
In one embodiment, as shown in fig. 10, a local area network connection method is provided, and the method is applied to the second terminal in fig. 1 for illustration, and includes the following steps:
step S1002, receiving a plurality of connection combinations sent by a first terminal to a second terminal through the Internet; a plurality of connection combinations, which are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application logged in with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening policy conditions.
Specifically, the first terminal acquires at least two original internet protocol addresses of the first terminal, and filters the at least two original internet protocol addresses according to preset at least two address filtering strategy conditions to obtain at least one candidate internet protocol address. The first terminal acquires a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal. The first terminal pairs each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations. The first terminal transmits the plurality of connection combinations to the second terminal through the internet.
And the user runs the first application on the second terminal and logs in the second application through the target account number. The second terminal receives a plurality of connection combinations sent by the first terminal to the second terminal through the Internet.
In step S1004, through a second application logged in with the target account on the second terminal, a connection with the first application is respectively requested to be established in the local area network based on the plurality of connection combinations.
Specifically, the second terminal requests to establish a connection with the first application in the local area network based on a plurality of connection combinations through the second application registered with the target account number, respectively. Each connection combination is used to request establishment of a connection with the first application, i.e. one connection combination may be used to initiate a request.
In this embodiment, the second terminal requests, through the second application, to establish a connection with the first application in the local area network based on at least two of the plurality of connection combinations, respectively.
Further, when the concurrent request fails, at least two unused connection combinations among the plurality of connection combinations are used to respectively and concurrently request to establish a connection with the first application in the local area network.
Step S1006, reserving any connection successfully established with the first terminal.
Specifically, when the second application on the second terminal successfully establishes a connection with the first application on the first terminal, the second terminal retains the connection.
When there are multiple successfully established connections, the second terminal may reserve the first successfully established connection, or the second terminal may randomly reserve either connection.
In this embodiment, when there is a successfully established connection, the first terminal may reject other requests initiated by the second application for establishing a connection with the first application. Alternatively, when there is a successfully established connection, the second terminal stops initiating a request to establish a connection with the first application using the connection combination.
In this embodiment, a plurality of connection combinations sent by a first terminal to a second terminal through the internet are received through the internet, where the received plurality of connection combinations are obtained by pairing one of a plurality of candidate port numbers and one of at least one candidate internet protocol address, the plurality of candidate port numbers correspond to a first application logged in on the first terminal by a target account, and the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to preset at least two address screening policy conditions, so as to obtain more ways of connecting the first application. And respectively requesting to establish connection with the first application in the local area network based on a plurality of connection combinations through a second application logged in by the target account on the second terminal, and reserving any connection successfully established with the first terminal, so that the second terminal tries to establish connection with the first application by using the plurality of connection combinations, and the connection success rate of the local area network can be effectively improved.
In one embodiment, the method further comprises: acquiring a target internet protocol address of a second terminal, and transmitting the target internet protocol address to a first terminal through the Internet;
wherein one of the at least two address screening policy conditions is a match screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
Specifically, the second terminal acquires its own target internet protocol address, and transmits the target internet protocol address to the first terminal through the internet. One of at least two address screening policy conditions used by the first terminal to screen candidate internet protocol addresses is a match screening condition. The first terminal obtains the target internet protocol address through the internet, determines the address matching degree between each of a plurality of original internet protocol addresses and the target internet protocol address, and screens at least two original internet protocol addresses based on the address matching degree and the matching degree screening condition to obtain a corresponding screening result. The first terminal screens at least two original Internet protocol addresses based on other address screening strategy conditions to obtain screening results corresponding to the first terminal. And combining the screening results to obtain candidate internet protocol addresses.
As shown in fig. 11, a flowchart of a lan connection method applied to a second terminal includes:
step S1102, obtaining a target internet protocol address except a blacklist;
step S1104, the target Internet protocol address is sent to the first terminal through the signaling server;
step S1106, waiting for the first terminal to return a plurality of connection combinations through the signaling server;
step S1108, a plurality of connection combinations are used to simultaneously initiate a connection request with the first application;
in step S1110, data migration is performed using the first successful connection.
In this embodiment, when the second terminal has a plurality of target ip addresses, the second terminal obtains a local address blacklist, where the address blacklist records virtual ip addresses, and cannot be connected to the second terminal through the virtual ip addresses. The second terminal filters the plurality of target internet protocol addresses through the virtual internet protocol addresses recorded in the address blacklist so as to filter out the virtual internet protocol addresses in the plurality of target internet protocol addresses. And the second terminal transmits the target Internet protocol address obtained after the filtering processing to the first terminal through the Internet.
In this embodiment, the target internet protocol address of the second terminal is obtained, and the target internet protocol address is sent to the first terminal through the internet, so that the first terminal screens candidate internet protocol addresses through the address matching degree between the target internet protocol address and each original internet protocol address, and the higher the matching degree is, the easier the candidate internet protocol addresses are connected to the first terminal, so that the candidate internet protocol addresses with high success rate of connection with the first terminal are screened out by using the address matching degree.
In one embodiment, a local area network connection method is provided, which is applied to a first terminal and a second terminal, and includes:
the method comprises the steps that a first terminal responds to a data migration request triggered by a first application logged in on the first terminal by a target account number, and at least two original Internet protocol addresses of the first terminal are obtained.
The first terminal acquires the number of the corresponding jump points of the plurality of original internet protocol addresses, and screens at least two original internet protocol addresses based on the number of the jump points and the screening condition of the jump points to obtain a first screening result.
When the first terminal is connected with the signaling server through the Internet, a target Internet protocol address of the second terminal is obtained from the signaling server through a first signaling channel between the first terminal and the signaling server; for each original internet protocol address, the first terminal determines a plurality of original masks corresponding to the original internet protocol address for which it is intended, and determines a plurality of target masks corresponding to the target internet protocol address.
And aiming at a plurality of original masks corresponding to each original internet protocol address, the first terminal performs bit-by-bit matching on the plurality of original masks and the plurality of target masks to obtain mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
And the first terminal screens at least two original Internet protocol addresses based on the screening conditions of the matching length and the matching degree of each mask to obtain a second screening result.
The first terminal screens the historical Internet protocol address successfully established with the first application from at least two original Internet protocol addresses according to the historical address screening conditions to obtain a third screening result; and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
The method comprises the steps that a first terminal obtains a plurality of original end port numbers corresponding to the first terminal; and determining the port property corresponding to each of the plurality of original port numbers, and respectively screening the original port number belonging to the recognized port and the original port number belonging to the registered port from the plurality of original port numbers.
The method comprises the steps that a first terminal screens out at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from a source port number belonging to a recognized port; and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
The first terminal pairs each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations.
The first terminal sends a plurality of connection combinations to a signaling server through a first signaling channel; the signaling server sends a plurality of connection combinations to the second terminal based on a second signaling path with the second terminal.
The second terminal receives a plurality of connection combinations sent to the second terminal by the first terminal through the Internet; the second terminal requests to establish connection with the first application in the local area network based on a plurality of connection combinations through a second application logged in by the target account number on the second terminal.
The first terminal and the second terminal reserve the same connection which is successfully established, the first terminal acquires application data corresponding to the first application, and the application data is migrated to the second application through a data transmission channel indicated by the connection which is successfully established with the second terminal.
In one embodiment, an application scenario of a lan connection method is provided, as shown in a timing chart of fig. 12, including:
and the user runs the application A at the computer end and logs in the application A at the computer end through the account number 1. And the user runs the application A at the mobile phone end and logs in the application A at the mobile phone end through the account number 1.
The user obtains each original IP address of the user at the data migration request of the application A triggered by the application A of the computer terminal. And obtaining the target IP address of the mobile phone terminal through the signaling server. The original IP address is the original internet protocol address, and the target IP address is the target internet protocol address.
A computer may have a plurality of network cards, the computer end may traverse and obtain the original IP addresses of all the network cards, and the computer end screens candidate IP addresses from all the original IP addresses by the following address screening policy conditions:
virtual network card blacklist policy: some security software or virtual machines register virtual network cards on the computer-side system, but the IP addresses of the virtual network cards are actually not connected, so that the IP addresses of the virtual network cards in all original IP addresses can be filtered through a virtual network card blacklist. After the virtual network card blacklist-based policy, the original IP address obtained by filtering is further filtered using the following policy.
Searching a priority route ip strategy: the computer end acquires the number of the hops from each original IP address to the default gateway, screens out candidate IP addresses with small hops, and the connection speed is faster when the number of hops is smaller.
Longest match policy: a first signaling channel is arranged between the computer end and the signaling server, and a second signaling channel is arranged between the mobile phone end and the signaling server. The computer end obtains the target IP address of the mobile phone end from the signaling server, and screens out candidate IP addresses from the original IP addresses through the longest matching strategy.
Port probing strategy: and selecting the port numbers of the 3 recognized ports corresponding to the application A as candidate port numbers, and selecting the port numbers of the preset number of ports from the registered ports as candidate port numbers.
Record historically successful IP address and port combinations: the computer end screens the historical IP addresses successfully connected with the application A of the computer end from the original IP addresses to serve as candidate IP addresses; and taking the history port number successfully established with the application A of the computer terminal as a candidate port number.
The computer terminal pairs each candidate port number with each candidate IP address respectively to obtain a plurality of connection combinations, for example, 4 connection combinations.
The computer end sends 4 connection combinations to a signaling server through a first signaling channel; the signaling server sends 4 connection combinations to the mobile phone terminal based on a second signaling channel between the signaling server and the mobile phone terminal.
The application A at the mobile phone side receives the 4 connection combinations, and simultaneously uses the 4 connection combinations to simultaneously request to establish connection with the application A at the computer side in the local area network.
The first connection which is successfully established is reserved between the computer end and the mobile phone end, and the application A of the computer end transfers the application data of the application A of the computer end to the application A of the mobile phone end through a data transmission channel indicated by the reserved connection.
The multiple policy combinations in this embodiment include searching a priority routing ip policy, a blacklist filtering common virtual network card policy, a longest matching policy, a port selection policy, and a history successful direct connection ip policy, and attempting to select an optimal connection policy through multiple sets of candidate ip addresses and port permutation and combination, so that the direct connection rate from end to end is improved through multiple combination policies, and the direct connection is performed on a computer end to a mobile phone end, so that a function which cannot be realized through data line connection can be realized. The proposed multiple combination strategies are universal methods, can be used in a cross-platform manner, and are low in subsequent maintenance cost. And moreover, the direct connection rate of the local area network is improved by using the general method, so that the maintenance cost can be reduced, and the experience of a user using the direct connection related function of the local area network is improved.
And, through the direct intercommunication of transmission control protocol (Transmission Control Protocol, TCP) or connectionless transmission protocol (User Datagram Protocol, UDP) of two terminals of the same account in the same LAN to satisfy the function that needs end-to-end transmission, in order to save background cost and promote transmission performance. TCP is a connection-oriented, reliable, byte stream based transport layer communication protocol, among other things.
It should be understood that, although the steps in the flowcharts related to the above embodiments are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a local area network connection device for realizing the above related local area network connection method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the lan connection device provided below may be referred to the limitation of the lan connection method hereinabove, and will not be repeated here.
In one embodiment, as shown in fig. 13, there is provided a local area network connection device 1300 comprising: an address acquisition module 1302, a screening module 1304, a port number acquisition module 1306, a pairing module 1308, and a connection module 1310, wherein:
an address acquisition module 1302 is configured to acquire at least two original internet protocol addresses of the first terminal.
The screening module 1304 is configured to screen at least two original internet protocol addresses according to a preset at least two address screening policy condition, so as to obtain at least one candidate internet protocol address.
The port number obtaining module 1306 is configured to obtain a plurality of candidate port numbers corresponding to a first application logged in with a target account number on the first terminal.
Pairing module 1308 is configured to pair each of the plurality of candidate port numbers with each candidate internet protocol address, respectively, to obtain a plurality of connection combinations.
A connection module 1310, configured to send the plurality of connection combinations to a second terminal through the internet, where a second application on the second terminal logs in with a target account; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in the local area network based on the plurality of connection combinations respectively; any connection successfully established with the second terminal is reserved.
In this embodiment, at least two original internet protocol addresses of the first terminal are obtained, and at least one candidate internet protocol address is obtained by screening the at least two original internet protocol addresses according to preset at least two address screening policy conditions, so that a plurality of candidate internet protocol addresses which can be connected to the first terminal can be screened out by using different address screening policy conditions, and the possibility of successfully connecting the first terminal can be improved. The method comprises the steps of obtaining a plurality of candidate port numbers corresponding to a first application logged in by a target account number on a first terminal, wherein the obtained candidate port numbers are port numbers with larger success rate of connection to the first application, and pairing each candidate port number with each candidate internet protocol address respectively, so that more connection combinations for connecting the first application on the first terminal can be obtained, more ways for connecting the first application are obtained, and the possibility of successful connection is effectively improved. And sending the plurality of connection combinations to the second terminal through the Internet, wherein a second application on the second terminal logs in with the target account, the plurality of connection combinations are used for indicating the second application to request to establish the connection with the first application in the local area network based on the plurality of connection combinations, and any connection successfully established with the second terminal is reserved, so that the second terminal tries to establish the connection with the first application by using the plurality of connection combinations, and the connection success rate between two applications in the local area network can be effectively improved.
In one embodiment, the at least two address screening policy conditions include at least one of a hop count screening condition or a match screening condition; the method comprises the steps of selecting a candidate internet protocol address according to a threshold value, wherein the threshold value screening condition is a constraint condition for the threshold value corresponding to the candidate internet protocol address selected according to the threshold value screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
In this implementation, at least two address screening policy conditions, including at least one of a hop count screening condition or a matching degree screening condition, enable screening of an original internet protocol address based on at least one of the hop count screening condition or the matching degree screening condition, enable screening by different address screening policy conditions, and enable obtaining a screening result under different address screening policy conditions. The probability of successful connection of the first terminal is higher in the screening result under the condition of each address screening strategy, so that the success rate of connection of the first terminal can be effectively improved.
In one embodiment, the screening module 1304 is further configured to obtain the number of hops corresponding to each of the plurality of original internet protocol addresses, and screen at least two original internet protocol addresses based on each number of hops and a screening condition of the number of hops to obtain a first screening result; acquiring a target internet protocol address of a second terminal through the internet, and determining the address matching degree between each of a plurality of original internet protocol addresses and the target internet protocol address respectively; screening at least two original Internet protocol addresses based on the matching degree of each address and the matching degree screening condition to obtain a second screening result; and combining the first screening result and the second screening result to obtain at least one candidate internet protocol address.
In this embodiment, the number of hops corresponding to each of the plurality of original internet protocol addresses is obtained, and at least two original internet protocol addresses are filtered based on each number of hops and a hop filtering condition, so that a first filtering result under the hop filtering condition can be obtained. The target internet protocol address of the second terminal is obtained through the internet, the address matching degree between each of a plurality of original internet protocol addresses and the target internet protocol address is determined, at least two original internet protocol addresses are screened based on the address matching degree and the matching degree screening condition, so that a second screening result under the matching degree screening condition can be obtained, the first screening result and the second screening result are combined, at least one candidate internet protocol address can be obtained, and the obtained candidate internet protocol address is screened based on the number of jump point screening condition or the matching degree screening condition, so that the possibility of successfully connecting the first terminal is high.
In one embodiment, the filtering module 1304 is further configured to determine, for each original internet protocol address, a plurality of original masks corresponding to the original internet protocol address; determining a plurality of target masks corresponding to the target internet protocol addresses; and for a plurality of original masks corresponding to each original internet protocol address, matching the plurality of original masks with a plurality of target masks bit by bit, and obtaining mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
In this embodiment, for each original internet protocol address, a plurality of original masks corresponding to the original internet protocol address are determined, a plurality of target masks corresponding to the target internet protocol address are determined, and for the plurality of original masks corresponding to each original internet protocol address, the plurality of original masks and the plurality of target masks are matched bit by bit, so that mask matching lengths between the corresponding original internet protocol address and the target internet protocol address can be accurately calculated, and candidate internet protocol addresses meeting matching degree screening conditions can be screened out based on the mask matching lengths.
In one embodiment, the screening module 1304 is further configured to screen, according to a historical address screening condition, a historical internet protocol that has been successfully connected to the first application from at least two original internet protocol addresses, to obtain a third screening result; and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
In this embodiment, according to the historical address screening condition, the historical internet protocol address successfully connected with the first application is screened from at least two original internet protocol addresses, so that a third screening result under the historical address screening condition can be obtained. And combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address, wherein the obtained candidate internet protocol address is screened out based on a hop count screening condition or a matching degree screening condition or a historical address screening condition, and the probability of successfully connecting the first terminal is high.
In one embodiment, the port number obtaining module 1306 is further configured to obtain a plurality of source port numbers corresponding to the first terminal; and screening the plurality of original port numbers according to preset at least two port number screening strategy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by the target account number on the first terminal.
In this embodiment, a plurality of initial port numbers corresponding to a first terminal are obtained, the plurality of initial port numbers are filtered according to preset at least two port number filtering policy conditions, at least two candidate port numbers corresponding to a first application logged in by a target account on the first terminal are obtained, and a plurality of candidate port numbers capable of being connected to the first application can be filtered using different port number filtering policy conditions, so that the success rate of connecting the first application can be improved.
In one embodiment, the port number obtaining module 1306 is further configured to determine port properties corresponding to the plurality of original port numbers, and determine an original port number whose port properties satisfy the port property screening condition; screening at least one candidate port number corresponding to a first application logged in by a target account number on a first terminal from the original port numbers meeting the port property screening conditions; and screening candidate port numbers which are successfully connected with the first application from a plurality of original port numbers according to the historical port screening conditions.
In this embodiment, the port properties corresponding to the plurality of original port numbers are determined to determine the original port number whose port properties satisfy the port property screening condition, so that the original port number of the specific port property can be screened out according to the port property screening condition. And screening at least one candidate port number corresponding to the first application logged in by the target account number on the first terminal from the original port numbers meeting the port property screening conditions, so that the port number with higher success rate of connecting the first application can be screened. According to the historical port screening conditions, candidate port numbers which are successfully connected with the first application are screened out from a plurality of original port numbers, and the candidate port numbers which are successfully connected with the first application are more likely to be successfully connected with the first application, so that the success rate of connection is improved.
In one embodiment, the port number obtaining module 1306 is further configured to screen, from the plurality of initial port numbers, an initial port number belonging to the recognized port and an initial port number belonging to the registered port, respectively; screening at least one candidate port number corresponding to a first application logged in by a target account number on a first terminal from the original port numbers belonging to the recognized ports; and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
In this embodiment, from a plurality of initial port numbers, an initial port number belonging to a recognized port and an initial port number belonging to a registered port are respectively screened out, at least one candidate port number corresponding to a first application registered with a target account number on a first terminal is screened out from the initial port numbers belonging to the recognized ports, the screened candidate port number is a port number recognized to be allocated to the first application, and the first application is easier to connect with the port number. The preset number of original port numbers are randomly selected from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application, and the port numbers which are not acknowledged to be allocated to any application can be randomly selected from the original port numbers which are not acknowledged to be allocated to any application, so that the port numbers can be used by the first application, and the port numbers can be possibly connected to the first application, thereby being beneficial to improving the success rate of establishing connection with the first application.
In one embodiment, the connection module 1310 is further configured to send, when the first terminal is connected to the signaling server through the internet, a plurality of connection combinations to the signaling server through a first signaling channel between the first terminal and the signaling server; when the signaling server is connected with the second terminal through the Internet, a plurality of connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal.
In this embodiment, when the first terminal is connected to the signaling server through the internet, a plurality of connection combinations are sent to the signaling server through a first signaling channel between the first terminal and the signaling server, so that the plurality of connection combinations can be forwarded to the second terminal, and the success rate of establishing connection with the first application can be effectively improved by the plurality of connection combinations. When the signaling server is connected with the second terminal through the Internet, a plurality of connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal, so that a second application of the second terminal requests to establish connection with the first application in the local area network based on the plurality of connection combinations, and data interaction between the first application and the second application can be directly realized after the connection is successfully established without forwarding through the server, and the data interaction efficiency between the two applications can be effectively improved.
In one embodiment, the address obtaining module 1302 is further configured to obtain at least two original internet protocol addresses of the first terminal in response to a data migration request triggered by a first application logged in with a target account on the first terminal;
The apparatus further comprises:
the migration module is used for acquiring application data corresponding to the first application and migrating the application data to the second application through a data transmission channel indicated by the connection successfully established with the second terminal.
In this embodiment, the lan connection method is applied to a data migration scenario. And responding to a data migration request triggered by a first application logged in by a target account number on the first terminal, and acquiring at least two original Internet protocol addresses of the first terminal, so that when a user triggers the data migration request of application data, connection between the first application and the second application can be established according to each step of a local area network connection method, after the connection is successful, the application data can be directly migrated from the first application to the second application, forwarding through other equipment is not needed, the efficiency of application data migration can be effectively improved, and the condition of data loss caused by data forwarding can be avoided.
In one embodiment, as shown in fig. 14, there is provided a lan connection apparatus 1400 comprising: a receiving module 1402 and a requesting module 1404, wherein:
a receiving module 1402, configured to receive, via the internet, a plurality of connection combinations sent by the first terminal to the second terminal via the internet; a plurality of connection combinations, which are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application logged in with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening policy conditions.
A request module 1404, configured to request, through a second application logged in with a target account on a second terminal, to establish a connection with the first application in the local area network based on a plurality of connection combinations, respectively; any connection successfully established with the first terminal is reserved.
In this embodiment, a plurality of connection combinations sent by a first terminal to a second terminal through the internet are received through the internet, where the received plurality of connection combinations are obtained by pairing one of a plurality of candidate port numbers and one of at least one candidate internet protocol address, the plurality of candidate port numbers correspond to a first application logged in on the first terminal by a target account, and the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to preset at least two address screening policy conditions, so as to obtain more ways of connecting the first application. And respectively requesting to establish connection with the first application in the local area network based on a plurality of connection combinations through a second application logged in by the target account on the second terminal, and reserving any connection successfully established with the first terminal, so that the second terminal tries to establish connection with the first application by using the plurality of connection combinations, and the connection success rate of the local area network can be effectively improved.
In one embodiment, the apparatus further comprises:
the sending module is used for obtaining a target internet protocol address of the second terminal and sending the target internet protocol address to the first terminal through the internet; wherein one of the at least two address screening policy conditions is a match screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
In this embodiment, the target internet protocol address of the second terminal is obtained, and the target internet protocol address is sent to the first terminal through the internet, so that the first terminal screens candidate internet protocol addresses through the address matching degree between the target internet protocol address and each original internet protocol address, and the higher the matching degree is, the easier the candidate internet protocol addresses are connected to the first terminal, so that the candidate internet protocol addresses with high success rate of connection with the first terminal are screened out by using the address matching degree.
The modules in the lan connection device may be implemented in whole or in part by software, hardware, or a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal or a server. Taking the terminal as an example, the internal structure thereof can be as shown in fig. 15. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a local area network connection method. The display unit of the computer equipment is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device, wherein the display screen can be a liquid crystal display screen or an electronic ink display screen, the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on a shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 15 is merely a block diagram of a portion of the structure associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric RandomAccess Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (26)

1. A method for connecting to a local area network, the method comprising:
acquiring at least two original internet protocol addresses of a first terminal;
screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account number on the first terminal;
Pairing each of the plurality of candidate port numbers with each of the candidate internet protocol addresses respectively to obtain a plurality of connection combinations;
transmitting the connection combinations to a second terminal through the Internet, and logging in a second application on the second terminal by using the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations;
and reserving any connection successfully established with the second terminal.
2. The method of claim 1, wherein the at least two address screening policy conditions comprise at least one of a hop count screening condition or a match screening condition; the hop screening condition is a constraint condition for the hop corresponding to the candidate internet protocol address screened according to the hop screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address and the target internet protocol address screened according to the matching degree screening condition.
3. The method according to claim 2, wherein said filtering said at least two original internet protocol addresses according to at least two preset address filtering policy conditions to obtain at least one candidate internet protocol address comprises:
Obtaining the number of the corresponding jump points of the plurality of original internet protocol addresses, and screening the at least two original internet protocol addresses based on the number of jump points and the jump point screening condition to obtain a first screening result;
acquiring a target internet protocol address of the second terminal through the internet, and determining the address matching degree between each of the plurality of original internet protocol addresses and the target internet protocol address respectively;
screening the at least two original internet protocol addresses based on the address matching degree and the matching degree screening condition to obtain a second screening result;
and combining the first screening result and the second screening result to obtain at least one candidate internet protocol address.
4. The method of claim 3, wherein the address matching degree comprises a mask matching length; said determining an address match between each of said plurality of original internet protocol addresses and said target internet protocol address, respectively, comprises:
for each original internet protocol address, determining a plurality of original masks corresponding to the original internet protocol address;
determining a plurality of target masks corresponding to the target internet protocol addresses;
And carrying out bit-by-bit matching on the multiple original masks corresponding to each original internet protocol address and the multiple target masks to obtain mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
5. The method of claim 3, wherein the at least two address screening policy conditions further comprise a historical address screening condition; the method further comprises the steps of:
screening the historical Internet protocol successfully connected with the first application from the at least two original Internet protocol addresses according to the historical address screening conditions to obtain a third screening result;
and combining the first screening result and the second screening result to obtain at least one candidate internet protocol address, including:
and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
6. The method according to claim 1, wherein the obtaining a plurality of candidate port numbers corresponding to a first application registered with a target account on the first terminal includes:
Acquiring a plurality of original end port numbers corresponding to the first terminal;
and screening the plurality of original port numbers according to preset at least two port number screening strategy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by a target account number on the first terminal.
7. The method of claim 6, wherein the at least two port number screening policy conditions include at least a port property screening condition and a historical port screening condition; the step of screening the plurality of original port numbers according to preset at least two port number screening policy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by a target account on the first terminal, including:
determining port properties corresponding to the plurality of original port numbers respectively, and determining the original port numbers of which the port properties meet the port property screening conditions;
screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers meeting the port property screening conditions;
and screening candidate port numbers which are successfully connected with the first application from the plurality of original port numbers according to the historical port screening conditions.
8. The method of claim 7, wherein determining the original port number for which the port property satisfies the port property screening condition comprises:
respectively screening out the original port number belonging to the recognized port and the original port number belonging to the registered port from the plurality of original port numbers;
and screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers meeting the port property screening conditions, wherein the screening comprises the following steps:
screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers belonging to the recognized ports;
and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
9. The method according to any one of claims 1 to 8, wherein said sending the plurality of connection combinations to the second terminal via the internet comprises:
when the first terminal is connected with a signaling server through the Internet, the plurality of connection combinations are sent to the signaling server through a first signaling channel between the first terminal and the signaling server;
And when the signaling server is connected with a second terminal through the Internet, the multiple connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal.
10. The method according to claim 9, wherein said obtaining at least two original internet protocol addresses of the first terminal comprises:
responding to a data migration request triggered by a first application logged in on the first terminal by a target account number, and acquiring at least two original Internet protocol addresses of the first terminal;
the method further comprises the steps of:
and acquiring application data corresponding to the first application, and migrating the application data to the second application through a data transmission channel indicated by the connection successfully established with the second terminal.
11. A method of network connection, the method comprising:
receiving a plurality of connection combinations sent to a second terminal by a first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
Requesting, by a second application on the second terminal that logs in with the target account, to establish a connection with the first application in a local area network based on the plurality of connection combinations, respectively;
and reserving any connection successfully established with the first terminal.
12. The method of claim 11, wherein the method further comprises:
acquiring a target internet protocol address of the second terminal, and transmitting the target internet protocol address to the first terminal through the internet;
wherein one of the at least two address screening policy conditions is a match screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
13. A local area network connection device, the device comprising:
an address acquisition module, configured to acquire at least two original internet protocol addresses of a first terminal;
the screening module is used for screening the at least two original internet protocol addresses according to preset at least two address screening strategy conditions to obtain at least one candidate internet protocol address;
The port number acquisition module is used for acquiring a plurality of candidate port numbers corresponding to a first application logged in by a target account on the first terminal;
a pairing module, configured to pair each of the plurality of candidate port numbers with each of the candidate internet protocol addresses, respectively, to obtain a plurality of connection combinations;
the connection module is used for sending the connection combinations to a second terminal through the Internet, and a second application on the second terminal logs in with the target account number; the plurality of connection combinations are used for indicating the second application to request to establish connection with the first application in a local area network respectively based on the plurality of connection combinations; and reserving any connection successfully established with the second terminal.
14. The apparatus of claim 13, wherein the at least two address screening policy conditions comprise at least one of a hop count screening condition or a match screening condition; the hop screening condition is a constraint condition for the hop corresponding to the candidate internet protocol address screened according to the hop screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address and the target internet protocol address screened according to the matching degree screening condition.
15. The apparatus of claim 14, wherein the screening module is further configured to obtain a number of hops corresponding to each of the plurality of original internet protocol addresses, and screen the at least two original internet protocol addresses based on each of the number of hops and the hop filtering condition to obtain a first screening result; acquiring a target internet protocol address of the second terminal through the internet, and determining the address matching degree between each of the plurality of original internet protocol addresses and the target internet protocol address respectively; screening the at least two original internet protocol addresses based on the address matching degree and the matching degree screening condition to obtain a second screening result; and combining the first screening result and the second screening result to obtain at least one candidate internet protocol address.
16. The apparatus of claim 15, wherein the address matching degree comprises a mask matching length; the screening module is further configured to determine, for each of the original internet protocol addresses, a plurality of original masks corresponding to the original internet protocol address to which the original mask corresponds; determining a plurality of target masks corresponding to the target internet protocol addresses; and carrying out bit-by-bit matching on the multiple original masks corresponding to each original internet protocol address and the multiple target masks to obtain mask matching lengths between the corresponding original internet protocol addresses and the target internet protocol addresses.
17. The apparatus of claim 15, wherein the at least two address screening policy conditions further comprise a historical address screening condition; the screening module is further configured to screen, according to the historical address screening condition, from the at least two original internet protocol addresses, a historical internet protocol that is successfully connected with the first application, so as to obtain a third screening result; and combining the first screening result, the second screening result and the third screening result to obtain at least one candidate internet protocol address.
18. The apparatus of claim 13, wherein the port number acquisition module is further configured to acquire a plurality of source port numbers corresponding to the first terminal; and screening the plurality of original port numbers according to preset at least two port number screening strategy conditions to obtain at least two candidate port numbers corresponding to a first application logged in by a target account number on the first terminal.
19. The apparatus of claim 18, wherein the at least two port number screening policy conditions comprise at least a port property screening condition and a historical port screening condition;
the port number obtaining module is further configured to determine port properties corresponding to the plurality of original port numbers, and determine an original port number whose port properties satisfy the port property screening condition; screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers meeting the port property screening conditions; and screening candidate port numbers which are successfully connected with the first application from the plurality of original port numbers according to the historical port screening conditions.
20. The apparatus of claim 19, wherein the port number acquisition module is further configured to screen a source port number belonging to a recognized port and a source port number belonging to a registered port from the plurality of source port numbers, respectively; screening at least one candidate port number corresponding to a first application logged in by a target account number on the first terminal from the original port numbers belonging to the recognized ports; and randomly selecting a preset number of original port numbers from the original port numbers belonging to the registration ports as candidate port numbers corresponding to the first application.
21. The apparatus according to any of claims 13 to 20, wherein the connection module is further configured to send the plurality of connection combinations to the signaling server through a first signaling path between the first terminal and the signaling server when the first terminal and the signaling server are connected through the internet; and when the signaling server is connected with a second terminal through the Internet, the multiple connection combinations are sent to the second terminal through the signaling server based on a second signaling channel between the signaling server and the second terminal.
22. The apparatus of claim 21, wherein the address acquisition module is further configured to acquire at least two original internet protocol addresses of the first terminal in response to a data migration request triggered by a first application logged on the first terminal with a target account number;
the apparatus further comprises:
and the migration module is used for acquiring application data corresponding to the first application and migrating the application data to the second application through a data transmission channel indicated by the connection successfully established with the second terminal.
23. A local area network connection device, the device comprising:
the receiving module is used for receiving a plurality of connection combinations sent to the second terminal by the first terminal through the Internet; the plurality of connection combinations are paired by one of a plurality of candidate port numbers and one of at least one candidate internet protocol address; the plurality of candidate port numbers correspond to a first application registered with a target account number on the first terminal; the at least one candidate internet protocol address is obtained by screening at least two original internet protocol addresses of the first terminal according to at least two preset address screening strategy conditions;
The request module is used for requesting to establish connection with the first application in a local area network based on the plurality of connection combinations through a second application logged in by the target account number on the second terminal; and reserving any connection successfully established with the first terminal.
24. The apparatus of claim 23, wherein the apparatus further comprises:
a sending module, configured to obtain a target internet protocol address of the second terminal, and send the target internet protocol address to the first terminal through the internet;
wherein one of the at least two address screening policy conditions is a match screening condition; the matching degree screening condition is a constraint condition for matching degree between the candidate internet protocol address screened according to the matching degree screening condition and the target internet protocol address.
25. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 12 when the computer program is executed.
26. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 12.
CN202310968065.4A 2023-08-03 2023-08-03 Local area network connection method, device, computer equipment and readable storage medium Active CN116708532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310968065.4A CN116708532B (en) 2023-08-03 2023-08-03 Local area network connection method, device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310968065.4A CN116708532B (en) 2023-08-03 2023-08-03 Local area network connection method, device, computer equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN116708532A CN116708532A (en) 2023-09-05
CN116708532B true CN116708532B (en) 2023-10-20

Family

ID=87826102

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310968065.4A Active CN116708532B (en) 2023-08-03 2023-08-03 Local area network connection method, device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN116708532B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016180220A1 (en) * 2015-08-27 2016-11-17 中兴通讯股份有限公司 Conversation setup method and apparatus
CN109474646A (en) * 2017-09-07 2019-03-15 腾讯科技(深圳)有限公司 Communication connecting method, device, system and storage medium
CN113315808A (en) * 2021-04-21 2021-08-27 深圳市捷视飞通科技股份有限公司 Network address matching method and device, computer equipment and storage medium
CN113810451A (en) * 2020-08-26 2021-12-17 荣耀终端有限公司 Method and device for establishing point-to-point link, server and terminal equipment
CN114900848A (en) * 2022-05-07 2022-08-12 深圳绿米联创科技有限公司 Device communication processing method, device, electronic device, system and storage medium
CN115686542A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Application installation method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102080828B1 (en) * 2013-10-14 2020-02-24 삼성전자주식회사 Method and apparatus for selective source ip address configuration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016180220A1 (en) * 2015-08-27 2016-11-17 中兴通讯股份有限公司 Conversation setup method and apparatus
CN109474646A (en) * 2017-09-07 2019-03-15 腾讯科技(深圳)有限公司 Communication connecting method, device, system and storage medium
CN113810451A (en) * 2020-08-26 2021-12-17 荣耀终端有限公司 Method and device for establishing point-to-point link, server and terminal equipment
CN113315808A (en) * 2021-04-21 2021-08-27 深圳市捷视飞通科技股份有限公司 Network address matching method and device, computer equipment and storage medium
CN115686542A (en) * 2021-07-29 2023-02-03 腾讯科技(深圳)有限公司 Application installation method, device, equipment and storage medium
CN114900848A (en) * 2022-05-07 2022-08-12 深圳绿米联创科技有限公司 Device communication processing method, device, electronic device, system and storage medium

Also Published As

Publication number Publication date
CN116708532A (en) 2023-09-05

Similar Documents

Publication Publication Date Title
CN106789526B (en) method and device for connecting multiple system networks
US20140112171A1 (en) Network system and method for improving routing capability
RU2464722C2 (en) Method, device and system for distribution of messages
CN112291366B (en) Data transmission method and device, storage medium and electronic equipment
CN113572864B (en) Data processing method, network element equipment and readable storage medium
US9537986B2 (en) Dynamic contact sharing in a mesh network
US10594584B2 (en) Network analysis and monitoring tool
CN115334586A (en) Data forwarding method and device, computer equipment and storage medium
CN117278628B (en) Data transmission method, device, system, computer equipment and storage medium
CN116708532B (en) Local area network connection method, device, computer equipment and readable storage medium
US10009265B2 (en) Communication control apparatus, communication control method, communication system, and recording medium
CN114401502B (en) Configuration method, configuration device, electronic equipment and storage medium
CN116055403A (en) Message data transmission method, device and server
Ahmad et al. IoT: Architecture, challenges, and solutions using fog network and application classification
US20140136647A1 (en) Router and operating method thereof
CN115603938A (en) Attack protection method, terminal device and computer readable storage medium
CN111315037B (en) Communication link establishing method and device, computer equipment and storage medium
US20210329087A1 (en) Distributed flow processing and flow cache
CN108848156B (en) Access gateway processing method, device and storage medium
CN114422581A (en) Service creation method, service creation apparatus, computer device, and storage medium
JP2007221522A (en) Polling device, terminal device, polling method and program
JP2004258747A (en) Connection destination peer selecting device and method
CN109451047A (en) Data transferring method, device, equipment and the storage medium of monitoring warning system
CN113993184B (en) Network selection method, network access method and related node equipment
CN110191454B (en) Method for realizing capacity expansion of number of access devices at Zigbee coordinator end

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
GR01 Patent grant
GR01 Patent grant