CN111741539B - Device connection method, device, system and readable storage medium - Google Patents

Device connection method, device, system and readable storage medium Download PDF

Info

Publication number
CN111741539B
CN111741539B CN202010881755.2A CN202010881755A CN111741539B CN 111741539 B CN111741539 B CN 111741539B CN 202010881755 A CN202010881755 A CN 202010881755A CN 111741539 B CN111741539 B CN 111741539B
Authority
CN
China
Prior art keywords
connection
equipment
preset
information
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
CN202010881755.2A
Other languages
Chinese (zh)
Other versions
CN111741539A (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.)
Shenzhen Microphone Holdings Co Ltd
Original Assignee
Shenzhen Microphone Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Microphone Holdings Co Ltd filed Critical Shenzhen Microphone Holdings Co Ltd
Priority to CN202010881755.2A priority Critical patent/CN111741539B/en
Publication of CN111741539A publication Critical patent/CN111741539A/en
Priority to PCT/CN2020/133164 priority patent/WO2022041542A1/en
Priority to EP20951210.2A priority patent/EP4207924A4/en
Application granted granted Critical
Publication of CN111741539B publication Critical patent/CN111741539B/en
Priority to US18/175,774 priority patent/US12034561B2/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/11Allocation or use of connection identifiers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a device connection method, a device, a system and a readable storage medium, wherein the method comprises the following steps: s1: acquiring connection information, wherein the connection information is provided by a terminal connected with the initiator device; s2: and connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information. According to the method and the device, after the connection information provided by the terminal is acquired, the target device is connected through the first preset connection rule and/or the second preset connection rule and the connection information, more optional connection schemes are provided for the initiator device and the target device when the initiator device and the target device are connected, and the initiator device is more flexible and intelligent when the initiator device and the target device are connected.

Description

