CN107659919B - Communication connection method and electronic equipment - Google Patents

Communication connection method and electronic equipment Download PDF

Info

Publication number
CN107659919B
CN107659919B CN201710748464.4A CN201710748464A CN107659919B CN 107659919 B CN107659919 B CN 107659919B CN 201710748464 A CN201710748464 A CN 201710748464A CN 107659919 B CN107659919 B CN 107659919B
Authority
CN
China
Prior art keywords
electronic device
electronic equipment
short
range communication
target
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
CN201710748464.4A
Other languages
Chinese (zh)
Other versions
CN107659919A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201710748464.4A priority Critical patent/CN107659919B/en
Publication of CN107659919A publication Critical patent/CN107659919A/en
Application granted granted Critical
Publication of CN107659919B publication Critical patent/CN107659919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/021Services related to particular areas, e.g. point of interest [POI] services, venue services or geofences
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72484User interfaces specially adapted for cordless or mobile telephones wherein functions are triggered by incoming communication events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • H04M1/72502Cordless telephones with one base station connected to a single line
    • H04M1/72505Radio link set-up procedures
    • H04M1/72511Searching for available channels
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/005Discovery of network devices, e.g. terminals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a communication connection method and electronic equipment, comprising the following steps: detecting to obtain at least one second electronic device; the second electronic equipment supports discovery and has the short-range communication function; determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device; controlling itself to be in a state of supporting a discovery based on the short-range communication function; and establishing connection with the target electronic equipment based on the short-range communication function.

Description

