Equipment connection method and device and storage medium
By mapping the connection data of multiple devices to be connected, the problem that public devices without logged in to the account cannot be connected to the network is solved, fast and efficient device connection is achieved, and power consumption is saved.
Patent Information
- Application Number
- CN202311403365.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-29
AI Technical Summary
The prior art cannot realize the ad hoc network connection between public devices without logged in to the account, and cannot search for devices with the same account.
By mapping the connection data of multiple devices to be connected, the mapped connection data length is smaller than the total length of the original data, and a connection is established with the second device based on the mapped connection data.
It realizes rapid connection establishment with devices with trust relationships, improves connection efficiency and saves power consumption.
Smart Images

Figure CN119906747A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of device connection, and in particular to a device connection method, device and storage medium. Background Art
[0002] Currently, after logging into a certain account on a device, you can quickly search for other devices nearby that have logged into the same account, so as to establish a connection with the device that has logged into the same account. However, for some public devices, there is no login account, such as personal computers (PCs), tablets (pads), televisions (TVs), etc. For these devices, it is impossible to search for devices with the same account, that is, it is impossible to achieve self-organizing networks. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a device connection method, apparatus and storage medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a device connection method is provided, comprising: in response to the first device corresponding to multiple second devices to be connected, mapping first connection data of the multiple second devices into second connection data, the length of the second connection data being less than the total length of the multiple first connection data; based on the second connection data, establishing a connection with the second device that has acquired the second connection data.
[0005] In one embodiment, mapping multiple first connection data into second connection data includes: mapping the first connection data N times, with the mapping target being a preset mapping value set, to obtain N mapping values; and obtaining the second connection data based on the N mapping values corresponding to the multiple first connection data respectively.
[0006] In one embodiment, the preset mapping value set includes M mapping values, and M and N are determined in the following manner: in response to the estimated number of the second device being a first preset number, M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0007] In one embodiment, the preset mapping value set includes M mapping values, and M and N are determined in the following manner: in response to an estimated number of the second device being a second preset number, the second preset number representing a maximum estimated number whose error probability is less than a second threshold, M and N are determined from a second data pair set, the second data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than the second threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0008] In one embodiment, determining M and N from the second data pair set includes: determining a data pair with a minimum M value from the second data pair set; and determining M and N based on the data pair.
[0009] In one embodiment, establishing a connection with the second device that has acquired the second connection data based on the second connection data includes: establishing a connection with the second device that has acquired the second connection data and the third connection data based on the second connection data and the third connection data corresponding to the first device.
[0010] According to a second aspect of an embodiment of the present disclosure, a device connection method is provided, comprising: acquiring second connection data broadcast by a first device; wherein the second connection data is obtained based on a mapping of multiple first connection data, and a length of the second connection data is less than a total length of the multiple first connection data; in response to the second connection data corresponding to the second device, establishing a connection with the first device.
[0011] In one embodiment, in response to the second connection data corresponding to the second device, establishing a connection with the first device broadcasting the second connection data includes: mapping the first connection data corresponding to the second device N times, with the mapping target being a preset mapping value set, to obtain N mapping values; in response to the second connection data including N mapping values corresponding to the second device, establishing a connection with the first device broadcasting the second connection data.
[0012] In one embodiment, the preset mapping value set includes M mapping values, and M and N are determined in the following manner: in response to the estimated number of the second device being a first preset number; M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that the mapping values corresponding to different first connection data are the same.
[0013] In one embodiment, M and N are determined in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number represents the maximum estimated number whose error probability is less than a second threshold; M and N are determined from a second data pair set, the second data pair set includes multiple groups of data pairs of M and N, and the error probability of each data pair is less than the second threshold.
[0014] In one embodiment, determining M and N from the second data pair set includes: determining a data pair with a minimum M value from the second data pair set; and determining M and N based on the data pair.
[0015] In one embodiment, obtaining the second connection data includes: obtaining the second connection data broadcast by the first device; obtaining the third connection data corresponding to the first device; and establishing a connection with the first device in response to the second connection data corresponding to the second device and the third connection data having an association relationship with the second device.
[0016] According to a third aspect of an embodiment of the present disclosure, a device connection apparatus is provided, comprising: a processing module, for mapping first connection data of the multiple second devices to be connected to each other in response to the first device corresponding to the multiple second devices to be connected to each other into second connection data, the length of the second connection data being smaller than the total length of the multiple first connection data; and establishing a connection with the second device that has acquired the second connection data based on the second connection data.
[0017] In one embodiment, the processing module maps multiple first connection data into second connection data in the following manner: mapping the first connection data N times, with the mapping target being a preset mapping value set, to obtain N mapping values; and obtaining the second connection data based on the N mapping values corresponding to the multiple first connection data respectively.
[0018] In one embodiment, the preset mapping value set includes M mapping values, and the processing module determines M and N in the following manner: in response to the estimated number of the second devices being a first preset number, M and N are determined from a first data pair set, the first data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0019] In one embodiment, the preset mapping value set includes M mapping values, and the processing module determines M and N in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number representing the maximum estimated number with an error probability less than a second threshold, M and N are determined from a second data pair set, the second data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than the second threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0020] In one embodiment, the processing module determines M and N from the second data pair set in the following manner: determining a data pair with a minimum M value from the second data pair set; and determining M and N based on the data pair.
[0021] In one implementation, the processing module establishes a connection with the second device that has acquired the second connection data in the following manner: based on the second connection data and third connection data corresponding to the first device, establishes a connection with the second device that has acquired the second connection data.
[0022] According to a fourth aspect of an embodiment of the present disclosure, a device connection apparatus is provided, comprising: an acquisition module, used to acquire second connection data broadcast by a first device; wherein the second connection data is obtained based on a mapping of multiple first connection data, the length of the second connection data is less than the total length of the multiple first connection data, and each first connection data corresponds to a device; and a processing module, used to establish a connection with the first device in response to the second connection data corresponding to the second device.
[0023] In one embodiment, the processing module establishes a connection with the first device broadcasting the second connection data in response to the second connection data corresponding to the second device in the following manner: maps the first connection data corresponding to the second device N times, with the mapping target being a preset mapping value set, to obtain N mapping values; and establishes a connection with the first device broadcasting the second connection data in response to the second connection data including N mapping values corresponding to the second device.
[0024] In one embodiment, the preset mapping value set includes M mapping values, and the processing module determines M and N in the following manner: in response to the estimated number of the second device being a first preset number; determining M and N from a first data pair set, the first data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that the mapping values corresponding to different first connection data are the same.
[0025] In one embodiment, the preset mapping value set includes M mapping values, and the processing module determines M and N in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number represents the maximum estimated number with an error probability less than a second threshold; M and N are determined from a second data pair set, the second data pair set includes multiple groups of M and N data pairs, and the error probability of each data pair is less than the second threshold.
[0026] In one embodiment, the processing module determines M and N from the second data pair set in the following manner: determining a data pair with a minimum M value from the second data pair set; and determining M and N based on the data pair.
[0027] In one embodiment, the acquisition module is also used to: acquire third connection data corresponding to the first device; the processing module is also used to: establish a connection with the first device in response to the second connection data corresponding to the second device and the third connection data having an association relationship with the second device.
[0028] According to a fifth aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a memory for storing instructions; and a processor for calling the instructions stored in the memory to execute the device connection method in the first aspect and any one of the implementation modes of the first aspect or the second aspect and any one of the implementation modes of the second aspect.
[0029] According to a sixth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions are executed by a processor, the device connection method in the first aspect or any one of the implementations of the first aspect is executed.
[0030] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in response to a first device corresponding to a plurality of second devices to be connected, the connection data of the plurality of second devices to be connected are mapped, the length of the connection data after mapping is less than the total length of the connection data before mapping, and a connection is established with the second device based on the mapped connection data, so that a connection can be quickly established with a device having a trust relationship, thereby improving efficiency.
[0031] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0033] Figure 1The figure is a flow chart of a device connection method according to an exemplary embodiment.
[0034] Figure 2 The invention is a flow chart showing a data mapping method according to an exemplary embodiment.
[0035] Figure 3 It is a mapping schematic diagram shown according to an exemplary embodiment.
[0036] Figure 4 is a flow chart of a method for determining M and N according to an exemplary embodiment.
[0037] Figure 5 The figure is a flow chart of a device connection method according to an exemplary embodiment.
[0038] Figure 6 The figure is a flow chart of a device connection method according to an exemplary embodiment.
[0039] Figure 7 The figure is a flow chart of a device connection method according to an exemplary embodiment.
[0040] Figure 8 is a flow chart of a method for determining M and N according to an exemplary embodiment.
[0041] Fig. 9 The figure is a flow chart of a device connection method according to an exemplary embodiment.
[0042] Fig.10 The figure is a block diagram of a device connecting an apparatus according to an exemplary embodiment.
[0043] Fig.11 The figure is a block diagram of a device connecting an apparatus according to an exemplary embodiment.
[0044] Fig.12 The figure is a block diagram of a device connecting an apparatus according to an exemplary embodiment. DETAILED DESCRIPTION
[0045] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.
[0046] Currently, after logging into a certain account on a device, you can quickly search for other devices nearby that have logged into the same account, so as to establish a connection with the device that has logged into the same account. However, for some public devices, there is no login account, such as personal computers (PCs), tablets (pads), televisions (TVs), etc. For these devices, it is impossible to search for devices with the same account, that is, it is impossible to achieve self-organizing networks.
[0047] In some embodiments, surrounding devices may be searched through Bluetooth low energy (BLE) broadcasting and BLE scanning, and a connection may be established based on this.
[0048] In some embodiments, after searching for a device, it is necessary to determine whether there is a trust relationship between the devices. For example, if a connection has been established between devices, the identification (ID) of the other device will be stored. When device A stores the ID of device B, it can be considered that there is a trust relationship between device A and device B.
[0049] However, in the above embodiment, if device A establishes a connection with device B, device B needs to wake up its application processor (AP), which results in high power consumption and does not fully utilize the low power consumption advantage of the Bluetooth chip. In addition, the processing flow is long and the efficiency is low.
[0050] In some embodiments, the device ID can be carried in the BLE broadcast, and a filtering condition can be set on the BLE scanning end, and the filtering condition includes the device ID. That is, the broadcast sent by device A to device B carries the ID of device B. When device B obtains the broadcast, it can determine whether to establish a connection with device A based on whether the broadcast contains the ID of device B.
[0051] However, in the above embodiment, since the content of BLE broadcast is limited, currently generally more than 20 bytes, it cannot carry too much data and can only carry the ID of a device, that is, it can only support one device to determine whether there is a trust relationship and establish a connection. If multiple BLE broadcasts are sent, power consumption will increase.
[0052] Therefore, the present disclosure provides a device connection method, which maps the connection data of the multiple second devices to be connected in response to a first device corresponding to multiple second devices to be connected, wherein the length of the mapped connection data is less than the total length of the connection data before mapping, and establishes a connection with the second device based on the mapped connection data, thereby being able to quickly establish a connection with a device with a trusted relationship and improving efficiency.
[0053] The device connection method in the present disclosure can be applied to terminals, TVs, etc. Among them, the terminal can also be called terminal equipment, mobile station (mobile station, MS), mobile terminal (mobile terminal, MT), etc., which is a device that provides voice and / or data connectivity to users. For example, the terminal can be a handheld device with wireless connection function, a vehicle-mounted device, etc. At present, some examples of terminals are: smart phones (mobile phones), pocket personal computers (pocket personal computers, PPCs), handheld computers, personal digital assistants (personal digital assistants, PDAs), laptops, tablet computers, wearable devices, or vehicle-mounted devices, etc. In addition, when it is a vehicle to everything (V2X) communication system, the terminal device can also be a vehicle-mounted device. It should be understood that the embodiments of the present disclosure do not limit the specific technology and specific device form adopted by the terminal.
[0054] Figure 1 is a flow chart of a device connection method according to an exemplary embodiment. Figure 1 As shown, the device connection method can be applied to a first device, and includes the following steps.
[0055] In step S11, in response to the first device corresponding to a plurality of second devices to be connected, first connection data of the plurality of second devices are mapped into second connection data.
[0056] In one embodiment, when the first device corresponds to multiple second devices to be connected, the first connection data of the multiple second devices can be mapped to obtain the second connection data. Among them, the first connection data is data that can uniquely identify the second device, for example, it can be a device identification (device identification, device ID), it can be a media access control (media access control) address, and the MAC address can also be called a local area network address. Of course, the first connection data can also be other data that can uniquely identify the second device, and the present disclosure is not limited. The first device can correspond to multiple second devices to be connected, which can be understood as a connection established between the first device and multiple second devices, or it can be understood as the first device storing the first connection data of multiple second devices. Among them, there is a trust relationship between the devices that establish a connection. There may be a trust relationship between the devices that have established a connection, or there may not be a trust relationship. The trust relationship can be understood as a prerequisite for data transmission. In some cases, data transmission can be carried out between devices with a trust relationship, and data transmission cannot be carried out between devices without a trust relationship. Data transmission can only be carried out after a trust relationship is established.
[0057] In this embodiment, the length of the second connection data is less than the total length of the plurality of first connection data. For example, if the plurality of first connection data occupy A bits in total and the second connection data occupy B bits, then the length of the plurality of first connection data is less than the total length of the plurality of first connection data, that is, B is less than A.
[0058] In one embodiment, the length of the second connection data may be less than or equal to the length of the first connection data.
[0059] In step S12, based on the second connection data, a connection is established with the second device that has acquired the second connection data.
[0060] In one embodiment, the second connection data may be broadcasted, and a connection may be established with a second device that has acquired the second connection data. For example, the second connection data may be broadcasted via BLE. After the first device broadcasts the second connection data, any device may acquire the second connection data. Since the second connection data is obtained by mapping multiple first connection data, the second device may establish a connection with the first device only after acquiring the second connection data. That is, a connection may be quickly established with the second device to be connected from all devices.
[0061] The present disclosure maps the connection data of the multiple second devices to be connected in response to a first device corresponding to multiple second devices to be connected, wherein the length of the mapped connection data is less than the total length of the connection data before mapping, and establishes a connection with the second device based on the mapped connection data. It is possible to quickly establish a connection with a device having a trusted relationship without waking up an AP, thereby saving power consumption and improving efficiency.
[0062] In some embodiments, Figure 2 is a flow chart of a data mapping method according to an exemplary embodiment. Figure 2 As shown, the following steps are included.
[0063] In step S21, the first connection data is mapped N times, the mapping target is a preset mapping value set, and N mapping values are obtained.
[0064] In one embodiment, the first connection data may be mapped N times, with the mapping target being a preset mapping value set, to obtain N mapping values. It can be understood that each mapping obtains a mapping value in the mapping value set. Different first connection data correspond to different N mapping values, where N is a positive integer.
[0065] In one embodiment, mapping the first connection data N times may be performed by using the first connection data as a random seed to generate N random numbers. The range of random numbers is a mapping value set, for example, the range of random numbers is 0-31, that is, the mapping value set includes 0, 1, 2, 3...29, 30, 31, a total of 32 values. Exemplarily, if the first connection data of device A is mapped twice, the mapping value obtained once is 7, and the mapping value obtained another time is 19, then the first connection data of device A corresponds to 2 mapping values, which are 7 and 19 respectively.
[0066] In step S22, second connection data is obtained based on N mapping values respectively corresponding to the plurality of first connection data.
[0067] In one embodiment, N mapping values corresponding to a plurality of first connection data may be used as the second connection data. That is, the second connection data includes the mapping value. For example, the second device to be connected includes device A, device B, and device C, the mapping value of device A is 7 and 19, the mapping value of device B is 1 and 18, and the mapping value of device C is 5 and 7, then the second connection data may be (1,5,7,18,19). In this embodiment, the length of the second connection data is not fixed. If device A obtains the second connection data, since the second connection data includes the mapping values 7 and 19 of device A, device A can determine that it has a trust relationship with the first device and establish a connection with the first device. If other devices obtain the second connection data, and the second connection data does not include its mapping value, then no connection is established with the first device, so as to quickly establish a connection with the second device with a trust relationship.
[0068] In one embodiment, N mapping values corresponding to the plurality of first connection data may be hashed to second connection data of fixed length. The fixed length of the second connection data depends on the number of mapping values in the mapping value set. For example, if the mapping value set includes 0, 1, 2, 3...29, 30, 31, a total of 32 values, the length of the second connection data may be 32 bits. Figure 3 is a schematic diagram of mapping according to an exemplary embodiment, such as Figure 3As shown, the length of the second connection data is 32 bits, and the mapping values of device A are 7 and 19, that is, the first connection data of device A is hashed to the 8th bit and the 20th bit, and the 8th bit and the 20th bit of the second connection data are both set to 1. The mapping values of device B are 1 and 18, that is, the first connection data of device A is hashed to the 2nd bit and the 19th bit, and the 2nd bit and the 19th bit of the second connection data are both set to 1. The mapping values of device C are 5 and 7, that is, the first connection data of device A is hashed to the 6th bit and the 8th bit, and the 6th bit and the 8th bit of the second connection data are both set to 1. The second connection data is 32 bits of data, in which the 2nd, 6th, 8th, 19th, and 20th bits are set to 1.
[0069] The present disclosure maps the first connection data N times to obtain N mapping values, and obtains the second connection data based on the N mapping values, so as to quickly establish a connection with the second device having a trust relationship.
[0070] In some embodiments, the mapping value set in the present disclosure includes M mapping values, and M and N can be determined in the following manner: in response to the estimated number of second devices being a first preset number, M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0071] In one embodiment, the estimated number of second devices can be understood as the number of second devices that may appear within a certain range. The estimated number of second devices can be set according to actual conditions. When the estimated number of second devices is the first preset number, M and N can be determined from the first data pair set. The first data pair set includes multiple groups of M and N data pairs. And each group of data corresponds to an error probability. The error probability refers to the probability that different first connection data correspond to the same mapping value. For example, different first connection data are mapped N times, and the mapping target is a mapping value set of M mapping values. If the N mapping values obtained are the same, it means that an error occurs. The probability of an error is the error probability. The error probability of each group of data pairs in the first data pair set is less than the first threshold. That is, when the estimated number of second devices is the first preset number, M and N are determined based on the data pairs in the first data pair set, which can ensure that the mapping error probability is less than the first threshold.
[0072] In one embodiment, M and N are determined from the first data pair set, for example, by selecting any data pair. Alternatively, the data pair with the smallest error probability may be selected. Alternatively, the data pair with the smallest M value may be screened out from the first data pair set, and M and N may be determined from the data pair with the smallest M value. For example, if there is one data pair with the smallest M value, then M and N are determined to be the M and N of the data pair. If there are multiple data pairs with the smallest M value, one data pair may be selected from them, and M and N may be determined based on the selected data pair.
[0073] In one embodiment, the first preset number may be, for example, 4 or 5. The first data pair set may refer to Table 1, which shows the estimated number of second devices and their corresponding data pairs.
[0074] Table 1
[0075]
[0076] For example, when the estimated number of second devices is 4, the first data pair set may include (32, 3), (32, 4), (32, 5)···(32, 7), (40, 2), (40, 3), (40, 4)···(40, 8), (44, 2), (44, 3), (44, 4)···(44, 8). Taking (32, 3) as an example, it means that M is 32, N is 3, and the error probability corresponding to the data pair is 0.0166. When the estimated number of second devices is 5, the first data pair set may include (40, 3), (40, 4)···(40, 7), (44, 3), (44, 4)···(44, 8). In this embodiment, the first threshold value is 2%. Of course, the first preset number, the first data pair set, and the first threshold value shown in Table 1 of this embodiment are only illustrative examples and can be set according to actual conditions. The present disclosure does not limit them.
[0077] The present disclosure determines M and N from the first data pair set based on the estimated number of second devices as the first preset number, thereby ensuring that the error probability is less than a threshold for the possible number of second devices, thereby better avoiding the occurrence of connection errors.
[0078] In some embodiments, the mapping value set in the present disclosure includes M mapping values, and M and N can be determined in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number representing the maximum estimated number whose error probability is less than a second threshold, M and N are determined from a second data pair set, the second data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than the second threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0079] In one embodiment, when the estimated number of second devices is the second preset number, M and N can be determined from the second data pair set. The second preset number represents the maximum estimated number whose error probability is less than the second threshold. The error probability of multiple groups of M and N data pairs in the second data pair is less than the second threshold. The relationship between the second threshold and the maximum estimated number can be understood as follows: when the number of second devices exceeds the maximum estimated number, no matter how many M and N are, their error probability will exceed the second threshold. That is, only by mapping the first connection data of the second preset number of second devices at most can the error probability be controlled within the second threshold. The second threshold is greater than the first threshold. Of course, in some cases, the second threshold may also be equal to the first threshold, which is not limited in the present disclosure.
[0080] In one embodiment, the second preset number may be, for example, 9. The second data pair may refer to Table 2, which shows the estimated number of second devices and their corresponding data pairs.
[0081] Table 2
[0082]
[0083]
[0084] For example, when the estimated number of second devices is 9, the first data pair set may include (40, 3), that is, M is 40, N is 3, and the error probability corresponding to the data pair is 0.0974. In this embodiment, the first threshold is 10%. Of course, the second preset number, the second data pair set, and the second threshold shown in Table 2 of this embodiment are only illustrative examples and can be set according to actual conditions, and the present disclosure does not limit them.
[0085] The present disclosure maps the first connection data of as many second devices as possible in response to the estimated number of second devices being a second preset number, i.e., when the error probability is not greater than a second threshold, thereby establishing connections with more second devices when sending the second connection data once, which is more efficient.
[0086] In some embodiments, Figure 4 FIG. 1 is a flow chart of a method for determining M and N according to an exemplary embodiment. Figure 4 As shown, M and N can be determined as follows:
[0087] In step S31, a data pair with the smallest M value is determined from the second data pair set.
[0088] In step S32, M and N are determined based on the data pair.
[0089] In one embodiment, a data pair with the smallest M value can be selected from the second data pair set. M and N are determined based on the selected data pair. For example, if the selected data pair with the smallest M value is 1, M and N are determined based on the data pair. For example, the data pair is (M1, N1), and M1 represents the smallest M value. Then M can be determined to be M1 and N to be N1. If there are multiple data pairs with the smallest M value selected, one data pair can be selected from them to determine M and N. Or M and N can be determined based on the data pair with the smallest error probability. For example, the data pairs with the smallest M value are (M1, N1) and (M1, N2), and M1 is the smallest M value. A data pair with the smallest error probability can be determined from (M1, N1) and (M1, N2). For example, if the error probability of (M1, N1) is smaller, M is determined to be M1 and N is determined to be N1. If the error probability of (M1, N2) is smaller, M is determined to be M1 and N is determined to be N2.
[0090] The present disclosure determines M and N by determining the minimum value of M from the data pair set, so as to achieve a higher mapping efficiency when the error probability is less than the second threshold. Furthermore, if the second connection data is of fixed length, the smaller the M value is, the smaller the fixed length of the second connection data is, which can save the space occupied by the data.
[0091] In some embodiments, based on the second connection data, an incorrect connection may occur when establishing a connection with the second device. For example, assuming that the mapping values of device A are 7 and 19, the mapping values of device B are 1 and 18, and the mapping values of device C are 5 and 7, then the second connection data includes 1, 5, 7, 18, and 19. When device D obtains the second connection data, assuming that the mapping values of device D are 18 and 19, it is obvious that device D is not one of device A, device B, and device C, that is, device D may not be the second device to be connected to the first device, but device D can also find its own mapping value from the second connection data, thereby erroneously establishing a connection with the first device. In order to avoid incorrect connections, the present disclosure provides a device connection method, Figure 5 FIG. 1 is a flow chart of a device connection method according to an exemplary embodiment. Figure 5 As shown, the following steps are included.
[0092] In step S41, in response to the first device corresponding to a plurality of second devices to be connected, first connection data of the plurality of second devices are mapped into second connection data.
[0093] In step S42, based on the second connection data and the third connection data corresponding to the first device, a connection is established with the second device that has acquired the second connection data and the third connection data.
[0094] The implementation of step S41 in this embodiment may refer to the implementation of step S11 above, which will not be described in detail here.
[0095] In one embodiment, the first device may broadcast the second connection data and the third connection data at the same time, and the second connection data is used for any device that obtains the second connection data. When the second connection data does not contain its mapping value, it can be directly determined not to establish a connection with it. The third connection data is the connection data corresponding to the first device, and the third connection data is used to uniquely identify the first device. For example, it can be the device ID of the first device, or the MAC address of the first device, which is not limited in the present disclosure. The third connection data is used for any device that obtains the second connection data, and when the second connection data contains its mapping value, it is further determined based on the third connection data whether there is a trust relationship, so as to establish a connection. That is, it can be understood that other devices obtain the second connection data and the third connection data, and can determine whether the second connection data contains its own mapping value. If it does, the AP is woken up to further determine whether to establish a connection. If it does not, the second device does not need to wake up the AP and directly does not establish a connection.
[0096] Based on the same concept, the embodiment of the present disclosure also provides a device connection method, which can be applied to a second device. Figure 6 is a flow chart of a device connection method according to an exemplary embodiment. Figure 6 As shown, the device connection method includes the following steps.
[0097] In step S51, the second connection data broadcast by the first device is obtained.
[0098] In one embodiment, the second device may obtain the second connection data broadcast by the first device. The second connection data is obtained by mapping multiple first connection data, and the length of the second connection data is less than the total length of the multiple first connection data. The specific implementation method can refer to the implementation method in steps S11-S12 of the above embodiment, and the present disclosure will not be repeated here.
[0099] In step S52, in response to the second connection data corresponding to the second device, a connection is established with the first device.
[0100] In one embodiment, the second device may establish a connection with the first device broadcasting the second connection data based on whether the second connection data corresponds to the second device. If the second connection data corresponds to the second device, the second device may not establish a connection with the first device broadcasting the second connection data if the second connection data does not correspond to the second device. For example, if the second connection data includes the first connection data corresponding to the second device, it is determined that the second connection data corresponds to the second device.
[0101] The present disclosure obtains the second connection data through the second device to determine whether to establish a connection with the first device. Since the second connection data is obtained based on the mapping of the first connection data, it is possible to quickly establish a connection with a device with a trust relationship, and the efficiency is improved. For the second device, there is no need to wake up the AP, saving power consumption.
[0102] In some embodiments, Figure 7 is a flow chart of a device connection method according to an exemplary embodiment. Figure 7 As shown, the device connection method includes the following steps.
[0103] In step S61, the first connection data corresponding to the second device is mapped N times, and the mapping target is a preset mapping value set to obtain N mapping values.
[0104] In one embodiment, the first connection data of the second device may be mapped N times, and the mapping target is a preset mapping value set to obtain N mapping values corresponding to the second device. The second device may record the N mapping values. The specific mapping method may refer to the above embodiment, and the present disclosure will not be repeated here.
[0105] In step S62, in response to the second connection data including N mapping values corresponding to the second device, a connection is established with the first device that broadcasts the second connection data.
[0106] In one embodiment, if the second device determines from the acquired second connection data that it contains N mapping values corresponding to the second device, it can be determined that there is a trust relationship between the second device and the first device broadcasting the second connection data, and a connection can be established with the first device broadcasting the second connection data.
[0107] In the present disclosure, by mapping the first connection data corresponding to the second device and comparing it with the mapping value included in the second connection data, if the second connection data includes the mapping value corresponding to the second device, a connection can be quickly established with the first device. There is no need to wake up the AP, and the connection is quickly established, while also saving power consumption.
[0108] In some embodiments, the mapping value set in the present disclosure includes M mapping values, and M and N can be determined in the following manner: in response to the estimated number of second devices being a first preset number, M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0109] In some embodiments, the mapping value set in the present disclosure includes M mapping values, and M and N can be determined in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number representing the maximum estimated number whose error probability is less than a second threshold, M and N are determined from a second data pair set, the second data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than the second threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0110] In some embodiments, Figure 8 FIG. 1 is a flow chart of a method for determining M and N according to an exemplary embodiment. Figure 8 As shown, M and N can be determined as follows:
[0111] In step S71, a data pair with the smallest M value is determined from the second data pair set.
[0112] In step S72, M and N are determined based on the data pair.
[0113] The method for determining M and N in this embodiment can refer to the above embodiment and will not be repeated here.
[0114] In some embodiments, Fig. 9 is a flow chart of a device connection method according to an exemplary embodiment. Fig. 9 As shown, the device connection method includes the following steps.
[0115] In step S81, the second connection data broadcast by the first device is obtained.
[0116] In step S82, third connection data corresponding to the first device is obtained.
[0117] In step S83, in response to the second connection data corresponding to the second device and the third connection data having an association relationship with the second device, a connection is established with the first device.
[0118] In one embodiment, the second device may obtain the second connection data and the third connection data broadcast by the first device. When the second connection data corresponds to the second device. For example, when the second connection data includes a mapping value corresponding to the second device, it can be further judged according to the third connection data. The second device may wake up the AP and determine whether the second device has a trust relationship with the first device, that is, whether the second device has an association relationship with the third connection data, based on the third connection data corresponding to the first device. For example, the third connection data of the first device is stored in the second device. Alternatively, the third connection data of the first device is recorded in the historical connection record of the second device, etc.
[0119] In one embodiment, if the second connection data does not include a mapping value corresponding to the second device, it can be directly determined not to establish a connection with the first device without waking up the AP again.
[0120] By acquiring the third connection data, the present disclosure can further determine whether there is a trust relationship between the first device and the second device based on determining that the second connection data corresponds to the second device, so as to avoid the situation where an erroneous connection is established. If the second connection data does not correspond to the second device, it can be directly determined that the connection is established with the first device, that is, there is no need to wake up the AP every time, thereby saving power consumption.
[0121] In some embodiments, the data broadcast by the first device may include a bit for indicating whether the second connection data is included, and when the bit is 1, it indicates that the second connection data is included, and when the bit is 0, it may indicate that the second connection data is not included.
[0122] In some embodiments, the data broadcast by the first device may include a bit indicating whether the third connection data of the first device is included. When the bit is 1, it indicates that the third connection data is included. When the bit is 0, it may indicate that the third connection data is not included. If the third connection data is not included, the second device does not need to wake up the AP to save power consumption.
[0123] In some embodiments, the data broadcast by the first device may include a bit indicating whether to support establishing a device connection, that is, whether to support an ad hoc network.
[0124] Based on the same concept, an embodiment of the present disclosure also provides a device connecting an apparatus.
[0125] It is understandable that the device connection device provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0126] It should be noted that those skilled in the art can understand that the various implementation methods / embodiments involved in the embodiments of the present disclosure can be used in conjunction with the aforementioned embodiments or can be used independently. Whether used alone or in conjunction with the aforementioned embodiments, the implementation principle is similar. In the implementation of the present disclosure, some embodiments are described in terms of implementation methods used together. Of course, those skilled in the art can understand that such examples are not limitations of the embodiments of the present disclosure.
[0127] Fig.10 FIG. 1 is a block diagram of a device connection apparatus 100 according to an exemplary embodiment. Fig.10 , the device 100 includes: a processing module 101.
[0128] The processing module 101 is used for mapping the first connection data of the plurality of second devices into second connection data in response to the first device corresponding to the plurality of second devices to be connected, wherein the length of the second connection data is less than the total length of the plurality of first connection data, and establishing a connection with the second device that has acquired the second connection data based on the second connection data.
[0129] In one embodiment, the processing module 101 maps the plurality of first connection data to the second connection data in the following manner: the first connection data is mapped N times, the mapping target is a preset mapping value set, and N mapping values are obtained. The second connection data is obtained based on the N mapping values corresponding to the plurality of first connection data.
[0130] In one embodiment, the preset mapping value set includes M mapping values, and the processing module 101 determines M and N in the following manner: in response to the estimated number of second devices being a first preset number, M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0131] In one embodiment, the preset mapping value set includes M mapping values, and the processing module 101 determines M and N in the following manner: in response to the estimated number of the second device being a second preset number, the second preset number representing the maximum estimated number whose error probability is less than a second threshold, M and N are determined from a second data pair set, the second data pair set including multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than the second threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
[0132] In one embodiment, the processing module 101 determines M and N from the second data pair set in the following manner: determine a data pair with the smallest M value from the second data pair set. Determine M and N based on the data pair.
[0133] In one implementation, the processing module 101 establishes a connection with the second device that obtains the second connection data in the following manner: based on the second connection data and the third connection data corresponding to the first device, establishes a connection with the second device that obtains the second connection data and the third connection data.
[0134] Based on the same concept, an embodiment of the present disclosure also provides a device connecting an apparatus.
[0135] It is understandable that the device connection device provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.
[0136] It should be noted that those skilled in the art can understand that the various implementation methods / embodiments involved in the embodiments of the present disclosure can be used in conjunction with the aforementioned embodiments or can be used independently. Whether used alone or in conjunction with the aforementioned embodiments, the implementation principle is similar. In the implementation of the present disclosure, some embodiments are described in terms of implementation methods used together. Of course, those skilled in the art can understand that such examples are not limitations of the embodiments of the present disclosure.
[0137] Fig.11 FIG. 2 is a block diagram of a device connection apparatus 200 according to an exemplary embodiment. Fig.11 The device 200 includes: an acquisition module 201 and a processing module 202.
[0138] The acquisition module 201 is used to acquire the second connection data broadcast by the first device. The second connection data is obtained based on the mapping of multiple first connection data, the length of the second connection data is less than the total length of the multiple first connection data, and each first connection data corresponds to a device. The processing module 202 is used to establish a connection with the first device in response to the second connection data corresponding to the second device.
[0139] In one implementation, the processing module 202 establishes a connection with the first device that broadcasts the second connection data in response to the second connection data corresponding to the second device in the following manner: the first connection data corresponding to the second device is mapped N times, the mapping target is a preset mapping value set, and N mapping values are obtained. In response to the second connection data including the N mapping values corresponding to the second device, a connection is established with the first device that broadcasts the second connection data.
[0140] In one embodiment, the preset mapping value set includes M mapping values, and the processing module 202 determines M and N in the following manner: in response to the estimated number of the second device being the first preset number, M and N are determined from a first data pair set, the first data pair set includes multiple groups of M and N data pairs, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that the mapping values corresponding to different first connection data are the same.
[0141] In one embodiment, the preset mapping value set includes M mapping values, and the processing module 202 determines M and N in the following manner: In response to the estimated number of the second device being a second preset number, the second preset number represents a maximum estimated number with an error probability less than a second threshold value. M and N are determined from a second data pair set, the second data pair set includes multiple groups of M and N data pairs, and the error probability of each data pair is less than the second threshold value.
[0142] In one embodiment, the processing module 202 determines M and N from the second data pair set in the following manner: determine a data pair with the smallest M value from the second data pair set. Determine M and N based on the data pair.
[0143] In one embodiment, the acquisition module 201 is further used to: acquire third connection data corresponding to the first device. The processing module 202 is further used to: establish a connection with the first device in response to the second connection data corresponding to the second device and the third connection data being associated with the second device.
[0144] The present disclosure maps the connection data of the multiple second devices to be connected in response to a first device corresponding to multiple second devices to be connected, wherein the length of the mapped connection data is less than the total length of the connection data before mapping, and establishes a connection with the second device based on the mapped connection data, thereby being able to quickly establish a connection with a device having a trusted relationship and improving efficiency.
[0145] Fig.12 It is a block diagram showing a device connection apparatus 300 according to an exemplary embodiment.
[0146] like Fig.12As shown, apparatus 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .
[0147] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0148] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0149] The power component 306 provides power to the various components of the device 300. The power component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.
[0150] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0151] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0152] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0153] The sensor assembly 314 includes one or more sensors for providing various aspects of the status assessment of the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0154] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 300 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0155] In an exemplary embodiment, the apparatus 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0156] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, which can be executed by a processor 320 of the device 300 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0157] The present disclosure maps the connection data of the multiple second devices to be connected in response to a first device corresponding to multiple second devices to be connected, wherein the length of the mapped connection data is less than the total length of the connection data before mapping, and establishes a connection with the second device based on the mapped connection data, thereby being able to quickly establish a connection with a device having a trusted relationship and improving efficiency.
[0158] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar thereto. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.
[0159] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.
[0160] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.
[0161] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.
[0162] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
Claims
1. A device connection method, characterized in that: Applied to a first device, the method includes: In response to the first device corresponding to a plurality of second devices to be connected, mapping the first connection data of the plurality of second devices into second connection data, wherein the length of the second connection data is less than the total length of the plurality of first connection data; Based on the second connection data, a connection is established with the second device that acquires the second connection data.
2. The method according to claim 1, characterized in that The mapping of the plurality of first connection data into the second connection data comprises: Mapping the first connection data N times, where the mapping target is a preset mapping value set, to obtain N mapping values; The second connection data is obtained based on the N mapping values respectively corresponding to a plurality of the first connection data.
3. The method according to claim 2, characterized in that The preset mapping value set includes M mapping values, and the M and N are determined in the following manner: In response to the estimated number of the second devices being a first preset number, M and N are determined from a first data pair set, wherein the first data pair set includes multiple groups of data pairs of M and N, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that different first connection data correspond to the same mapping value.
4. The method according to claim 2, characterized in that: The preset mapping value set includes M mapping values, and the M and N are determined in the following manner: In response to the estimated number of the second devices being a second preset number, the second preset number representing the maximum estimated number whose error probability is less than a second threshold, M and N are determined from a second data pair set, the second data pair set comprising multiple groups of data pairs of M and N, and the error probability of each group of data pairs is less than the second threshold, the error probability representing the probability that different first connection data correspond to the same mapping value.
5. The method according to claim 4, characterized in that The determining M and N from the second data pair set comprises: Determine a data pair with the smallest M value from the second data pair set; M and N are determined based on the data pair.
6. The method according to claim 2, characterized in that Establishing a connection with the second device that acquires the second connection data based on the second connection data includes: Based on the second connection data and the third connection data corresponding to the first device, a connection is established with the second device that has acquired the second connection data and the third connection data.
7. A device connection method, characterized in that: Applied to the second device, the method includes: Acquire second connection data broadcasted by the first device; The second connection data is obtained by mapping based on a plurality of first connection data, and the length of the second connection data is less than the total length of the plurality of first connection data; In response to the second connection data corresponding to the second device, a connection is established with the first device.
8. The method according to claim 7, characterized in that In response to the second connection data corresponding to the second device, establishing a connection with the first device that broadcasts the second connection data includes: Mapping the first connection data corresponding to the second device N times, where the mapping target is a preset mapping value set, to obtain N mapping values; In response to the second connection data including the N mapping values corresponding to the second device, establishing a connection with the first device that broadcasts the second connection data.
9. The method according to claim 8, characterized in that The preset mapping value set includes M mapping values, and the M and N are determined in the following manner: In response to the estimated number of the second devices being a first preset number; M and N are determined from a first data pair set, wherein the first data pair set includes multiple groups of data pairs of M and N, and the error probability of each group of data pairs is less than a first threshold, and the error probability represents the probability that mapping values corresponding to different first connection data are the same.
10. The method according to claim 8, characterized in that The M and the N are determined in the following manner: In response to the estimated number of the second devices being a second preset number, the second preset number represents a maximum estimated number with an error probability less than a second threshold; M and N are determined from a second data pair set, where the second data pair set includes a plurality of data pairs of M and N, and the error probability of each data pair is less than the second threshold.
11. The method according to claim 10, characterized in that The determining M and N from the second data pair set comprises: Determine a data pair with the smallest M value from the second data pair set; M and N are determined based on the data pair.
12. The method according to claim 8, characterized in that Get the second connection data, including: Acquire second connection data broadcasted by the first device; Acquire third connection data corresponding to the first device; In response to the second connection data corresponding to the second device and the third connection data having an association relationship with the second device, a connection is established with the first device.
13. A device connection device, characterized in that: The apparatus is configured for a first device, and comprises: A processing module is used to map the first connection data of the multiple second devices to be connected to the first device in response to the first device corresponding to multiple second devices to be connected to the second connection data, the length of the second connection data is less than the total length of the multiple first connection data; based on the second connection data, establish a connection with the second device that obtains the second connection data.
14. A device connection device, characterized in that: The apparatus is configured for a second device, and comprises: An acquisition module, used to acquire second connection data broadcasted by the first device; The second connection data is obtained by mapping based on a plurality of first connection data, the length of the second connection data is less than the total length of the plurality of first connection data, and each of the first connection data corresponds to a device; The processing module is configured to establish a connection with the first device in response to the second connection data corresponding to the second device.
15. An electronic device, characterized in that: include: A memory for storing instructions; as well as A processor, configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 6.
16. An electronic device, characterized in that: include: A memory for storing instructions; as well as A processor, configured to call the instructions stored in the memory to execute the method according to any one of claims 7 to 12.
17. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions are executed by the processor, the method according to any one of claims 1 to 6 is executed.
18. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions are executed by the processor, the method according to any one of claims 7 to 12 is executed.