CN113453207A - Identity type determination method and device, storage medium and electronic device - Google Patents

Identity type determination method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113453207A
CN113453207A CN202110686909.7A CN202110686909A CN113453207A CN 113453207 A CN113453207 A CN 113453207A CN 202110686909 A CN202110686909 A CN 202110686909A CN 113453207 A CN113453207 A CN 113453207A
Authority
CN
China
Prior art keywords
identity
type
information
determining
identity 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.)
Granted
Application number
CN202110686909.7A
Other languages
Chinese (zh)
Other versions
CN113453207B (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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110686909.7A priority Critical patent/CN113453207B/en
Publication of CN113453207A publication Critical patent/CN113453207A/en
Application granted granted Critical
Publication of CN113453207B publication Critical patent/CN113453207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/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
    • H04W8/00Network data management
    • H04W8/22Processing or transfer of terminal data, e.g. status or physical capabilities
    • H04W8/24Transfer of terminal data

Abstract

The embodiment of the invention provides an identity type determination method, an identity type determination device, a storage medium and an electronic device, wherein the identity type determination method comprises the following steps: receiving a first broadcast message sent by first equipment, wherein the first broadcast message comprises first identity information of the first equipment, and the first identity information is used for indicating an identity supported by the first equipment; determining second identity information of a second device, wherein the second identity information is used for indicating identities supported by the second device; determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information. By the method and the device, the problems of inaccurate identity type determination and poor user experience in the related technology are solved, the accuracy of identity determination is improved, and the user experience is improved.

Description

Identity type determination method and device, storage medium and electronic device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to an identity type determining method, an identity type determining device, a storage medium and an electronic device.
Background
With the development of the internet of things and smart homes, the number of BLE (Bluetooth) terminal devices is increased, and when most of the BLE terminal devices are connected with other devices in a pairing mode, the role of the device serving as a master or slave can be clearly defined. But some BLE terminal devices need to be paired and connected with the same type of BLE terminal devices, and when a plurality of same type of BLE terminal devices are paired and connected, a chain network needs to be established in a linear mode. The connection diagram of the master device and the slave device can be seen in fig. 1.
In the related art, for the pairing connection in the linear manner, a selection right is handed to a user, the user determines which device is used as a master and which device is used as a slave, or two connections are established simultaneously, and one device is determined to be the master and the other device is determined to be the slave according to a result of data interaction and negotiation between the two devices. The first scheme requires the participation of a user to determine the role of the equipment, and the user experience is poor; the second scheme is complicated in interaction, long in flow and high in error probability.
Therefore, the problems of inaccurate identity type determination and poor user experience exist in the related technology.
In view of the above problems in the related art, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides an identity type determination method, an identity type determination device, a storage medium and an electronic device, and at least solves the problems of inaccurate identity type determination and poor user experience in the related technology.
According to an embodiment of the present invention, there is provided an identity type determination method including: receiving a first broadcast message sent by first equipment, wherein the first broadcast message comprises first identity information of the first equipment, and the first identity information is used for indicating an identity supported by the first equipment; determining second identity information of a second device, wherein the second identity information is used for indicating identities supported by the second device; determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
According to another embodiment of the present invention, there is provided an identity type determination apparatus including: a receiving module, configured to receive a first broadcast message sent by a first device, where the broadcast message includes first identity information of the first device, and the first identity information is used to indicate an identity supported by the first device; a first determining module, configured to determine second identity information of a second device, where the second identity information is used to indicate an identity supported by the second device; a second determination module to determine a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
According to yet another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, a first broadcast message sent by first equipment is received, wherein the first broadcast message comprises first identity information of the first equipment, second identity information of second equipment is determined, and a first identity type of the first equipment and a second identity type of the second equipment are determined according to the first identity information and the second identity information. The second device can determine the first identity type of the first device and the second identity type of the second device only by receiving the first broadcast message sent by the first device, complex interaction between the first device and the second device is not needed, and the identity type of the device is not needed to be specified by a user, so that the problems of inaccurate identity type determination and poor user experience in the related technology can be solved, the accuracy of identity determination is improved, and the user experience is improved.
Drawings
FIG. 1 is a schematic diagram of a master-slave device connection in the related art;
fig. 2 is a block diagram of a hardware structure of a mobile terminal of an identity type determination method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a method of identity type determination according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method for identity type determination in accordance with a specific embodiment of the present invention;
fig. 5 is a block diagram of the structure of an identity type determination apparatus according to an embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking the example of the operation on the mobile terminal, fig. 2 is a hardware structure block diagram of the mobile terminal of the identity type determination method according to the embodiment of the present invention. As shown in fig. 2, the mobile terminal may include one or more (only one shown in fig. 2) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may further include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 2 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 2, or have a different configuration than shown in FIG. 2.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to the identity type determination method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, an identity type determining method is provided, and fig. 3 is a flowchart of the identity type determining method according to the embodiment of the present invention, as shown in fig. 3, the flowchart includes the following steps:
step S302, receiving a first broadcast message sent by a first device, wherein the broadcast message includes first identity information of the first device, and the first identity information is used for indicating an identity supported by the first device;
step S304, determining second identity information of a second device, wherein the second identity information is used for indicating an identity supported by the second device;
step S306, determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
In the above embodiment, the first device and the second device may both be bluetooth devices, the first identity type may be a master or a Slave, and the second identity type may be a master or a Slave. The first identity information is used for indicating the identities supported by the first device, and the second identity information is used for indicating the identities supported by the second device. The first device and the second device may be devices supporting the identity of a master device, devices supporting the identity of a slave device, or devices supporting both the identity of a master device and the identity of a slave device.
In the above embodiment, the second device may receive the first broadcast message broadcast by the first device, the second device may determine the first identity information of the first device according to the first broadcast message, meanwhile, the second device may also broadcast its own second identity information to other devices (including the first device), the second device may determine the first identity type and the second identity type according to the first identity information and the second identity information, and the other devices may also determine their own identity types according to the second identity information and their own identity information. Namely, when the user does not need to participate, the role of the equipment can be determined without establishing connection, so that the user experience is improved, and the method is simple and is not easy to make mistakes.
Optionally, the main body of the above steps may be a second device, a background processor, or other devices with similar processing capabilities, and may also be a machine integrated with at least a data processing device, where the data processing device may include a terminal such as a computer, a mobile phone, and the like, but is not limited thereto.
According to the invention, a first broadcast message sent by first equipment is received, wherein the first broadcast message comprises first identity information of the first equipment, second identity information of second equipment is determined, and a first identity type of the first equipment and a second identity type of the second equipment are determined according to the first identity information and the second identity information. The second device can determine the first identity type of the first device and the second identity type of the second device only by receiving the first broadcast message sent by the first device, complex interaction between the first device and the second device is not needed, and the identity of the device is not needed to be specified by a user.
In one exemplary embodiment, determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information comprises: when the first identity information indicates that the first device only supports a first type identity and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the first type identity and determining that the second identity type is the first type identity; wherein the first type identity is a master device or a slave device. In this embodiment, after determining the first identity information, the second device may determine, according to the first identity information, an identity type supported by the first device, and determine, according to the second identity information, an identity type supported by the second device. The first identity type and the second identity type are determined to be the first type identity when both the first device and the second device support only the first type identity. Wherein the first type identity may be a master or a slave. That is, when both the first device and the second device can only be used as a master device or a slave device, the identity types of the first device and the second device are determined as the master device or the slave device, and the first device and the second device do not establish a connection relationship.
In one exemplary embodiment, determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information comprises: when the first identity information indicates that the first device only supports a first type identity, and the second identity information indicates that the second device supports the first type identity and a second type identity, or the second identity information indicates that the second device supports the second type identity, determining that the first identity type is the first type identity, and determining that the second identity type is the second type identity; or when the first identity information indicates that the first device supports a first type identity and a second type identity, or the first identity information indicates that the first device supports the second type identity, and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the second type identity, and determining that the second identity type is the first type identity; the first type identity is different from the second type identity, and the first type identity and the second type identity are slave devices or master devices. In this embodiment, after determining the first identity information, the second device may determine, according to the first identity information, a type identity supported by the first device, and determine, according to the second identity information, an identity type supported by the second device. When the first device only supports a first type identity, the second device supports both the first type identity and the second type identity, or the second device only supports the second type identity, the first identity type of the first device is determined as the first type identity, and the second identity type of the second device is determined as the second type identity. When the second device only supports the first type identity, the first device supports both the first type identity and the second type identity, or the first device only supports the second type identity, the second identity type of the second device is determined as the first type identity, and the first identity type of the first device is determined as the second type identity. That is, when the first device may be a master device and a slave device and the second device may be only a master device or a slave device, the second device is determined as the master device or the slave device, and accordingly, the identity of the first device is an identity different from the identity of the second device and the first device is determined as the slave device or the master device.
In one exemplary embodiment, determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information comprises: when the first identity information indicates that the first equipment supports a first type identity and a second type identity, and the second identity information indicates that the second equipment supports the first type identity and the second type identity, determining first equipment information of the first equipment and second equipment information of the second equipment; determining the first identity type and the second identity type based on the first device information and the second device information. In this embodiment, when the first device and the second device both support two types of identities, the first device information of the first device and the second device information of the second device are determined, and the first identity type and the second identity type are determined according to the first device information and the second device information. The first device information and the second device information both include unique identification information of the first device and the second device, and the first identity type and the second identity type can be determined according to the unique identification information of the devices.
In one exemplary embodiment, determining the first identity type and the second identity type based on the first device information and the second device information comprises: determining a first MAC address included in the first device information; determining a second MAC address included in the second device information; determining the first identity type and the second identity type based on the first MAC address and the second MAC address. In this embodiment, the first identity type and the second identity type may be determined based on MAC addresses, i.e., MACs, of the first device and the second device. And the MAC is used for comparison, and the collision risk of the same MAC cannot occur because the MAC has equipment uniqueness.
In one exemplary embodiment, determining the first identity type and the second identity type based on the first medium access control address and the second medium access control address comprises: comparing the first MAC address with the second MAC address to obtain a comparison result; determining the first identity as a master and the second identity as a slave when the comparison indicates that the first MAC address is greater than the second MAC address; determining the first identity type as the slave device and the second identity type as the master device when the comparison result indicates that the first MAC address is less than the second MAC address. In this embodiment, when the first device and the second device both support the master device and the slave device, the MACs of the first device and the second device may be compared, and the identity of the device with the larger MAC value may be determined as the master device, and the identity of the device with the smaller MAC value may be determined as the slave device.
In one exemplary embodiment, the method further comprises: initiating a pairing request to the first device to establish a communication connection with the first device when the first identity type and the second identity type are different. In this embodiment, when the identity types of the first device and the second device are different, it is described that one master device and one slave device must exist in the first device and the second device, and therefore, a pairing request may be sent to the first device to establish a communication connection with the first device.
In one exemplary embodiment, the method further comprises: determining that a communication connection between the second device and the first device fails when the first identity type and the second identity type are the same; transmitting a second broadcast message including the second identity information to determine a third identity type of the second device based on the second broadcast message. In this embodiment, when the first identity and the second identity are the same, the broadcast message including the own identity information may be broadcast to other devices, and after receiving the broadcast message, the other devices determine the identities of the other devices according to the other identity information and the identity information included in the received broadcast message, and establish a communication connection when the identities are different.
The identity type determination method is described below with reference to specific embodiments:
fig. 4 is a flowchart of an identity type determining method according to an embodiment of the present invention, as shown in fig. 4, before a pairing connection process of BLE devices of the same type, a role that can be supported by the device may be carried in a broadcast manner, where there are 3 cases: 1. slave; 2. a master; 3. slave/master. After the opposite terminal device scans the relevant information, the judgment can be carried out by combining the self-supportable role. If both devices support master/slave, the two devices use the broadcasted MAC to compare, the device with the larger MAC value is the master, and the device with the smaller MAC value is the slave. The determined identity type classification manner of the first device and the second device can be referred to table 1. Where X in table 1 indicates that device a and device B cannot establish a connection.
TABLE 1
Figure BDA0003124903790000081
As shown in table 1, when both the device a and the device B (corresponding to the first device and the second device) support only slave (i.e. slave), the identities of both the device a and the device B are slave, and at this time, the two devices cannot establish a connection. When the device a supports slave and the device B supports master, the device B is determined as master and the device a is determined as slave, which can establish connection, and the device B, i.e. the master, can send a control instruction to the slave, i.e. the device a. When the device A supports slave and the device B supports slave/master, the device B is determined as master and the device A is determined as slave, the two can establish connection, and the device B sends a control instruction to the slave, namely the device A.
When the device A supports a master and the device B supports a slave, the device A is determined as the master and the device B is determined as the slave, the master and the device B can be connected, and the device A sends a control instruction to the device B. When the equipment A supports the master and the equipment B supports the master, the identities of the equipment A and the equipment B are confirmed to be the masters, and the equipment A and the equipment B cannot be connected. When the device A supports a master and the device B supports a slave/master, the device A is determined as the master and the device B is determined as the slave, the device A and the device B can establish connection, and the device A sends a control instruction to the device B.
When the device A supports slave/master and the device B supports slave, the device A is determined as master and the device B is determined as slave, the device A and the device B can establish connection, and the device A sends a control instruction to the device B. When the device A supports slave/master and the device B supports master, the device B is determined as master and the device A is determined as slave, the device A and the slave can establish connection, and the device B sends a control instruction to the device A. When the device A supports the slave/master and the device B supports the slave/master, the two devices can use the broadcasted MAC to compare, the device with the larger MAC value is the master, and the device with the smaller MAC value is the slave.
In the foregoing embodiment, the first device and the second device can determine the identity information through the broadcast message, and user participation is not required, thereby improving user experience. The first device and the second device do not need to be connected and interacted and negotiated, and the efficiency of determining the identity type is improved. And the MAC is used for comparison, and the collision risk of the same MAC can not occur because the MAC has equipment uniqueness. And the intellectualization of identity confirmation type is fully embodied through self-adaptive negotiation.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention 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, or a network device) to execute the method according to the embodiments of the present invention.
In this embodiment, an identity type determining apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of an embodiment of an identity type determining apparatus according to the present invention, and as shown in fig. 5, the apparatus includes:
a receiving module 52, configured to receive a first broadcast message sent by a first device, where the broadcast message includes first identity information of the first device, and the first identity information is used to indicate an identity supported by the first device;
a first determining module 54, configured to determine second identity information of a second device, where the second identity information is used to indicate identities supported by the second device;
a second determining module 56, configured to determine a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
In an example embodiment, second determination module 56 may enable determining a first identity of the first device and a second identity of the second device based on the first identity information and the second identity information by: when the first identity information indicates that the first device only supports a first type identity and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the first type identity and determining that the second identity type is the first type identity; wherein the first type identity is a master device or a slave device.
In an example embodiment, second determination module 56 may enable determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information by: when the first identity information indicates that the first device only supports a first type identity, and the second identity information indicates that the second device supports the first type identity and a second type identity, or the second identity information indicates that the second device supports the second type identity, determining that the first identity type is the first type identity, and determining that the second identity type is the second type identity; or when the first identity information indicates that the first device supports a first type identity and a second type identity, or the first identity information indicates that the first device supports the second type identity, and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the second type identity, and determining that the second identity type is the first type identity; the first type identity is different from the second type identity, and the first type identity and the second type identity are slave devices or master devices.
In an example embodiment, second determination module 56 may enable determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information by: when the first identity information indicates that the first equipment supports a first type identity and a second type identity, and the second identity information indicates that the second equipment supports the first type identity and the second type identity, determining first equipment information of the first equipment and second equipment information of the second equipment; determining the first identity type and the second identity type based on the first device information and the second device information.
In an example embodiment, second determination module 56 may enable determining the first identity type and the second identity type based on the first device information and the second device information by: determining a first MAC address included in the first device information; determining a second MAC address included in the second device information; determining the first identity type and the second identity type based on the first media access control address and the second media access control address.
In an exemplary embodiment, the second determining module 56 may determine the first identity type and the second identity type based on the first mac address and the second mac address by: comparing the first MAC address with the second MAC address to obtain a comparison result; determining the first identity type as a master device and the second identity type as a slave device when the comparison result indicates that the first MAC address is greater than the second MAC address; determining the first identity type as the slave device and the second identity type as the master device when the comparison result indicates that the first MAC address is less than the second MAC address.
In an exemplary embodiment, the apparatus may be further configured to: sending a pairing request to the first device to establish a communication connection with the first device when the first identity type and the second identity type are different.
In an exemplary embodiment, the apparatus may be further configured to: determining that a communication connection between the second device and the first device fails when the first identity type and the second identity type are the same; transmitting a second broadcast message including the second identity information to determine a third identity type of the second device based on the second broadcast message.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method as set forth in any of the above.
In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
In an exemplary embodiment, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary embodiments, and details of this embodiment are not repeated herein.
It will be apparent to those skilled in the art that the various modules or steps of the invention described above may be implemented using a general purpose computing device, they may be centralized on a single computing device or distributed across a network of computing devices, and they may be implemented using program code executable by the computing devices, such that they may be stored in a memory device and executed by the computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into various integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (11)