Communication connection method and electronic equipment
Technical Field
The present invention relates to communications technologies, and in particular, to a communication connection method and an electronic device.
Background
In the related art, before two electronic devices communicate with each other, the two electronic devices are usually required to be communicatively connected. Taking two electronic devices with bluetooth communication functions as an example, before performing bluetooth communication, two electronic devices need to perform bluetooth communication connection, one of the electronic devices is a master device, the other electronic device is a slave device, and the specific connection process is as follows: after the master device starts the Bluetooth function, the slave device is searched; after the slave equipment to be subjected to Bluetooth communication is found, the equipment name corresponding to the electronic slave equipment and the PIN code of the slave equipment are input on the display screen of the master equipment, so that communication connection between the master equipment and the slave equipment is realized.
It can be seen that, in the related art, in the bluetooth communication connection process between two electronic devices, a master device user needs to manually start the bluetooth function and manually select a slave device, and the connection process is complex.
Disclosure of Invention
The embodiment of the invention provides a communication connection method and electronic equipment, which can simplify the communication connection process.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a communication connection method, which is applied to first electronic equipment with a short-range communication function and comprises the following steps:
detecting to obtain at least one second electronic device; the second electronic equipment supports discovery and has the short-range communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
controlling itself to be in a state of supporting a discovery based on the short-range communication function;
and establishing connection with the target electronic equipment based on the short-range communication function.
In the foregoing solution, before the detecting obtains at least one second electronic device, the method further includes:
detecting that at least one of the following detection conditions is satisfied:
the first electronic equipment is in a preset motion state;
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
In the foregoing solution, the detecting that the first electronic device is in a preset motion state includes:
detecting an attitude change parameter of the first electronic device;
determining that the first electronic device is in a preset motion state based on the attitude change parameter.
In the foregoing solution, the determining, as the target electronic device, one second electronic device that meets a preset condition in the at least one second electronic device includes:
when the number of the second electronic equipment is one, determining that the second electronic equipment is the target electronic equipment;
when the number of the second electronic devices is multiple, detecting the signal intensity of the second electronic device, and determining the second electronic device with the maximum signal intensity value as the target electronic device;
or when the number of the second electronic devices is multiple, determining the second electronic device with the maximum number of connections between the second electronic device and each second electronic device based on the short-range communication function as the target electronic device.
In the foregoing solution, the establishing of the connection with the target electronic device based on the short-range communication function includes:
presenting an identification characterizing the target electronic device;
sending a connection request based on the short-range communication to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
In the above scheme, the method further comprises:
when at least one of the following closing conditions is detected to be met, disconnecting the target electronic equipment based on the short-range communication function:
the idle time between the target electronic equipment and the target electronic equipment exceeds a preset first time threshold;
the time for transmitting data between the target electronic equipment and the target electronic equipment based on the short-range communication function reaches a second time threshold;
and the data transmitted between the target electronic equipment and the target electronic equipment based on the short-range communication function meets the preset data type.
In the foregoing solution, the detecting to obtain at least one second electronic device includes:
detecting and obtaining at least one second electronic device by auxiliary equipment installed inside the first electronic device;
or the short-range communication function chip in the first electronic equipment detects and obtains at least one second electronic equipment;
or at least one second electronic device which is sent by a third electronic device outside the first electronic device is received.
An embodiment of the present invention further provides a first electronic device, including:
a processor for detecting at least one second electronic device; the second electronic equipment supports discovery and has a specific type of communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
controlling itself to be in a state of supporting a discovery based on the short-range communication function;
and the transceiver is used for establishing connection with the target electronic equipment based on the short-range communication function.
In the foregoing solution, the processor is further configured to detect that at least one of the following detection conditions is satisfied:
the first electronic equipment is in a preset motion state;
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
In the foregoing solution, the transceiver is specifically configured to present an identifier representing the target electronic device;
sending a communication connection request based on the specific type to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
In the embodiment of the invention, after the first electronic equipment determines the target electronic equipment, the first electronic equipment controls the first electronic equipment to be in a discovery state based on a short-range communication function; that is to say, after the first electronic device determines the target electronic device, the first electronic device automatically triggers itself to be in a discovery state, so that the intelligence of operation is improved, and the flow of short-range communication connection is simplified.
Drawings
Fig. 1 is a schematic view illustrating an alternative flow chart of a communication connection method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process of detecting and acquiring a second electronic device by a first electronic device according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a process of establishing a connection between a first target electronic device and a target electronic device according to an embodiment of the present invention;
fig. 4 is a schematic view illustrating an alternative flow of a communication connection method according to a second embodiment of the present invention;
FIG. 5 is a diagram illustrating a first electronic device in a preset shaking state according to an embodiment of the invention;
fig. 6 is a schematic view of an alternative flow chart of a communication connection method according to a third embodiment of the present invention;
fig. 7 is a schematic structural diagram of a fourth electronic device according to an embodiment of the invention.
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples.
Example one
Fig. 1 is a schematic flow chart illustrating an alternative communication connection method according to an embodiment of the present invention, which will be described according to various steps.
And step S101, detecting and obtaining at least one second electronic device.
Here, at least one second electronic device is detected and obtained by the first electronic device.
The first electronic equipment and the second electronic equipment are both electronic equipment with a short-range communication function; and the second electronic device is an electronic device supporting discovery, that is, other devices can discover the second electronic device by means of searching, detecting and the like.
In an example, the implementation process of the first electronic device detecting and obtaining at least one second electronic device is as follows:
detecting and obtaining at least one second electronic device by auxiliary equipment installed inside the first electronic device; for example, a second electronic device whose distance from the first electronic device satisfies a preset distance threshold is detected by a distance sensor installed inside the first electronic device.
In another example, the implementation process of the first electronic device detecting and obtaining at least one second electronic device is as follows:
detecting and obtaining at least one second electronic device by a short-range communication function chip arranged in the first electronic device; the short-range communication function chip referred to herein may be a bluetooth chip.
In another example, a schematic processing procedure diagram of a first electronic device detecting and obtaining at least one second electronic device, as shown in fig. 2, includes:
in step S101a, the first electronic device detects the existence of a third electronic device (e.g., a server) having a communication connection relationship with itself.
In step S101b, the first electronic device sends a request message to the third electronic device to request the third electronic device to detect a second electronic device whose distance from the first electronic device satisfies a preset distance.
Step S101c, after receiving the request message, the third electronic device detects and obtains at least one second electronic device.
In step S101d, the third electronic device sends the detection result to the first electronic device.
Step S102, determining, as a target electronic device, one second electronic device that meets a preset condition, among the at least one second electronic device.
Here, a second electronic device satisfying a preset condition is determined as a target electronic device by the first electronic device.
In a specific embodiment, when the second electronic device is one, the first electronic device determines that the second electronic device is the target electronic device.
In another specific embodiment, when the number of the second electronic devices is multiple, the first electronic device detects the signal strength of the second electronic device, and determines that the second electronic device with the largest signal strength value is the target electronic device.
In yet another embodiment, when there are a plurality of second electronic devices, the first electronic device queries the number of times of connection between itself and the plurality of second electronic devices based on the short-range communication function, and determines the second electronic device with the largest number of times of connection as the target electronic device. Here, after connecting with each second electronic device based on the short-range communication function, the first electronic device records the connection event in its own storage area, such as the starting time for establishing the connection, the content and size of the transmission data, and the like.
And step S103, controlling the self to be in a state of supporting the discovery based on the short-range communication function.
Here, the first electronic device controls itself to be in a state of supporting discovery based on the short-range communication function. Although the first electronic device has a short-range communication function, the short-range communication function of the first electronic device may be turned on or off as needed.
In a specific embodiment, the first electronic device controls to start a short-range communication function of the first electronic device, that is, the first electronic device controls the first electronic device to be in a state of supporting a discovery state based on the short-range communication function; that is, other external electronic devices can find the first electronic device by means of searching, searching and the like, and the first electronic device can be connected with the external electronic device based on the short-range communication function when the first electronic device meets the preset condition. The connection referred to herein may refer to a pairing process between two electronic devices during communication, that is, communication authentication between two electronic devices, and data transmission between two electronic devices can be performed after the communication authentication is passed.
And step S104, establishing the connection with the target electronic equipment based on the short-range communication function.
In a specific embodiment, a schematic processing procedure of establishing a connection between a first target electronic device and the target electronic device based on the short-range communication function is shown in fig. 3, and includes the following steps:
in step S104a, the first electronic device presents an identification characterizing the target electronic device.
Step S104b, the first electronic device sends a connection request based on the short-range communication to the target electronic device based on the identifier.
In step S104c, the first electronic device receives the connection request response sent by the target electronic device.
In an example, the first electronic device presenting the identifier representing the target electronic device in step S104a is implemented by presenting the identifier representing the target electronic device on a display unit of the first electronic device; or, when the first electronic device is a Virtual Reality (VR) device, presenting an identifier characterizing a target electronic device in space.
In an example, the first electronic device sends the connection request based on the short-range communication to the target electronic device based on the identifier in step S104b, where the user sends an instruction to the first electronic device by double-clicking or single-clicking the identifier, and the first electronic device sends the connection request based on the short-range communication to the target electronic device in response to the instruction sent by the user.
In step S104c, after the first electronic device receives the connection request response sent by the target electronic device, the connection between the first electronic device and the target electronic device is achieved.
It should be noted that the short-range communication function according to the embodiment of the present invention includes, but is not limited to, a bluetooth function.
Example two
Fig. 4 is a schematic diagram of an alternative flow of a communication connection method according to another embodiment of the present invention. The method of the second embodiment is similar to the method shown in fig. 1, and the difference is that before step S101, the method further includes:
in step S105, the first electronic device detects that at least one of the following detection conditions is satisfied.
Here, the detection conditions include: the first electronic device is in a preset motion state, a preset detection period is reached, and a potential event representing that short-range communication connection needs to be established occurs in the first electronic device.
In an example, a detection period for detecting the second electronic device may be preset, and a value of the detection period may be flexibly set as needed, such as set to 5 seconds, 1 minute, or 3 minutes, and the like.
In another example, in the history of establishing the short-range communication connection between the first electronic device and the second electronic device, if a first event occurs in the first electronic device, establishing the short-range communication connection with the second electronic device; then, if the first event occurs again in the first electronic device, it is considered that a potential event occurs in the first electronic device, which indicates that the short-range communication connection needs to be established.
In yet another example, it is determined that the first electronic device satisfies the detection condition when the first electronic device is in a preset motion state. In a specific embodiment, the implementation manner of determining that the first electronic device is in the preset motion state is as follows: detecting a posture change parameter of the first electronic equipment, and determining that the first electronic equipment is in a preset motion state based on the posture change parameter.
In practical implementation, the preset motion state may be a state in which the first electronic device is shaken, a state in which the first electronic device is thrown away, or the like; when the preset motion state is a state that the first electronic device shakes, correspondingly, the posture change parameter represents a speed change rate of the first electronic device in a first direction within a first time period, namely an acceleration of the first electronic device in a certain direction; when the acceleration of the first electronic device in a certain direction reaches a preset acceleration threshold, it is determined that the first electronic device is in a preset motion state, and the acceleration threshold can be set according to an actual situation. Or, correspondingly, the gesture change parameter represents the motion frequency of the first electronic device in the first time period, taking the motion of the first electronic device as shaking as an example, and the motion frequency of the first electronic device is shaking frequency; when the shaking frequency of the first electronic device reaches a preset frequency threshold, it is determined that the first electronic device is in a preset motion state, and the shaking frequency can be set according to an actual situation. It is detected that the first electronic device is in the preset shaking state as shown in fig. 5.
EXAMPLE III
Fig. 6 is a schematic view of an alternative flow of a communication connection method according to another embodiment of the present invention. The method of the third embodiment is similar to the method shown in fig. 1, and the difference is that after step S104, the method further includes:
and S106, disconnecting the target electronic equipment based on the short-range communication function.
In one embodiment, the first electronic device disconnects the connection with the target electronic device based on the short-range communication function when detecting that one of the following shutdown conditions is satisfied.
The shutdown conditions include:
1) the idle between the first electronic device and the target electronic device exceeds a preset first time threshold.
2) And the time for transmitting data between the first electronic equipment and the target electronic equipment based on the short-range communication function reaches a second time threshold.
3) And the data transmitted between the first electronic equipment and the target electronic equipment based on the short-range communication function meets the preset data type.
In a specific embodiment, the idle time between the first electronic device and the target electronic device exceeds a preset first time threshold, which means that the time for not transmitting data between the first electronic device and the target electronic device exceeds the preset first time threshold, or the time for transmitting invalid data between the first electronic device and the target electronic device exceeds the preset first time threshold. The invalid data may be heartbeat signaling transmitted between the first electronic device and the target electronic device for determining that a communication connection relationship exists between the first electronic device and the target electronic device, or data transmitted between the first electronic device and the target electronic device for characterizing an attribute thereof, such as: data characterizing device types, device storage spaces, and the like; of course, the invalid data may be other preset types of data.
In a specific embodiment, the data transmitted between the first electronic device and the target electronic device based on the short-range communication function satisfies a preset data type, where the preset data type is a type of invalid data transmitted between the first electronic device and the target electronic device based on the short-range communication function; wherein the invalid data includes: heartbeat signaling transmitted between the first electronic device and the target electronic device for determining that a communication connection relationship exists between the first electronic device and the target electronic device, or data transmitted between the first electronic device and the target electronic device for representing self attributes, such as: data characterizing device type, characterizing device storage space, etc.
Example four
Based on the communication connection method, the embodiment of the present invention further provides a first electronic device 700, where a structure of the first electronic device, as shown in fig. 7, includes a processor 701 and a transceiver 703; wherein the content of the first and second substances,
a processor 701, configured to detect and obtain at least one second electronic device; the second electronic equipment supports discovery and has a specific type of communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
and controlling the self to be in a state of supporting the discovery based on the short-range communication function.
A transceiver 703 for establishing a connection with the target electronic device based on the short-range communication function.
In a specific embodiment, the processor 701 is further configured to detect that at least one of the following detection conditions is satisfied:
the first electronic equipment is in a preset motion state;
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
In an embodiment, the processor 701 is specifically configured to detect an attitude change parameter of the first electronic device 700;
determining that the first electronic device is in a preset motion state based on the attitude change parameter.
In a specific embodiment, the processor 701 is specifically configured to determine that the second electronic device is a target electronic device when the second electronic device is one;
when the number of the second electronic devices is multiple, detecting the signal intensity of the second electronic device, and determining the second electronic device with the maximum signal intensity value as the target electronic device;
or when the number of the second electronic devices is multiple, determining that the second electronic device with the maximum number of connections based on the short-range communication function is the target electronic device.
In a specific embodiment, the transceiver 703 is specifically configured to present an identifier characterizing the target electronic device;
sending a connection request based on the short-range communication to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
In an embodiment, the processor 701 is specifically configured to disconnect the connection with the target electronic device based on the short-range communication function when detecting that at least one of the following shutdown conditions is satisfied:
the idle time between the target electronic equipment and the target electronic equipment exceeds a preset first time threshold;
the time for transmitting data between the target electronic equipment and the target electronic equipment based on the short-range communication function reaches a second time threshold;
and the data transmitted between the target electronic equipment and the target electronic equipment based on the short-range communication function meets the preset data type.
In one embodiment, the first electronic device 700 further comprises a memory 702 and a bus system 705 for coupling the components in the first electronic device, it being understood that the bus system 705 is used for enabling connection communication between these components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
It will be appreciated that the memory 702 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The memory 702 described in connection with the embodiments of the invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 702 in embodiments of the present invention is used to store various types of data to support the operation of the first electronic device. Examples of such data include: any computer programs for operating on the first electronic device, such as an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 may include various applications such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The Processor 701 may be a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 701 may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present invention. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed by the embodiment of the invention can be directly implemented by a hardware decoding processor, or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the memory 702, and the processor 701 may read the information in the memory 702 and perform the steps of the aforementioned methods in conjunction with its hardware.
In an exemplary embodiment, the first electronic Device 700 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic Devices (CPLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, Micro Controllers (MCUs), microprocessors (microprocessors), or other electronic components for performing the aforementioned methods.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
Accordingly, an embodiment of the present invention further provides a computer storage medium, on which a computer program is stored, where the computer program, when executed by a processor, performs:
detecting to obtain at least one second electronic device; the second electronic equipment supports discovery and has the short-range communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
controlling itself to be in a state of supporting a discovery based on the short-range communication function;
and establishing connection with the target electronic equipment based on the short-range communication function.
The computer program, when executed by the processor, further performs:
before the detection obtains at least one second electronic device, at least one of the following detection conditions is detected to be satisfied:
the first electronic equipment is in a preset motion state;
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
The computer program, when executed by the processor, further performs:
detecting an attitude change parameter of the first electronic device;
determining that the first electronic device is in a preset motion state based on the attitude change parameter.
The computer program, when executed by the processor, further performs:
when the number of the second electronic equipment is one, determining that the second electronic equipment is the target electronic equipment;
when the number of the second electronic devices is multiple, detecting the signal intensity of the second electronic device, and determining the second electronic device with the maximum signal intensity value as the target electronic device;
or when the number of the second electronic devices is multiple, determining that the second electronic device with the maximum number of connections based on the short-range communication function is the target electronic device.
The computer program, when executed by the processor, further performs:
presenting an identification characterizing the target electronic device;
sending a connection request based on the short-range communication to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
The computer program, when executed by the processor, further performs:
when at least one of the following closing conditions is detected to be met, disconnecting the target electronic equipment based on the short-range communication function:
the idle time between the target electronic equipment and the target electronic equipment exceeds a preset first time threshold;
the time for transmitting data between the target electronic equipment and the target electronic equipment based on the short-range communication function reaches a second time threshold;
and the data transmitted between the target electronic equipment and the target electronic equipment based on the short-range communication function meets the preset data type.
It should be noted that, according to the embodiment of the present invention, the first electronic device and the second electronic device may be implemented in various forms, for example, they may be a smart phone, a tablet computer, an earphone, a notebook computer, or a wearable device (such as smart glasses, a smart watch, and the like).
It should also be noted that the terms "first \ second \ are used for distinguishing similar objects, and do not represent a specific ordering for the objects, and it should be understood that" first \ second "may be interchanged with a specific order or sequence where permitted. It should be understood that "first \ second" distinct objects may be interchanged under appropriate circumstances such that embodiments of the invention described herein may be practiced in sequences other than those illustrated or described herein.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (9)

1. A communication connection method is applied to a first electronic device with a short-range communication function, and is characterized by comprising the following steps:
detecting that the first electronic equipment is in a preset motion state; wherein the detecting that the first electronic device is in a preset motion state includes: detecting an attitude change parameter of the first electronic device; determining that the first electronic device is in a preset motion state based on the attitude change parameter; wherein the gesture change parameter characterizes a rate of change of speed of the first electronic device in a first direction over a first time period, or the gesture change parameter characterizes a frequency of motion of the first electronic device over the first time period;
detecting to obtain at least one second electronic device; the second electronic equipment supports discovery and has the short-range communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
after the target electronic equipment is determined, controlling the target electronic equipment to be in a state of supporting the discovery based on the short-range communication function;
and establishing connection with the target electronic equipment based on the short-range communication function.
2. The method of claim 1, wherein before the detecting obtains at least one second electronic device, the method further comprises:
detecting that at least one of the following detection conditions is satisfied:
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
3. The method according to claim 1, wherein the determining, as the target electronic device, one of the at least one second electronic device that satisfies a preset condition includes:
when the number of the second electronic equipment is one, determining that the second electronic equipment is the target electronic equipment;
when the number of the second electronic devices is multiple, detecting the signal intensity of the second electronic device, and determining the second electronic device with the maximum signal intensity value as the target electronic device;
or when the number of the second electronic devices is multiple, determining that the second electronic device with the maximum number of connections based on the short-range communication function is the target electronic device.
4. The method according to claim 1, wherein the establishing of the connection with the target electronic device based on the short-range communication function comprises:
presenting an identification characterizing the target electronic device;
sending a connection request based on the short-range communication to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
5. The method of claim 1, further comprising:
when at least one of the following closing conditions is detected to be met, disconnecting the target electronic equipment based on the short-range communication function:
the idle time between the target electronic equipment and the target electronic equipment exceeds a preset first time threshold;
the time for transmitting data between the target electronic equipment and the target electronic equipment based on the short-range communication function reaches a second time threshold;
and the data transmitted between the target electronic equipment and the target electronic equipment based on the short-range communication function meets the preset data type.
6. The method of claim 1, wherein the detecting obtains at least one second electronic device, comprising:
detecting and obtaining at least one second electronic device by auxiliary equipment installed inside the first electronic device;
or the short-range communication function chip in the first electronic equipment detects and obtains at least one second electronic equipment;
or at least one second electronic device which is sent by a third electronic device outside the first electronic device is received.
7. A first electronic device, comprising:
the processor is used for detecting that the first electronic equipment is in a preset motion state; wherein the detecting that the first electronic device is in a preset motion state includes: detecting an attitude change parameter of the first electronic device; determining that the first electronic device is in a preset motion state based on the attitude change parameter; wherein the gesture change parameter characterizes a rate of change of speed of the first electronic device in a first direction over a first time period, or the gesture change parameter characterizes a frequency of motion of the first electronic device over the first time period;
detecting to obtain at least one second electronic device; the second electronic equipment supports discovery and has a short-range communication function;
determining a second electronic device meeting a preset condition as a target electronic device in the at least one second electronic device;
after the target electronic equipment is determined, controlling the target electronic equipment to be in a state of supporting the discovery based on the short-range communication function;
and the transceiver is used for establishing connection with the target electronic equipment based on the short-range communication function.
8. The first electronic device of claim 7, wherein the processor is further configured to,
detecting that at least one of the following detection conditions is satisfied:
reaching a preset detection period;
a potential event occurs in the first electronic device that characterizes a need to establish a short-range communication connection.
9. The first electronic device of claim 7, wherein the transceiver is specifically configured to,
presenting an identification characterizing the target electronic device;
sending a connection request based on the short-range communication to the target electronic equipment based on the identification;
and receiving a communication connection request response sent by the target electronic equipment.
CN201710748464.4A 2017-08-28 2017-08-28 Communication connection method and electronic equipment Active CN107659919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710748464.4A CN107659919B (en) 2017-08-28 2017-08-28 Communication connection method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710748464.4A CN107659919B (en) 2017-08-28 2017-08-28 Communication connection method and electronic equipment

Publications (2)

Publication Number Publication Date
CN107659919A CN107659919A (en) 2018-02-02
CN107659919B true CN107659919B (en) 2021-07-16

Family

ID=61128723

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710748464.4A Active CN107659919B (en) 2017-08-28 2017-08-28 Communication connection method and electronic equipment

Country Status (1)

Country Link
CN (1) CN107659919B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109461284A (en) * 2018-09-30 2019-03-12 南昌与德通讯技术有限公司 Alarm method, terminal device and the computer readable storage medium of terminal device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104735810A (en) * 2013-12-20 2015-06-24 深圳市海思半导体有限公司 Method and device for establishing connecting between terminals
CN103986502B (en) * 2014-04-01 2017-01-25 联想(北京)有限公司 Information processing method, electronic device and system
CN105050029B (en) * 2015-06-02 2019-06-18 深圳市文鼎创数据科技有限公司 The method and system of terminal device pairing connection
CN106789461A (en) * 2016-12-12 2017-05-31 北京小米移动软件有限公司 The method and device of intelligent home device connection

Also Published As

Publication number Publication date
CN107659919A (en) 2018-02-02

Similar Documents

Publication Publication Date Title
KR102593824B1 (en) Method for controlling a camera and electronic device thereof
EP3146796B1 (en) Method and apparatus for providing notification
EP3287866A1 (en) Electronic device and method of providing image acquired by image sensor to application
KR20190117485A (en) Service data processing method and device, and Service processing method and device
KR102107132B1 (en) Access point connection method of electronic apparatus and electronic appparatus thereof
CN104869305B (en) Method and apparatus for processing image data
KR102206351B1 (en) Electronic device and method for making continuity of operated work thereof
CN112153071A (en) Message sending method, device, gateway and storage medium
AU2017414413B2 (en) Search method and apparatus
US9380463B2 (en) Method for displaying lock screen and electronic device thereof
CN108605373B (en) Method and electronic device for providing network sharing service
EP4344180A1 (en) Incoming-call reminding method and electronic device
CN110855534B (en) Method and apparatus for searching and controlling controllee in smart home system
CN105260655A (en) Application program starting protection method, device and system
CN114461240A (en) Software upgrading method, software upgrading system and electronic equipment
KR20180020401A (en) Method for controlling communication network connection, storage medium and electronic device therefor
US10284614B2 (en) Method for downloading contents of electronic device and electronic device thereof
WO2022143155A1 (en) Resource access method and terminal device
KR20150007894A (en) Apparatas and method for proposing a response manual of occurring denial in an electronic device
CN110881224B (en) Network long connection method, device, equipment and storage medium
CN107659919B (en) Communication connection method and electronic equipment
CN110046033B (en) Application program processing method and device, electronic equipment and computer readable storage medium
EP3805938A1 (en) Server node selection method and terminal device
KR102545127B1 (en) Electronic device for managing application associated with a key of external electronic device and the method for the same
KR20200106317A (en) Appartus and method for controlling application relocation in edge computing environment

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