Device connection method, device, system and readable storage medium
Technical Field
The present application relates to the field of electronic technologies, and in particular, to a device connection method, device, system, and readable storage medium.
Background
Along with the popularization of wearable intelligent equipment (such as intelligent wrist-watch, intelligent earphone, intelligent bracelet etc.), intelligent household equipment (such as intelligent TV, intelligent audio amplifier etc.) and car networking equipment (such as intelligent automobile, on-vehicle terminal etc.), very big facility has been brought for people's life. However, as for the way of establishing connection between the devices, for example, the smart watch and the smart speaker establish connection, the connection is currently established through bluetooth, when the connection is established through bluetooth, the user selects a connection device on the smart watch through the device name on the bluetooth connectable device list, and then, the connection feedback information is output through the smart watch regardless of whether the connection is successful or failed. The connection establishment scheme is single and not flexible and intelligent enough. Therefore, how to make the process of establishing connection between devices more flexible and intelligent is a problem that needs to be solved urgently.
The above is only for the purpose of assisting understanding of the technical solutions of the present application, and does not represent an admission that the above is prior art.
Disclosure of Invention
The present application mainly aims to provide a device connection method, device, system and readable storage medium, and aims to solve the technical problem of insufficient flexibility and intelligence in the process of establishing connection between devices.
In order to achieve the above object, the present application provides a device connection method, where the device connection method is applied to an initiator device, and the device connection method includes the steps of:
s1: acquiring connection information;
optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
Optionally, the connection information is provided by a terminal connected to the initiator device;
s2: and connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information.
Optionally, the step of S2 includes: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
Optionally, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power, and an equipment state; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Optionally, sorting one or more items of the connection information according to a preset priority; generating the first preset connection rule according to the sorted connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
Optionally, the sorting one or more items of the connection information according to a preset priority includes:
Sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Optionally, at least one of the following is included:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Optionally, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Optionally, the compliance with the eighth preset condition includes at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Optionally, before the step of S1, the method further includes the step of:
s0: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S1 is executed.
Optionally, before the step of S2, the method further includes the step of:
the step S2 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
Optionally, after the step of S2, the method further includes the steps of:
s3: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
Optionally, the device status includes a status of the terminal and/or a status of the target device.
Optionally, generating the first preset connection rule according to the first connection information and/or the second connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the first connection information and/or the second connection information to obtain a first preset connection rule.
Optionally, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Optionally, the method further comprises: and after the initiator equipment is successfully connected with the target equipment, maintaining or disconnecting the connection between the terminal and the target equipment.
Optionally, the method further comprises: and if the connection information changes, updating the corresponding preset connection rule.
A device connection method is applied to a terminal, and comprises the following steps:
s10: acquiring connection information of target equipment according to a request of initiator equipment;
optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
optionally, the connection information is provided by the terminal;
s20: and sending the connection information to enable the initiator device to be connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information.
Optionally, the step of S20 includes: and if the initiator device fails to connect the target device according to the first preset connection rule and the connection information, connecting the target device according to the second preset connection rule and the connection information.
Optionally, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power, and an equipment state; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Optionally, sorting one or more items of the connection information according to a preset priority; generating the first preset connection rule according to the sorted connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
Optionally, the sorting one or more items of the connection information according to a preset priority includes:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Optionally, at least one of the following is included:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
The connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Optionally, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Optionally, the compliance with the eighth preset condition includes at least one of:
The connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Optionally, before the step of S10, the method further includes the step of:
s00: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S10 is executed.
Optionally, before the step of connecting, by the initiator device, to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes the step of:
the step S20 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
Optionally, after the step of connecting, by the initiator device, to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes the step of:
S30: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
Optionally, the method further comprises: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
Optionally, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Optionally, the target device includes at least one first target device and at least one second target device, and further includes:
and if the initiator device fails to be connected to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the terminal acquires and sends the connection information of the second target device, so that the initiator device is connected to the second target device according to a fourth preset connection rule and the connection information of the second target device.
Optionally, the fourth preset connection rule includes at least one of:
after the initiator device fails to connect with the first target device, or after receiving a switching instruction, immediately or after delaying preset time, controlling the initiator device to connect with the second target device;
triggering the initiator device to connect the second target device after the failure times of the initiator device to connect the first target device reach the preset times;
and outputting prompt information.
Optionally, if the initiator device fails to connect to the second target device, the method further includes at least one of the following:
controlling the initiator device to connect with the first target device;
controlling the initiator device to connect the second target device again;
after the connection failure times reach preset times, controlling the initiator device not to be connected with the first target device or the second target device any more;
and outputting prompt information.
Optionally, the method further comprises at least one of:
after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
And if the connection information changes, updating the corresponding preset connection rule.
A device connection method is applied to a target device, and comprises the following steps:
s100: acquiring connection information according to a request of a terminal;
optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
optionally, the connection information is provided by the terminal;
s200: and sending the connection information so that the initiator device connected with the terminal is connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information.
Optionally, the step S200 includes: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
Optionally, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power, and an equipment state; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Optionally, at least one of the following is included:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Optionally, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Optionally, the compliance with the eighth preset condition includes at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Optionally, before the step S100, the method further includes the step of:
S000: and detecting whether a preset operation is received or whether the operation is in a preset mode, and if so, executing the step S100.
Optionally, before the step of connecting, by the initiator device, to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes the step of:
and after receiving the feedback information of the target side device and/or receiving a connection confirmation instruction, executing the step S200.
Optionally, after the step of connecting, by the initiator device, to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes the step of:
s300: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
Optionally, the method further comprises: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
Optionally, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Optionally, the manner of acquiring the connection information includes at least one of:
obtaining locally;
obtaining through a server;
and obtaining the data through other equipment connected with the target side equipment.
Optionally, the method further comprises: if a first preset instruction is received or the target device is detected to be in or switched to a preset mode, the method includes at least one of the following steps:
immediately or in a delayed manner disconnecting the device connection or all the connections of the target device;
if a second preset instruction is received, restoring to the previous state;
and outputting prompt information.
Optionally, at least one of the following is also included:
after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
and if the connection information changes, updating the corresponding preset connection rule.
To achieve the above object, the present application also provides a device comprising a memory, a processor and a device connection program stored on the memory and executable on the processor, the device connection program, when executed by the processor, implementing the steps of the device connection method as described above.
In order to achieve the above object, the present application further provides a system, where the system includes at least one initiator device that implements the above device connection method; at least one terminal for realizing the equipment connection method; at least one target device for implementing the device connection method is provided.
To achieve the above object, the present application also provides a computer-readable storage medium having stored thereon a program for implementing a device connection method, the program being executed by a processor to implement the steps of the device connection method as described above.
The application is characterized in that through S1: acquiring connection information, wherein the connection information is provided by a terminal connected with the initiator device; s2: and connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information. After the connection information provided by the terminal is acquired, the target device is connected through the first preset connection rule and/or the second preset connection rule and the connection information, more optional connection schemes are provided for the initiator device and the target device when the initiator device is connected, and the initiator device is more flexible and intelligent when the initiator device is connected with the target device.
Drawings
Fig. 1 is a schematic hardware structure diagram of a mobile terminal implementing various embodiments of the present application;
fig. 2 is a communication network system architecture diagram according to an embodiment of the present application;
FIG. 3 is a schematic flow chart diagram illustrating a first embodiment of a method for connecting devices according to the present application;
FIG. 4 is a schematic diagram of a text prompt message output by the device connection method of the present application;
FIG. 5 is a schematic diagram of another text prompt output by the device connection method of the present application;
FIG. 6 is a schematic flow chart diagram illustrating a second embodiment of a method for connecting devices according to the present application;
FIG. 7 is a schematic flow chart diagram illustrating a third embodiment of a device connection method according to the present application;
fig. 8 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The apparatus may be embodied in various forms. For example, the devices described in the present application may include mobile terminals such as a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The following description will be given taking a mobile terminal as an example, and it will be understood by those skilled in the art that the configuration according to the embodiment of the present application can be applied to a fixed type terminal in addition to elements particularly used for mobile purposes.
Referring to fig. 1, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present application, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 1 is not intended to be limiting of mobile terminals, which may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 1:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000 (Code Division Multiple Access 2000 ), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 1 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 1 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 1, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present application, a communication network system on which the mobile terminal of the present application is based is described below.
Referring to fig. 2, fig. 2 is an architecture diagram of a communication Network system according to an embodiment of the present disclosure, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present application is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, various embodiments of the present application are provided.
The present application provides an apparatus connection method, and referring to fig. 3, fig. 3 is a schematic flowchart of a first embodiment of the apparatus connection method according to the present application.
While the embodiments of the present application provide an embodiment of a device connection method, it should be noted that, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown or described here. The device connection method is applied to an initiator device. The equipment connection method comprises the following steps:
step S1, obtaining connection information, where the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
Optionally, the connection information may also be provided by a terminal connected with the initiator device.
Specifically, terminal equipment (such as smart mobile phone, PAD (Portable Android Device, tablet computer), wearable smart machine (such as intelligent wrist-watch, intelligent bracelet, smart earphone etc.), intelligent household equipment (such as smart television, smart sound box etc.), between the car networking equipment (such as intelligent automobile, vehicle mounted terminal etc.), can establish the relation of connection each other in the use, in order to make things convenient for data exchange, thereby provide corresponding function for the user, for example, the cell-phone is established with smart sound box and is connected, so that the cell-phone exports audio signal as the sound source, smart sound box exports the sound that audio signal corresponds as the output. It should be noted that the connection relationship is established through the connection information, and the terminal is a device that has already established a connection with the initiator device.
Specifically, the initiator device obtains connection information, where the connection information is provided by a terminal connected to the initiator device, or the terminal provides first connection information and/or the target device provides second connection information.
In an embodiment, the initiator device is a computer (e.g., a PC or a tablet), the terminal is a mobile phone, the target device is a WIFI access point (which may be a WIFI hotspot made by another mobile phone), the mobile phone is connected to the WIFI access point, the computer is also connected to the mobile phone (e.g., bluetooth, NFC, etc.), and then the computer may obtain an identifier of the WIFI access point and/or a connection user name and/or a connection password through the mobile phone, so that the computer can be connected to the WIFI access point through the obtained connection information. Furthermore, the maximum number of devices allowed to be accessed by the WIFI access point or the connection parameter information such as the fastest connection speed can be acquired by the mobile phone and provided to the computer, or the WIFI access point is sent out by broadcasting and the like and acquired by the computer through broadcasting. Through the implementation mode, the connection between the devices is more convenient and intelligent, and a safer technical effect (such as avoiding the input of connection passwords for multiple times) can be realized.
In an embodiment, the initiator device is a tablet, the terminal is a mobile phone, the target device is a smart television, the tablet is connected to the mobile phone, the mobile phone is connected to the smart television, and a current user wants to connect and launch information (such as music or video being played) on the tablet to the smart television, then corresponding processing can be performed on the tablet according to connection information (such as maximum screen resolution, supported audio format, supported video format, supported multi-channel number, supported audio/video playing application, and the like supported by the smart television) provided by the mobile phone, so that data to be launched can meet requirements of the smart television.
In one embodiment, the initiator device is a mobile phone, the terminal is a smart home control center (such as an intelligent router, an intelligent sound box or an intelligent voice assistant device), the target device is a smart home device (such as an intelligent television, an intelligent air conditioner and the like), and when a user is not at home, the smart home control center is connected with all the smart home devices and controls the smart home devices to work or sleep in a preset mode; after the user arrives at home, the control right of the smart home control center needs to be transferred to the mobile phone of the user, and the mobile phone of the user controls all smart home devices. In order to realize a flexible and intelligent connection mode, after a user arrives at home, the smart home control center is connected with the user mobile phone, so that the user mobile phone can acquire connection information of all smart home devices through the smart home control center, the connection information in the example comprises at least one of device names, device addresses, device types, device working states, device electric quantity information and the like of all the smart home devices, specifically, the device names, the device addresses and the device types of the smart home devices can be acquired by the user mobile phone from the smart home control center, and the device working states and the device electric quantity information of the smart home devices can be provided for the user mobile phone by the smart home devices in a broadcast mode or sent to the user mobile phone by the smart home control center. When the user mobile phone obtains the first connection information and the second connection information, connection between the user mobile phone and all smart home devices can be established, so that transfer of control right from the smart home control center to the user mobile phone is achieved, when the user is at home, the mobile phone carried with the user can be used for achieving control of the smart home devices, and when the user leaves home, the smart home control center continues to control all the smart home devices. Through the implementation mode, more convenient, flexible and intelligent technical effects can be realized, and further the user experience is improved.
In one embodiment, the initiator device is a vehicle device, the terminal is a user mobile phone, the target device is a centralized monitoring platform of the internet of vehicles, the user mobile phone is respectively connected with the centralized monitoring platform of the internet of vehicles and the vehicle device, and the current user wants to enable the vehicle device to be intelligently and flexibly connected to the centralized monitoring platform of the internet of vehicles so as to accurately acquire road condition information, thereby providing auxiliary information for automatic driving. At this time, the first connection information of the centralized monitoring platform for internet of vehicles can be provided to the vehicle device by the user mobile phone, the first connection information includes an encryption key shared by the server of the centralized monitoring platform for internet of vehicles and the user mobile phone, and the server of the centralized monitoring platform for internet of vehicles can also provide second connection information, the second connection information includes information such as dynamically updated access point nodes and/or access addresses of the current server, and the second connection information can be provided by the server of the centralized monitoring platform for internet of vehicles in a broadcasting manner or indirectly through the user mobile phone. Therefore, the vehicle equipment can be accessed to the server of the vehicle networking centralized monitoring platform in an encrypted state according to the first connection information and the second connection information, the safety of vehicle communication is ensured, and the flexibility of accessing the vehicle equipment to the vehicle networking centralized monitoring platform is also ensured.
And step S2, connecting the target side device according to the first preset connection rule and/or the second preset connection rule and the connection information.
Specifically, the initiator device may connect to the target device through the first preset connection rule and the connection information, or connect to the target device through the second preset connection rule and the connection information, or connect to the target device through the first preset connection rule, the second preset connection rule, and the connection information.
Further, the step of connecting the target device according to the first preset connection rule and/or the second preset connection rule and the connection information includes:
and a, if the target side equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target side equipment according to the second preset connection rule and the connection information.
Specifically, if the initiator device connects to the target device according to the first preset connection rule and the connection information, the target device may be inconvenient to establish connection with the initiator device, for example, the target device is establishing connection with another device, and therefore, after the initiator device fails to connect to the target device, the target device may be connected according to the second preset connection rule and the connection information.
Further, the connection information includes at least one of device identification, device name, device address, device type, device number, device power, and device status; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Specifically, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, an equipment state, a connection user name, a connection password, and a connection parameter, or the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, and an equipment state, or the connection information includes at least one of a connection user name, a connection password, and a connection parameter.
For the equipment identifier, the initiator equipment can identify the identity of the target equipment through the equipment identifier, and the equipment identifier is equivalent to the identity characteristic identification information of the equipment; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device identification. In addition, when the initiator device determines whether the target device has a device identifier matching with a preset device identifier in the device, the device identifier is used for functionally distinguishing other devices, which is equivalent to making a special mark for the device.
For the device name, the initiator device may identify the identity of the target device by the device name; the initiator device can also output prompt information to the user through the device name, for example, the device name is 'smart phone', and the initiator device can output prompt information 'connection is established with the smart phone'; in addition, the initiator device may also identify whether the target device is a history connection device by the device name.
For a device address, an initiator device may identify an identity of a target device through the device address, where the device address is a Media Access Control (MAC) address of the device, the initiator device establishes a connection with the target device through the device address, and generally, when the initiator device establishes a connection with the target device through bluetooth, the device address is a MAC address of bluetooth; when the initiator device and the target device establish connection through WiFi (Wireless Fidelity), the device address is the MAC address of WiFi; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device address.
For the device type, when the initiator device connects to the target device, the target device may not be unique, in other words, there are multiple target devices, and when there are multiple target devices, the initiator device classifies the target device according to the device type. For example, there are a plurality of connectable smart air conditioners in a smart home, and the plurality of smart air conditioners can be classified into a smart air conditioner class; among connectable smart headsets, there are a plurality of smart headsets that satisfy different audio playing requirements of users, for example, a smart headset for listening to music, a smart headset for playing games, a smart headset for watching movies, etc., and the plurality of smart headsets can be classified as smart headsets.
For the number of devices, in order to ensure the stability of the connection between the devices, the target device limits the maximum number of connectable devices, and when the initiator device initiates a request for establishing connection to the target device, the initiator device receives the number of devices and the maximum number of connectable devices fed back by the target device.
For the device power, in order to ensure the stability of the connection between the devices, the initiator device needs to obtain the device power of the target device, and it can be understood that the lower the device power is, the shorter the device usable time is for the same use environment (such as playing music), so that when the device power of the target device is lower than a certain value, the initiator device does not need to connect to the target device.
For the device status, when the initiator device connects to the target device, the device status of the target device may be a device use status, a device running status, and the like.
For the connection user name and the connection password, when devices are connected, in order to ensure the accuracy and the safety of the connection, the initiator device needs to ensure that the device connected this time is the target device but not other connectable devices through the connection user name and the connection password.
For the connection parameters, when the initiator device connects to the target device, the target device sets a certain condition for the connection through the connection parameters, so as to achieve the purpose of limiting the connection.
Further, one or more items in the connection information are sorted according to a preset priority; generating the first preset connection rule according to the sorted connection information; or, the first preset connection rule is obtained by matching one or more items in the connection information with a third preset connection rule.
Specifically, one or more items of the connection information are sorted according to a preset priority; generating a first preset connection rule according to the sorted connection information; or, matching a third preset connection rule with one or more items of the connection information to obtain a first preset connection rule, where the third preset connection rule is a connection rule preset by a system, the connection rule includes the first preset connection rule, and optionally, the connection rule is a sorting manner for performing preset sorting on one or more items of the connection information.
It should be noted that the preset priority may be set by a user of the initiator device, or may be preset by a system, and is not specifically limited in this embodiment.
Further, the sorting one or more items of the connection information according to a preset priority includes:
sequencing all the connection information according to a first preset priority; and/or sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Specifically, sorting each connection information according to a first preset priority; and/or sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Specifically, the above-mentioned ranking includes ranking between connection information, for example, ranking the device name, the device type, and the device power amount, and ranking of the connection information itself, for example, ranking the first connection information providing device, the second connection information providing device, and the third connection information providing device of the device power amount. For the ordering among the connection information, according to a first preset priority ordering, the connection information with high priority is preferentially judged in the process that the initiator device is connected with the target device, for example, the priority of the device name is higher than the priority of the device electric quantity, so that the connection information of the device name is preferentially considered in the process that the initiator device is connected with the target device; for the ordering of the connection information itself, according to the second preset priority ordering, the initiator device preferentially connects the connection information providing device with a higher priority when connecting with the target device, for example, the priority of the second connection information providing device of the device power is the highest, so that when the initiator device connects with the target device, the second connection information providing device is preferentially connected.
Further, the device status includes at least one of normal, abnormal, smooth, stuck, idle, overloaded, allowed connection, disallowed connection, restricted connection, secure, unsecure, worn, unworn, in use, not in use.
Specifically, multiple device states exist in the device operation process, including at least one of normal, abnormal, smooth, stuck, idle, overload, connection allowed, connection disallowed, connection limited, safe, non-safe, wearing, non-wearing, using and non-using.
It should be noted that when the device status of the target device connected to the initiator device is at least one of abnormal, stuck, overloaded, connection not allowed, non-secure, non-wearable, and non-use, it is inconvenient to perform subsequent data exchange, for example, when the device status of the target device is stuck, during the subsequent data exchange, the data processing procedure of the target device is very long, which affects user experience.
It should be noted that the device state is normal, which represents that the target device is in a normal working state; the equipment state is abnormal, which represents that the target equipment is in an abnormal working state; the equipment state is smooth, which represents that the target equipment can work smoothly; the device state is stuck, which represents that the target device cannot work smoothly, for example, the target device responds to an abnormality, and the response time is relatively long compared with smoothness; when the device state is idle, the target device currently needs fewer tasks to be processed, for example, a Central Processing Unit (CPU) occupies a smaller proportion; the device state is overload, which represents that the target device has more tasks to be processed currently, for example, the occupation ratio of a CPU is larger; the device state is that the connection is allowed, and the device represents that the target device is allowed to establish connection with other devices; the device state is that connection is not allowed, and the target device is not allowed to establish connection with other devices; the device state is that the connection is limited, and the target device is allowed to establish connection with other devices under certain conditions; the device state is a safe state, which represents that the target device is in a safe state, for example, the network used by the target device is a safe network; the device state is non-secure, which represents that the target device is in a non-secure state, for example, the network used by the target device is a non-secure network (a network with potential security hazards (such as public WiFi)); the equipment state represents that the target side equipment is in a user wearing state; the equipment state is that the non-wearing represents that the target side equipment is in a non-user wearing state; the device state is that the use represents that the target device is in a user use state; the device state is non-use and represents that the target device is in a non-user use state.
The connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Specifically, the connection parameter includes at least one of a connection duration, a connection rate, a connection start time, a connection end time, and a connection location, and the connection parameter may be set by a user of the target device or automatically identified by the target device. It should be noted that the connection duration is an available duration after the initiator device and the target device establish a connection, and the connection is disconnected after the available duration is exceeded; the connection rate is an available data exchange rate after the initiator device and the target device establish connection, and the data exchange rate is not allowed to exceed the available data exchange rate in the data exchange process; the connection starting time is the starting time for establishing connection between the initiator device and the target device, and the time can be set by a user of the initiator device or a user of the target device, and can also be the current time; the connection end time is the time for disconnecting the initiator device and the target device, and the time can be set by a user of the initiator device or the target device; the connection location is the current location information of the target device, for example, the location where the target device is located is a conference room, the target device is an earphone, especially, when wireless earphones are used, two earphones are not suitable to be used at the same time so as to avoid missing or missing meeting contents, therefore, after the initiator device is connected with the wireless earphones, the data to be played is transmitted to only one of the earphones (such as the main earphone), and if the target device is located in the vehicle, the user of the initiator device is the driver, the target device is the earphones, particularly when the wireless earphones are used, in order to avoid the driver from being immersed in the content output by the earphones, therefore, after the initiator device is connected with the wireless earphone, the data to be played is transmitted to only one earphone (such as the main earphone), therefore, the initiator device is more flexible, intelligent and safe when being connected with the target device, and the user experience is improved.
Further, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device identifier meets a first preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device identifier, and/or if the device identifier does not meet the first preset condition, the initiator device is not connected to the target device and/or outputs prompt information, where meeting the first preset condition is that the device identifier includes a device identifier of a history connection device or is a special mark.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device identifier, and completes authentication between the initiator device and the target device through at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, referring to fig. 4, the user tries to connect to the smart watch or the initiator device tries to automatically connect to the smart watch, and the smart watch does not meet the first preset condition, so the initiator device outputs a prompt message "the smart watch is an unknown device and the connection is failed".
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device name meets a second preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device name, and/or if the device name does not meet the second preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the device name meeting the second preset condition includes a device name of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device by the device name, and completes authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device address meets a third preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device address, and/or if the device address does not meet the third preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein the device address meeting the third preset condition includes a device address of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device address, and completes authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the device type meets a fourth preset condition, connecting to the target side device according to the device type and the connection information, and/or if the device type does not meet the fourth preset condition, not connecting to the target side device and/or outputting prompt information.
Specifically, if the device type meets a fourth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device type, and/or if the device type does not meet the fourth preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the meeting of the fourth preset condition is that the device type meets the current use condition of the initiator device.
It should be noted that the current usage condition may be automatically determined by the initiator device, or may be set by a user of the initiator device, for example, if the user of the initiator device is playing a game, the device type is that the smart headset for playing the game satisfies the current usage condition of the initiator device; if the user of the initiator device needs to start one intelligent air conditioner and the device type information providing device has a plurality of intelligent air conditioners, one of the plurality of intelligent air conditioners is started according to a preset starting rule to meet the current use condition of the initiator device, wherein the preset starting rule can be to start the intelligent air conditioner closest to the initiator device, the intelligent air conditioner with the largest number of use times, and the like.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device according to the device type, and completes authentication between the initiator device and the target device by at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device suitable for the use environment is currently available, and the connection is failed" is output.
And if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the number of the devices meets a fifth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the number of the devices, and/or if the number of the devices does not meet the fifth preset condition, the initiator device is not connected to the target device and/or prompt information is output, where meeting the fifth preset condition is that the number of the devices does not exceed the maximum number of connectable devices of the target device.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the number of devices is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device is currently available for connection, and connection is failed" is output.
If the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device electric quantity meets a sixth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device electric quantity, and/or if the device electric quantity does not meet the sixth preset condition, the initiator device is not connected to the target device and/or outputs a prompt message, wherein the meeting of the sixth preset condition is that the device electric quantity is greater than or equal to a preset electric quantity threshold.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the device power amount is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, and the like, for example, a prompt message of "the current device power does not meet the usage requirement, and the connection is failed" is output.
And if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device state meets a seventh preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device state, and/or if the device state does not meet the seventh preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein meeting the seventh preset condition is that the device state is at least one of normal, smooth, idle, connection-allowed, connection-limited, safe, wearing and using.
It should be noted that, in the process of establishing connection, the initiator device determines the target device with the highest second preset priority in the device state, and completes the authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete the establishment of connection. The determination mode of the second preset priority in the equipment state is as follows: the more items in the device state, such as normal, smooth, idle, allowed connection, limited connection, safe, wearing and using, the higher the second preset priority.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "the device status of the current device does not meet the usage requirement, and the connection is failed" is output.
If the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the connection parameter meets the eighth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the connection parameter, and/or if the device status does not meet the eighth preset condition, the initiator device is not connected to the target device and/or prompt information is output.
It should be noted that, in the process of establishing the connection, the initiator device determines the target device corresponding to the connection parameter meeting the eighth preset condition in the connection parameters, and completes the authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete the establishment of the connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device meeting the connection requirement currently and failed to establish connection" is output.
Further, the compliance with the eighth preset condition includes at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Specifically, the eighth preset condition is met when the connection parameter includes a connection duration, and a historical connection duration is less than the connection duration, where the historical connection duration is an accumulated total duration in the historical connection between the initiator device and the target device, and the historical connection can be limited within a certain time from the current time, for example, within 10 hours from the current time, so that it is ensured that the total connection duration between the initiator device and the target device is less than the connection duration within the certain time; the connection parameters comprise connection rate, and when the current connection rate is greater than or equal to the connection rate, an eighth preset condition is met, wherein the connection rate is the minimum connection rate meeting data transmission in the connection process; when the connection parameters include a connection start time and the current time meets the start time requirement, an eighth preset condition is met, where the connection start time is after the current time, for example, the current time is 15: 30, then the connection start time should be 15: after 30 (e.g., 15: 35); when the connection end time is included in the connection parameters and the current time meets the end time requirement, an eighth preset condition is met, where the connection end time should be after the current time, and meanwhile, after the connection start time, for example, the current time is 15: 30, connection start time 15: 35, the connection end time should be 15: after 35 (e.g., 15: 40); and when the current location meets the requirement of the connection location, meeting an eighth preset condition, wherein the current location meets the requirement of the connection location when the current location is a preset location, and the preset location comprises a meeting room, an interior of a vehicle and the like.
Further, before the step S1, the method further includes:
in step S0, it is detected whether a preset operation is received or whether the operation is in a preset mode, and if yes, the step S1 is executed.
Specifically, the initiator device detects whether a preset operation is received or whether the initiator device is in a preset mode, and if the initiator device receives the preset operation or is currently in the preset mode, the initiator device executes a step of acquiring connection information; and if the preset operation is not received or the current state is not in the preset mode, the step of obtaining the connection information is not executed. The preset modes comprise an intelligent mode, an automatic switching mode and the like, which support the connection between the devices through a first preset connection rule and/or a second preset connection rule.
Further, before the step of S2, the method further includes the steps of:
and b, receiving the feedback information of the target side equipment and/or executing the step S2 after receiving a connection confirmation instruction.
Specifically, the initiator device receives feedback information of the target device, and/or receives a connection confirmation instruction, and then performs a step of connecting the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information.
It should be noted that the feedback information is whether the target device agrees to establish a connection with the initiator device; the connection confirmation instruction is an instruction which is input by the user at the initiator device and confirms the connection between the initiator device and the target device, so that the initiator device user determines whether to establish the connection, the connection establishment process is more flexible and intelligent, and the user experience is improved.
Further, after the step of S2, the method further includes:
step S3, after the connection is successful or failed, outputting a prompt message to at least one of the initiator device, the terminal, and the target device.
Specifically, after the initiator device successfully or unsuccessfully connects to the target device, prompt information is output to at least one of the initiator device, the terminal, and the target device to prompt the user that the connection is successful or unsuccessful, so as to improve user experience.
It should be noted that the prompt message includes at least one of voice message, text message, vibration message, and light message. For example, referring to fig. 5, if the initiator device is a smart phone, the text information is output through a "smart tv" terminal, "the smart phone is connected to the smart watch," and specifically, the display duration of the popup window may be set, and the popup window may be automatically closed after displaying for 0.5 seconds; the voice information may be output through a speaker of at least one of the initiator device, the terminal, and the target device, such as the voice information output by the initiator device, and the content of the voice information may be "connected XXX"; the light information can be output through a flash lamp of at least one of the initiator device, the terminal and the target device, for example, a preset flash mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset flash mode can be used for flashing once every fixed time and continuously flashing for a period of time, and if the user unlocks the light information output device at the moment, prompt information 'connected XXX' can be output to the user in a mode of outputting text information or voice information; the vibration information can be output through a vibration function of at least one of the initiator device, the terminal and the target device, for example, a preset vibration mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset vibration mode can be vibration once every fixed time and vibration for a period of time continuously, and if the user unlocks the light information output device at the moment, a prompt message of 'connected XXX' can be output to the user through a mode of outputting text information or voice information.
Further, the device status includes a status of the terminal and/or a status of the target device.
Specifically, the device state includes a state of the terminal and/or a state of the target device.
It should be noted that the device state may be used as a basis for determining whether to establish a connection between devices, and may also be used as a basis for determining whether to disconnect an established connection between devices, where the state of the terminal in the device state may be used to determine whether the terminal needs to disconnect from the initiator device, and the state of the target device in the device state may be used to determine whether the target device is suitable for establishing a connection with the initiator device.
Further, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal and the second connection information is provided by the target device.
Specifically, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal and the second connection information is provided by the target device.
It should be noted that, the terminal has established a connection with the target device, and the terminal may provide the acquired first connection information of the target device to the initiator device; the second connection information of the target device that is not acquired may also be acquired after receiving the connection request of the initiator device, so as to provide the initiator device with the second connection information.
Further, generating the first preset connection rule according to the first connection information and/or the second connection information; or, obtaining a first preset connection rule by matching one or more of the first connection information and/or the second connection information with a third preset connection rule.
Specifically, a first preset connection rule is generated according to first connection information acquired by a terminal and/or second connection information not acquired by the terminal; or, the first preset connection rule is obtained by matching one or more items of the first connection information acquired by the terminal and/or the second connection information not acquired by the terminal with the third preset connection rule.
Further, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Specifically, if the initiator device and the target device are successfully connected, the initiator device and the target device are not disconnected any more or are disconnected regularly or are disconnected overtime; if the connection between the initiator device and the target device fails, the initiator device and the target device are no longer connected or connected in a timing manner or in a periodic manner.
Specifically, the initiator device successfully connects to the target device, and may determine a disconnection condition between the initiator device and the target device through a certain disconnection policy, where the disconnection policy includes no disconnection, timed disconnection, or disconnection overtime, where the disconnection is not maintained until the initiator device (or the target device) does not receive a disconnection instruction of the user; the timed disconnection means that after the connection is established and a certain time is reached, the initiator device and the target device are automatically disconnected, for example, when the connection is established and 5 minutes is reached, the initiator device and the target device are automatically disconnected; if the timeout disconnection is that data exchange does not occur between the initiator device and the target device within a certain time after the connection is established, the initiator device and the target device are automatically disconnected, for example, after transmission of certain data is completed between the initiator device and the target device, no data exchange occurs between the initiator device and the target device within 6 minutes, and the initiator device and the target device are automatically disconnected.
Specifically, after the connection between the initiator device and the target device fails, the initiator device may continue to attempt to connect to the target device through a continuous connection policy, where the continuous connection policy includes no-connection, a timed connection, or a periodic connection, where no-connection is that the initiator device does not attempt to connect to the target device until the initiator device does not receive a connection request instruction of a user; the timed connection is that after the connection fails, if a certain time is reached, the initiator device automatically tries to reconnect the target device, for example, if the time reaches 5 minutes after the connection is established, the initiator device automatically tries to reconnect the target device; the periodic connection is that after the connection failure, the initiator device periodically attempts to connect the target device again, for example, after the connection failure, the initiator device attempts to connect the target device once every 6 minutes.
Further, the device connection method further includes:
and c, after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device.
Specifically, after the initiator device and the target device are successfully connected, the connection between the terminal and the target device is maintained or disconnected.
Specifically, the target device and the terminal may be devices with similar functions, and after the initiator device is successfully connected to the target device, the connection between the terminal and the target device is disconnected, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a PAD with similar functions to the intelligent mobile phone; the target device and the terminal may also be devices with dissimilar functions, and after the initiator device is successfully connected with the target device, the connection between the terminal and the target device is maintained, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a vehicle-mounted terminal.
Further, the device connection method further includes:
and d, if the connection information changes, updating the corresponding preset connection rule.
Specifically, if the connection information changes, the corresponding preset connection rule is updated.
Specifically, the first preset connection rule and the second preset connection rule are directly affected by the connection information, for example, the first preset priority of the device identifier in the connection information is the highest, the first preset priority of the number of devices in the connection information is the second, the first preset connection rule is to prioritize the device identifier for connection, after the connection information changes, the device identifier in the connection information is not considered any more, accordingly, the number of devices originally in the first preset priority and the second is changed to be the first priority, and the first preset connection rule at this time is updated to prioritize the number of devices for connection.
In this embodiment, by S1: acquiring connection information, wherein the connection information is provided by a terminal connected with the initiator device; s2: and connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information. After the connection information provided by the terminal is acquired, the target device is connected through the first preset connection rule and/or the second preset connection rule and the connection information, and more optional connection schemes are provided for the initiator device and the target device when the initiator device is connected. The method and the device enable the initiator device to be more flexible and intelligent when the initiator device is connected with the target device.
Further, with reference to fig. 6, a second embodiment is presented based on the first embodiment of the device connection method of the present application, and it should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. The device connection method is applied to the terminal. The equipment connection method comprises the following steps:
step S10, obtaining connection information of the target device according to a request of the initiator device, where the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
optionally, the connection information may also be provided by the terminal.
Specifically, the terminal acquires the acquired connection information of the target device and/or acquires connection information of the target device that is not acquired according to a request of the initiator device.
In an embodiment, the initiator device is a computer (e.g., a PC or a tablet), the terminal is a mobile phone, the target device is a WIFI access point (which may be a WIFI hotspot made by another mobile phone), the mobile phone is connected to the WIFI access point, the computer is also connected to the mobile phone (e.g., bluetooth, NFC, etc.), and then the computer may obtain an identifier of the WIFI access point and/or a connection user name and/or a connection password through the mobile phone, so that the computer can be connected to the WIFI access point through the obtained connection information. Furthermore, the maximum number of devices allowed to be accessed by the WIFI access point or the connection parameter information such as the fastest connection speed can be acquired by the mobile phone and provided to the computer, or the WIFI access point is sent out by broadcasting and the like and acquired by the computer through broadcasting. Through the implementation mode, the connection between the devices is more convenient and intelligent, and a safer technical effect (such as avoiding the input of connection passwords for multiple times) can be realized.
In an embodiment, the initiator device is a tablet, the terminal is a mobile phone, the target device is a smart television, the tablet is connected to the mobile phone, the mobile phone is connected to the smart television, and a current user wants to connect and launch information (such as music or video being played) on the tablet to the smart television, then corresponding processing can be performed on the tablet according to connection information (such as maximum screen resolution, supported audio format, supported video format, supported multi-channel number, supported audio/video playing application, and the like supported by the smart television) provided by the mobile phone, so that data to be launched can meet requirements of the smart television.
In one embodiment, the initiator device is a mobile phone, the terminal is a smart home control center (such as an intelligent router, an intelligent sound box or an intelligent voice assistant device), the target device is a smart home device (such as an intelligent television, an intelligent air conditioner and the like), and when a user is not at home, the smart home control center is connected with all the smart home devices and controls the smart home devices to work or sleep in a preset mode; after the user arrives at home, the control right of the smart home control center needs to be transferred to the mobile phone of the user, and the mobile phone of the user controls all smart home devices. In order to realize a flexible and intelligent connection mode, after a user arrives at home, the smart home control center is connected with the user mobile phone, so that the user mobile phone can acquire connection information of all smart home devices through the smart home control center, the connection information in the example comprises at least one of device names, device addresses, device types, device working states, device electric quantity information and the like of all the smart home devices, specifically, the device names, the device addresses and the device types of the smart home devices can be acquired by the user mobile phone from the smart home control center, and the device working states and the device electric quantity information of the smart home devices can be provided for the user mobile phone by the smart home devices in a broadcast mode or sent to the user mobile phone by the smart home control center. After the user mobile phone acquires the first connection information and the second connection information, connection between the user mobile phone and all smart home devices can be established, so that transfer of control power from the smart home control center to the user mobile phone is achieved, when the user is at home, the user can use the mobile phone carried with the user to achieve control of the smart home devices, and when the user leaves home, the smart home control center continues to control all the smart home devices. Through the implementation mode, more convenient, flexible and intelligent technical effects can be realized, and further the user experience is improved.
In one embodiment, the initiator device is a vehicle device, the terminal is a user mobile phone, the target device is a centralized monitoring platform of the internet of vehicles, the user mobile phone is respectively connected with the centralized monitoring platform of the internet of vehicles and the vehicle device, and the current user wants to enable the vehicle device to be intelligently and flexibly connected to the centralized monitoring platform of the internet of vehicles so as to accurately acquire road condition information, thereby providing auxiliary information for automatic driving. At this time, the first connection information of the centralized monitoring platform for internet of vehicles can be provided to the vehicle device by the user mobile phone, the first connection information includes an encryption key shared by the server of the centralized monitoring platform for internet of vehicles and the user mobile phone, and the server of the centralized monitoring platform for internet of vehicles can also provide second connection information, the second connection information includes information such as dynamically updated access point nodes and/or access addresses of the current server, and the second connection information can be provided by the server of the centralized monitoring platform for internet of vehicles in a broadcasting manner or indirectly through the user mobile phone. Therefore, the vehicle equipment can be accessed to the server of the vehicle networking centralized monitoring platform in an encrypted state according to the first connection information and the second connection information, the safety of vehicle communication is ensured, and the flexibility of accessing the vehicle equipment to the vehicle networking centralized monitoring platform is also ensured.
Step S20, sending the connection information, so that the initiator device connects to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information.
Specifically, the terminal sends connection information to the initiator device, so that the initiator device is connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information.
Further, the step of sending the connection information includes:
and e, if the initiator device fails to connect the target device according to the first preset connection rule and the connection information, connecting the target device according to the second preset connection rule and the connection information.
Specifically, if the initiator device connects to the target device according to the first preset connection rule and the connection information, the target device may be inconvenient to establish connection with the initiator device, for example, the target device is establishing connection with another device, and therefore, after the initiator device fails to connect to the target device, the target device may be connected according to the second preset connection rule and the connection information.
Further, the connection information includes at least one of device identification, device name, device address, device type, device number, device power, and device status; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Specifically, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, an equipment state, a connection user name, a connection password, and a connection parameter, or the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, and an equipment state, or the connection information includes at least one of a connection user name, a connection password, and a connection parameter.
For the equipment identifier, the initiator equipment can identify the identity of the target equipment through the equipment identifier, and the equipment identifier is equivalent to the identity characteristic identification information of the equipment; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device identification. In addition, when the initiator device determines whether the target device has a device identifier matching with a preset device identifier in the device, the device identifier is used for functionally distinguishing other devices, which is equivalent to making a special mark for the device.
For the device name, the initiator device may identify the identity of the target device by the device name; the initiator device can also output prompt information to the user through the device name, for example, the device name is 'smart phone', and the initiator device can output prompt information 'connection is established with the smart phone'; in addition, the initiator device may also identify whether the target device is a history connection device by the device name.
For a device address, an initiator device may identify an identity of a target device through the device address, where the device address is a Media Access Control (MAC) address of the device, the initiator device establishes a connection with the target device through the device address, and generally, when the initiator device establishes a connection with the target device through bluetooth, the device address is a MAC address of bluetooth; when the initiator device and the target device establish connection through WiFi (Wireless Fidelity), the device address is the MAC address of WiFi; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device address.
For the device type, when the initiator device connects to the target device, the target device may not be unique, in other words, there are multiple target devices, and when there are multiple target devices, the initiator device classifies the target device according to the device type. For example, there are a plurality of connectable smart air conditioners in a smart home, and the plurality of smart air conditioners can be classified into a smart air conditioner class; among connectable smart headsets, there are a plurality of smart headsets that satisfy different audio playing requirements of users, for example, a smart headset for listening to music, a smart headset for playing games, a smart headset for watching movies, etc., and the plurality of smart headsets can be classified as smart headsets.
For the number of devices, in order to ensure the stability of the connection between the devices, the target device limits the maximum number of connectable devices, and when the initiator device initiates a request for establishing connection to the target device, the initiator device receives the number of devices and the maximum number of connectable devices fed back by the target device.
For the device power, in order to ensure the stability of the connection between the devices, the initiator device needs to obtain the device power of the target device, and it can be understood that the lower the device power is, the shorter the device usable time is for the same use environment (such as playing music), so that when the device power of the target device is lower than a certain value, the initiator device does not need to connect to the target device.
For the device status, when the initiator device connects to the target device, the device status of the target device may be a device use status, a device running status, and the like.
For the connection user name and the connection password, when devices are connected, in order to ensure the accuracy and the safety of the connection, the initiator device needs to ensure that the device connected this time is the target device but not other connectable devices through the connection user name and the connection password.
For the connection parameters, when the initiator device connects to the target device, the target device sets a certain condition for the connection through the connection parameters, so as to achieve the purpose of limiting the connection.
Further, the device connection method further includes:
sorting one or more items in the connection information according to a preset priority; generating the first preset connection rule according to the sorted connection information; or, the first preset connection rule is obtained by matching one or more items in the connection information with a third preset connection rule.
Specifically, one or more items of the connection information are sorted according to a preset priority; generating a first preset connection rule according to the sorted connection information; or, matching a third preset connection rule with one or more items of the connection information to obtain a first preset connection rule, where the third preset connection rule is a connection rule preset by a system, the connection rule includes the first preset connection rule, and optionally, the connection rule is a sorting manner for performing preset sorting on one or more items of the connection information.
It should be noted that the preset priority may be set by a user of the initiator device, or may be preset by a system, and is not specifically limited in this embodiment.
Further, the sorting one or more items of the connection information according to a preset priority includes:
Sequencing all the connection information according to a first preset priority; and/or sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Specifically, sorting each connection information according to a first preset priority; and/or sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Specifically, the above-mentioned ranking includes ranking between connection information, for example, ranking the device name, the device type, and the device power amount, and ranking of the connection information itself, for example, ranking the first connection information providing device, the second connection information providing device, and the third connection information providing device of the device power amount. For the ordering among the connection information, according to a first preset priority ordering, the connection information with high priority is preferentially judged in the process that the initiator device is connected with the target device, for example, the priority of the device name is higher than the priority of the device electric quantity, so that the connection information of the device name is preferentially considered in the process that the initiator device is connected with the target device; for the ordering of the connection information itself, according to the second preset priority ordering, the initiator device preferentially connects the connection information providing device with a higher priority when connecting with the target device, for example, the priority of the second connection information providing device of the device power is the highest, so that when the initiator device connects with the target device, the second connection information providing device is preferentially connected.
Further, the device status includes at least one of normal, abnormal, smooth, stuck, idle, overloaded, allowed connection, disallowed connection, restricted connection, secure, unsecure, worn, unworn, in use, not in use.
Specifically, multiple device states exist in the device operation process, including at least one of normal, abnormal, smooth, stuck, idle, overload, connection allowed, connection disallowed, connection limited, safe, non-safe, wearing, non-wearing, using and non-using.
It should be noted that when the device status of the target device connected to the initiator device is at least one of abnormal, stuck, overloaded, connection not allowed, non-secure, non-wearable, and non-use, it is inconvenient to perform subsequent data exchange, for example, when the device status of the target device is stuck, during the subsequent data exchange, the data processing procedure of the target device is very long, which affects user experience.
It should be noted that the device state is normal, which represents that the target device is in a normal working state; the equipment state is abnormal, which represents that the target equipment is in an abnormal working state; the equipment state is smooth, which represents that the target equipment can work smoothly; the device state is stuck, which represents that the target device cannot work smoothly, for example, the target device responds to an abnormality, and the response time is relatively long compared with smoothness; when the device state is idle, the target device currently needs fewer tasks to be processed, for example, a Central Processing Unit (CPU) occupies a smaller proportion; the device state is overload, which represents that the target device has more tasks to be processed currently, for example, the occupation ratio of a CPU is larger; the device state is that the connection is allowed, and the device represents that the target device is allowed to establish connection with other devices; the device state is that connection is not allowed, and the target device is not allowed to establish connection with other devices; the device state is that the connection is limited, and the target device is allowed to establish connection with other devices under certain conditions; the device state is a safe state, which represents that the target device is in a safe state, for example, the network used by the target device is a safe network; the device state is non-secure, which represents that the target device is in a non-secure state, for example, the network used by the target device is a non-secure network (a network with potential security hazards (such as public WiFi)); the equipment state represents that the target side equipment is in a user wearing state; the equipment state is that the non-wearing represents that the target side equipment is in a non-user wearing state; the device state is that the use represents that the target device is in a user use state; the device state is non-use and represents that the target device is in a non-user use state.
The connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Specifically, the connection parameter includes at least one of a connection duration, a connection rate, a connection start time, a connection end time, and a connection location, and the connection parameter may be set by a user of the target device or automatically identified by the target device. It should be noted that the connection duration is an available duration after the initiator device and the target device establish a connection, and the connection is disconnected after the available duration is exceeded; the connection rate is an available data exchange rate after the initiator device and the target device establish connection, and the data exchange rate is not allowed to exceed the available data exchange rate in the data exchange process; the connection starting time is the starting time for establishing connection between the initiator device and the target device, and the time can be set by a user of the initiator device or a user of the target device, and can also be the current time; the connection end time is the time for disconnecting the initiator device and the target device, and the time can be set by a user of the initiator device or the target device; the connection location is the current location information of the target device, for example, the location where the target device is located is a conference room, the target device is an earphone, especially, when wireless earphones are used, two earphones are not suitable to be used at the same time so as to avoid missing or missing meeting contents, therefore, after the initiator device is connected with the wireless earphones, the data to be played is transmitted to only one of the earphones (such as the main earphone), and if the target device is located in the vehicle, the user of the initiator device is the driver, the target device is the earphones, particularly when the wireless earphones are used, in order to avoid the driver from being immersed in the content output by the earphones, therefore, after the initiator device is connected with the wireless earphone, the data to be played is transmitted to only one earphone (such as the main earphone), therefore, the initiator device is more flexible, intelligent and safe when being connected with the target device, and the user experience is improved.
Further, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device identifier meets a first preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device identifier, and/or if the device identifier does not meet the first preset condition, the initiator device is not connected to the target device and/or outputs prompt information, where meeting the first preset condition is that the device identifier includes a device identifier of a history connection device or is a special mark.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device identifier, and completes authentication between the initiator device and the target device through at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, referring to fig. 4, the user tries to connect to the smart watch or the initiator device tries to automatically connect to the smart watch, and the smart watch does not meet the first preset condition, so the initiator device outputs a prompt message "the smart watch is an unknown device and the connection is failed".
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device name meets a second preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device name, and/or if the device name does not meet the second preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the device name meeting the second preset condition includes a device name of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device by the device name, and completes authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device address meets a third preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device address, and/or if the device address does not meet the third preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein the device address meeting the third preset condition includes a device address of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device address, and completes authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the device type meets a fourth preset condition, connecting to the target side device according to the device type and the connection information, and/or if the device type does not meet the fourth preset condition, not connecting to the target side device and/or outputting prompt information.
Specifically, if the device type meets a fourth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device type, and/or if the device type does not meet the fourth preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the meeting of the fourth preset condition is that the device type meets the current use condition of the initiator device.
It should be noted that the current usage condition may be automatically determined by the initiator device, or may be set by a user of the initiator device, for example, if the user of the initiator device is playing a game, the device type is that the smart headset for playing the game satisfies the current usage condition of the initiator device; if the user of the initiator device needs to start one intelligent air conditioner and the device type information providing device has a plurality of intelligent air conditioners, one of the plurality of intelligent air conditioners is started according to a preset starting rule to meet the current use condition of the initiator device, wherein the preset starting rule can be to start the intelligent air conditioner closest to the initiator device, the intelligent air conditioner with the largest number of use times, and the like.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device according to the device type, and completes authentication between the initiator device and the target device by at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device suitable for the use environment is currently available, and the connection is failed" is output.
And if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the number of the devices meets a fifth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the number of the devices, and/or if the number of the devices does not meet the fifth preset condition, the initiator device is not connected to the target device and/or prompt information is output, where meeting the fifth preset condition is that the number of the devices does not exceed the maximum number of connectable devices of the target device.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the number of devices is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device is currently available for connection, and connection is failed" is output.
If the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device electric quantity meets a sixth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device electric quantity, and/or if the device electric quantity does not meet the sixth preset condition, the initiator device is not connected to the target device and/or outputs a prompt message, wherein the meeting of the sixth preset condition is that the device electric quantity is greater than or equal to a preset electric quantity threshold.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the device power amount is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, and the like, for example, a prompt message of "the current device power does not meet the usage requirement, and the connection is failed" is output.
And if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device state meets a seventh preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device state, and/or if the device state does not meet the seventh preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein meeting the seventh preset condition is that the device state is at least one of normal, smooth, idle, connection-allowed, connection-limited, safe, wearing and using.
It should be noted that, in the process of establishing connection, the initiator device determines the target device with the highest second preset priority in the device state, and completes the authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete the establishment of connection. The determination mode of the second preset priority in the equipment state is as follows: the more items in the device state, such as normal, smooth, idle, allowed connection, limited connection, safe, wearing and using, the higher the second preset priority.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "the device status of the current device does not meet the usage requirement, and the connection is failed" is output.
If the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the connection parameter meets the eighth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the connection parameter, and/or if the device status does not meet the eighth preset condition, the initiator device is not connected to the target device and/or prompt information is output.
It should be noted that, in the process of establishing the connection, the initiator device determines the target device corresponding to the connection parameter meeting the eighth preset condition in the connection parameters, and completes the authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete the establishment of the connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device meeting the connection requirement currently and failed to establish connection" is output.
Further, the compliance with the eighth preset condition includes at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Specifically, the eighth preset condition is met when the connection parameter includes a connection duration, and a historical connection duration is less than the connection duration, where the historical connection duration is an accumulated total duration in the historical connection between the initiator device and the target device, and the historical connection can be limited within a certain time from the current time, for example, within 10 hours from the current time, so that it is ensured that the total connection duration between the initiator device and the target device is less than the connection duration within the certain time; the connection parameters comprise connection rate, and when the current connection rate is greater than or equal to the connection rate, an eighth preset condition is met, wherein the connection rate is the minimum connection rate meeting data transmission in the connection process; when the connection parameters include a connection start time and the current time meets the start time requirement, an eighth preset condition is met, where the connection start time is after the current time, for example, the current time is 15: 30, then the connection start time should be 15: after 30 (e.g., 15: 35); when the connection end time is included in the connection parameters and the current time meets the end time requirement, an eighth preset condition is met, where the connection end time should be after the current time, and meanwhile, after the connection start time, for example, the current time is 15: 30, connection start time 15: 35, the connection end time should be 15: after 35 (e.g., 15: 40); and when the current location meets the requirement of the connection location, meeting an eighth preset condition, wherein the current location meets the requirement of the connection location when the current location is a preset location, and the preset location comprises a meeting room, an interior of a vehicle and the like.
Further, before the step of S10, the method further includes:
in step S00, it is detected whether a preset operation is received or whether the operation is in a preset mode, and if yes, the step S10 is executed.
Specifically, the terminal detects whether a preset operation is received or whether the terminal is in a preset mode, and if the preset operation is received or the terminal is currently in the preset mode, the step of acquiring the connection information of the target device according to the request of the initiator device is executed; and if the preset operation is not received or the current state is not in the preset mode, the step of acquiring the connection information of the target equipment according to the request of the initiator equipment is not executed. The preset modes comprise an intelligent mode, an automatic switching mode and the like, which support the connection between the devices through a first preset connection rule and/or a second preset connection rule. The preset operation is a response operation of the terminal user to the request of the initiator device, and comprises refusing to obtain the connection information of the target device and agreeing to obtain the connection information of the target device.
Further, before the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes:
And f, receiving the feedback information of the target side equipment and/or executing the step S20 after receiving the connection confirmation instruction.
Specifically, the initiator device receives feedback information of the target device, and/or receives a connection confirmation instruction, and then performs sending of the connection information, so that the sender device connects to the target device according to a first preset connection rule and/or a second preset connection rule, and the connection information.
It should be noted that the feedback information is whether the target device agrees to establish a connection with the initiator device; the connection confirmation instruction is an instruction which is input by the user at the initiator device and confirms the connection between the initiator device and the target device, so that the initiator device user determines whether to establish the connection, the connection establishment process is more flexible and intelligent, and the user experience is improved.
Further, after the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes:
step S30, after the connection is successful or failed, outputting a prompt message to at least one of the initiator device, the terminal, and the target device.
Specifically, after the initiator device successfully or unsuccessfully connects to the target device, prompt information is output to at least one of the initiator device, the terminal, and the target device to prompt the user that the connection is successful or unsuccessful, so as to improve user experience.
It should be noted that the prompt message includes at least one of voice message, text message, vibration message, and light message. For example, referring to fig. 5, if the initiator device is a smart phone, the text information is output through a "smart tv" terminal, "the smart phone is connected to the smart watch," and specifically, the display duration of the popup window may be set, and the popup window may be automatically closed after displaying for 0.5 seconds; the voice information may be output through a speaker of at least one of the initiator device, the terminal, and the target device, such as the voice information output by the initiator device, and the content of the voice information may be "connected XXX"; the light information can be output through a flash lamp of at least one of the initiator device, the terminal and the target device, for example, a preset flash mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset flash mode can be used for flashing once every fixed time and continuously flashing for a period of time, and if the user unlocks the light information output device at the moment, prompt information 'connected XXX' can be output to the user in a mode of outputting text information or voice information; the vibration information can be output through a vibration function of at least one of the initiator device, the terminal and the target device, for example, a preset vibration mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset vibration mode can be vibration once every fixed time and vibration for a period of time continuously, and if the user unlocks the light information output device at the moment, a prompt message of 'connected XXX' can be output to the user through a mode of outputting text information or voice information.
Further, the device connection method further includes:
the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
Specifically, when the initiator device establishes a connection with the target device through the terminal, the terminal and the target device are in a connected state, where the target device includes one or more terminals.
Further, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Specifically, if the initiator device and the target device are successfully connected, the initiator device and the target device are not disconnected any more or are disconnected regularly or are disconnected overtime; if the connection between the initiator device and the target device fails, the initiator device and the target device are no longer connected or connected in a timing manner or in a periodic manner.
Specifically, the initiator device successfully connects to the target device, and may determine a disconnection condition between the initiator device and the target device through a certain disconnection policy, where the disconnection policy includes no disconnection, timed disconnection, or disconnection overtime, where the disconnection is not maintained until the initiator device (or the target device) does not receive a disconnection instruction of the user; the timed disconnection means that after the connection is established and a certain time is reached, the initiator device and the target device are automatically disconnected, for example, when the connection is established and 5 minutes is reached, the initiator device and the target device are automatically disconnected; if the timeout disconnection is that data exchange does not occur between the initiator device and the target device within a certain time after the connection is established, the initiator device and the target device are automatically disconnected, for example, after transmission of certain data is completed between the initiator device and the target device, no data exchange occurs between the initiator device and the target device within 6 minutes, and the initiator device and the target device are automatically disconnected.
Specifically, after the connection between the initiator device and the target device fails, the initiator device may continue to attempt to connect to the target device through a continuous connection policy, where the continuous connection policy includes no-connection, a timed connection, or a periodic connection, where no-connection is that the initiator device does not attempt to connect to the target device until the initiator device does not receive a connection request instruction of a user; the timed connection is that after the connection fails, if a certain time is reached, the initiator device automatically tries to reconnect the target device, for example, if the time reaches 5 minutes after the connection is established, the initiator device automatically tries to reconnect the target device; the periodic connection is that after the connection failure, the initiator device periodically attempts to connect the target device again, for example, after the connection failure, the initiator device attempts to connect the target device once every 6 minutes.
Further, the target device includes at least a first target device and at least a second target device, and the device connection method further includes:
and g, if the initiator device fails to connect to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the terminal acquires and sends the connection information of the second target device, so that the initiator device is connected to the second target device according to a fourth preset connection rule and the connection information of the second target device.
Specifically, if the initiator device fails to connect to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information (for example, the initiator device user refuses to connect to the first target device), the terminal obtains and sends the connection information of the second target device to the initiator device, so that the initiator device connects to the second target device according to the fourth preset connection rule and the connection information of the second target device.
Further, the fourth preset rule includes at least one of:
and after the initiator device fails to connect the first target device, or after receiving a switching instruction, immediately or after delaying preset time, controlling the initiator device to connect the second target device.
Specifically, after the initiator device fails to connect to the first target device, or after receiving a handover command, the initiator device may be controlled by the terminal to connect to the second target device immediately or after delaying for a preset time, where the handover command is a command that a user of the initiator device needs to switch a connection to another device when the user is unsatisfied with the connected first target device.
And triggering the initiator device to connect the second target device after the failure times of the initiator device to connect the first target device reach preset times.
Specifically, after the initiator device attempts to connect to the first target device for multiple times and all fails, if the number of times of failure reaches a preset number of times, the initiator device does not attempt to connect to the first target device, and triggers a condition that the initiator device connects to the second target device, where the preset number of times may be set by a user or preset by a system, and this embodiment is not particularly limited.
And outputting prompt information.
Specifically, after the initiator device fails to connect to the first target device, at least one of the terminal and the initiator device outputs prompt information to the user, where the prompt information includes a reason for the failure to connect to the first target device.
Further, if the initiator device fails to connect to the second target device, the method further includes at least one of the following:
and controlling the initiator device to be connected with the first target device.
Specifically, the terminal may control the initiator device to reconnect to the first target device.
And controlling the initiator device to connect the second target device again.
In particular, the terminal may control the initiator device to attempt to reconnect to the second target device.
And after the connection failure times reach the preset times, controlling the initiator device not to be connected with the first target device or the second target device.
Specifically, after the number of times of failure of the initiator device to connect to the second target device reaches a preset number of times, the terminal controls the initiator device not to connect to the first target device or the second target device any more, where the preset number of times may be set by a user or preset by a system, and is not limited in this embodiment.
And outputting prompt information.
Specifically, after the initiator device fails to connect to the second target device, at least one of the terminal and the initiator device outputs a prompt message related to the connection failure to the user, so as to prompt the user that the initiator device fails to connect to the second target device and a reason for the connection failure.
Further, the device connection method further includes at least one of:
and after the initiator equipment is successfully connected with the target equipment, maintaining or disconnecting the connection between the terminal and the target equipment.
Specifically, after the initiator device and the target device are successfully connected, the connection between the terminal and the target device is maintained or disconnected.
Specifically, the target device and the terminal may be devices with similar functions, and after the initiator device is successfully connected to the target device, the connection between the terminal and the target device is disconnected, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a PAD with similar functions to the intelligent mobile phone; the target device and the terminal may also be devices with dissimilar functions, and after the initiator device is successfully connected with the target device, the connection between the terminal and the target device is maintained, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a vehicle-mounted terminal.
And if the connection information changes, updating the corresponding preset connection rule.
Specifically, if the connection information changes, the corresponding preset connection rule is updated.
Specifically, the first preset connection rule and the second preset connection rule are directly affected by the connection information, for example, the first preset priority of the device identifier in the connection information is the highest, the first preset priority of the number of devices in the connection information is the second, the first preset connection rule is to prioritize the device identifier for connection, after the connection information changes, the device identifier in the connection information is not considered any more, accordingly, the number of devices originally in the first preset priority and the second is changed to be the first priority, and the first preset connection rule at this time is updated to prioritize the number of devices for connection.
In this embodiment, by S10: acquiring connection information of target equipment according to a request of initiator equipment; s20: and sending the connection information to enable the initiator device to be connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information. The connection information of the target party is acquired according to the request of the initiator device, and then the connection information is sent to the initiator device, so that the initiator device is connected with the target party device through the first preset connection rule and/or the second preset connection rule and the connection information, more optional connection schemes are provided for the initiator device and the target party device when the initiator device is connected, and the initiator device is more flexible and intelligent when the initiator device is connected with the target party device.
Further, with reference to fig. 7, a third embodiment is presented based on the first embodiment of the device connecting method of the present application, and it should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that here. The device connection method is applied to a target device. The equipment connection method comprises the following steps:
step S100, obtaining connection information according to a request of a terminal, where the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal, and the second connection information is provided by the target device.
Optionally, the first connection information or the second connection information may include at least one of the target device identifier, the target device name, the target device address, the target device type, the target device number, the target device power, and the target device status, and may also include at least one of a connection user name, a connection password, and a connection parameter;
optionally, the connection information may also be provided by the terminal.
Specifically, the target device receives a connection information acquisition request sent by the terminal, and acquires connection information.
In an embodiment, the initiator device is a computer (e.g., a PC or a tablet), the terminal is a mobile phone, the target device is a WIFI access point (which may be a WIFI hotspot made by another mobile phone), the mobile phone is connected to the WIFI access point, the computer is also connected to the mobile phone (e.g., bluetooth, NFC, etc.), and then the computer may obtain an identifier of the WIFI access point and/or a connection user name and/or a connection password through the mobile phone, so that the computer can be connected to the WIFI access point through the obtained connection information. Furthermore, the maximum number of devices allowed to be accessed by the WIFI access point or the connection parameter information such as the fastest connection speed can be acquired by the mobile phone and provided to the computer, or the WIFI access point is sent out by broadcasting and the like and acquired by the computer through broadcasting. Through the implementation mode, the connection between the devices is more convenient and intelligent, and a safer technical effect (such as avoiding the input of connection passwords for multiple times) can be realized.
In an embodiment, the initiator device is a tablet, the terminal is a mobile phone, the target device is a smart television, the tablet is connected to the mobile phone, the mobile phone is connected to the smart television, and a current user wants to connect and launch information (such as music or video being played) on the tablet to the smart television, then corresponding processing can be performed on the tablet according to connection information (such as maximum screen resolution, supported audio format, supported video format, supported multi-channel number, supported audio/video playing application, and the like supported by the smart television) provided by the mobile phone, so that data to be launched can meet requirements of the smart television.
In one embodiment, the initiator device is a mobile phone, the terminal is a smart home control center (such as an intelligent router, an intelligent sound box or an intelligent voice assistant device), the target device is a smart home device (such as an intelligent television, an intelligent air conditioner and the like), and when a user is not at home, the smart home control center is connected with all the smart home devices and controls the smart home devices to work or sleep in a preset mode; after the user arrives at home, the control right of the smart home control center needs to be transferred to the mobile phone of the user, and the mobile phone of the user controls all smart home devices. In order to realize a flexible and intelligent connection mode, after a user arrives at home, the smart home control center is connected with the user mobile phone, so that the user mobile phone can acquire connection information of all smart home devices through the smart home control center, the connection information in the example comprises at least one of device names, device addresses, device types, device working states, device electric quantity information and the like of all the smart home devices, specifically, the device names, the device addresses and the device types of the smart home devices can be acquired by the user mobile phone from the smart home control center, and the device working states and the device electric quantity information of the smart home devices can be provided for the user mobile phone by the smart home devices in a broadcast mode or sent to the user mobile phone by the smart home control center. After the user mobile phone acquires the first connection information and the second connection information, connection between the user mobile phone and all smart home devices can be established, so that transfer of control power from the smart home control center to the user mobile phone is achieved, when the user is at home, the user can use the mobile phone carried with the user to achieve control of the smart home devices, and when the user leaves home, the smart home control center continues to control all the smart home devices. Through the implementation mode, more convenient, flexible and intelligent technical effects can be realized, and further the user experience is improved.
In one embodiment, the initiator device is a vehicle device, the terminal is a user mobile phone, the target device is a centralized monitoring platform of the internet of vehicles, the user mobile phone is respectively connected with the centralized monitoring platform of the internet of vehicles and the vehicle device, and the current user wants to enable the vehicle device to be intelligently and flexibly connected to the centralized monitoring platform of the internet of vehicles so as to accurately acquire road condition information, thereby providing auxiliary information for automatic driving. At this time, the first connection information of the centralized monitoring platform for internet of vehicles can be provided to the vehicle device by the user mobile phone, the first connection information includes an encryption key shared by the server of the centralized monitoring platform for internet of vehicles and the user mobile phone, and the server of the centralized monitoring platform for internet of vehicles can also provide second connection information, the second connection information includes information such as dynamically updated access point nodes and/or access addresses of the current server, and the second connection information can be provided by the server of the centralized monitoring platform for internet of vehicles in a broadcasting manner or indirectly through the user mobile phone. Therefore, the vehicle equipment can be accessed to the server of the vehicle networking centralized monitoring platform in an encrypted state according to the first connection information and the second connection information, the safety of vehicle communication is ensured, and the flexibility of accessing the vehicle equipment to the vehicle networking centralized monitoring platform is also ensured.
Step S200, sending the connection information, so that the initiator device connected to the terminal is connected to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information.
Specifically, the target device sends the connection information to the terminal, so that the initiator device connected to the terminal is connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information.
Further, the S200 step includes:
and h, if the target side equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target side equipment according to the second preset connection rule and the connection information.
Specifically, if the initiator device connects to the target device according to the first preset connection rule and the connection information, the target device may be inconvenient to establish connection with the initiator device, for example, the target device is establishing connection with another device, and therefore, after the initiator device fails to connect to the target device, the target device may be connected according to the second preset connection rule and the connection information.
Further, the connection information includes at least one of device identification, device name, device address, device type, device number, device power, and device status; and/or the connection information comprises at least one of a connection user name, a connection password and a connection parameter.
Specifically, the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, an equipment state, a connection user name, a connection password, and a connection parameter, or the connection information includes at least one of an equipment identifier, an equipment name, an equipment address, an equipment type, an equipment number, an equipment power level, and an equipment state, or the connection information includes at least one of a connection user name, a connection password, and a connection parameter.
For the equipment identifier, the initiator equipment can identify the identity of the target equipment through the equipment identifier, and the equipment identifier is equivalent to the identity characteristic identification information of the equipment; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device identification. In addition, when the initiator device determines whether the target device has a device identifier matching with a preset device identifier in the device, the device identifier is used for functionally distinguishing other devices, which is equivalent to making a special mark for the device.
For the device name, the initiator device may identify the identity of the target device by the device name; the initiator device can also output prompt information to the user through the device name, for example, the device name is 'smart phone', and the initiator device can output prompt information 'connection is established with the smart phone'; in addition, the initiator device may also identify whether the target device is a history connection device by the device name.
For a device address, an initiator device may identify an identity of a target device through the device address, where the device address is a Media Access Control (MAC) address of the device, the initiator device establishes a connection with the target device through the device address, and generally, when the initiator device establishes a connection with the target device through bluetooth, the device address is a MAC address of bluetooth; when the initiator device and the target device establish connection through WiFi (Wireless Fidelity), the device address is the MAC address of WiFi; in addition, the initiator device can also identify whether the target device is a history connection device or not through the device address.
For the device type, when the initiator device connects to the target device, the target device may not be unique, in other words, there are multiple target devices, and when there are multiple target devices, the initiator device classifies the target device according to the device type. For example, there are a plurality of connectable smart air conditioners in a smart home, and the plurality of smart air conditioners can be classified into a smart air conditioner class; among connectable smart headsets, there are a plurality of smart headsets that satisfy different audio playing requirements of users, for example, a smart headset for listening to music, a smart headset for playing games, a smart headset for watching movies, etc., and the plurality of smart headsets can be classified as smart headsets.
For the number of devices, in order to ensure the stability of the connection between the devices, the target device limits the maximum number of connectable devices, and when the initiator device initiates a request for establishing connection to the target device, the initiator device receives the number of devices and the maximum number of connectable devices fed back by the target device.
For the device power, in order to ensure the stability of the connection between the devices, the initiator device needs to obtain the device power of the target device, and it can be understood that the lower the device power is, the shorter the device usable time is for the same use environment (such as playing music), so that when the device power of the target device is lower than a certain value, the initiator device does not need to connect to the target device.
For the device status, when the initiator device connects to the target device, the device status of the target device may be a device use status, a device running status, and the like.
For the connection user name and the connection password, when devices are connected, in order to ensure the accuracy and the safety of the connection, the initiator device needs to ensure that the device connected this time is the target device but not other connectable devices through the connection user name and the connection password.
For the connection parameters, when the initiator device connects to the target device, the target device sets a certain condition for the connection through the connection parameters, so as to achieve the purpose of limiting the connection.
Further, the device status includes at least one of normal, abnormal, smooth, stuck, idle, overloaded, allowed connection, disallowed connection, restricted connection, secure, unsecure, worn, unworn, in use, not in use.
Specifically, multiple device states exist in the device operation process, including at least one of normal, abnormal, smooth, stuck, idle, overload, connection allowed, connection disallowed, connection limited, safe, non-safe, wearing, non-wearing, using and non-using.
It should be noted that when the device status of the target device connected to the initiator device is at least one of abnormal, stuck, overloaded, connection not allowed, non-secure, non-wearable, and non-use, it is inconvenient to perform subsequent data exchange, for example, when the device status of the target device is stuck, during the subsequent data exchange, the data processing procedure of the target device is very long, which affects user experience.
It should be noted that the device state is normal, which represents that the target device is in a normal working state; the equipment state is abnormal, which represents that the target equipment is in an abnormal working state; the equipment state is smooth, which represents that the target equipment can work smoothly; the device state is stuck, which represents that the target device cannot work smoothly, for example, the target device responds to an abnormality, and the response time is relatively long compared with smoothness; when the device state is idle, the target device currently needs fewer tasks to be processed, for example, a Central Processing Unit (CPU) occupies a smaller proportion; the device state is overload, which represents that the target device has more tasks to be processed currently, for example, the occupation ratio of a CPU is larger; the device state is that the connection is allowed, and the device represents that the target device is allowed to establish connection with other devices; the device state is that connection is not allowed, and the target device is not allowed to establish connection with other devices; the device state is that the connection is limited, and the target device is allowed to establish connection with other devices under certain conditions; the device state is a safe state, which represents that the target device is in a safe state, for example, the network used by the target device is a safe network; the device state is non-secure, which represents that the target device is in a non-secure state, for example, the network used by the target device is a non-secure network (a network with potential security hazards (such as public WiFi)); the equipment state represents that the target side equipment is in a user wearing state; the equipment state is that the non-wearing represents that the target side equipment is in a non-user wearing state; the device state is that the use represents that the target device is in a user use state; the device state is non-use and represents that the target device is in a non-user use state.
The connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
Specifically, the connection parameter includes at least one of a connection duration, a connection rate, a connection start time, a connection end time, and a connection location, and the connection parameter may be set by a user of the target device or automatically identified by the target device. It should be noted that the connection duration is an available duration after the initiator device and the target device establish a connection, and the connection is disconnected after the available duration is exceeded; the connection rate is an available data exchange rate after the initiator device and the target device establish connection, and the data exchange rate is not allowed to exceed the available data exchange rate in the data exchange process; the connection starting time is the starting time for establishing connection between the initiator device and the target device, and the time can be set by a user of the initiator device or a user of the target device, and can also be the current time; the connection end time is the time for disconnecting the initiator device and the target device, and the time can be set by a user of the initiator device or the target device; the connection location is the current location information of the target device, for example, the location where the target device is located is a conference room, the target device is an earphone, especially, when wireless earphones are used, two earphones are not suitable to be used at the same time so as to avoid missing or missing meeting contents, therefore, after the initiator device is connected with the wireless earphones, the data to be played is transmitted to only one of the earphones (such as the main earphone), and if the target device is located in the vehicle, the user of the initiator device is the driver, the target device is the earphones, particularly when the wireless earphones are used, in order to avoid the driver from being immersed in the content output by the earphones, therefore, after the initiator device is connected with the wireless earphone, the data to be played is transmitted to only one earphone (such as the main earphone), therefore, the initiator device is more flexible, intelligent and safe when being connected with the target device, and the user experience is improved.
Further, the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device identifier meets a first preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device identifier, and/or if the device identifier does not meet the first preset condition, the initiator device is not connected to the target device and/or outputs prompt information, where meeting the first preset condition is that the device identifier includes a device identifier of a history connection device or is a special mark.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device identifier, and completes authentication between the initiator device and the target device through at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, referring to fig. 4, the user tries to connect to the smart watch or the initiator device tries to automatically connect to the smart watch, and the smart watch does not meet the first preset condition, so the initiator device outputs a prompt message "the smart watch is an unknown device and the connection is failed".
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device name meets a second preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device name, and/or if the device name does not meet the second preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the device name meeting the second preset condition includes a device name of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device by the device name, and completes authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device address meets a third preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device address, and/or if the device address does not meet the third preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein the device address meeting the third preset condition includes a device address of a history connection device.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device through the device address, and completes authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete establishment of connection.
Note that the prompt message may include text message, voice message, etc., for example, a prompt message "XXX is unknown device, and connection is failed" is output.
If the device type meets a fourth preset condition, connecting to the target side device according to the device type and the connection information, and/or if the device type does not meet the fourth preset condition, not connecting to the target side device and/or outputting prompt information.
Specifically, if the device type meets a fourth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password, and the device type, and/or if the device type does not meet the fourth preset condition, the initiator device is not connected to the target device and/or prompt information is output, wherein the meeting of the fourth preset condition is that the device type meets the current use condition of the initiator device.
It should be noted that the current usage condition may be automatically determined by the initiator device, or may be set by a user of the initiator device, for example, if the user of the initiator device is playing a game, the device type is that the smart headset for playing the game satisfies the current usage condition of the initiator device; if the user of the initiator device needs to start one intelligent air conditioner and the device type information providing device has a plurality of intelligent air conditioners, one of the plurality of intelligent air conditioners is started according to a preset starting rule to meet the current use condition of the initiator device, wherein the preset starting rule can be to start the intelligent air conditioner closest to the initiator device, the intelligent air conditioner with the largest number of use times, and the like.
It should be noted that, in the process of establishing connection, the initiator device identifies the target device according to the device type, and completes authentication between the initiator device and the target device by at least one of a connection user name and a connection password, so as to complete establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device suitable for the use environment is currently available, and the connection is failed" is output.
And if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the number of the devices meets a fifth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the number of the devices, and/or if the number of the devices does not meet the fifth preset condition, the initiator device is not connected to the target device and/or prompt information is output, where meeting the fifth preset condition is that the number of the devices does not exceed the maximum number of connectable devices of the target device.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the number of devices is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device is currently available for connection, and connection is failed" is output.
If the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device electric quantity meets a sixth preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device electric quantity, and/or if the device electric quantity does not meet the sixth preset condition, the initiator device is not connected to the target device and/or outputs a prompt message, wherein the meeting of the sixth preset condition is that the device electric quantity is greater than or equal to a preset electric quantity threshold.
It should be noted that, in the process of establishing connection, the target device with the highest second preset priority in the device power amount is determined for the initiator device, and the identity authentication between the initiator device and the target device is completed through at least one of the connection user name and the connection password, so as to complete the establishment of connection.
It should be noted that the prompt message may include text message, voice message, and the like, for example, a prompt message of "the current device power does not meet the usage requirement, and the connection is failed" is output.
And if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the device state meets a seventh preset condition, the initiator device establishes a connection with the target device by connecting at least one of a user name and a connection password and the device state, and/or if the device state does not meet the seventh preset condition, the initiator device is not connected to the target device and/or outputs prompt information, wherein meeting the seventh preset condition is that the device state is at least one of normal, smooth, idle, connection-allowed, connection-limited, safe, wearing and using.
It should be noted that, in the process of establishing connection, the initiator device determines the target device with the highest second preset priority in the device state, and completes the authentication between the initiator device and the target device by at least one of the connection user name and the connection password, so as to complete the establishment of connection. The determination mode of the second preset priority in the equipment state is as follows: the more items in the device state, such as normal, smooth, idle, allowed connection, limited connection, safe, wearing and using, the higher the second preset priority.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "the device status of the current device does not meet the usage requirement, and the connection is failed" is output.
If the connection parameter meets an eighth preset condition, connecting to the target side equipment according to the connection parameter and the connection information, and/or if the connection parameter does not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
Specifically, if the connection parameter meets the eighth preset condition, the initiator device establishes a connection with the target device through at least one of a connection user name and a connection password and the connection parameter, and/or if the device status does not meet the eighth preset condition, the initiator device is not connected to the target device and/or prompt information is output.
It should be noted that, in the process of establishing the connection, the initiator device determines the target device corresponding to the connection parameter meeting the eighth preset condition in the connection parameters, and completes the authentication between the initiator device and the target device through at least one of the connection user name and the connection password, so as to complete the establishment of the connection.
It should be noted that the prompt message may include text message, voice message, etc., for example, a prompt message of "no device meeting the connection requirement currently and failed to establish connection" is output.
Further, the compliance with the eighth preset condition includes at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise connection ending time, and the current time meets the requirement of the ending time;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
Specifically, the eighth preset condition is met when the connection parameter includes a connection duration, and a historical connection duration is less than the connection duration, where the historical connection duration is an accumulated total duration in the historical connection between the initiator device and the target device, and the historical connection can be limited within a certain time from the current time, for example, within 10 hours from the current time, so that it is ensured that the total connection duration between the initiator device and the target device is less than the connection duration within the certain time; the connection parameters comprise connection rate, and when the current connection rate is greater than or equal to the connection rate, an eighth preset condition is met, wherein the connection rate is the minimum connection rate meeting data transmission in the connection process; when the connection parameters include a connection start time and the current time meets the start time requirement, an eighth preset condition is met, where the connection start time is after the current time, for example, the current time is 15: 30, then the connection start time should be 15: after 30 (e.g., 15: 35); when the connection end time is included in the connection parameters and the current time meets the end time requirement, an eighth preset condition is met, where the connection end time should be after the current time, and meanwhile, after the connection start time, for example, the current time is 15: 30, connection start time 15: 35, the connection end time should be 15: after 35 (e.g., 15: 40); and when the current location meets the requirement of the connection location, meeting an eighth preset condition, wherein the current location meets the requirement of the connection location when the current location is a preset location, and the preset location comprises a meeting room, an interior of a vehicle and the like.
Further, before the step S100, the method further includes:
step S000, detecting whether a preset operation is received or whether the operation is in a preset mode, if so, executing step S100.
Specifically, the target device detects whether a preset operation is received or whether the target device is in a preset mode, and if the preset operation is received or the target device is in the preset mode currently, the step of acquiring connection information according to a request of the terminal is executed; and if the preset operation is not received or the current state is not in the preset mode, the step of acquiring the connection information according to the request of the terminal is not executed. The preset modes comprise an intelligent mode, an automatic switching mode and the like, which support the connection between the devices through a first preset connection rule and/or a second preset connection rule. The preset operation is a response operation made by a target side device user aiming at a request of a terminal, and comprises the steps of obtaining the connection information of the target side device and not obtaining the connection information of the target side device.
Further, before the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes:
And i, receiving feedback information of the target side equipment, and/or executing the step of sending the connection information after receiving a connection confirmation instruction so that the sender equipment connected with the terminal is connected to the target side equipment according to a first preset connection rule and/or a second preset connection rule and the connection information.
Specifically, the initiator device receives feedback information of the target device, and/or performs the step of sending the connection information after receiving a connection confirmation instruction.
It should be noted that the feedback information is whether the target device agrees to establish a connection with the initiator device; the connection confirmation instruction is an instruction which is input by the user at the initiator device and confirms the connection between the initiator device and the target device, so that the initiator device user determines whether to establish the connection, the connection establishment process is more flexible and intelligent, and the user experience is improved.
Further, after the step of connecting the sender device to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the method further includes:
step S300, after the connection is successful or failed, a prompt message is output to at least one of the sender equipment, the terminal and the target equipment.
Specifically, after the initiator device successfully or unsuccessfully connects to the target device, prompt information is output to at least one of the initiator device, the terminal, and the target device to prompt the user that the connection is successful or unsuccessful, so as to improve user experience.
It should be noted that the prompt message includes at least one of voice message, text message, vibration message, and light message. For example, referring to fig. 5, if the initiator device is a smart phone, the text information is output through a "smart tv" terminal, "the smart phone is connected to the smart watch," and specifically, the display duration of the popup window may be set, and the popup window may be automatically closed after displaying for 0.5 seconds; the voice information may be output through a speaker of at least one of the initiator device, the terminal, and the target device, such as the voice information output by the initiator device, and the content of the voice information may be "connected XXX"; the light information can be output through a flash lamp of at least one of the initiator device, the terminal and the target device, for example, a preset flash mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset flash mode can be used for flashing once every fixed time and continuously flashing for a period of time, and if the user unlocks the light information output device at the moment, prompt information 'connected XXX' can be output to the user in a mode of outputting text information or voice information; the vibration information can be output through a vibration function of at least one of the initiator device, the terminal and the target device, for example, a preset vibration mode is used for prompting a user that the initiator device is successfully connected with the target device, the preset vibration mode can be vibration once every fixed time and vibration for a period of time continuously, and if the user unlocks the light information output device at the moment, a prompt message of 'connected XXX' can be output to the user through a mode of outputting text information or voice information.
Further, the device connection method further includes:
the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
Specifically, when the initiator device establishes a connection with the target device through the terminal, the target device and the terminal are in a connected state, where the target device includes one or more devices.
Further, the second preset connection rule includes at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
Specifically, if the target device and the initiator device are successfully connected, the target device and the initiator device are not disconnected any more or are disconnected regularly or are disconnected overtime; and if the connection between the target equipment and the initiator equipment fails, the target equipment and the initiator equipment are not connected any more or connected in a timing mode or in a periodic mode.
Specifically, the target device and the initiator device are successfully connected, and a disconnection condition between the target device and the initiator device can be determined through a certain disconnection policy, where the disconnection policy includes no disconnection, timed disconnection or overtime disconnection, and the disconnection is not maintained until the target device (or the initiator device) does not receive a disconnection instruction of a user; the timed disconnection means that after the connection is established and a certain time is reached, the target device and the initiator device are automatically disconnected, for example, when the connection is established and 5 minutes is reached, the target device and the initiator device are automatically disconnected; if the timeout disconnection is that data exchange does not occur between the target device and the initiator device within a certain time after the connection is established, the target device and the initiator device are automatically disconnected, for example, after transmission of certain data is completed between the target device and the initiator device, no data exchange occurs between the target device and the initiator device within 6 minutes, and the target device and the initiator device are automatically disconnected.
Specifically, after the connection between the target device and the initiator device fails, the initiator device may continue to attempt to connect to the target device through a continuous connection policy, where the continuous connection policy includes no-connection, a timed connection, or a periodic connection, where no-connection is that the initiator device does not attempt to connect to the target device until it does not receive a connection request instruction from a user; the timed connection is that after the connection fails, if a certain time is reached, the initiator device automatically tries to reconnect the target device, for example, if the time reaches 5 minutes after the connection is established, the initiator device automatically tries to reconnect the target device; the periodic connection is that after the connection failure, the initiator device periodically attempts to connect the target device again, for example, after the connection failure, the initiator device attempts to connect the target device once every 6 minutes.
Further, the manner of acquiring the connection information includes at least one of:
obtaining locally;
obtaining through a server;
and obtaining the data through other equipment connected with the target side equipment.
Specifically, the target device obtains its own connection information locally; the server can also acquire the connection information of all other devices which can establish connection with the initiator device; the method can also be obtained by other devices connected with the target device, wherein the other devices are all devices capable of establishing connection with the initiator device.
Further, the device connection method further includes:
if a first preset instruction is received or the target device is detected to be in or switched to a preset mode, the method includes at least one of the following steps:
immediately or in a delayed manner disconnecting the device connection or all the connections of the target device;
if a second preset instruction is received, restoring to the previous state;
and outputting prompt information.
Specifically, if a first preset instruction is received or it is detected that the target device is in or switched to a preset mode, the method includes at least one of the following: immediately or in a delayed manner disconnecting the device connection or all the connections of the target device; if a second preset instruction is received, restoring to the previous state; and outputting prompt information. The time-delay disconnection is to disconnect the device connection or all the connections of the target device after a period of time when receiving a first preset instruction or detecting that the target device is in or switched to a preset mode, where the period of time may be set by a user or preset by a system, and this embodiment is not specifically limited; the first preset instruction is an instruction for disconnecting the target equipment from part or all of the equipment connected with the target equipment; the second preset instruction is an instruction for canceling the operation performed by the target device to execute the first preset instruction.
Further, the device connection method further includes at least one of:
and after the initiator equipment is successfully connected with the target equipment, maintaining or disconnecting the connection between the terminal and the target equipment.
Specifically, after the target device and the initiator device are successfully connected, the connection between the terminal and the target device is maintained or disconnected.
Specifically, the target device and the terminal may be devices with similar functions, and after the initiator device is successfully connected to the target device, the connection between the terminal and the target device is disconnected, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a PAD with similar functions to the intelligent mobile phone; the target device and the terminal may also be devices with dissimilar functions, and after the initiator device is successfully connected with the target device, the connection between the terminal and the target device is maintained, for example, the initiator device is an intelligent headset, the terminal is an intelligent mobile phone, and the target device is a vehicle-mounted terminal.
And if the connection information changes, updating the corresponding preset connection rule.
Specifically, if the connection information changes, the corresponding preset connection rule is updated.
Specifically, the first preset connection rule and the second preset connection rule are directly affected by the connection information, for example, the first preset priority of the device identifier in the connection information is the highest, the first preset priority of the number of devices in the connection information is the second, the first preset connection rule is to prioritize the device identifier for connection, after the connection information changes, the device identifier in the connection information is not considered any more, accordingly, the number of devices originally in the first preset priority and the second is changed to be the first priority, and the first preset connection rule at this time is updated to prioritize the number of devices for connection.
In this embodiment, by S100: acquiring connection information according to a request of a terminal; s200: and sending the connection information so that the initiator device connected with the terminal is connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information. The connection information is sent to the terminal after the connection information of the target party is acquired according to the request of the terminal, so that the initiator device connected with the terminal is connected with the target party device through the first preset connection rule and/or the second preset connection rule and the connection information, more optional connection schemes are provided for the initiator device to be connected with the target party device, and the initiator device is more flexible and intelligent when being connected with the target party device.
In addition, the present application also provides an apparatus connecting device, which includes:
the first acquisition module is used for acquiring the connection information; optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal and the second connection information is provided by the target device;
and the connection module is used for connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information.
Further, the connection module includes:
and the detection unit is used for connecting the target side equipment according to the second preset connection rule and the connection information after the target side equipment is failed to be connected according to the first preset connection rule and the connection information.
Further, the device connecting apparatus further includes:
the sorting module is used for sorting one or more items in the connection information according to a preset priority;
the first generation module is used for generating the first preset connection rule according to the sorted connection information;
and the first matching module is used for matching the third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
Further, the ranking module includes:
the first sequencing unit is used for sequencing all the connection information according to a first preset priority;
and the second sorting unit is used for sorting the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Further, the device connecting apparatus further includes:
the detection module is used for detecting whether preset operation is received or not, and if so, the first acquisition module is executed;
the detection module is further used for detecting whether the mobile terminal is in a preset mode or not, and if yes, the first acquisition module is executed.
Further, the device connecting apparatus further includes:
the first receiving module is used for receiving the feedback information of the target side equipment and executing the connecting module;
and the second receiving module is used for executing the connecting module after receiving the connection confirmation instruction.
Further, the device connecting apparatus further includes:
and the output module is used for outputting prompt information to at least one of the initiator device, the terminal and the target device after the connection is successful or failed.
Further, the device connecting apparatus further includes:
A second generating module, configured to generate the first preset connection rule according to the first connection information and/or the second connection information;
and the second matching module is used for matching a third preset connection rule through one or more items in the first connection information and/or the second connection information to obtain a first preset connection rule.
Further, the device connecting apparatus further includes:
a maintaining module, configured to maintain a connection between the terminal and the target device after the initiator device and the target device are successfully connected;
and the disconnection module is used for disconnecting the connection between the terminal and the target equipment after the initiator equipment and the target equipment are successfully connected.
Further, the device connecting apparatus further includes:
and the updating module is used for updating the corresponding preset connection rule if the connection information changes.
In addition, the present application also provides an apparatus connecting device, which includes:
the first acquisition module is used for acquiring the connection information of the target equipment according to the request of the initiator equipment; optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by a terminal and the second connection information is provided by the target device;
And the sending module is used for sending the connection information.
Further, the connection module includes:
and the detection unit is used for connecting the target side equipment according to the second preset connection rule and the connection information after the target side equipment is failed to be connected according to the first preset connection rule and the connection information.
Further, the device connecting apparatus further includes:
the sorting module is used for sorting one or more items in the connection information according to a preset priority;
the first generation module is used for generating the first preset connection rule according to the sorted connection information;
and the first matching module is used for matching the third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
Further, the ranking module includes:
the first sequencing unit is used for sequencing all the connection information according to a first preset priority;
and the second sorting unit is used for sorting the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
Further, the device connecting apparatus further includes:
the detection module is used for detecting whether preset operation is received or not, and if so, the first acquisition module is executed;
The detection module is further used for detecting whether the mobile terminal is in a preset mode or not, and if yes, the first acquisition module is executed.
Further, the device connecting apparatus further includes:
the first receiving module is used for receiving the feedback information of the target side equipment and executing the connecting module;
and the second receiving module is used for executing the connecting module after receiving the connection confirmation instruction.
Further, the device connecting apparatus further includes:
and the output module is used for outputting prompt information to at least one of the initiator device, the terminal and the target device after the connection is successful or failed.
Further, the device connecting apparatus further includes:
and the sending module is used for acquiring and sending the connection information of the second target party equipment by the terminal if the initiator equipment fails to be connected to the first target party equipment according to the first preset connection rule and/or the second preset connection rule and the connection information.
Further, the device connecting apparatus further includes:
a maintaining module, configured to maintain a connection between the terminal and the target device after the initiator device and the target device are successfully connected;
A disconnection module, configured to disconnect the connection between the terminal and the target device after the initiator device and the target device are successfully connected;
and the updating module is used for updating the corresponding preset connection rule if the connection information changes.
In addition, the present application also provides an apparatus connecting device, which includes:
the first acquisition module is used for acquiring connection information according to a request of a terminal; optionally, the connection information includes at least one first connection information and at least one second connection information, where the first connection information is provided by the terminal and the second connection information is provided by the target device;
and the sending module is used for sending the connection information.
Further, the connection module includes:
and the detection unit is used for connecting the target side equipment according to the second preset connection rule and the connection information after the target side equipment is failed to be connected according to the first preset connection rule and the connection information.
Further, the device connecting apparatus further includes:
the detection module is used for detecting whether preset operation is received or not, and if so, the first acquisition module is executed;
The detection module is further used for detecting whether the mobile terminal is in a preset mode or not, and if yes, the first acquisition module is executed.
Further, the device connecting apparatus further includes:
the first receiving module is used for receiving the feedback information of the target side equipment and executing the connecting module;
and the second receiving module is used for executing the connecting module after receiving the connection confirmation instruction.
Further, the device connecting apparatus further includes:
and the output module is used for outputting prompt information to at least one of the initiator device, the terminal and the target device after the connection is successful or failed.
Further, the device connecting apparatus further includes:
a disconnection module, configured to disconnect the device connection or all the connections of the target device immediately or in a delayed manner;
the restoring module is used for restoring to the previous state if a second preset instruction is received;
the output module is also used for outputting prompt information.
Further, the device connecting apparatus further includes:
a maintaining module, configured to maintain a connection between the terminal and the target device after the initiator device and the target device are successfully connected;
A disconnection module, configured to disconnect the connection between the terminal and the target device after the initiator device and the target device are successfully connected;
and the updating module is used for updating the corresponding preset connection rule if the connection information changes.
The specific implementation of the device control apparatus of the present application is substantially the same as that of each of the embodiments of the device connection method described above, and is not described herein again.
In addition, the present application also provides a device, which may be the initiator device, the terminal, or the target device. As shown in fig. 8, fig. 8 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present application.
Fig. 8 may be a schematic structural diagram of a hardware operating environment of the device.
As shown in fig. 8, the apparatus may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the device may also include RF (Radio Frequency) circuitry, sensors, audio circuitry, WiFi modules, and the like.
Those skilled in the art will appreciate that the configuration of the device shown in fig. 8 does not constitute a limitation of the device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 8, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a device connection program. Among them, the operating system is a program that manages and controls the hardware and software resources of the device, supporting the operation of the device connection program and other software or programs.
In the apparatus shown in fig. 8, the user interface 1003 is mainly used for connecting a terminal, and performing data communication with the terminal; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be used to invoke the device connection program stored in the memory 1005 and perform the steps of the device connection method as described above.
The specific implementation of the device of the present application is substantially the same as the embodiments of the device connection method described above, and is not described herein again.
The present application further provides an apparatus, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, carries out the steps of the method as described above.
Furthermore, an embodiment of the present application also provides a computer-readable storage medium, where a device connection program is stored on the computer-readable storage medium, and the device connection program, when executed by a processor, implements the steps of the device connection method as described above.
The specific implementation of the computer-readable storage medium of the present application is substantially the same as the embodiments of the device connection method described above, and is not described herein again.
Embodiments of the present application also provide a computer program product, which includes computer program code, when the computer program code runs on a computer, the computer is caused to execute the method as described in the above various possible embodiments.
An embodiment of the present application further provides a chip, which includes a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that a device in which the chip is installed executes the method described in the above various possible embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the recitation of an element by the phrase "comprising an … …" does not exclude the presence of additional like elements in the process, method, article, or apparatus that comprises the element, and further, where similarly-named elements, features, or elements in different embodiments of the disclosure may have the same meaning, or may have different meanings, that particular meaning should be determined by their interpretation in the embodiment or further by context with the embodiment.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context. Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," "includes" and/or "including," when used in this specification, specify the presence of stated features, steps, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, steps, operations, elements, components, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "A, B or C" or "A, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of elements, functions, steps or operations are inherently mutually exclusive in some way.
It should be noted that step numbers such as S1 and S2 are used herein for the purpose of more clearly and briefly describing the corresponding content, and do not constitute a substantial limitation on the sequence, and those skilled in the art may perform S2 first and then S1 in specific implementation, which should be within the scope of the present application.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, in different orders, and may be performed alternately or at least partially with respect to other steps or sub-steps of other steps.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, a device, or a network device) to execute the method according to the embodiments of the present application.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are included in the scope of the present application.