1. A method for identity type determination, comprising:
receiving a first broadcast message sent by first equipment, wherein the first broadcast message comprises first identity information of the first equipment, and the first identity information is used for indicating an identity supported by the first equipment;
determining second identity information of a second device, wherein the second identity information is used for indicating identities supported by the second device;
determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
2. The method of claim 1, wherein determining a first identity type for the first device and a second identity type for the second device based on the first identity information and the second identity information comprises:
when the first identity information indicates that the first device only supports a first type identity and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the first type identity and determining that the second identity type is the first type identity;
wherein the first type identity is a master device or a slave device.
3. The method of claim 1, wherein determining a first identity type for the first device and a second identity type for the second device based on the first identity information and the second identity information comprises:
when the first identity information indicates that the first device only supports a first type identity, and the second identity information indicates that the second device supports the first type identity and a second type identity, or the second identity information indicates that the second device supports the second type identity, determining that the first identity type is the first type identity, and determining that the second identity type is the second type identity; or
When the first identity information indicates that the first device supports a first type identity and a second type identity, or the first identity information indicates that the first device supports the second type identity, and the second identity information indicates that the second device only supports the first type identity, determining that the first identity type is the second type identity, and determining that the second identity type is the first type identity;
the first type identity is different from the second type identity, and the first type identity and the second type identity are slave devices or master devices.
4. The method of any of claims 1 to 3, wherein determining a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information comprises:
when the first identity information indicates that the first equipment supports a first type identity and a second type identity, and the second identity information indicates that the second equipment supports the first type identity and the second type identity, determining first equipment information of the first equipment and second equipment information of the second equipment;
determining the first identity type and the second identity type based on the first device information and the second device information.
5. The method of claim 4, wherein determining the first identity type and the second identity type based on the first device information and the second device information comprises:
determining a first MAC address included in the first device information;
determining a second MAC address included in the second device information;
determining the first identity type and the second identity type based on the first MAC address and the second MAC address.
6. The method of claim 5, wherein determining the first identity type and the second identity type based on the first MAC address and the second MAC address comprises:
comparing the first MAC address with the second MAC address to obtain a comparison result;
determining the first identity as a master and the second identity as a slave when the comparison indicates that the first MAC address is greater than the second MAC address;
determining the first identity type as the slave device and the second identity type as the master device when the comparison result indicates that the first MAC address is less than the second MAC address.
7. The method according to any one of claims 1 to 6, further comprising:
initiating a pairing request to the first device to establish a communication connection with the first device when the first identity type and the second identity type are different.
8. The method according to any one of claims 1 to 7, further comprising:
determining that a communication connection between the second device and the first device fails when the first identity type and the second identity type are the same;
transmitting a second broadcast message including the second identity information to determine a third identity type of the second device based on the second broadcast message.
9. An identity type determination apparatus, comprising:
a receiving module, configured to receive a first broadcast message sent by a first device, where the broadcast message includes first identity information of the first device, and the first identity information is used to indicate an identity supported by the first device;
a first determining module, configured to determine second identity information of a second device, where the second identity information is used to indicate an identity supported by the second device;
a second determination module to determine a first identity type of the first device and a second identity type of the second device based on the first identity information and the second identity information.
10. A computer-readable storage medium, in which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 8.
11. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 8.
CN202110686909.7A 2021-06-21 2021-06-21 Identity type determining method and device, storage medium and electronic device Active CN113453207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110686909.7A CN113453207B (en) 2021-06-21 2021-06-21 Identity type determining method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110686909.7A CN113453207B (en) 2021-06-21 2021-06-21 Identity type determining method and device, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN113453207A true CN113453207A (en) 2021-09-28
CN113453207B CN113453207B (en) 2024-03-22

