CN113453207B - Identity type determining method and device, storage medium and electronic device - Google Patents

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

Info

Publication number
CN113453207B
CN113453207B CN202110686909.7A CN202110686909A CN113453207B CN 113453207 B CN113453207 B CN 113453207B CN 202110686909 A CN202110686909 A CN 202110686909A CN 113453207 B CN113453207 B CN 113453207B
Authority
CN
China
Prior art keywords
identity
type
determining
information
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.)
Active
Application number
CN202110686909.7A
Other languages
Chinese (zh)
Other versions
CN113453207A (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

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 determining method, an identity type determining device, a storage medium and an electronic device, wherein the method comprises the following steps: receiving a first broadcast message sent by a first device, wherein the first broadcast message comprises first identity information of the first device, and the first identity information is used for indicating an identity supported by the first device; determining second identity information of a second device, wherein the second identity information is used for indicating identities supported by the second device; a first identity type of the first device and a second identity type of the second device are determined based on the first identity information and the second identity information. The method and the device solve the problems of inaccurate identity type determination and poor user experience in the related technology, improve the accuracy of identity determination and improve the user experience.

Description

Identity type determining 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 home, more and more BLE (bluetooth) terminal devices are available, and most of BLE terminal devices can definitely define that the device acts as master (master) or slave (slave) when being connected with other devices in a pairing manner. However, some BLE end devices need to be paired with the same type of BLE end device and when multiple BLE end devices of the same type are involved in the paired connection, the chain network needs to be built in a linear manner. Wherein, the schematic diagram of the connection of the master device and the slave device can be seen in fig. 1.
In the related art, for such a pairing connection in a linear manner, either a selection right is given to a user, so that the user decides which device is a master and which device is a slave, or two connections are simultaneously established, and one device is the master and the other device is the slave according to the result of data interaction and negotiation between the two devices. The first scheme requires user participation to decide the equipment role, so that the user experience is poor; the second scheme has complex interaction, long flow and high error probability.
Therefore, the related technology has the problems of inaccurate identity type determination and poor user experience.
In view of the above problems in the related art, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the invention provides an identity type determining method, an identity type determining device, a storage medium and an electronic device, which are used for at least solving 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 determining method including: receiving a first broadcast message sent by a first device, wherein the first broadcast message comprises first identity information of the first device, and the first identity information is used for indicating an identity supported by the first device; determining second identity information of a second device, wherein the second identity information is used for indicating identities supported by the second device; a first identity type of the first device and a second identity type of the second device are determined 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 determining apparatus including: the device comprises a receiving module, a receiving module and a receiving module, wherein the receiving module is used for receiving a first broadcast message sent by first equipment, wherein the broadcast message comprises first identity information of the first equipment, and the first identity information is used for indicating the identity supported by the first equipment; 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; and the second determining module is used for determining a first identity type of the first equipment and a second identity type of the second equipment based on the first identity information and the second identity information.
According to yet another embodiment of the present invention, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program when executed by a processor implements the steps of the method as described in any of the above.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the method and the device, a first broadcast message sent by the first device is received, wherein the first broadcast message comprises first identity information of the first device, second identity information of the second device is determined, and the first identity type of the first device and the second identity type of the second device are determined according to the first identity information and the second identity information. The second equipment can determine the first identity type of the first equipment and the second identity type of the second equipment only by receiving the first broadcast message sent by the first equipment, complex interaction between the first equipment and the second equipment is not needed, and the identity type of the equipment 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 configuration of a mobile terminal of an identity type determining 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 flowchart 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 configuration of an identity type determining apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below 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 the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking the mobile terminal as an example, fig. 2 is a block diagram of a hardware structure of the mobile terminal of an identity type determining method according to an embodiment of the present invention. As shown in fig. 2, the mobile terminal may include one or more (only one is shown in fig. 2) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as 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 appreciated by those skilled in the art that the structure shown in fig. 2 is merely illustrative and not limiting of the structure of the mobile terminal described above. 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 a computer program, for example, a software program of application software and a module, such as a computer program corresponding to the identity type determining method in the embodiment of the present invention, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement the method described above. 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 remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The 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 (Network Interface Controller, simply referred to as NIC) that can connect 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 configured to communicate with the internet wirelessly.
In this embodiment, there is provided a method for determining an identity type, and fig. 3 is a flowchart of the method for determining an identity type according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step S302, a first broadcast message sent by a first device is received, wherein the broadcast message comprises 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, second identity information of a second device is determined, wherein the second identity information is used for indicating the 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, both the first device and the second device may be bluetooth devices, the first identity type may be master (master) or Slave (Slave), and the second identity type may be master (master) or Slave (Slave). The first identity information is used for indicating the identity supported by the first device, and the second identity information is used for indicating the identity supported by the second device. The first device and the second device may be devices supporting the identity of the master device, devices supporting the identity of the slave device, or devices supporting both the identity of the master device and the identity of the slave device.
In the above embodiment, the second device may receive the first broadcast message broadcast by the first device, and the second device may determine the first identity information of the first device according to the first broadcast message, and at the same time, the second device may also broadcast the second identity information of itself to other devices (including the first device), and 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 the respective identity types according to the second identity information and the identity information of itself. The role of the equipment can be determined without the participation of the user or the establishment of connection, so that the user experience is improved, and the equipment is simple and is not easy to make mistakes.
Alternatively, the main body of execution 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, but is not limited to, a computer, a mobile phone, and other terminals.
According to the method and the device, a first broadcast message sent by the first device is received, wherein the first broadcast message comprises first identity information of the first device, second identity information of the second device is determined, and the first identity type of the first device and the second identity type of the second device are determined according to the first identity information and the second identity information. The second equipment can determine the first identity type of the first equipment and the second identity type of the second equipment only by receiving the first broadcast message sent by the first equipment, complex interaction between the first equipment and the second equipment is not needed, and the identity of the equipment is not needed to be designated by a user, so that the problems of inaccurate identity 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.
In one exemplary embodiment, determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises: determining that the first identity type is the first type identity and determining that the second identity type is the first type identity when the first identity information characterizes that the first device only supports the first type identity and the second identity information characterizes that the second device only supports the first type identity; wherein the first type of identity is a master device or a slave device. In this embodiment, after determining the first identity information, the second device may determine the identity type supported by the first device according to the first identity information, and determine the identity type supported by the second device according to the second identity information. When both the first device and the second device support only the first type of identity, the first identity type and the second identity type are determined to be the first type of identity. Wherein the first type of identity may be a master device or a slave device. That is, when both the first device and the second device can only function as the master device or the 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 connection relationship is not established between the first device and the second device.
In one exemplary embodiment, determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises: determining that the first identity type is the first type identity and determining that the second identity type is the second type identity when the first identity information characterizes that the first device supports only the first type identity and the second identity information characterizes that the second device supports the first type identity and the second type identity or the second identity information characterizes that the second device supports the second type identity; or when the first identity information characterizes that the first device supports a first type identity and a second type identity, or when the first identity information characterizes that the first device supports the second type identity and the second identity information characterizes that the second device supports only 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; wherein 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 the type identity supported by the first device according to the first identity information, and determine the identity type supported by the second device according to the second identity information. When the first device supports only the first type of identity, the second device supports both the first type of identity and the second type of identity, or the second device supports only the second type of identity, the first identity type of the first device is determined to be the first type of identity, and the second identity type of the second device is determined to be the second type of identity. When the second device supports only the first type of identity, the first device supports both the first type of identity and the second type of identity, or the first device supports only the second type of identity, the second identity type of the second device is determined to be the first type of identity, and the first identity type of the first device is determined to be the second type of 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 that of the second device, and the first device is determined as the slave device or the master device.
In one exemplary embodiment, determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises: determining first device information of the first device and second device information of the second device when the first identity information characterizes the first device to support a first type identity and a second type identity and the second identity information characterizes the second device to support the first type identity and the second type identity; the first identity type and the second identity type are determined based on the first device information and the second device information. In this embodiment, when the first device and the second device 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 comprise 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 device.
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 includes: determining a first media access control address included in the first device information; determining a second media access control address included in the second device information; the first identity type and the second identity type are determined based on the first medium access control address and the second medium access control address. In this embodiment, the first identity type and the second identity type may be determined according to the MAC, which is the medium access control address of the first device and the second device. The MAC is used for comparison, and the identical collision risk of the MAC can not occur because the MAC has the device 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; when the comparison result indicates that the first media access control address is larger than the second media access control address, determining the first identity as a master device and determining the second identity as a slave device; and when the comparison result indicates that the first media access control address is smaller than the second media access control address, determining the first identity type as the slave device and determining the second identity type as the master device. In this embodiment, when the first device and the second device both support the identities of the master device and the slave device, the MACs of the first device and the second device may be compared, the identity of the device having a large MAC value is determined as the master device, and the identity of the device having a small MAC value is determined as the slave device.
In an exemplary embodiment, the method further comprises: and when the first identity type and the second identity type are different, initiating a pairing request to the first device so as to establish a communication connection with the first device. In this embodiment, when the identity types of the first device and the second device are different, it is explained that there is necessarily one master device and one slave device 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 an exemplary embodiment, the method further comprises: determining that the communication connection between the second equipment and the first equipment fails when the first identity type and the second identity type are the same; and 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 self-identity information may be broadcast to other devices, and after receiving the broadcast message, the other devices determine the identities of the first identity and the second identity according to the other identity information and the identity information included in the received broadcast message, and establish communication connection when the identities are different.
The identity type determination method is described below with reference to the 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 broadcast mode may be used to carry roles supportable by the device, where there are 3 cases: 1. slave; 2. a master; 3. slave/master. And the opposite terminal equipment can judge by combining the roles which can be supported by the opposite terminal equipment after the opposite terminal equipment scans the related information. If both devices support master/slave, the two devices will use the broadcasted MAC to perform comparison, where the device with a large MAC value is the master and the device with a small MAC value is the slave. The classification manner of the determined identity types of the first device and the second device can be seen in table 1. Wherein X in table 1 indicates that device a and device B cannot establish a connection.
TABLE 1
As shown in table 1, when both device a and device B (corresponding to the first device and the second device described above) support only slave (i.e., slave), then the identities of both device a and device B are slaves, at which time they cannot establish a connection. When the device a supports slave and the device B supports master, the device B is determined to be a master, the device a is determined to be a slave, both devices can establish a connection, and a control instruction or the like can be sent from the device B, i.e., the master, to the slave, i.e., the device a. When device a supports slave and device B supports slave/master, device B is determined to be master and device a is determined to be slave, both devices can establish a connection, and device B sends control instructions to slave, device a, etc.
When the device a supports master and the device B supports slave, the device a is determined to be master and the device B is determined to be slave, and the device a and the device B can establish a connection, and a control instruction is sent to the device B by the device a. When the device a supports the master and the device B supports the master, the identities of the device a and the device B are both confirmed as the master, and the device a and the device B cannot establish connection. When device a supports master and device B supports slave/master, device a is determined to be master and device B is determined to be slave, both may establish a connection, control instructions may be sent by device a to device B, and so on.
When device a supports slave/master and device B supports slave, device a is determined to be master and device B is determined to be slave, both may establish a connection, control instructions may be sent by device a to device B, and so on. When device a supports slave/master and device B supports master, device B is determined to be master and device a is determined to be slave, both may establish a connection, control instructions may be sent by device B to device a, etc. When the device A supports slave/master and the device B supports slave/master, the two devices can use the broadcasted MAC to compare, the device with the large MAC value is the master, and the device with the small MAC value is the slave.
In the foregoing embodiment, the first device and the second device may determine the identity information through the broadcast message, without user participation, thereby improving user experience. The first equipment and the second equipment do not need to be connected and interactively negotiated, so that the efficiency of determining the identity type is improved. And the MAC is used for comparison, and the MAC has device uniqueness, so that the same collision risk of the MAC does not occur. Through self-adaptive negotiation, the intellectualization of confirming the identity type is fully embodied.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiment also provides an identity type determining apparatus, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 5 is a block diagram of an identity type determining apparatus according to an embodiment of the present invention, 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, where 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 an identity supported by the second device;
a second determining module 56 is 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 one exemplary embodiment, the second determining module 56 may determine the first identity of the first device and the second identity of the second device based on the first identity information and the second identity information by: determining that the first identity type is the first type identity and determining that the second identity type is the first type identity when the first identity information characterizes that the first device only supports the first type identity and the second identity information characterizes that the second device only supports the first type identity; wherein the first type of identity is a master device or a slave device.
In one exemplary embodiment, second determination module 56 may implement determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information by: determining that the first identity type is the first type identity and determining that the second identity type is the second type identity when the first identity information characterizes that the first device supports only the first type identity and the second identity information characterizes that the second device supports the first type identity and the second type identity or the second identity information characterizes that the second device supports the second type identity; or when the first identity information characterizes that the first device supports a first type identity and a second type identity, or the first identity information characterizes that the first device supports the second type identity, and the second identity information characterizes that the second device only supports the first type identity, the first identity type is determined to be the second type identity, and the second identity type is determined to be the first type identity; wherein 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 one exemplary embodiment, second determination module 56 may implement determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information by: determining first device information of the first device and second device information of the second device when the first identity information characterizes the first device to support a first type identity and a second type identity and the second identity information characterizes the second device to support the first type identity and the second type identity; the first identity type and the second identity type are determined based on the first device information and the second device information.
In one exemplary embodiment, second determination module 56 may implement 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 media access control address included in the first device information; determining a second media access control address included in the second device information; the first identity type and the second identity type are determined based on the first medium access control address and the second medium access control address.
In one exemplary embodiment, the second determining module 56 may implement 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 by: comparing the first MAC address with the second MAC address to obtain a comparison result; when the comparison result indicates that the first media access control address is larger than the second media access control address, determining the first identity type as a master device and determining the second identity type as a slave device; and when the comparison result indicates that the first media access control address is smaller than the second media access control address, determining the first identity type as the slave device and determining the second identity type as the master device.
In one exemplary embodiment, the apparatus may also be used to: and when the first identity type and the second identity type are different, sending a pairing request to the first device so as to establish a communication connection with the first device.
In one exemplary embodiment, the apparatus may also be used to: determining that the communication connection between the second equipment and the first equipment fails when the first identity type and the second identity type are the same; and 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 each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present invention also provide 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 described in any of the above.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps 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 of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (9)

1. A method for identity type determination, comprising:
receiving a first broadcast message sent by a first device, wherein the first broadcast message comprises first identity information of the first device, and the first identity information is used for indicating an identity supported by the first device;
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;
determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises: determining first device information of the first device and second device information of the second device when the first identity information characterizes the first device to support a first type identity and a second type identity and the second identity information characterizes the second device to support the first type identity and the second type identity; determining a first media access control address included in the first device information; determining a second media access control address included in the second device information; comparing the first MAC address with the second MAC address to obtain a comparison result; when the comparison result indicates that the first media access control address is larger than the second media access control address, determining the first identity type as a master device and determining the second identity type as a slave device; and when the comparison result indicates that the first media access control address is smaller than the second media access control address, determining the first identity type as the slave device and determining the second identity type as the master device.
2. The method of claim 1, wherein determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises:
determining that the first identity type is the first type identity and determining that the second identity type is the first type identity when the first identity information characterizes that the first device only supports the first type identity and the second identity information characterizes that the second device only supports the first type identity;
wherein the first type of identity is a master device or a slave device.
3. The method of claim 1, wherein determining the first identity type of the first device and the second identity type of the second device based on the first identity information and the second identity information comprises:
determining that the first identity type is the first type identity and determining that the second identity type is the second type identity when the first identity information characterizes that the first device supports only the first type identity and the second identity information characterizes that the second device supports the first type identity and the second type identity or the second identity information characterizes that the second device supports the second type identity; or (b)
Determining that the first identity type is the second type identity and determining that the second identity type is the first type identity when the first identity information characterizes that the first device supports a first type identity and a second type identity or the first identity information characterizes that the first device supports the second type identity and the second identity information characterizes that the second device supports only the first type identity;
wherein 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. A method according to any one of claims 1 to 3, further comprising:
and when the first identity type and the second identity type are different, initiating a pairing request to the first device so as to establish a communication connection with the first device.
5. A method according to any one of claims 1 to 3, further comprising:
determining that the communication connection between the second equipment and the first equipment fails when the first identity type and the second identity type are the same;
and 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.
6. The method according to claim 4, wherein the method further comprises:
determining that the communication connection between the second equipment and the first equipment fails when the first identity type and the second identity type are the same;
and 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.
7. An identity type determining apparatus, comprising:
the device comprises a receiving module, a receiving module and a receiving module, wherein the receiving module is used for receiving a first broadcast message sent by first equipment, wherein the broadcast message comprises first identity information of the first equipment, and the first identity information is used for indicating the identity supported by the first equipment;
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 determining module, 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;
the second determining module determines 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: determining first device information of the first device and second device information of the second device when the first identity information characterizes the first device to support a first type identity and a second type identity and the second identity information characterizes the second device to support the first type identity and the second type identity; determining a first media access control address included in the first device information; determining a second media access control address included in the second device information; comparing the first MAC address with the second MAC address to obtain a comparison result; when the comparison result indicates that the first media access control address is larger than the second media access control address, determining the first identity type as a master device and determining the second identity type as a slave device; and when the comparison result indicates that the first media access control address is smaller than the second media access control address, determining the first identity type as the slave device and determining the second identity type as the master device.
8. A computer readable storage medium, characterized in that a computer program is stored in the computer readable storage medium, wherein the computer program, when being executed by a processor, implements the steps of the method according to any of the claims 1 to 6.
9. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 6.
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 CN113453207A (en) 2021-09-28
CN113453207B true 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平台单主机与多从机自配对蓝牙通信研究;陈思思;;信息与电脑(理论版)(第05期);参见全文 *

Also Published As

Publication number Publication date
CN113453207A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
CN111885594B (en) Equipment binding method and device
CN110808948B (en) Remote procedure calling method, device and system
CN109041140B (en) Method for rapidly switching wireless network, intelligent hardware and terminal equipment
CN111885115A (en) Equipment binding change method and device
US10789180B2 (en) SPI-based data transmission method and device
US11889255B2 (en) Communication method between earphones and charging box, charging box, earphones and readable storage medium
CN107371234B (en) Registration method, device and terminal
CN112637931A (en) Method and device for establishing network connection
CN111182611B (en) Communication method and device
CN111182515A (en) Network distribution method, device, terminal and computer storage medium
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN112737847A (en) Node upgrading method and device, storage medium and electronic device
CN111884875A (en) Offline device determination method and device
CN112202652A (en) Method and device for displaying information of equipment to be networked, storage medium and electronic device
CN108055172B (en) Bidirectional forwarding detection method and device
CN113259918A (en) Equipment binding method and system
CN113453207B (en) Identity type determining method and device, storage medium and electronic device
CN103634877B (en) Without the management method of access point in the network of access controller and access point apparatus
CN112511621A (en) Data transmission 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
CN112669480B (en) Data processing method and device, terminal equipment and storage medium
CN106850246A (en) The recognition methods of facility information and device
CN114007266A (en) Link establishment method, device, base station and storage medium
CN111314108A (en) Data transmission method, device, equipment, storage medium and front-end system

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