CN112153754B - Point-to-point connection method and device, electronic equipment and storage medium - Google Patents

Point-to-point connection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112153754B
CN112153754B CN202011030740.1A CN202011030740A CN112153754B CN 112153754 B CN112153754 B CN 112153754B CN 202011030740 A CN202011030740 A CN 202011030740A CN 112153754 B CN112153754 B CN 112153754B
Authority
CN
China
Prior art keywords
point
connection
terminal equipment
service
scanning
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
CN202011030740.1A
Other languages
Chinese (zh)
Other versions
CN112153754A (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.)
Apollo Zhilian Beijing Technology Co Ltd
Original Assignee
Apollo Zhilian Beijing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Apollo Zhilian Beijing Technology Co Ltd filed Critical Apollo Zhilian Beijing Technology Co Ltd
Priority to CN202011030740.1A priority Critical patent/CN112153754B/en
Publication of CN112153754A publication Critical patent/CN112153754A/en
Priority to KR1020210038046A priority patent/KR102491467B1/en
Priority to JP2021094947A priority patent/JP7299268B2/en
Application granted granted Critical
Publication of CN112153754B publication Critical patent/CN112153754B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals

Abstract

The application discloses a point-to-point connection method, a point-to-point connection device, electronic equipment and a storage medium, and relates to the technical field of wireless connection. The specific implementation scheme is as follows: starting service scanning and corresponding point scanning; responding to that service terminal equipment is scanned in a service scanning mode at first, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing identification information of the service terminal equipment; and responding to the fact that the corresponding point equipment object list is scanned in a corresponding point scanning mode, and initiating point-to-point connection to the equipment under the condition that the equipment matched with the identification information of the service terminal equipment exists in the corresponding point equipment object list. The method and the device can improve the efficiency of establishing the point-to-point connection.

Description