Family

ID=77811896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110686909.7A Active CN113453207B (en) 2021-06-21 2021-06-21 Identity type determining method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113453207B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956458A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Interaction control method and device for terminals
WO2017214137A1 (en) * 2016-06-07 2017-12-14 Cassia Networks Inc. Methods, devices and systems for supporting wireless communication
CN110753334A (en) * 2019-10-25 2020-02-04 华为技术有限公司 Bluetooth communication method, device and equipment with Bluetooth communication function
CN111866838A (en) * 2020-08-07 2020-10-30 上海商米科技集团股份有限公司 Electronic price tag system and communication method thereof
CN112203263A (en) * 2020-09-25 2021-01-08 深圳市晨北科技有限公司 Broadcast message interaction method, terminal, device and medium
CN112584364A (en) * 2019-09-30 2021-03-30 阿里巴巴集团控股有限公司 Bluetooth network, communication method, device and storage medium thereof
CN112584463A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Information synchronization method and system among multiple devices and electronic device
CN112954819A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Equipment networking method, electronic equipment and system

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105956458A (en) * 2016-04-28 2016-09-21 乐视控股(北京)有限公司 Interaction control method and device for terminals
WO2017214137A1 (en) * 2016-06-07 2017-12-14 Cassia Networks Inc. Methods, devices and systems for supporting wireless communication
CN112584364A (en) * 2019-09-30 2021-03-30 阿里巴巴集团控股有限公司 Bluetooth network, communication method, device and storage medium thereof
CN112584463A (en) * 2019-09-30 2021-03-30 华为技术有限公司 Information synchronization method and system among multiple devices and electronic device
CN110753334A (en) * 2019-10-25 2020-02-04 华为技术有限公司 Bluetooth communication method, device and equipment with Bluetooth communication function
CN112954819A (en) * 2019-12-11 2021-06-11 华为技术有限公司 Equipment networking method, electronic equipment and system
CN111866838A (en) * 2020-08-07 2020-10-30 上海商米科技集团股份有限公司 Electronic price tag system and communication method thereof
CN112203263A (en) * 2020-09-25 2021-01-08 深圳市晨北科技有限公司 Broadcast message interaction method, terminal, device and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈思思;: "Android平台单主机与多从机自配对蓝牙通信研究", 信息与电脑(理论版), no. 05 *

