CN116017381A - Bluetooth connection method, device and medium for air conditioner - Google Patents

Bluetooth connection method, device and medium for air conditioner Download PDF

Info

Publication number
CN116017381A
CN116017381A CN202211559862.9A CN202211559862A CN116017381A CN 116017381 A CN116017381 A CN 116017381A CN 202211559862 A CN202211559862 A CN 202211559862A CN 116017381 A CN116017381 A CN 116017381A
Authority
CN
China
Prior art keywords
air conditioner
connectable
analysis result
broadcast packet
address information
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.)
Pending
Application number
CN202211559862.9A
Other languages
Chinese (zh)
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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202211559862.9A priority Critical patent/CN116017381A/en
Publication of CN116017381A publication Critical patent/CN116017381A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to the technical field of Internet of things, and provides an air conditioner Bluetooth connection method, equipment and medium.

Description

Bluetooth connection method, device and medium for air conditioner
Technical Field
The invention relates to the technical field of the Internet of things, in particular to an air conditioner Bluetooth connection method, equipment and medium.
Background
With the realization of internet of things of air conditioners, more and more air conditioning equipment are carried with Bluetooth modules, and the control demands of mobile equipment developed based on Bluetooth communication are increasing. However, bluetooth connection pairing itself has the disadvantage of being time-consuming, and if there is one mobile device that is connecting to the paired bluetooth device, it is difficult for other mobile devices to successfully connect to the paired bluetooth device.
In the field of air conditioner control, the disadvantage is especially obvious, and if other mobile devices are maliciously connected and paired with air conditioner Bluetooth, the connection pairing and normal use between normal mobile devices and air conditioners are difficult to ensure on the existing Bluetooth connection pairing flow.
Disclosure of Invention
In view of the foregoing, it is necessary to provide an air conditioner bluetooth connection method, device and medium, which aims to solve the problem of interference of bluetooth connection between an air conditioner and a mobile device.
An air conditioner bluetooth connection method, the air conditioner bluetooth connection method comprising:
broadcasting a first connectable non-directional broadcast packet at preset time intervals;
when a second connectable non-directional broadcast packet sent by the mobile equipment aiming at the first connectable non-directional broadcast packet is received, analyzing the second connectable non-directional broadcast packet to obtain a second analysis result;
verifying the second analysis result, randomly generating a verification code after the second analysis result passes verification, and displaying the generated verification code;
when a third connectable non-directional broadcast packet sent by the mobile equipment based on the verification code is received, analyzing the third connectable non-directional broadcast packet to obtain a third analysis result;
Verifying the third analysis result, recording the address information of the mobile equipment in the third analysis result after the third analysis result passes the verification, and sending out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable mark;
and when receiving a connection request packet sent by the mobile equipment based on the fourth connectable non-directional broadcast packet, establishing Bluetooth connection with the mobile equipment according to the connection request packet.
According to a preferred embodiment of the present invention, the first connectable non-directional broadcast packet includes an air conditioner specific connectable verification flag and address information of the air conditioner.
According to a preferred embodiment of the present invention, the verifying the second analysis result includes:
when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is the same as the address information of the air conditioner and the second connectable non-directional broadcast packet includes the specific connectable verification mark of the air conditioner, determining that the second analysis result passes verification; or alternatively
And when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the second connectable non-directional broadcast packet does not include the air conditioner specific connectable verification mark, determining that the second analysis result is not verified.
According to a preferred embodiment of the present invention, the verifying the third analysis result includes:
when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is the same as the address information of the air conditioner, and the verification code included in the third connectable non-directional broadcast packet is the same as the verification code generated by the air conditioner, determining that the third analysis result passes verification; or alternatively
And when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the verification code included in the third connectable non-directional broadcast packet is different from the verification code generated by the air conditioner, determining that the third analysis result fails verification.
According to a preferred embodiment of the present invention, the establishing a bluetooth connection with the mobile device according to the connection request packet includes:
acquiring sender address information corresponding to the connection request packet;
comparing the sender address information with the recorded address information;
allowing a bluetooth connection to be established with the mobile device when the sender address information is the same as the recorded address information; or alternatively
And refusing to establish Bluetooth connection with the mobile equipment when the sender address information is different from the recorded address information.
An air conditioner Bluetooth connection method is applied to a mobile device, the mobile device is communicated with an air conditioner, and the air conditioner Bluetooth connection method comprises the following steps:
when a first connectable non-directional broadcast packet of the air conditioner broadcast is received, analyzing the first connectable non-directional broadcast packet to obtain a first analysis result;
verifying the first analysis result, and after the first analysis result passes the verification, sending a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result;
when detecting that a verification code is input, sending a third connectable non-directional broadcast packet according to the verification code;
and when a fourth connectable non-directional broadcast packet with an air conditioner specific connectable mark sent by the air conditioner is received, sending a connection request packet to the air conditioner.
According to a preferred embodiment of the present invention, the verifying the first analysis result includes:
when the first analysis result shows that the first connectable non-directional broadcasting packet comprises an air conditioner specific connectable verification mark, determining that the first analysis result passes verification; or alternatively
And when the first analysis result shows that the air conditioner specific connectable verification mark is not included in the first connectable non-directional broadcast packet, determining that the first analysis result is not verified.
According to a preferred embodiment of the present invention, the sending a second connectable non-directional broadcast packet to the air conditioner according to the first parsing result includes:
acquiring the air conditioner specific connectable verification mark and the address information of the air conditioner from the first analysis result;
acquiring address information of the mobile equipment;
generating the second connectable non-directional broadcast packet according to the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment;
and sending the second connectable non-directional broadcast packet to the air conditioner.
An air conditioner bluetooth connecting device operates in the air conditioner, the air conditioner communicates with mobile device, air conditioner bluetooth connecting device includes:
a broadcasting unit for broadcasting a first connectable non-directional broadcasting packet at every preset time interval;
the analyzing unit is used for analyzing the second connectable non-directional broadcast packet to obtain a second analyzing result when receiving the second connectable non-directional broadcast packet sent by the mobile device aiming at the first connectable non-directional broadcast packet;
The verification unit is used for verifying the second analysis result, randomly generating a verification code after the second analysis result passes the verification, and displaying the generated verification code;
the parsing unit is further configured to parse a third connectable non-directional broadcast packet sent by the mobile device based on the verification code to obtain a third parsing result when the parsing unit receives the third connectable non-directional broadcast packet;
the verification unit is further configured to verify the third analysis result, record address information of the mobile device in the third analysis result after the third analysis result passes the verification, and send out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable flag;
and the connection unit is used for establishing Bluetooth connection with the mobile equipment according to the connection request packet when receiving the connection request packet sent by the mobile equipment based on the fourth connectable non-directional broadcast packet.
An air conditioner bluetooth connection system operable with a mobile device in communication with an air conditioner, the air conditioner bluetooth connection system comprising:
the analyzing module is used for analyzing the first connectable non-directional broadcast packet to obtain a first analyzing result when receiving the first connectable non-directional broadcast packet of the air conditioner broadcast;
The verification module is used for verifying the first analysis result and sending a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result after the first analysis result passes the verification;
the sending module is used for sending a third connectable non-directional broadcast packet according to the verification code when the verification code is detected to be input;
and the connection module is used for sending a connection request packet to the air conditioner when receiving a fourth connectable non-directional broadcast packet with an air conditioner specific connectable mark sent by the air conditioner.
A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
And the processor executes the instructions stored in the memory to realize the air conditioner Bluetooth connection method.
A computer-readable storage medium having stored therein at least one instruction that is executed by a processor in a computer device to implement the air conditioner bluetooth connection method.
According to the technical scheme, the self-adaptive connection authentication in the non-connection stage can be realized by using the connectable non-directional broadcast in the broadcast stage, so that the resource occupation caused by illegal connection operation of other equipment is avoided, and the pairing efficiency and stability of Bluetooth connection are improved.
Drawings
Fig. 1 is a flowchart of a bluetooth connection method for an air conditioner according to a preferred embodiment of the present invention.
Fig. 2 is a flowchart of another preferred embodiment of the bluetooth connection method of the air conditioner of the present invention.
Fig. 3 is a functional block diagram of a preferred embodiment of the bluetooth connection device for air conditioner according to the present invention.
Fig. 4 is a functional block diagram of a preferred embodiment of the bluetooth connection system for air conditioner according to the present invention.
Fig. 5 is a schematic structural diagram of a computer device implementing a preferred embodiment of the bluetooth connection method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flowchart of a bluetooth connection method for an air conditioner according to a preferred embodiment of the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The air conditioner Bluetooth connection method is applied to one or more computer devices, wherein the computer device is a device capable of automatically performing numerical calculation and/or information processing according to preset or stored instructions, and the hardware comprises, but is not limited to, a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, an ASIC), a programmable gate array (Field-Programmable Gate Array, FPGA), a digital processor (Digital Signal Processor, DSP), an embedded device and the like.
The computer device may be any electronic product that can interact with a user in a human-computer manner, such as a personal computer, tablet computer, smart phone, personal digital assistant (Personal Digital Assistant, PDA), game console, interactive internet protocol television (Internet Protocol Television, IPTV), smart wearable device, etc.
The computer device may also include a network device and/or a user device. Wherein the network device includes, but is not limited to, a single network server, a server group composed of a plurality of network servers, or a Cloud based Cloud Computing (Cloud Computing) composed of a large number of hosts or network servers.
The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
The network in which the computer device is located includes, but is not limited to, the internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (Virtual Private Network, VPN), and the like.
The air conditioner Bluetooth connection method is applied to an air conditioner, the air conditioner is communicated with mobile equipment, and the method comprises the following steps:
s10, broadcasting a first connectable non-directional broadcasting packet at preset time intervals.
For example: the bluetooth device a periodically transmits broadcast data to other devices in the environment, and the non-directional broadcast data is used to notify the bluetooth device that receives the data: a connection may be initiated to bluetooth device a and bluetooth device a receives any connection. That is, the bluetooth device a issues a broadcast outward, the broadcast content being mainly for notification: other bluetooth devices receiving the broadcast may connect to bluetooth device a.
In this embodiment, each connectable non-directional broadcast packet further includes address information of the sender to indicate the identity of the sender.
In this embodiment, the preset time interval may be configured in a user-defined manner.
In this embodiment, the air conditioner refers to an air conditioner having a bluetooth function.
In this embodiment, the first connectable non-directional broadcast packet includes an air conditioner specific connectable verification flag and address information of the air conditioner.
The air conditioner specific connectable verification mark is mark information which needs to be formulated together by both communication parties. The air conditioner specific connectible verification flag may be a number, letter, binary data, etc., ultimately appearing as byte data of the communication bottom layer.
The address information of the air conditioner refers to a MAC (media access control) address of the air conditioner.
And S11, when a second connectable non-directional broadcast packet sent by the mobile equipment aiming at the first connectable non-directional broadcast packet is received, analyzing the second connectable non-directional broadcast packet to obtain a second analysis result.
In this embodiment, the second parsing result includes information carried by the second connectable non-directional broadcast packet, such as: address information, flag information, etc.
And S12, verifying the second analysis result, randomly generating a verification code after the second analysis result passes the verification, and displaying the generated verification code.
In this embodiment, the verifying the second analysis result includes:
when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is the same as the address information of the air conditioner and the second connectable non-directional broadcast packet includes the specific connectable verification mark of the air conditioner, determining that the second analysis result passes verification; or alternatively
And when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the second connectable non-directional broadcast packet does not include the air conditioner specific connectable verification mark, determining that the second analysis result is not verified.
In this embodiment, the verification code may be two digits, and the digits of the verification code may be configured according to the capacity of the display screen of the air conditioner.
After randomly generating the verification code, the verification code may be displayed on a display panel of the air conditioner for viewing.
And S13, when a third connectable non-directional broadcast packet sent by the mobile equipment based on the verification code is received, analyzing the third connectable non-directional broadcast packet to obtain a third analysis result.
In this embodiment, the third parsing result includes information carried by the third connectable non-directional broadcast packet, such as: verification code, address information of the mobile device, etc.
And S14, verifying the third analysis result, recording the address information of the mobile equipment in the third analysis result after the third analysis result passes the verification, and sending out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable mark.
In this embodiment, the verifying the third analysis result includes:
when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is the same as the address information of the air conditioner, and the verification code included in the third connectable non-directional broadcast packet is the same as the verification code generated by the air conditioner, determining that the third analysis result passes verification; or alternatively
And when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the verification code included in the third connectable non-directional broadcast packet is different from the verification code generated by the air conditioner, determining that the third analysis result fails verification.
Further, after the third analysis result passes the verification, the address information of the mobile device in the third analysis result is recorded, so that Bluetooth connection is carried out with the appointed mobile device according to the recorded address information.
Further, a fourth connectible non-directional broadcast packet with an air conditioner specific connectible flag is sent.
The air conditioner specific connectable mark is also mark information, and can be number, letter, binary data and the like, and finally represents byte data of a communication bottom layer.
And S15, when receiving a connection request packet sent by the mobile equipment based on the fourth connectable non-directional broadcast packet, establishing Bluetooth connection with the mobile equipment according to the connection request packet.
In this embodiment, the connection request packet is a connection request initiated by the initiator to a designated broadcaster.
In this embodiment, the establishing a bluetooth connection with the mobile device according to the connection request packet includes:
acquiring sender address information corresponding to the connection request packet;
comparing the sender address information with the recorded address information;
allowing a bluetooth connection to be established with the mobile device when the sender address information is the same as the recorded address information; or alternatively
And refusing to establish Bluetooth connection with the mobile equipment when the sender address information is different from the recorded address information.
Through comparing sender address information with the address information of record, can the targeted realization bluetooth be connected, avoid not causing the resource to occupy when illegally connecting the air conditioner by other equipment of air conditioner record, and then improved air conditioner bluetooth connection's efficiency and stability.
For example: after the air conditioner opens the Bluetooth broadcast, a plurality of other mobile devices exist in the environment, but connection requests initiated by other mobile devices after receiving the air conditioner Bluetooth broadcast can be ignored immediately by the air conditioner, only the mobile devices supporting air conditioner control (namely, addresses are recorded by the air conditioner) can be connected and paired, and the connection process is rapid and is not interfered by the connection of other mobile devices.
According to the technical scheme, the self-adaptive connection authentication in the non-connection stage can be realized by using the connectable non-directional broadcast in the broadcast stage, so that the resource occupation caused by illegal connection operation of other equipment is avoided, and the pairing efficiency and stability of Bluetooth connection are improved.
Fig. 2 is a flowchart of another preferred embodiment of the bluetooth connection method for air conditioner according to the present invention. The order of the steps in the flowchart may be changed and some steps may be omitted according to various needs.
The air conditioner Bluetooth connection method is applied to mobile equipment, the mobile equipment is communicated with an air conditioner, and the method comprises the following steps:
and S20, when a first connectable non-directional broadcast packet of the air conditioner broadcast is received, analyzing the first connectable non-directional broadcast packet to obtain a first analysis result.
In this embodiment, the first parsing result may include information carried by the first connectable non-directional broadcast packet, such as an air conditioner specific connectable verification flag and address information of the air conditioner.
S21, verifying the first analysis result, and after the first analysis result passes the verification, sending a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result.
In this embodiment, the verifying the first analysis result includes:
when the first analysis result shows that the first connectable non-directional broadcasting packet comprises an air conditioner specific connectable verification mark, determining that the first analysis result passes verification; or alternatively
And when the first analysis result shows that the air conditioner specific connectable verification mark is not included in the first connectable non-directional broadcast packet, determining that the first analysis result is not verified.
In this embodiment, the sending, according to the first parsing result, a second connectable non-directional broadcast packet to the air conditioner includes:
acquiring the air conditioner specific connectable verification mark and the address information of the air conditioner from the first analysis result;
acquiring address information of the mobile equipment;
generating the second connectable non-directional broadcast packet according to the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment;
and sending the second connectable non-directional broadcast packet to the air conditioner.
The address information of the mobile device may be a MAC (media access control) address of the mobile device.
The second connectable non-directional broadcasting packet comprises the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment, so that Bluetooth connection between the air conditioner and the appointed mobile equipment can be established through the connectable non-directional broadcasting packet.
S22, when the input of the verification code is detected, a third connectable non-directional broadcast packet is sent out according to the verification code.
In this embodiment, the verification code is included in the third connectable non-directional broadcast packet.
S23, when a fourth connectable non-directional broadcast packet with an air conditioner specific connectable flag sent by the air conditioner is received, a connection request packet is sent to the air conditioner.
The air conditioner specific connectable mark is used for indicating the appointed mobile equipment to establish Bluetooth connection with the air conditioner.
Wherein the connection request packet is a connection request initiated by the initiator to the designated broadcaster.
According to the technical scheme, the self-adaptive connection authentication in the non-connection stage can be realized by using the connectable non-directional broadcast in the broadcast stage, so that the resource occupation caused by illegal connection operation of other equipment is avoided, and the pairing efficiency and stability of Bluetooth connection are improved.
Fig. 3 is a functional block diagram of a bluetooth connection device for air conditioner according to a preferred embodiment of the present invention. The air conditioner bluetooth connection device 11 includes a broadcasting unit 110, a parsing unit 111, a verification unit 112, and a connection unit 113. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The air conditioner bluetooth connection device 11 operates in an air conditioner, which communicates with a mobile device, and includes:
the broadcasting unit 110 is configured to broadcast the first connectable non-directional broadcast packet at preset time intervals.
For example: the bluetooth device a periodically transmits broadcast data to other devices in the environment, and the non-directional broadcast data is used to notify the bluetooth device that receives the data: a connection may be initiated to bluetooth device a and bluetooth device a receives any connection. That is, the bluetooth device a issues a broadcast outward, the broadcast content being mainly for notification: other bluetooth devices receiving the broadcast may connect to bluetooth device a.
In this embodiment, each connectable non-directional broadcast packet further includes address information of the sender to indicate the identity of the sender.
In this embodiment, the preset time interval may be configured in a user-defined manner.
In this embodiment, the air conditioner refers to an air conditioner having a bluetooth function.
In this embodiment, the first connectable non-directional broadcast packet includes an air conditioner specific connectable verification flag and address information of the air conditioner.
The air conditioner specific connectable verification mark is mark information which needs to be formulated together by both communication parties. The air conditioner specific connectible verification flag may be a number, letter, binary data, etc., ultimately appearing as byte data of the communication bottom layer.
The address information of the air conditioner refers to a MAC (media access control) address of the air conditioner.
The parsing unit 111 is configured to parse a second connectable non-directional broadcast packet sent by the mobile device for the first connectable non-directional broadcast packet to obtain a second parsing result when the second connectable non-directional broadcast packet is received.
In this embodiment, the second parsing result includes information carried by the second connectable non-directional broadcast packet, such as: address information, flag information, etc.
The verification unit 112 is configured to verify the second analysis result, randomly generate a verification code after the second analysis result passes the verification, and display the generated verification code.
In this embodiment, the verifying unit 112 verifies the second analysis result includes:
when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is the same as the address information of the air conditioner, and the second connectable non-directional broadcast packet includes the specific connectable verification mark of the air conditioner, determining that the second analysis result passes verification; or alternatively
And when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the second connectable non-directional broadcast packet does not include the air conditioner specific connectable verification mark, determining that the second analysis result is not verified.
In this embodiment, the verification code may be two digits, and the digits of the verification code may be configured according to the capacity of the display screen of the air conditioner.
After randomly generating the verification code, the verification code may be displayed on a display panel of the air conditioner for viewing.
The parsing unit 111 is further configured to parse a third connectable non-directional broadcast packet sent by the mobile device based on the verification code to obtain a third parsing result when the parsing unit receives the third connectable non-directional broadcast packet.
In this embodiment, the third parsing result includes information carried by the third connectable non-directional broadcast packet, such as: verification code, address information of the mobile device, etc.
The verification unit 112 is further configured to verify the third analysis result, record address information of the mobile device in the third analysis result after the third analysis result passes the verification, and send out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable flag.
In this embodiment, the verifying unit 112 verifies that the third analysis result includes:
when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is the same as the address information of the air conditioner, and the verification code included in the third connectable non-directional broadcast packet is the same as the verification code generated by the air conditioner, determining that the third analysis result passes verification; or alternatively
And when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the verification code included in the third connectable non-directional broadcast packet is different from the verification code generated by the air conditioner, determining that the third analysis result fails verification.
Further, after the third analysis result passes the verification, the address information of the mobile device in the third analysis result is recorded, so that Bluetooth connection is carried out with the appointed mobile device according to the recorded address information.
Further, a fourth connectible non-directional broadcast packet with an air conditioner specific connectible flag is sent.
The air conditioner specific connectable mark is also mark information, and can be number, letter, binary data and the like, and finally represents byte data of a communication bottom layer.
The connection unit 113 is configured to, when receiving a connection request packet sent by the mobile device based on the fourth connectable non-directional broadcast packet, establish a bluetooth connection with the mobile device according to the connection request packet.
In this embodiment, the connection request packet is a connection request initiated by the initiator to a designated broadcaster.
In this embodiment, the connection unit 113 establishes a bluetooth connection with the mobile device according to the connection request packet includes:
acquiring sender address information corresponding to the connection request packet;
comparing the sender address information with the recorded address information;
allowing a bluetooth connection to be established with the mobile device when the sender address information is the same as the recorded address information; or alternatively
And refusing to establish Bluetooth connection with the mobile equipment when the sender address information is different from the recorded address information.
Through comparing sender address information with the address information of record, can the targeted realization bluetooth be connected, avoid not causing the resource to occupy when illegally connecting the air conditioner by other equipment of air conditioner record, and then improved air conditioner bluetooth connection's efficiency and stability.
For example: after the air conditioner opens the Bluetooth broadcast, a plurality of other mobile devices exist in the environment, but connection requests initiated by other mobile devices after receiving the air conditioner Bluetooth broadcast can be ignored immediately by the air conditioner, only the mobile devices supporting air conditioner control (namely, addresses are recorded by the air conditioner) can be connected and paired, and the connection process is rapid and is not interfered by the connection of other mobile devices.
According to the technical scheme, the self-adaptive connection authentication in the non-connection stage can be realized by using the connectable non-directional broadcast in the broadcast stage, so that the resource occupation caused by illegal connection operation of other equipment is avoided, and the pairing efficiency and stability of Bluetooth connection are improved.
Fig. 4 is a functional block diagram of a preferred embodiment of the bluetooth connection system for air conditioner according to the present invention. The air conditioner bluetooth connection system 22 comprises an analysis module 220, a verification module 221, an emission module 222 and a connection module 223. The module/unit referred to in the present invention refers to a series of computer program segments, which are stored in a memory, capable of being executed by a processor and of performing a fixed function. In the present embodiment, the functions of the respective modules/units will be described in detail in the following embodiments.
The air conditioner bluetooth connection system 22 operates on a mobile device that communicates with an air conditioner, comprising:
the parsing module 220 is configured to parse the first connectable non-directional broadcast packet when receiving the first connectable non-directional broadcast packet of the air-conditioning broadcast to obtain a first parsing result.
In this embodiment, the first parsing result may include information carried by the first connectable non-directional broadcast packet, such as an air conditioner specific connectable verification flag and address information of the air conditioner.
The verification module 221 is configured to verify the first analysis result, and send a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result after the first analysis result passes the verification.
In this embodiment, the verifying module 221 verifies that the first parsing result includes:
when the first analysis result shows that the first connectable non-directional broadcasting packet comprises an air conditioner specific connectable verification mark, determining that the first analysis result passes verification; or alternatively
And when the first analysis result shows that the air conditioner specific connectable verification mark is not included in the first connectable non-directional broadcast packet, determining that the first analysis result is not verified.
In this embodiment, the verifying module 221 sending the second connectable non-directional broadcast packet to the air conditioner according to the first parsing result includes:
acquiring the air conditioner specific connectable verification mark and the address information of the air conditioner from the first analysis result;
acquiring address information of the mobile equipment;
generating the second connectable non-directional broadcast packet according to the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment;
And sending the second connectable non-directional broadcast packet to the air conditioner.
The address information of the mobile device may be a MAC (media access control) address of the mobile device.
The second connectable non-directional broadcasting packet comprises the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment, so that Bluetooth connection between the air conditioner and the appointed mobile equipment can be established through the connectable non-directional broadcasting packet.
The sending module 222 is configured to send a third connectable non-directional broadcast packet according to the verification code when the verification code is detected to be input.
In this embodiment, the verification code is included in the third connectable non-directional broadcast packet.
The connection module 223 is configured to send a connection request packet to the air conditioner when receiving a fourth connectable non-directional broadcast packet with an air conditioner specific connectable flag sent by the air conditioner.
The air conditioner specific connectable mark is used for indicating the appointed mobile equipment to establish Bluetooth connection with the air conditioner.
Wherein the connection request packet is a connection request initiated by the initiator to the designated broadcaster.
According to the technical scheme, the self-adaptive connection authentication in the non-connection stage can be realized by using the connectable non-directional broadcast in the broadcast stage, so that the resource occupation caused by illegal connection operation of other equipment is avoided, and the pairing efficiency and stability of Bluetooth connection are improved.
Fig. 5 is a schematic structural diagram of a computer device according to a preferred embodiment of the present invention for implementing the bluetooth connection method of the air conditioner.
The computer device 1 may comprise a memory 12, a processor 13 and a bus, and may further comprise a computer program stored in the memory 12 and executable on the processor 13, such as an air-conditioning bluetooth connection program.
It will be appreciated by those skilled in the art that the schematic diagram is merely an example of the computer device 1 and does not constitute a limitation of the computer device 1, the computer device 1 may be a bus type structure, a star type structure, the computer device 1 may further comprise more or less other hardware or software than illustrated, or a different arrangement of components, for example, the computer device 1 may further comprise an input-output device, a network access device, etc.
It should be noted that the computer device 1 is only used as an example, and other electronic products that may be present in the present invention or may be present in the future are also included in the scope of the present invention by way of reference.
The memory 12 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 may in some embodiments be an internal storage unit of the computer device 1, such as a removable hard disk of the computer device 1. The memory 12 may in other embodiments also be an external storage device of the computer device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the computer device 1. Further, the memory 12 may also include both an internal storage unit and an external storage device of the computer device 1. The memory 12 may be used not only for storing application software installed in the computer device 1 and various types of data, such as codes of an air conditioner bluetooth connection program, etc., but also for temporarily storing data that has been output or is to be output.
The processor 13 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, a combination of various control chips, and the like. The processor 13 is a Control Unit (Control Unit) of the computer device 1, connects the respective components of the entire computer device 1 using various interfaces and lines, executes various functions of the computer device 1 and processes data by running or executing programs or modules stored in the memory 12 (for example, executing an air conditioner bluetooth connection program, etc.), and calls data stored in the memory 12.
The processor 13 executes the operating system of the computer device 1 and various types of applications installed. The processor 13 executes the application program to implement the steps of the various embodiments of the air conditioner bluetooth connection method described above, such as the steps shown in fig. 1-2.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory 12 and executed by the processor 13 to complete the present invention. The one or more modules/units may be a series of computer readable instruction segments capable of performing the specified functions, which instruction segments describe the execution of the computer program in the computer device 1. For example, the computer program may be divided into a broadcasting unit 110, a parsing unit 111, a verification unit 112, a connection unit 113 and/or a parsing module 220, a verification module 221, an issuing module 222, a connection module 223.
The integrated units implemented in the form of software functional modules described above may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a computer device, or a network device, etc.) or a processor (processor) to execute the portions of the air conditioner bluetooth connection method according to the embodiments of the present invention.
The modules/units integrated in the computer device 1 may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on this understanding, the present invention may also be implemented by a computer program for instructing a relevant hardware device to implement all or part of the procedures of the above-mentioned embodiment method, where the computer program may be stored in a computer readable storage medium and the computer program may be executed by a processor to implement the steps of each of the above-mentioned method embodiments.
Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory, or the like.
Further, the computer-readable storage medium 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 for at least one function, and the like; the storage data area may store data created from the use of blockchain nodes, and the like.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one straight line is shown in fig. 5, but not only one bus or one type of bus. The bus is arranged to enable a connection communication between the memory 12 and at least one processor 13 or the like.
Although not shown, the computer device 1 may further comprise a power source (such as a battery) for powering the various components, preferably the power source may be logically connected to the at least one processor 13 via a power management means, whereby the functions of charge management, discharge management, and power consumption management are achieved by the power management means. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The computer device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described in detail herein.
Further, the computer device 1 may also comprise a network interface, optionally comprising a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used for establishing a communication connection between the computer device 1 and other computer devices.
The computer device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the computer device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
Fig. 5 shows only a computer device 1 with components 12-13, it will be understood by those skilled in the art that the structure shown in fig. 5 is not limiting of the computer device 1 and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
In connection with fig. 1, the memory 12 in the computer device 1 stores a plurality of instructions to implement an air conditioner bluetooth connection method, the processor 13 may execute the plurality of instructions to implement:
broadcasting a first connectable non-directional broadcast packet at preset time intervals;
when a second connectable non-directional broadcast packet sent by the mobile equipment aiming at the first connectable non-directional broadcast packet is received, analyzing the second connectable non-directional broadcast packet to obtain a second analysis result;
verifying the second analysis result, randomly generating a verification code after the second analysis result passes verification, and displaying the generated verification code;
when a third connectable non-directional broadcast packet sent by the mobile equipment based on the verification code is received, analyzing the third connectable non-directional broadcast packet to obtain a third analysis result;
verifying the third analysis result, recording the address information of the mobile equipment in the third analysis result after the third analysis result passes the verification, and sending out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable mark;
and when receiving a connection request packet sent by the mobile equipment based on the fourth connectable non-directional broadcast packet, establishing Bluetooth connection with the mobile equipment according to the connection request packet.
In connection with fig. 2, the memory 12 in the computer device 1 stores a plurality of instructions to implement an air conditioner bluetooth connection method, the processor 13 may execute the plurality of instructions to implement:
when a first connectable non-directional broadcast packet of the air conditioner broadcast is received, analyzing the first connectable non-directional broadcast packet to obtain a first analysis result;
verifying the first analysis result, and after the first analysis result passes the verification, sending a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result;
when detecting that a verification code is input, sending a third connectable non-directional broadcast packet according to the verification code;
and when a fourth connectable non-directional broadcast packet with an air conditioner specific connectable mark sent by the air conditioner is received, sending a connection request packet to the air conditioner.
In particular, the specific implementation method of the above instructions by the processor 13 may refer to the description of the relevant steps in the corresponding embodiment of fig. 1-2, which is not repeated herein.
The data in this case were obtained legally.
In the several embodiments provided in the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The invention is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. The units or means stated in the invention may also be implemented by one unit or means, either by software or hardware. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. The air conditioner Bluetooth connection method is applied to an air conditioner, and the air conditioner is communicated with mobile equipment, and is characterized by comprising the following steps:
broadcasting a first connectable non-directional broadcast packet at preset time intervals;
when a second connectable non-directional broadcast packet sent by the mobile equipment aiming at the first connectable non-directional broadcast packet is received, analyzing the second connectable non-directional broadcast packet to obtain a second analysis result;
verifying the second analysis result, randomly generating a verification code after the second analysis result passes verification, and displaying the generated verification code;
when a third connectable non-directional broadcast packet sent by the mobile equipment based on the verification code is received, analyzing the third connectable non-directional broadcast packet to obtain a third analysis result;
Verifying the third analysis result, recording the address information of the mobile equipment in the third analysis result after the third analysis result passes the verification, and sending out a fourth connectable non-directional broadcast packet with an air-conditioner specific connectable mark;
and when receiving a connection request packet sent by the mobile equipment based on the fourth connectable non-directional broadcast packet, establishing Bluetooth connection with the mobile equipment according to the connection request packet.
2. The bluetooth connection method according to claim 1, wherein the first connectable non-directional broadcasting packet includes an air-conditioner specific connectable verification flag and address information of the air conditioner.
3. The bluetooth connection method of claim 2, wherein the verifying the second parsing result comprises:
when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is the same as the address information of the air conditioner and the second connectable non-directional broadcast packet includes the specific connectable verification mark of the air conditioner, determining that the second analysis result passes verification; or alternatively
And when the second analysis result shows that the address information included in the second connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the second connectable non-directional broadcast packet does not include the air conditioner specific connectable verification mark, determining that the second analysis result is not verified.
4. The bluetooth connection method of claim 2, wherein the verifying the third parsing result includes:
when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is the same as the address information of the air conditioner, and the verification code included in the third connectable non-directional broadcast packet is the same as the verification code generated by the air conditioner, determining that the third analysis result passes verification; or alternatively
And when the third analysis result shows that the address information included in the third connectable non-directional broadcast packet is different from the address information of the air conditioner, and/or the verification code included in the third connectable non-directional broadcast packet is different from the verification code generated by the air conditioner, determining that the third analysis result fails verification.
5. The bluetooth connection method according to claim 1, wherein the establishing a bluetooth connection with the mobile device according to the connection request packet comprises:
acquiring sender address information corresponding to the connection request packet;
comparing the sender address information with the recorded address information;
allowing a bluetooth connection to be established with the mobile device when the sender address information is the same as the recorded address information; or alternatively
And refusing to establish Bluetooth connection with the mobile equipment when the sender address information is different from the recorded address information.
6. The air conditioner Bluetooth connection method is applied to mobile equipment, and the mobile equipment is communicated with an air conditioner, and is characterized by comprising the following steps:
when a first connectable non-directional broadcast packet of the air conditioner broadcast is received, analyzing the first connectable non-directional broadcast packet to obtain a first analysis result;
verifying the first analysis result, and after the first analysis result passes the verification, sending a second connectable non-directional broadcast packet to the air conditioner according to the first analysis result;
when detecting that a verification code is input, sending a third connectable non-directional broadcast packet according to the verification code;
and when a fourth connectable non-directional broadcast packet with an air conditioner specific connectable mark sent by the air conditioner is received, sending a connection request packet to the air conditioner.
7. The bluetooth connection method of claim 6, wherein the verifying the first parsing result comprises:
when the first analysis result shows that the first connectable non-directional broadcasting packet comprises an air conditioner specific connectable verification mark, determining that the first analysis result passes verification; or alternatively
And when the first analysis result shows that the air conditioner specific connectable verification mark is not included in the first connectable non-directional broadcast packet, determining that the first analysis result is not verified.
8. The bluetooth connection method according to claim 7, wherein the transmitting a second connectable non-directional broadcast packet to the air conditioner according to the first parsing result comprises:
acquiring the air conditioner specific connectable verification mark and the address information of the air conditioner from the first analysis result;
acquiring address information of the mobile equipment;
generating the second connectable non-directional broadcast packet according to the air conditioner specific connectable verification mark, the address information of the air conditioner and the address information of the mobile equipment;
and sending the second connectable non-directional broadcast packet to the air conditioner.
9. A computer device, the computer device comprising:
a memory storing at least one instruction; a kind of electronic device with high-pressure air-conditioning system
A processor executing instructions stored in the memory to implement the air conditioner bluetooth connection method according to any one of claims 1 to 5 and/or the air conditioner bluetooth connection method according to any one of claims 6 to 8.
10. A computer-readable storage medium, characterized by: the computer readable storage medium has stored therein at least one instruction for execution by a processor in a computer device to implement the air conditioner bluetooth connection method according to any one of claims 1 to 5 and/or the air conditioner bluetooth connection method according to any one of claims 6 to 8.
CN202211559862.9A 2022-12-06 2022-12-06 Bluetooth connection method, device and medium for air conditioner Pending CN116017381A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211559862.9A CN116017381A (en) 2022-12-06 2022-12-06 Bluetooth connection method, device and medium for air conditioner

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211559862.9A CN116017381A (en) 2022-12-06 2022-12-06 Bluetooth connection method, device and medium for air conditioner