Point-to-point connection method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of networks, in particular to the technical field of wireless connection.
Background
The wireless internet access (Wi-Fi) Point-to-Point (P2P, point-to-Point) technology has the characteristics of higher flexibility, longer range, larger transmission capacity and the like, and is more and more emphasized, so that an efficient, stable and accurate connection scheme is particularly important. The Wi-Fi P2P technology can be applied to connection between intelligent devices carrying android (android) systems.
Existing Wi-Fi P2P generally has two connection modes.
The first is service scanning (discovery services), i.e. a way to scan local services. First, two terminals are divided into a server side and a client side, and the two sides have a specific name in agreement. The service end opens Wi-Fi P2P connection and creates a local service through the name, the client starts scanning the local service, in the found service, whether the service end needs to be connected or not is judged by matching the specific name, and then connection is established.
The second is corresponding point scanning (discover peers), i.e., a manner of scanning corresponding points. Firstly, dividing two terminals into a server and a client, and opening a Wi-Fi P2P connection by the server. The client scans corresponding points (Peers) and can find a device list of the Wi-Fi P2P opened at the periphery. Then, the devices in the device list can be traversed for connection, and finally, the target server device is found.
The first method is inefficient, and may not search for the designated device for a long time; the second approach has the disadvantage of requiring a search of all devices with open Wi-Fi P2P connections on the perimeter, and then polling to determine which device is the target server device and establish the connection, which is also inefficient.
Disclosure of Invention
The application provides a point-to-point connection method, a point-to-point connection device, an electronic device and a storage medium.
According to an aspect of the present application, there is provided a point-to-point connection method, including:
starting service scanning and corresponding point scanning;
responding to that service terminal equipment is scanned in a service scanning mode at first, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing identification information of the service terminal equipment;
and responding to the fact that the corresponding point equipment object list is scanned in a corresponding point scanning mode, and initiating point-to-point connection to the equipment under the condition that the equipment matched with the identification information of the service terminal equipment exists in the corresponding point equipment object list.
According to another aspect of the present application, there is provided another point-to-point connection method, including:
initiating a listening for a service scan and a listening for a corresponding point scan;
and feeding back a connection success message to the client terminal equipment which sends the connection request message in response to the connection request message being monitored by adopting a monitoring mode aiming at service scanning or a monitoring mode aiming at corresponding point scanning.
According to another aspect of the present application, there is provided a point-to-point connection apparatus including:
the simultaneous scanning module is used for starting service scanning and corresponding point scanning;
the first connection module is used for responding to the fact that the service terminal equipment is scanned in a service scanning mode at first, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing the identification information of the service terminal equipment;
and the second connection module is used for responding to the fact that the corresponding point equipment object list is scanned in a corresponding point scanning mode, and initiating point-to-point connection to the equipment under the condition that the equipment matched with the identification information of the service terminal equipment exists in the corresponding point equipment object list.
According to another aspect of the present application, there is provided a point-to-point connection apparatus including:
the monitoring module is used for starting monitoring aiming at service scanning and monitoring aiming at corresponding point scanning;
and the connection establishing module is used for responding to the connection request message monitored by adopting a monitoring mode aiming at service scanning or a monitoring mode aiming at corresponding point scanning and feeding back a connection success message to the client terminal equipment sending the connection request message.
According to another aspect of the present application, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described above.
According to another aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method as described above.
According to another aspect of the application, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method as described above.
In the embodiment of the application, the client terminal equipment in point-to-point connection simultaneously starts service scanning and corresponding point scanning, establishes connection with the service terminal equipment under the condition that the service terminal equipment is firstly scanned in a service scanning mode, and stores the identification information of the service terminal equipment; under the condition that a corresponding point device object list is scanned in a corresponding point scanning mode, a device matched with the pre-stored identification information of the service terminal device is found from the list, namely the device can be determined as a target device, and connection is established with the device. Therefore, the method not only avoids the situation that the designated equipment cannot be searched for a long time due to the fact that service scanning (discovery services) is adopted for each connection, but also avoids polling of each scanned equipment in a corresponding point scanning (discovery peers) mode, and therefore the efficiency of establishing the Wi-Fi P2P connection can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be considered limiting of the present application. Wherein:
fig. 1 is a flowchart of an implementation of a peer-to-peer connection method according to an embodiment of the present application;
fig. 2 is a flowchart of a peer-to-peer connection establishment procedure according to an embodiment of the present application;
FIG. 3 is a flow chart of another implementation of a peer-to-peer connection method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a point-to-point connection apparatus 400 according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a point-to-point connection apparatus 500 according to an embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing a peer-to-peer connection method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The embodiment of the application provides a point-to-point connection method which can be applied to client terminal equipment in point-to-point connection. Fig. 1 is a flowchart of an implementation of a peer-to-peer connection method according to an embodiment of the present application, including:
step S101: initiating service scans (discovery services) and corresponding point scans (discovery peers);
step S102: responding to that service terminal equipment is scanned in a service scanning mode at first, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing identification information of the service terminal equipment;
step S103: and in response to the fact that the corresponding point device object list is scanned in a corresponding point scanning mode firstly, initiating point-to-point connection to the device under the condition that the device matched with the identification information of the service terminal device exists in the corresponding point device object list.
Optionally, before performing step S101, first, one of the two android devices supporting Wi-Fi P2P connection is used as a service terminal device, and a service Application (APP) is installed on the service terminal device; and the other one is used as a client terminal device, and a client APP is installed on the client terminal device.
And opening the service end APP, wherein the service end APP can initialize the Wi-Fi P2P of the service terminal equipment. And (4) opening the client APP, and simultaneously starting the discovery services and discovery peers scanning modes of the client terminal equipment by the client APP, and scanning by adopting the two scanning modes, namely executing the step S101.
Before the connection is established, the client terminal device and the service terminal device agree in advance on a name, such as an instance name (InstanceName).
Optionally, in the above-mentioned step S102, if the client terminal device scans the Service terminal device (Service device) first, at this time, an InstanceName name can be obtained, and a Wi-Fi P2P device (wifiP 2 PDevice) object is obtained. If the instanceName is a well-agreed name and is not in the process of connecting at this time, the connection to the device is initiated. After the Wi-Fi P2P connection is established between the client terminal device and the service terminal device, the identification information of the service terminal device, such as unique identification address information (devicedaddress), is stored in the client terminal device.
That is, optionally, in the step S102, in the case that the instance name of the service terminal device is consistent with the pre-agreed name, initiating the peer-to-peer connection to the service terminal device includes:
sending a connection request message to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with the pre-agreed name and the service terminal equipment is not in the connection process;
a connection success message is received from the service terminal device.
Optionally, in the case described in step S103, if the wifi 2PDevice object is obtained by discoverPeers scanning, the group of devices is traversed, and if a certain device is not in the connection process with the unique identification address information (deviceAddress) stored in the above step, the connection to the certain device is initiated.
That is, optionally, in the step S103, in the case that there is a device matching the identification information of the service terminal device in the corresponding point device object list, initiating the peer-to-peer connection to the device includes:
sending a connection request message to the equipment under the condition that the equipment matched with the identification information of the service terminal equipment exists in the corresponding point equipment object list and is not in a connection process;
a connection success message is received from the device.
In some embodiments, the service terminal device simultaneously starts monitoring for service scans (discovery services) and monitoring for corresponding point scans (discovery peers), and waits for the client terminal device to adopt one of the scanning modes to monitor a connection request message sent by the client terminal device, so as to establish a connection with the client terminal device.
Fig. 2 is a flowchart of a peer-to-peer connection establishment procedure according to an embodiment of the present application, including the following steps:
the client terminal equipment starts the client side APP, and the service terminal equipment starts the server side APP. The client terminal device is an android device provided with a client APP, and the service terminal device is an android device provided with a server APP. The client terminal equipment and the service terminal equipment respectively start respective APP, and the starting time of the client terminal equipment and the starting time of the service terminal equipment are not limited by the sequence.
And the APP of the server opens the Wi-Fi P2P connection of the service terminal equipment, and the server is established. The method comprises the steps that the client terminal equipment starts service scanning (discover services) and corresponding point scanning (discover peers), and the discover services mode and the discover peers mode are adopted for simultaneous scanning. And the service terminal equipment starts monitoring the two scanning modes. The execution actions of the service terminal device and the client terminal device are respectively carried out at two ends, and the execution time of the service terminal device and the execution time of the client terminal device are not limited by the sequence.
If the local service equipment is monitored by adopting a discover services mode, the client terminal equipment judges whether the name of the equipment is consistent with a pre-stored instance name (InstanceName) and the equipment is not in the connection process, and if the name is consistent and the equipment is not in the connection process, the client terminal equipment initiates connection to the service terminal equipment. The service terminal device monitors the connection request by adopting a monitoring mode corresponding to the discovery services, and receives the connection request. The client terminal device receives the callback function which is successfully connected, the unique identification address information (deviceAddress) of the service terminal device is cached locally, and the whole connection process is finished.
If a discover Peers mode is adopted to scan to obtain a device object list of corresponding points (Peers), searching a device consistent with cached unique identification address information (deviceAddress) from the list, and if the device consistent with the address information is found and the device is not in a connection process, indicating that the device is a service terminal device to be finally found, so that the client terminal device initiates connection to the service terminal device. The service terminal device adopts a monitoring mode corresponding to discover peers to monitor the connection request, receives the connection request, and feeds back the connection request to the client terminal device, so that the whole connection process is finished.
Therefore, if the client terminal device scans the service terminal device by adopting a discovery services scanning mode, and establishes Wi-Fi P2P connection with the service terminal device; then, when the Wi-Fi P2P connection is established again in the following, in the case that the Peers object list is obtained by scanning in a discover Peers manner, a device with the same deviceAddress address as the device stored before may be searched in the list, and the Wi-Fi P2P connection is initiated to the device without polling each device in the list, so that the efficiency of establishing the P2P connection can be improved.
The embodiment of the present application further provides a peer-to-peer connection method, which may be applied to a service terminal device in peer-to-peer connection, where fig. 3 is a flowchart of another implementation of the peer-to-peer connection method in the embodiment of the present application, and includes:
step S301: initiating a listening for a service scan and a listening for a corresponding point scan;
step S302: and feeding back a connection success message to the client terminal equipment sending the connection request message in response to the connection request message being monitored by adopting a monitoring mode aiming at service scanning or a monitoring mode aiming at corresponding point scanning.
Therefore, after the Wi-Fi P2P connection function is opened, the service terminal device can monitor the corresponding two scanning modes at the same time, and the connection request of the client terminal device can be monitored no matter the client terminal device selects the discover services scanning mode or the discover peers scanning mode.
The embodiment of the application also provides a point-to-point connection device, which can be a client terminal device of point-to-point connection. Fig. 4 is a schematic structural diagram of a peer-to-peer connection device 400 according to an embodiment of the present application, including:
a simultaneous scanning module 401, configured to start service scanning and corresponding point scanning;
a first connection module 402, configured to respond to that a service terminal device is scanned in a service scanning manner first, initiate a point-to-point connection to the service terminal device and store identification information of the service terminal device when an instance name of the service terminal device is consistent with a pre-agreed name;
a second connection module 403, configured to respond to that the corresponding point device object list is scanned in a corresponding point scanning manner first, and initiate a peer-to-peer connection to the device when a device that matches the identification information of the service terminal device exists in the corresponding point device object list.
Optionally, the pre-agreed name includes: the client terminal equipment and the service terminal equipment of the point-to-point connection have pre-agreed names.
Optionally, the first connection module 402 is configured to:
sending a connection request message to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with the pre-agreed name and the service terminal equipment is not in the connection process; a connection success message is received from the service terminal device.
Optionally, the second connection module 403 is configured to:
sending a connection request message to the equipment under the condition that the equipment matched with the identification information of the service terminal equipment exists in the corresponding point equipment object list and the equipment is not in a connection process; a connection success message is received from the device.
The functions of the modules in the apparatuses in the embodiment of the present application may refer to the corresponding descriptions in the method 100, and are not described herein again.
The embodiment of the application also provides another point-to-point connection device, and the device can be a service terminal device of point-to-point connection. Fig. 5 is a schematic structural diagram of a point-to-point connection apparatus 500 according to an embodiment of the present application, including:
a monitoring module 501, configured to start monitoring for service scanning and monitoring for corresponding point scanning;
a connection establishing module 502, configured to, in response to monitoring the connection request message in a monitoring manner for service scanning or a monitoring manner for corresponding point scanning, feed back a connection success message to the client terminal device that sent the connection request message.
The functions of the modules in the apparatuses in the embodiment of the present application may refer to the corresponding description in the method 300, and are not described herein again.
It should be noted that the service terminal device and the client terminal device are only one functional division. The same android device is a client terminal device under the condition that a client APP is installed; under the condition that the APP is installed on the server side, the android device is the service terminal device. Therefore, the same intelligent device carrying the android system can be a client terminal device and a service terminal device.
According to embodiments of the present application, an electronic device, a readable storage medium, and a computer program product are also provided.
Fig. 6 is a block diagram of an electronic device according to the peer-to-peer connection method of the embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic devices may also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, if desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the peer-to-peer connection method provided herein. The non-transitory computer readable storage medium of the present application stores computer instructions for causing a computer to perform the peer-to-peer connection method provided herein.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the peer-to-peer connection method in the embodiments of the present application (for example, the simultaneous scanning module 401, the first connection module 402, and the second connection module 403 shown in fig. 4, or the simultaneous listening module 501 and the connection establishment module 502 shown in fig. 5). The processor 601 executes various functional applications of the server and data processing by executing non-transitory software programs, instructions and modules stored in the memory 602, that is, implementing the point-to-point connection method in the above method embodiments.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the electronic devices of the point-to-point connection, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 may optionally include memory located remotely from the processor 601, which may be connected to a point-to-point connected electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method of peer-to-peer connection may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of a point-to-point connected electronic device, such as a touch screen, keypad, mouse, track pad, touch pad, pointer stick, one or more mouse buttons, track ball, joystick or other input device. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) service.
It should be understood that various forms of the flows shown above, reordering, adding or deleting steps, may be used. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A point-to-point connection method, comprising:
starting service scanning and corresponding point scanning;
responding to that service terminal equipment is firstly scanned in a service scanning mode, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing identification information of the service terminal equipment;
and in response to the first scanning of the corresponding point device object list in the corresponding point scanning mode, sending a connection request message to the device and receiving a connection success message from the device under the condition that the device matched with the identification information of the service terminal device exists in the corresponding point device object list and is not in a connection process.
2. The method of claim 1, wherein the pre-agreed name comprises: the client terminal equipment and the service terminal equipment of the point-to-point connection have pre-agreed names.
3. The method according to claim 1 or 2, wherein the initiating a peer-to-peer connection to the service terminal device in case the instance name of the service terminal device is consistent with a pre-agreed name comprises:
sending a connection request message to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name and the service terminal equipment is not in a connection process;
and receiving a connection success message from the service terminal equipment.
4. A point-to-point connection method, comprising:
initiating a listening for a service scan and a listening for a corresponding point scan;
responding to the monitoring of the corresponding connection request message by adopting the monitoring mode aiming at the service scanning, and establishing point-to-point connection with the client terminal equipment according to the monitoring of the corresponding connection request message aiming at the service scanning so that the client terminal equipment receives and stores the identification information of the equipment;
responding to the monitoring mode aiming at the corresponding point scanning to monitor the corresponding connection request message, and feeding back a connection success message to the client terminal equipment, wherein the monitoring mode aiming at the corresponding point scanning to monitor the corresponding connection request message is sent when the client terminal equipment is matched with the equipment according to the identification information and the equipment is determined not to be in the connection process.
5. A point-to-point connection device comprising:
the simultaneous scanning module is used for starting service scanning and corresponding point scanning;
the first connection module is used for responding to that service terminal equipment is firstly scanned in a service scanning mode, initiating point-to-point connection to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name, and storing the identification information of the service terminal equipment;
a second connection module, configured to send a connection request message to the device and receive a connection success message from the device in response to that a corresponding point device object list is first scanned in a corresponding point scanning manner, where a device that matches the identification information of the service terminal device exists in the corresponding point device object list and the device is not in a connection process.
6. The apparatus of claim 5, wherein the pre-agreed name comprises: the client terminal device and the service terminal device which are connected in a point-to-point manner have pre-appointed names.
7. The apparatus of claim 5 or 6, wherein the first connection module is to:
sending a connection request message to the service terminal equipment under the condition that the instance name of the service terminal equipment is consistent with a pre-agreed name and the service terminal equipment is not in a connection process; and receiving a connection success message from the service terminal equipment.
8. A point-to-point connection device comprising:
the monitoring module is used for starting monitoring aiming at service scanning and monitoring aiming at corresponding point scanning;
a connection establishing module, configured to respond to the monitoring mode for service scanning that monitors the corresponding connection request message, and establish a point-to-point connection with the client terminal device according to the monitoring mode for service scanning that monitors the corresponding connection request message, so that the client terminal device receives and stores the identification information of the apparatus; responding to the monitoring mode aiming at the corresponding point scanning to monitor the corresponding connection request message, and feeding back a connection success message to the client terminal equipment, wherein the monitoring mode aiming at the corresponding point scanning to monitor the corresponding connection request message is sent when the client terminal equipment is matched with the device according to the identification information and the device is determined not to be in the connection process.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202011030740.1A 2020-09-27 2020-09-27 Point-to-point connection method and device, electronic equipment and storage medium Active CN112153754B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202011030740.1A CN112153754B (en) 2020-09-27 2020-09-27 Point-to-point connection method and device, electronic equipment and storage medium
KR1020210038046A KR102491467B1 (en) 2020-09-27 2021-03-24 Point to point connection method, apparatus, electronic device, storage medium and computer program
JP2021094947A JP7299268B2 (en) 2020-09-27 2021-06-07 PEER-TO-PEER CONNECTION METHOD, APPARATUS, ELECTRONIC DEVICE, STORAGE MEDIUM, AND PROGRAM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011030740.1A CN112153754B (en) 2020-09-27 2020-09-27 Point-to-point connection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112153754A CN112153754A (en) 2020-12-29
CN112153754B true CN112153754B (en) 2023-02-17