Also Published As

Publication number Publication date
CN113453207B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN111885115B (en) Device binding changing method and device
CN111885594B (en) Equipment binding method and device
CN111885144B (en) Equipment binding method and device
US20190342738A1 (en) Method and Device for Sharing File Between Different Terminals
CN107371234B (en) Registration method, device and terminal
CN112737847B (en) Node upgrading method and device, storage medium and electronic device
CN111182515A (en) Network distribution method, device, terminal and computer storage medium
CN111182611B (en) Communication method and device
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN112202652A (en) Method and device for displaying information of equipment to be networked, storage medium and electronic device
CN111736866A (en) One-to-one and one-to-many compatible online upgrading method and terminal equipment
CN110071950B (en) Information transmission method, transfer device, terminal, controlled device and storage medium
CN112511621A (en) Data transmission method and device, storage medium, and electronic device
CN113938351A (en) Data acquisition method, system and computer readable storage medium
CN113453207A (en) Identity type determination method and device, storage medium and electronic device
CN105451367A (en) Wireless network connection method, device and system
EP4207637A1 (en) Time synchronization method and apparatus, device, and storage medium
CN110858201B (en) Data processing method and system, processor and storage medium
CN112511441A (en) Message processing method and device
CN111008220A (en) Dynamic identification method and device of data source, storage medium and electronic device
CN111107663B (en) Data transmission method and device, storage medium and electronic device
CN111314108A (en) Data transmission method, device, equipment, storage medium and front-end system
CN106412657B (en) A kind of method and system of set-top box programming sequence code
CN112165465B (en) Data processing method and device for outgoing third-party platform and electronic device
CN113891385B (en) Method, device and equipment for detecting link state of network equipment

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