Publications (1)

Publication Number Publication Date
CN116017381A true CN116017381A (en) 2023-04-25

Family

ID=86025667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211559862.9A Pending CN116017381A (en) 2022-12-06 2022-12-06 Bluetooth connection method, device and medium for air conditioner

Country Status (1)

Country Link
CN (1) CN116017381A (en)

Similar Documents

Publication Publication Date Title
WO2023056943A1 (en) Internet of things rule engine-based terminal control method and apparatus, and device and medium
CN113806434B (en) Big data processing method, device, equipment and medium
CN114301670B (en) Terminal authentication method, device, equipment and medium based on IPV6 address
CN116405332B (en) Service request method, device, equipment and medium based on Nginx gateway
CN116743885B (en) UDP engine-based data transmission method, device, equipment and medium
CN116017381A (en) Bluetooth connection method, device and medium for air conditioner
CN115866604A (en) Air conditioner Bluetooth connection method, system, equipment and medium
CN117316359B (en) Blood detection process tracking method, device, equipment and medium
CN116361753B (en) Authority authentication method, device, equipment and medium
CN116455997B (en) STEP market multipath forwarding method, STEP market multipath forwarding device, STEP market multipath forwarding equipment and STEP market multipath forwarding medium
CN116306591B (en) Flow form generation method, device, equipment and medium
CN116414366B (en) Middleware interface generation method, device, equipment and medium
CN115934576B (en) Test case generation method, device, equipment and medium in transaction scene
CN112235148B (en) VLAN configuration detection method, VLAN configuration detection device, electronic equipment and storage medium
CN116418896B (en) Task execution method, device, equipment and medium based on timer
CN117151641A (en) Task tracking method, device, equipment and medium based on in-area personnel management
CN117573217A (en) Personnel inquiry task execution method, device, equipment and medium
CN117151955A (en) Traffic case processing state tracking method, device, equipment and medium
CN116843454A (en) Channel information management method, device, equipment and medium
CN117170663A (en) Data dictionary generating method, device, equipment and medium based on financial business
CN115985312A (en) Air conditioner control method, device, equipment and medium based on voice recognition
CN116957649A (en) Customer screening method, device, equipment and medium
CN114138378A (en) Non-invasive current-limiting fusing method, device, equipment and medium
CN115765902A (en) Audio signal switching method, device, equipment and medium
CN116994279A (en) Invoice data acquisition method, invoice data acquisition device, invoice data acquisition equipment and invoice data acquisition medium

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