Family

ID=73894273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011030740.1A Active CN112153754B (en) 2020-09-27 2020-09-27 Point-to-point connection method and device, electronic equipment and storage medium

Country Status (3)

Country Link
JP (1) JP7299268B2 (en)
KR (1) KR102491467B1 (en)
CN (1) CN112153754B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924806B (en) * 2022-04-07 2024-03-26 南京慧尔视软件科技有限公司 Dynamic synchronization method, device, equipment and medium for configuration information

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486816A (en) * 2014-12-08 2015-04-01 电子科技大学 Quick automatic scanning method of Wifi (Wireless Fidelity) terminal equipment in multiple access points
CN106535301A (en) * 2016-12-30 2017-03-22 珠海赛纳打印科技股份有限公司 Method, device and system for establishing communication connection
CN103813473B (en) * 2014-01-17 2017-08-25 深圳市金立通信设备有限公司 A kind of communication means, terminal and system
CN111372326A (en) * 2020-03-13 2020-07-03 华为技术有限公司 Method and mobile device for establishing point-to-point wireless connection
CN111372325A (en) * 2020-02-21 2020-07-03 华为技术有限公司 Method and device for establishing Wi-Fi point-to-point connection

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013169974A1 (en) * 2012-05-11 2013-11-14 Interdigital Patent Holdings, Inc. Context-aware peer-to-peer communication
US9173161B2 (en) * 2013-03-06 2015-10-27 Qualcomm Incorporated Peer-to-peer pre-association discovery operations
KR20160053594A (en) * 2014-11-05 2016-05-13 삼성전자주식회사 Method for connecting to device and apparatus supporting wi-fi direct for performing the same
US10098168B2 (en) * 2014-12-08 2018-10-09 Apple Inc. Neighbor awareness networking datapath
JP2017085376A (en) * 2015-10-28 2017-05-18 キヤノン株式会社 Communication device, control method thereof, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103813473B (en) * 2014-01-17 2017-08-25 深圳市金立通信设备有限公司 A kind of communication means, terminal and system
CN104486816A (en) * 2014-12-08 2015-04-01 电子科技大学 Quick automatic scanning method of Wifi (Wireless Fidelity) terminal equipment in multiple access points
CN106535301A (en) * 2016-12-30 2017-03-22 珠海赛纳打印科技股份有限公司 Method, device and system for establishing communication connection
CN111372325A (en) * 2020-02-21 2020-07-03 华为技术有限公司 Method and device for establishing Wi-Fi point-to-point connection
CN111372326A (en) * 2020-03-13 2020-07-03 华为技术有限公司 Method and mobile device for establishing point-to-point wireless connection