Claims (101)

1. A device connection method, applied to an initiator device, the method comprising the steps of:
S1: acquiring connection information, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by a terminal, the second connection information is provided by target side equipment, and the connection information comprises at least one of equipment identification, equipment name, equipment address, equipment type, equipment quantity, equipment electric quantity, equipment state and connection parameters;
s2: connecting the target side equipment according to a first preset connection rule and/or a second preset connection rule and the connection information, wherein the first preset connection rule comprises at least one of the following:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information;
and/or the second preset connection rule comprises at least one of the following:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
2. The method of claim 1, wherein the step of S2 includes: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
3. The method of claim 1, wherein one or more of the connection information is ordered by a preset priority; generating the first preset connection rule according to the sorted connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
4. The method of claim 3, wherein the ordering one or more of the connection information by a preset priority comprises:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
5. The method of claim 1, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
6. The method of claim 1, wherein the meeting of the eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
The connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
7. The method of claim 1, wherein before the step of S1, further comprising the step of:
s0: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S1 is executed.
8. The method of claim 1, wherein before the step of S2, further comprising the step of:
the step S2 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
9. The method of claim 1, further comprising, after the step of S2, the step of:
s3: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
10. The method of claim 1, wherein the device state comprises a state of the terminal and/or a state of the target device.
11. The method according to claim 1, characterized by generating the first preset connection rule according to the first connection information and/or the second connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the first connection information and/or the second connection information to obtain a first preset connection rule.
12. The method of any of claims 1 to 11, further comprising: and after the initiator equipment is successfully connected with the target equipment, maintaining or disconnecting the connection between the terminal and the target equipment.
13. The method of any of claims 1 to 11, further comprising: and if the connection information changes, updating the corresponding preset connection rule.
14. A device connection method, applied to an initiator device, the method comprising the steps of:
s1: acquiring connection information, wherein the connection information comprises at least one first connection information and at least one second connection information, the first connection information is provided by a terminal, the second connection information is provided by target side equipment, and a first preset connection rule is generated according to the first connection information and/or the second connection information, or the first preset connection rule is obtained by matching one or more of the first connection information and/or the second connection information with a third preset connection rule;
S2: and connecting the target side equipment according to the first preset connection rule and/or the second preset connection rule and the connection information.
15. The method of claim 14, wherein the step of S2 includes: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
16. The method of claim 14, wherein the connection information comprises at least one of a device identification, a device name, a device address, a device type, a number of devices, a device power level, a device status, a connection parameter.
17. The method of claim 16, wherein one or more of the connection information is ordered by a preset priority; and generating the first preset connection rule according to the sorted connection information.
18. The method of claim 17, wherein the ordering one or more of the connection information by a preset priority comprises:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
19. The method of claim 16, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
20. The method of claim 16, wherein the first preset connection rule comprises at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
21. The method of claim 20, wherein the compliance with an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
22. The method of claim 14, wherein before the step of S1, further comprising the step of:
s0: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S1 is executed.
23. The method of claim 14, wherein before the step of S2, further comprising the step of:
The step S2 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
24. The method of claim 14, further comprising, after the step of S2, the step of:
s3: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
25. The method of claim 16, wherein the device state comprises a state of the terminal and/or a state of the target device.
26. The method according to any of claims 14 to 19 and 21 to 25, wherein the second preset connection rule comprises at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
27. The method of any one of claims 14 to 25, further comprising: and after the initiator equipment is successfully connected with the target equipment, maintaining or disconnecting the connection between the terminal and the target equipment.
28. The method of any one of claims 14 to 25, further comprising: and if the connection information changes, updating the corresponding preset connection rule.
29. A device connection method is applied to a terminal, and comprises the following steps:
s10: acquiring connection information of target side equipment according to a request of initiator side equipment, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by the terminal, the second connection information is provided by the target side equipment, and the connection information comprises at least one of equipment identification, equipment name, equipment address, equipment type, equipment quantity, equipment electric quantity, equipment state and connection parameters;
s20: sending the connection information to enable the initiator device to connect to the target device according to a first preset connection rule and/or a second preset connection rule, and the connection information, where the first preset connection rule includes at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information;
and/or the second preset connection rule comprises at least one of the following:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
30. The method of claim 29, wherein the step of S20 includes: and if the initiator device fails to connect the target device according to the first preset connection rule and the connection information, connecting the target device according to the second preset connection rule and the connection information.
31. The method of claim 29, wherein one or more of the connection information is ordered by a preset priority; generating the first preset connection rule according to the sorted connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
32. The method of claim 31, wherein the ordering one or more of the connection information by a preset priority comprises:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
33. The method of claim 29, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
34. The method of claim 29, wherein the compliance with an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
35. The method of claim 29, wherein before the step of S10, further comprising the step of:
s00: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S10 is executed.
36. The method as claimed in claim 29, wherein before the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information, further comprising the step of:
the step S20 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
37. The method as claimed in claim 29, further comprising, after the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information, the step of:
s30: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
38. The method of claim 29, further comprising: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
39. The method of any one of claims 29 to 38, wherein the target devices include at least a first target device and at least a second target device, further comprising:
and if the initiator device fails to be connected to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the terminal acquires and sends the connection information of the second target device, so that the initiator device is connected to the second target device according to a fourth preset connection rule and the connection information of the second target device.
40. The method of claim 39, wherein the fourth preset connection rule comprises at least one of:
after the initiator device fails to connect with the first target device, or after receiving a switching instruction, immediately or after delaying preset time, controlling the initiator device to connect with the second target device;
triggering the initiator device to connect the second target device after the failure times of the initiator device to connect the first target device reach the preset times;
and outputting prompt information.
41. The method of claim 39, wherein if the initiator device fails to connect to the second target device, further comprising at least one of:
controlling the initiator device to connect with the first target device;
controlling the initiator device to connect the second target device again;
after the connection failure times reach preset times, controlling the initiator device not to be connected with the first target device or the second target device any more;
and outputting prompt information.
42. The method of any one of claims 29 to 38, further comprising at least one of:
After the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
and if the connection information changes, updating the corresponding preset connection rule.
43. A device connection method is applied to a terminal, and comprises the following steps:
s10: acquiring connection information of target equipment according to a request of initiator equipment, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by the terminal, the second connection information is provided by the target equipment, and one or more items in the connection information are ordered according to a preset priority; generating a first preset connection rule according to the sorted connection information; or, matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule;
s20: and sending the connection information to enable the initiator device to be connected to the target device according to the first preset connection rule and/or the second preset connection rule and the connection information.
44. The method of claim 43, wherein the step of S20 includes: and if the initiator device fails to connect the target device according to the first preset connection rule and the connection information, connecting the target device according to the second preset connection rule and the connection information.
45. The method of claim 43, wherein the connection information comprises at least one of a device identification, a device name, a device address, a device type, a number of devices, a device power level, a device status, a connection parameter.
46. The method of claim 43, wherein the ordering one or more of the connection information by a preset priority comprises:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
and sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
47. The method of claim 45, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
48. The method of claim 45, wherein the first preset connection rule comprises at least one of:
If the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
49. The method of claim 48, wherein the meeting of an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
The connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
50. The method of claim 43, wherein before the step of S10, further comprising the steps of:
s00: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S10 is executed.
51. The method according to claim 43, further comprising, before the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information, the steps of:
the step S20 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
52. The method according to claim 43, further comprising, after the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information, the step of:
s30: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
53. The method of claim 43, further comprising: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
54. The method of any one of claims 43 to 47 and 49 to 53, wherein the second preset connection rule comprises at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
55. The method of claim 44 or 45, wherein the target devices comprise at least a first target device and at least a second target device, further comprising:
and if the initiator device fails to be connected to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the terminal acquires and sends the connection information of the second target device, so that the initiator device is connected to the second target device according to a fourth preset connection rule and the connection information of the second target device.
56. The method of claim 55, wherein the fourth preset connection rule comprises at least one of:
after the initiator device fails to connect with the first target device, or after receiving a switching instruction, immediately or after delaying preset time, controlling the initiator device to connect with the second target device;
triggering the initiator device to connect the second target device after the failure times of the initiator device to connect the first target device reach the preset times;
and outputting prompt information.
57. The method of claim 55, wherein if the initiator device fails to connect to the second target device, further comprising at least one of:
controlling the initiator device to connect with the first target device;
controlling the initiator device to connect the second target device again;
after the connection failure times reach preset times, controlling the initiator device not to be connected with the first target device or the second target device any more;
and outputting prompt information.
58. The method of any one of claims 43 to 53, further comprising at least one of:
After the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
and if the connection information changes, updating the corresponding preset connection rule.
59. A device connection method is applied to a terminal, and comprises the following steps:
s10: acquiring connection information of target equipment according to a request of initiator equipment, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by the terminal, and the second connection information is provided by the target equipment;
s20: and sending the connection information to enable the initiator device to be connected to the target device according to a first preset connection rule and/or a second preset connection rule and the connection information, wherein the target device comprises at least one first target device and at least one second target device, and if the initiator device fails to be connected to the first target device according to the first preset connection rule and/or the second preset connection rule and the connection information, the terminal acquires and sends the connection information of the second target device to enable the initiator device to be connected to the second target device according to a fourth preset connection rule and the connection information of the second target device.
60. The method of claim 59, wherein the step of S20 includes: and if the initiator device fails to connect the target device according to the first preset connection rule and the connection information, connecting the target device according to the second preset connection rule and the connection information.
61. The method of claim 59, wherein the connection information comprises at least one of a device identification, a device name, a device address, a device type, a number of devices, a device power level, a device status, a connection parameter.
62. The method of claim 61, wherein one or more of the connection information is ordered by a preset priority; generating the first preset connection rule according to the sorted connection information;
or the like, or, alternatively,
and matching a third preset connection rule through one or more items in the connection information to obtain a first preset connection rule.
63. The method of claim 62, wherein the ordering one or more of the connection information by a preset priority comprises:
sequencing all the connection information according to a first preset priority; and/or the presence of a gas in the gas,
And sequencing the connection information providing devices corresponding to the same connection information in the connection information according to a second preset priority.
64. The method of claim 61, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
65. The method of claim 61, wherein the first preset connection rule comprises at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
66. The method of claim 65, wherein the compliance with an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
67. The method of claim 59, further comprising, before said step of S10, the step of:
s00: it is detected whether a preset operation is received or whether it is in a preset mode, and if so, the step S10 is executed.
68. The method according to claim 59, further comprising, before the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information, the step of:
The step S20 is executed after receiving the feedback information of the target device and/or receiving the connection confirmation instruction.
69. The method according to claim 59, further comprising, after the step of the initiator device connecting to the target device according to the first preset connection rule and/or the second preset connection rule, and the connection information, the step of:
s30: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
70. The method of claim 59, further comprising: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
71. The method of any one of claims 59 to 64 and 66 to 70, wherein the second preset connection rule comprises at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
72. The method of claim 59, wherein the fourth preset connection rule comprises at least one of:
After the initiator device fails to connect with the first target device, or after receiving a switching instruction, immediately or after delaying preset time, controlling the initiator device to connect with the second target device;
triggering the initiator device to connect the second target device after the failure times of the initiator device to connect the first target device reach the preset times;
and outputting prompt information.
73. The method of claim 59, wherein if the initiator device fails to connect to the second target device, further comprising at least one of:
controlling the initiator device to connect with the first target device;
controlling the initiator device to connect the second target device again;
after the connection failure times reach preset times, controlling the initiator device not to be connected with the first target device or the second target device any more;
and outputting prompt information.
74. The method of any one of claims 59 to 70, further comprising at least one of:
after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
And if the connection information changes, updating the corresponding preset connection rule.
75. A device connection method, applied to a target device, the method comprising the steps of:
s100: acquiring connection information according to a request of a terminal, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by the terminal, the second connection information is provided by the target side device, and the connection information comprises at least one of a device identifier, a device name, a device address, a device type, a device number, a device electric quantity, a device state and a connection parameter;
s200: sending the connection information to enable initiator equipment connected with the terminal to be connected to the target equipment according to a first preset connection rule and/or a second preset connection rule and the connection information, wherein the first preset connection rule comprises at least one of the following:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information;
and/or the second preset connection rule comprises at least one of the following:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
76. The method of claim 75, wherein the S200 step comprises: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
77. The method of claim 75, comprising at least one of:
the equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
78. The method of claim 75, wherein said meeting an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
79. The method of claim 75, further comprising, before the step of S100, the steps of:
S000: and detecting whether a preset operation is received or whether the operation is in a preset mode, and if so, executing the step S100.
80. The method according to claim 75, further comprising, before the step of the initiator device connecting to the target device according to first and/or second preset connection rules and the connection information, the step of:
and after receiving the feedback information of the target side device and/or receiving a connection confirmation instruction, executing the step S200.
81. The method according to claim 75, further comprising, after the step of the initiator device connecting to the target device according to a first preset connection rule and/or a second preset connection rule, and the connection information, the step of:
s300: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
82. The method of claim 75, further comprising: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
83. The method of any one of claims 75 to 82, wherein the manner of obtaining connection information comprises at least one of:
Obtaining locally;
obtaining through a server;
and obtaining the data through other equipment connected with the target side equipment.
84. The method of any one of claims 75 to 82, further comprising: if a first preset instruction is received or the target device is detected to be in or switched to a preset mode, the method includes at least one of the following steps:
immediately or in a delayed manner disconnecting the device connection or all the connections of the target device;
if a second preset instruction is received, restoring to the previous state;
and outputting prompt information.
85. The method of any one of claims 75 to 82, further comprising at least one of:
after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
and if the connection information changes, updating the corresponding preset connection rule.
86. A device connection method, applied to a target device, the method comprising the steps of:
s100: acquiring connection information according to a request of a terminal, wherein the connection information comprises at least one piece of first connection information and at least one piece of second connection information, the first connection information is provided by the terminal, and the second connection information is provided by the target side equipment;
S200: sending the connection information to enable initiator equipment connected with the terminal to be connected to the target equipment according to a first preset connection rule and/or a second preset connection rule and the connection information, wherein if a first preset instruction is received or the target equipment is detected to be in or switched to a preset mode, the connection information comprises at least one of the following:
immediately or in a delayed manner disconnecting the device connection or all the connections of the target device;
if a second preset instruction is received, restoring to the previous state;
and outputting prompt information.
87. The method of claim 86, wherein the S200 step comprises: and if the target equipment is failed to be connected according to the first preset connection rule and the connection information, connecting the target equipment according to the second preset connection rule and the connection information.
88. The method of claim 86, wherein the connection information comprises at least one of a device identification, a device name, a device address, a device type, a number of devices, a device power level, a device status, a connection parameter.
89. The method of claim 88, comprising at least one of:
The equipment state comprises at least one of normal, abnormal, smooth, stuck, idle, overload, connection permission, connection non-permission, connection limitation, safety, non-safety, wearing, non-wearing, using and non-using;
the connection parameter includes at least one of connection duration, connection rate, connection start time, connection end time, and connection location.
90. The method of claim 88, wherein the first preset connection rule comprises at least one of:
if the equipment identification meets a first preset condition, connecting to the target side equipment according to the equipment identification and the connection information, and/or if the equipment identification does not meet the first preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment name meets a second preset condition, connecting to the target side equipment according to the equipment name and the connection information, and/or if the equipment name does not meet the second preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment address meets a third preset condition, connecting to the target side equipment according to the equipment address and the connection information, and/or if the equipment address does not meet the third preset condition, not connecting to the target side equipment and/or outputting prompt information;
If the equipment type meets a fourth preset condition, connecting to the target side equipment according to the equipment type and the connection information, and/or if the equipment type does not meet the fourth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment number meets a fifth preset condition, connecting to the target side equipment according to the equipment number and the connection information, and/or if the equipment number does not meet the fifth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment electric quantity meets a sixth preset condition, connecting to the target side equipment according to the equipment electric quantity and the connection information, and/or if the equipment electric quantity does not meet the sixth preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the equipment state meets a seventh preset condition, connecting to the target side equipment according to the equipment state and the connection information, and/or if the equipment state does not meet the seventh preset condition, not connecting to the target side equipment and/or outputting prompt information;
if the connected parameters meet the eighth preset condition, connecting to the target side equipment according to the connected parameters and the connected information, and/or if the connected parameters do not meet the eighth preset condition, not connecting to the target side equipment and/or outputting prompt information.
91. The method of claim 90, wherein the compliance with an eighth preset condition comprises at least one of:
the connection parameters comprise connection duration, and the historical connection duration is less than the connection duration;
the connection parameters comprise connection rate, and the current connection rate is greater than or equal to the connection rate;
the connection parameters comprise connection starting time, and the current time meets the requirement of the starting time;
the connection parameters comprise end time, and the current time meets the end time requirement;
the connection parameters comprise connection places, and the current place meets the requirements of the connection places.
92. The method of claim 86, prior to the step of S100, further comprising the step of:
s000: and detecting whether a preset operation is received or whether the operation is in a preset mode, and if so, executing the step S100.
93. The method according to claim 86, further comprising, before the step of said initiator device connecting to said target device according to a first preset connection rule and/or a second preset connection rule, and said connection information, the step of:
and after receiving the feedback information of the target side device and/or receiving a connection confirmation instruction, executing the step S200.
94. The method according to claim 86, further comprising, after the step of the initiator device connecting to the target device according to first and/or second preset connection rules and the connection information, the step of:
s300: and after the connection is successful or failed, outputting prompt information to at least one of the initiator device, the terminal and the target device.
95. The method of claim 86, further comprising: the terminal is also connected with the target side equipment at the same time, and/or the number of the target side equipment is multiple.
96. The method of any one of claims 86 to 95, wherein the second preset connection rule comprises at least one of:
if the connection is successful, the initiator device and the target device are not disconnected any more or are disconnected at regular time or are disconnected overtime; if the connection fails, the initiator device and the target device are not connected any more or connected in a timing or periodic manner.
97. The method of any one of claims 86 to 95, wherein the manner of obtaining connection information comprises at least one of:
obtaining locally;
obtaining through a server;
And obtaining the data through other equipment connected with the target side equipment.
98. The method of any one of claims 86 to 95, further comprising at least one of:
after the initiator device is successfully connected with the target device, maintaining or disconnecting the connection between the terminal and the target device;
and if the connection information changes, updating the corresponding preset connection rule.
99. An apparatus comprising a memory having stored thereon a computer program and a processor that, when executed, implements the method of any of claims 1-98.
100. A system, comprising:
at least one initiator device implementing the method of any one of claims 1 to 28;
at least one terminal implementing the method according to any one of claims 29 to 74;
at least one target device implementing the method of any one of claims 75 to 98.
101. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the method according to any one of claims 1 to 98.
CN202010881755.2A 2020-08-28 2020-08-28 Device connection method, device, system and readable storage medium Active CN111741539B (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202010881755.2A CN111741539B (en) 2020-08-28 2020-08-28 Device connection method, device, system and readable storage medium
PCT/CN2020/133164 WO2022041542A1 (en) 2020-08-28 2020-12-01 Processing method, device, and storage medium
EP20951210.2A EP4207924A4 (en) 2020-08-28 2020-12-01 Processing method, device, and storage medium
US18/175,774 US12034561B2 (en) 2020-08-28 2023-02-28 Processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010881755.2A CN111741539B (en) 2020-08-28 2020-08-28 Device connection method, device, system and readable storage medium

Publications (2)

Publication Number Publication Date
CN111741539A CN111741539A (en) 2020-10-02
CN111741539B true CN111741539B (en) 2020-12-08

Family

ID=72658119

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010881755.2A Active CN111741539B (en) 2020-08-28 2020-08-28 Device connection method, device, system and readable storage medium

Country Status (1)

Country Link
CN (1) CN111741539B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4207924A4 (en) * 2020-08-28 2024-05-15 Shenzhen Transsion Holdings Co., Ltd. Processing method, device, and storage medium
CN113613269B (en) * 2021-07-14 2022-06-24 无锡宇宁智能科技有限公司 Method for improving wifi connectivity, mobile terminal and readable storage medium
CN116669225B (en) * 2022-12-28 2024-04-19 广州源动智慧体育科技有限公司 Device connection method, electronic device and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209142A (en) * 2016-09-06 2016-12-07 济南大学 A kind of Intelligent bracelet based on hybrid network
CN110119090A (en) * 2018-02-05 2019-08-13 江苏怡通数码科技有限公司 A kind of control method for the multi-function robot can be realized health monitoring and home control
CN110300397A (en) * 2019-05-30 2019-10-01 惠州高盛达科技有限公司 The wifi connection method of AI intelligent sound box and AI intelligent sound box
CN111143683A (en) * 2019-12-26 2020-05-12 上海传英信息技术有限公司 Terminal interaction recommendation method and device and readable storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3076714B1 (en) * 2013-11-26 2019-08-14 Kyocera Corporation Mobile communication system, user terminal, and base station
CN110138837B (en) * 2019-04-15 2021-12-28 平安科技(深圳)有限公司 Request processing method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106209142A (en) * 2016-09-06 2016-12-07 济南大学 A kind of Intelligent bracelet based on hybrid network
CN110119090A (en) * 2018-02-05 2019-08-13 江苏怡通数码科技有限公司 A kind of control method for the multi-function robot can be realized health monitoring and home control
CN110300397A (en) * 2019-05-30 2019-10-01 惠州高盛达科技有限公司 The wifi connection method of AI intelligent sound box and AI intelligent sound box
CN111143683A (en) * 2019-12-26 2020-05-12 上海传英信息技术有限公司 Terminal interaction recommendation method and device and readable storage medium

Also Published As

Publication number Publication date
CN111741539A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN112004173B (en) Bluetooth headset switching method, mobile terminal and computer readable storage medium
CN111741539B (en) Device connection method, device, system and readable storage medium
CN107046696B (en) Communication network switching method and mobile terminal
CN109195143B (en) Network access method, mobile terminal and readable storage medium
CN109600740B (en) File downloading method and device and computer readable storage medium
CN111818667B (en) Device connection method, device and readable storage medium
CN109144705B (en) Application management method, mobile terminal and computer readable storage medium
CN107124718B (en) Data transmission method, mobile terminal and storage medium
CN112261535A (en) Major-minor switching method and device for wireless earphone and readable storage medium
CN108536383B (en) Game control method, game control equipment and computer readable storage medium
CN111935849A (en) Information processing method, device and storage medium
CN112612598A (en) Anti-addiction method, mobile terminal and computer-readable storage medium
CN110098651B (en) Charging method, charging device, electronic equipment and readable storage medium
CN109618377B (en) Call processing method, terminal, network side device and computer readable storage medium
CN108541046B (en) Network selection method, terminal and storage medium
CN110740454A (en) non-independent networking residing method, device and computer readable storage medium
CN108199964B (en) Transmission method, terminal, server and computer readable storage medium
CN107466081B (en) Wireless switching method and terminal
CN112770279B (en) Network sharing method, mobile terminal and computer readable storage medium
CN107517487B (en) Call control method and mobile terminal
CN107135498B (en) File sharing method and equipment
CN109818967B (en) Notification method, server, mobile terminal and computer readable storage medium
CN108541003B (en) VoWiFi call control method and device
CN108183833B (en) Response processing method and device and computer readable storage medium
CN107360599B (en) Intelligent wifi networking method and mobile terminal

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