Also Published As

Publication number Publication date
KR20210040314A (en) 2021-04-13
JP7299268B2 (en) 2023-06-27
CN112153754A (en) 2020-12-29
JP2021141609A (en) 2021-09-16
KR102491467B1 (en) 2023-01-26

Similar Documents

Publication Publication Date Title
KR102555806B1 (en) Method, apparatus, device and storage medium for establishing wireless connection
CN110032512B (en) Debugging method of small program, related equipment and terminal
EP3813339B1 (en) Acquisition method, apparatus, device and storage medium for applet data
CN111414208B (en) Application program starting method, device and equipment
CN111934840A (en) Communication method of client and server, gateway, electronic equipment and storage medium
CN111277647A (en) Block chain network member management method, device, equipment and medium
CN112433788A (en) Applet running method and device, electronic equipment and storage medium
EP3816802A2 (en) Method and device for processing mini program data
CN112153754B (en) Point-to-point connection method and device, electronic equipment and storage medium
CN111615171B (en) Access method and device of wireless local area network
CN111770176B (en) Traffic scheduling method and device
CN112069137A (en) Method and device for generating information, electronic equipment and computer readable storage medium
CN109768918B (en) Method and apparatus for implementing instant messaging
CN111966502A (en) Method and device for adjusting number of instances, electronic equipment and readable storage medium
CN113726881B (en) Communication connection establishment method, related device and computer readable storage medium
CN112752323B (en) Method and device for changing hot spot access state
WO2022142716A1 (en) Information processing method and apparatus regarding wireless hotspot
CN111432011B (en) Block chain network communication method and equipment
CN113630298A (en) Intelligent control system, method and device
CN112118576B (en) Method and apparatus for networking over wireless hotspots
CN110764932A (en) Data processing method, system, medium and computing device
CN113079188B (en) Client identification processing method, device, terminal, server, system and medium
CN114401300B (en) Cloud application control method, device, equipment, medium and program product
US20230408621A1 (en) Aod acquisition method and apparatus, and communication device
CN111835857B (en) Method and apparatus for accessing data

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
TA01 Transfer of patent application right

Effective date of registration: 20211013

Address after: 100176 Room 101, 1st floor, building 1, yard 7, Ruihe West 2nd Road, economic and Technological Development Zone, Daxing District, Beijing

Applicant after: Apollo Zhilian (Beijing) Technology Co.,Ltd.

Address before: 2 / F, baidu building, 10 Shangdi 10th Street, Haidian District, Beijing 100085

Applicant before: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant