Device interconnection method and apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-10-25
- Publication Date
- 2026-06-05
AI Technical Summary
The QR code authentication connection process between existing devices is serial, resulting in long interaction time and affecting the user experience.
By generating background layers and signal layers in parallel, signal modulation is used for pixels to realize authentication connection between devices.
Reduces the interaction time of device connection, improves user experience, and realizes pixel-level signal transmission.
Smart Images

Figure CN122162343A_ABST
Abstract
Description
Device interconnection method and apparatus Technical Field
[0001] The present application relates to the field of communication technology, and more specifically, to a method and apparatus for interconnecting devices. Background Art
[0002] When pairing devices for the first time, they typically scan a QR code to authenticate the connection. However, the current QR code authentication process is a serial one, requiring each step to be triggered accordingly, resulting in a lengthy interaction time.
[0003] Summary of the Invention
[0004] The present application provides a device connection method and apparatus, which can reduce the interaction time of device connection and improve user experience.
[0005] In the first aspect, a device connection method is provided. The method can be executed by a first device, or by a module (such as a chip or circuit) in the first device, or by a logical node, logical module or software that can implement all or part of the functions of the first device. This application does not limit this.
[0006] The method includes: a first device generates a first layer and a second layer in parallel, the first layer is a background layer, the second layer includes N pixels, the first information is modulated on the N pixels, and the first information is used for the authentication connection between the first device and the second device; the first device generates a third layer based on the first layer and the second layer; and the first device displays the third layer on the screen.
[0007] Through the above method, not only can pixel-level signal transmission be achieved, but the first device can also generate multiple layers in parallel, which can reduce the interaction time of device connection and improve user experience.
[0008] In combination with the first aspect, in certain implementations of the first aspect, the above-mentioned first information includes at least two signals, and the above-mentioned first information is modulated on the above-mentioned N pixel points, including: the above-mentioned first information is modulated on the above-mentioned N pixel points through at least two carriers, and the above-mentioned at least two signals correspond one-to-one to the above-mentioned at least two carriers.
[0009] Exemplarily, if the above-mentioned first information is encoded as a binary information sequence, then the information sequence of the first information can be modulated on the above-mentioned N pixel points through two carriers; if the above-mentioned first information is encoded as a multi-base information sequence, then the information sequence of the first information can be modulated on the above-mentioned N pixel points through multiple carriers.
[0010] In combination with the first aspect, in some implementations of the first aspect, the above method also includes: the first device selects P areas on the above second layer; the first device selects part or all of the pixels in each of the above P areas, and selects a total of N pixels, where N is greater than P and N and P are both positive integers.
[0011] When the first device selects all pixel points in each of the above-mentioned P areas, it can be considered that the above-mentioned first device selects P pixel blocks in the above-mentioned second layer, and all pixel points included in the P pixel blocks are the above-mentioned N pixel points.
[0012] The above method can be used to select pixels for modulating signals in different regions.
[0013] In combination with the first aspect, in certain implementations of the first aspect, at least one pixel point selected from one of the above-mentioned P areas is used to modulate a signal of the above-mentioned first information, and the above-mentioned method also includes: the first device repeatedly modulates the above-mentioned at least two signals on the pixel points selected from the above-mentioned P areas.
[0014] Through the above method, the robustness of at least two signals for transmitting the first information can be improved, thereby avoiding the situation where the signal in some places on the screen of the first device is weak and the complete first information cannot be obtained.
[0015] In combination with the first aspect, in certain implementations of the first aspect, the first signal of the at least two signals corresponds to the first carrier of the at least two carriers, and the method includes: the first device modulates the first signal on M pixels among the N pixel points through the first carrier, and the initial phase of the first carrier corresponding to the M pixel points is randomly distributed.
[0016] Similarly, if the first information includes two signals, the second signal of the above two signals corresponds to the second carrier among the above two carriers, the above method also includes: the first device modulates the above second signal on the pixel points other than the above M pixel points among the above N pixel points through the second carrier.
[0017] Through the above method, the randomness, aesthetics and technology hiding effects of the screen image of the first device can be achieved.
[0018] In combination with the first aspect, in certain implementations of the first aspect, the above-mentioned M pixel points are in S areas among the above-mentioned P areas, and the above-mentioned method also includes: the first device assigns an R value, a G value and a B value in the RGB color space to each pixel point among the above-mentioned M pixel points, the brightness indicated by the R value, the G value and the B value of the pixel point selected from each of the S areas is an L value, and the maximum difference between the L values of each area in the S areas is less than the first threshold value.
[0019] By using the above method, the brightness presented by different areas under the same carrier is kept consistent or approximately equal, so that no flickering phenomenon occurs when viewed by human eyes.
[0020] In combination with the first aspect, in certain implementations of the first aspect, the above method also includes: the first device selects one or more first pixel points / first pixel blocks of the above second layer; the first device modulates the carrier corresponding to the one or more first pixel points / first pixel blocks to a constant carrier during the process of transmitting the above first information.
[0021] Exemplarily, the first device may select one or more first pixel points / first pixel blocks for area #1 among the P areas. The first or multiple first pixel points / first pixel blocks may be pixel points / pixel blocks located within the area #1 or pixel points / pixel blocks adjacent to the area #1. This application does not limit this.
[0022] Exemplarily, the first device may modulate the carrier corresponding to one or more first pixel points / first pixel blocks into any one of the at least two carriers mentioned above, or may modulate it into other carriers, which is not limited in this application.
[0023] Through the above method, the other carriers of at least two signals carrying the first information can be demodulated with reference to the constant carrier corresponding to the one or more first pixel points / first pixel blocks selected above, which can improve the accuracy of demodulation.
[0024] In combination with the first aspect, in certain implementations of the first aspect, the frequency of any one of the at least two carriers may be 0.
[0025] By using the above method, the number of detection points during carrier demodulation can be reduced, thus shortening the demodulation time.
[0026] On the second aspect, a device connection method is provided, which can be executed by the second device, or by a module (such as a chip or circuit) in the second device, or by a logical node, logical module or software that can realize all or part of the functions of the second device. This application does not limit this.
[0027] The method includes: the second device scans the screen of the first device, the screen displays a third layer, the third layer is generated based on the first layer and the second layer, the first layer and the second layer are generated in parallel, the first layer is a background layer, the second layer includes N pixels, first information is modulated on the N pixels, and the first information is used for authentication connection between the second device and the first device; the second device obtains second information based on the result of the above scanning; the second device authenticates the second information and completes the connection with the first device.
[0028] Through the above method, not only can pixel-level signal transmission be achieved, but multiple layers can also be generated in parallel, which can reduce the interaction time of device connection and improve user experience.
[0029] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned first information includes at least two signals, and the above-mentioned first information is modulated on the above-mentioned N pixel points, including: the above-mentioned first information is modulated on the above-mentioned N pixel points through at least two carriers, and the above-mentioned at least two signals correspond one-to-one to the above-mentioned at least two carriers.
[0030] Exemplarily, if the above-mentioned first information is encoded as a binary information sequence, then the information sequence of the first information can be modulated on the above-mentioned N pixel points through two carriers; if the above-mentioned first information is encoded as a multi-base information sequence, then the information sequence of the first information can be modulated on the above-mentioned N pixel points through multiple carriers.
[0031] In combination with the second aspect, in certain implementations of the second aspect, the above-mentioned N pixel points are obtained by selecting part or all of the pixel points in each of the P areas selected on the screen of the above-mentioned first device, where N is greater than P and N and P are both positive integers.
[0032] The above-mentioned N pixel points are obtained by selecting all pixel points in each of the P areas selected on the screen of the above-mentioned first device. It can be considered that the above-mentioned first device has selected P pixel blocks in the above-mentioned second layer, and all pixel points included in the P pixel blocks are the above-mentioned N pixel points.
[0033] The above method can be used to select pixels for modulating signals in different regions.
[0034] In combination with the second aspect, in certain implementations of the second aspect, all pixel points selected from one of the above-mentioned P areas are used to modulate a signal of the above-mentioned first information. When the sampling rate of the above-mentioned second device when scanning the screen of the above-mentioned first device is equal to the screen refresh rate of the above-mentioned first device, the above-mentioned at least two signals are repeatedly modulated on the pixel points selected from the above-mentioned P areas.
[0035] Through the above method, the robustness of at least two signals for transmitting the first information can be improved, thereby avoiding the situation where the signal in some places on the screen of the first device is weak and the complete first information cannot be obtained.
[0036] In combination with the second aspect, in some implementations of the second aspect, a sampling rate of the second device when scanning the screen of the first device is greater than or equal to twice a screen refresh rate of the first device.
[0037] Through the above method, the refresh stripes when the second device scans the first device can be reduced as much as possible, thereby improving the accuracy of obtaining the second information.
[0038] In combination with the second aspect, in certain implementations of the second aspect, the frequency of any one of the at least two carriers may be 0.
[0039] By using the above method, the number of detection points during carrier demodulation can be reduced, thus shortening the demodulation time.
[0040] In a third aspect, a communication device is provided, comprising a processor, wherein the processor is configured to, by executing a computer program or instruction or through a logic circuit, enable the communication device to execute the method described in the first aspect and any possible embodiment of the first aspect, or enable the communication device to execute the method described in the second aspect and any possible embodiment of the second aspect.
[0041] In a possible implementation, the communication device further includes a memory for storing the computer program or instruction.
[0042] In a possible implementation, the communication device further includes a communication interface, which is used to input and / or output signals.
[0043] In a fourth aspect, a communication device is provided, comprising a logic circuit and an input / output interface, wherein the input / output interface is used to input and / or output signals, and the logic circuit is used to execute the method described in the first aspect and any possible embodiment of the first aspect, or to execute the method described in the second aspect and any possible embodiment of the second aspect.
[0044] In a fifth aspect, a computer-readable storage medium is provided, on which a computer program or instruction is stored. When the computer program or the instruction is run on a computer, the method described in the first aspect and any possible method of the first aspect is executed, or the method described in the second aspect and any possible method of the second aspect is executed.
[0045] In a sixth aspect, a computer program product is provided, comprising instructions, which, when executed on a computer, cause the method described in the first aspect and any possible method of the first aspect to be executed, or cause the method described in the second aspect and any possible method of the second aspect to be executed.
[0046] In the seventh aspect, a communication system is provided, which includes the above-mentioned first device and the above-mentioned second device, the first device is used to execute the method described in the above-mentioned first aspect and any possible method of the first aspect, and the second device is used to execute the above-mentioned second aspect and any possible method of the second aspect.
[0047] For the description of the beneficial effects of the third to seventh aspects, reference can be made to the description of the first and second aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] FIG1 is a schematic diagram of an example device interconnection method 100 applicable to an embodiment of the present application.
[0049] FIG2 is a schematic flow chart of a device interconnection method 200 provided in an embodiment of the present application.
[0050] FIG3 is a schematic diagram of a layer provided in an embodiment of the present application.
[0051] FIG4 is a schematic diagram of another layer provided in an embodiment of the present application.
[0052] FIG5 is a schematic diagram of the first carrier and the second carrier provided in this application.
[0053] FIG6 is another waveform diagram of the first carrier provided in this application.
[0054] FIG7 is another waveform diagram of the first carrier provided in this application.
[0055] FIG8 is a schematic block diagram of a communication device 800 applicable to an embodiment of the present application.
[0056] FIG9 is a schematic block diagram of a communication device 900 applicable to an embodiment of the present application. DETAILED DESCRIPTION
[0057] First, the operating system applicable to the embodiments of the present application is described.
[0058] The technical solution provided in this application can be applied to various operating systems, such as: Android operating system, Apple operating system (iPhone operating system, iOS), Harmony operating system (Harmony OS), Microsoft (Microsoft Windows) operating system, etc.
[0059] This application is mainly used in the application scenario of first-look pairing between devices. For example, when pairing between devices for the first time, the authentication connection between the devices is generally achieved by scanning a QR code. However, the current QR code authentication connection process is a serial process, and each step in the authentication process needs to be triggered accordingly, which takes a long time to interact.
[0060] Based on this, the present application provides a device interconnection method 200, which can reduce the interaction time when devices are interconnected. Before introducing the device interconnection method 200 provided by the present application, in order to facilitate understanding of the device interconnection method 200 provided by the present application, the present application first introduces the overall interaction process applicable to the device interconnection method 200, as shown in Figure 1, a schematic flowchart of the interaction between the first device and the second device. The overall interaction process shown in Figure 1 can be executed by the first device and the second device, or by modules and / or devices (for example, chips or integrated circuits, etc.) with corresponding functions installed in the first device and the second device, and the present application does not limit this.
[0061] For example, the first device may be a new mobile phone and the second device may be an old mobile phone; or the first device may be a personal computer (PC) and the second device may be a mobile phone; or the first device may be a mobile phone and the second device may be a watch, etc. This application does not limit this. The overall interaction process includes:
[0062] In step S110 , the first device actively discovers surrounding devices. For example, the first device actively discovers the second device.
[0063] In step S111, the second device determines whether it is discovered by the first device and queries whether it has the ability to support the dynamic Harmony ring.
[0064] For example, whether the second device has the ability to support dynamic HarmonyOS ring can be configured on the second device through factory settings.
[0065] Step S112: If the second device supports dynamic HarmonyOS ring, the second device feeds back to the first device that the first device has successfully discovered the second device.
[0066] In step S113, the first device loads the first authentication information onto the dynamic Harmony ring and generates a dynamic Harmony ring on the screen.
[0067] Among them, the process of how the first device involved in step S113 loads the first authentication information on the dynamic Harmony ring is detailed in the relevant description of Figure 2 below.
[0068] Step S114: The second device activates the camera to scan the dynamic Harmony ring on the screen of the first device.
[0069] Step S115: The second device obtains second authentication information according to the scanning result.
[0070] Step S116: The second device sends the obtained second authentication information to the first device.
[0071] Step S117: The first device authenticates the second authentication information according to the first authentication information.
[0072] Specifically, the first authentication information is equivalent to the first information described below, and the second authentication information is equivalent to the second information described below. The first authentication information and the second authentication information here can be found in the description of the first information and the second information below.
[0073] Step S118: After the second authentication information is confirmed, the first device sends a feedback to the second device indicating that the authentication is successful.
[0074] Step S119: The second device completes the connection with the first device.
[0075] After the first device completes the connection with the second device, the first device can execute subsequent business processes with the second device, which is not limited in this application.
[0076] Based on the above-mentioned overall interaction process, the device interconnection method 200 provided in this application is shown in Figure 2. The device interconnection method 200 mainly further describes the above-mentioned step S113, that is, how the first device loads the first authentication information on the dynamic Hongmeng ring and how to generate the dynamic Hongmeng ring. The device interconnection method 200 can be executed by the first device and the second device, or by modules and / or devices (for example, chips or integrated circuits, etc.) with corresponding functions installed in the first device and the second device. This application does not limit this. Specifically, the device interconnection method 200 provided in this application includes:
[0077] Step S210: The first device generates a first layer and a second layer in parallel.
[0078] Specifically, the first layer is a background layer, the second layer includes N pixels, the first information is modulated on the N pixels, and the first information is used for authentication connection between the first device and the second device.
[0079] Exemplarily, the first information may be an authentication code used for the first device to perform an authentication connection with the second device.
[0080] For example, the present application may provide the following two methods for selecting the N pixels included in the second layer:
[0081] Method 1: The first device selects P regions on the second layer; the first device selects multiple pixels in each of the P regions, for a total of N pixels, where N is greater than P and both N and P are positive integers. For example, regions 1, 2, 3, 4, 5, and 6 of the second layer shown in FIG3 are the P selected regions.
[0082] Method 2: The first device selects Q pixel blocks on the second layer, where all pixels included in the Q pixel blocks are the N pixel points, where N is greater than Q and both N and Q are positive integers. For example, pixel blocks 1, 2, 3, 4, 5, 6, 7, and 8 of the second layer shown in FIG4 are the Q selected pixel blocks.
[0083] It should be noted that in the above-mentioned method 1, when the first device selects all pixels in each of the above-mentioned P areas, it can be considered that the first device has selected P pixel blocks, and all pixels included in the P pixel blocks are the above-mentioned N pixels. In this case, method 1 can be considered to be the same as method 2. The following embodiments of the present application are described in terms of selecting N pixels by area (method 1) and selecting the above-mentioned N pixels by pixel blocks (method 2), but these two methods may be equivalent in some cases.
[0084] Specifically, the first information is modulated on the N pixel points through at least two carrier waves. The modulated first information includes at least two signals, and the at least two signals correspond to the at least two carrier waves in a one-to-one manner.
[0085] For example, if the information sequence of the first information is binary, the first information can be modulated on the N pixels through two carrier waves, and the modulated first information includes two signals.
[0086] Specifically, the first device modulating the first information on the N pixels may include the following three steps:
[0087] 1. The first information to be transmitted is converted into a combination of signal 1 and signal 0 represented by a string of binary digits through a certain encoding method. For example, the string of binary digits may be 101, and the specific form of the string of binary digits is not limited in this application.
[0088] Optionally, 2. baseband modulate the above string of binary digits to form a baseband signal.
[0089] It should be noted that the present application does not limit the encoding method for forming the baseband signal. For example, the present application may provide two encoding methods for forming the baseband signal.
[0090] Coding method 1: repeated coding.
[0091] The string of binary digits is a signal to be transmitted, and the string of signals to be transmitted is repeatedly arranged on the second layer.
[0092] For example, as shown in FIG3 , in the second layer, N pixels are selected in the above-mentioned manner, and the above-mentioned string of binary digits 101 is arranged in areas 1, 2, and 3, respectively, and then the above-mentioned string of binary digits 101 is arranged in areas 4, 5, and 6, respectively. This method is a centrosymmetric encoding method. When the camera sampling rate of the second device is equal to the screen refresh rate of the first device, since the sampling direction of the camera is generally vertical and the screen refresh direction is generally row refresh, the camera of the second device will form oblique refresh stripes when sampling, and the signal at the refresh stripes is weak. Using this centrosymmetric repeated encoding method can enhance the signal strength at the refresh stripes. Alternatively, in order to reduce the width of the refresh stripes, the camera sampling rate of the second device can be increased. For example, the camera sampling rate of the second device is greater than or equal to twice the screen refresh rate of the first device.
[0093] For example, as shown in FIG4 , in the second layer, in the above-mentioned second method of selecting N pixels, the above-mentioned string of binary digits 101 is arranged in pixel block 1, pixel block 2, and pixel block 3, respectively, and then the above-mentioned string of binary digits 101 is arranged in pixel block 5, pixel block 6, and pixel block 7, respectively. This method is a centrosymmetric encoding method. When the camera sampling rate of the second device is equal to the screen refresh rate of the first device, since the sampling direction of the camera is generally vertical and the screen refresh direction is generally row refresh, the camera of the second device will form oblique refresh stripes when sampling, and the signal at the refresh stripes is weak. Using this centrosymmetric encoding method can enhance the signal strength at the refresh stripes. Alternatively, in order to reduce the width of the refresh stripes, the camera sampling rate of the second device can be increased. For example, the camera sampling rate of the second device is greater than or equal to twice the screen refresh rate of the first device.
[0094] Coding method 2: differential coding.
[0095] The above string of binary digits is the signal to be transmitted, and each signal in the string of signals to be transmitted is encoded again into signal 0 plus signal 1.
[0096] For example, the number 1 in the above string of binary numbers 101 is re-encoded as "10" and the number 0 is re-encoded as "01", so the above string of binary numbers 101 can be re-encoded as 100110. The re-encoded 100110 can be arranged arbitrarily on the second layer.
[0097] For example, as shown in the second layer in FIG3 , in the above-mentioned method of selecting N pixels, the re-encoded 100110 can be arranged in regions 1, 4, 3, 6, 2, and 5 in sequence.
[0098] For example, as shown in the second layer of FIG4 , under the above-mentioned method 2 of selecting N pixels, the re-encoded 100110 can be arranged in pixel block 1, pixel block 4, pixel block 8, pixel block 5, pixel block 3, and pixel block 6, respectively.
[0099] By adopting the above differential encoding method, when the amount of information to be transmitted is small, it can be ensured that the probability of the two binary symbols appearing is the same, which is beneficial to the accuracy of decoding.
[0100] 3. Carrier modulation: The binary digits obtained in step 1 or the binary digits obtained in step 2 are modulated on the N pixels through two carriers.
[0101] Exemplarily, in step 2, a string of binary digits is obtained through the encoding method 1 or the encoding method 2 to represent two signals, namely signal 1 and signal 0.
[0102] The first device modulates signal 1 on M pixel points through a first carrier; the first device modulates signal 0 on pixel points other than the M pixel points among the N pixel points through a second carrier.
[0103] Exemplarily, based on the example given in step 2 above, in the above encoding method 1 and the above method 1 of selecting N pixels, the first device modulates signal 1 on the M pixels selected from areas 1, 3, 4, and 6 through the first carrier; the first device modulates signal 0 on the pixels selected from areas 2 and 5 through the second carrier.
[0104] Exemplarily, based on the example given in step 2, in the above-mentioned encoding method 1 and the above-mentioned method 2 of selecting N pixel points, the first device modulates signal 1 on all pixel points included in pixel block 1, pixel block 3, pixel block 5, and pixel block 7 through the first carrier; the first device modulates signal 0 on all pixel points included in pixel block 2 and pixel block 6 through the second carrier.
[0105] Exemplarily, based on the example given in step 2, in the above-mentioned encoding method 2 and the above-mentioned method 1 for selecting N pixels, the first device modulates signal 1 on the M pixels selected from areas 1, 6, and 2 through the first carrier; the first device modulates signal 0 on the pixels selected from areas 4, 3, and 5 through the second carrier.
[0106] Exemplarily, based on the example given in step 2, in the above-mentioned encoding method 2 and the above-mentioned method 2 for selecting N pixel points, the first device modulates signal 1 on all pixel points included in pixel block 1, pixel block 5, and pixel block 3 through the first carrier; the first device modulates signal 0 on all pixel points included in pixel block 4, pixel block 8, and pixel block 6 through the second carrier.
[0107] For example, assuming that the screen refresh rate of the first device is FPS S , then the screen refresh period of the first device is T S =1 / FPS S , the first carrier and the second carrier can be shown in FIG5. The period of the first carrier (carrier1) is 3T S , so the first carrier includes the main frequency FPS S / 3; the period of the second carrier (carrier2) is 2T S , so the second carrier includes the main frequency FPS S / 2.
[0108] The present application does not need to limit the waveform of each carrier to a strict square wave, sine wave, etc. Taking the first carrier as an example, the first carrier can also be the waveform shown in Figure 6. In one cycle, the first carrier has three different phases, namely α1, α2, and α3 as shown in Figure 6.
[0109] Since there are a large number of modulated carrier waveforms on the screen of the first device, although the human eye will not perceive the color change when the colors of the pixels are mixed, when the camera is used to shoot or the camera is paused at a certain frame after recording, the color corresponding to the phase of one of α1, α2, and α3 shown in Figure 6 will be clearly observed. In order to increase the randomness, aesthetics and technical hiding effect of the picture, the initial phases of the above-mentioned first carrier corresponding to the above-mentioned M pixels are randomly distributed, as shown in Figure 7. The initial phase of the first waveform shown in Figure 7 is α1, the initial phase of the second waveform is α2, and the initial phase of the third waveform is α3. The waveform of the above-mentioned first carrier corresponding to the above-mentioned M pixels can be any of the three waveforms shown in Figure 7. Similarly, the initial phases of the second carrier corresponding to the pixel points other than the above-mentioned M pixels in the above-mentioned N pixels can also be randomly distributed.
[0110] In order to prevent human eyes from observing flickering changes on the screen of the first device, this application provides a method that can prevent human eyes from observing the flickering phenomenon. The method is as follows:
[0111] In the above-mentioned method of selecting N pixels, the M pixels are located in S areas among the P areas, and the first device assigns an R value, a G value, and a B value in the RGB color space to each of the M pixels. The brightness indicated by the R value, G value, and B value of the pixel selected from each of the S areas is an L value, and the maximum difference between the L values of each of the S areas is less than a first threshold. Exemplarily, the first device may convert the R value, G value, and B value of the pixel selected from each of the S areas into a CIELAB color space to obtain an L value, an A value, and a B value for each of the S areas, wherein the L value of each of the S areas is approximately equal. Similarly, the pixels other than the M pixels among the N pixels are located in an area other than the S areas among the P areas, and the first device assigns an R value, a G value, and a B value in the RGB color space to each pixel other than the M pixels among the N pixels, and the brightness indicated by the R value, G value, and B value of the pixel selected from each area other than the S areas among the P areas is an L value, and the maximum difference between the L values of each area other than the S areas among the P areas is less than a third threshold. Exemplarily, the first device converts the R value, G value, and B value of the pixel selected from each area other than the S areas among the P areas into a CIELAB color space to obtain an L value, an A value, and a B value for each area other than the S areas among the P areas, and the L value of each area other than the S areas among the P areas is approximately equal.
[0112] In the above example, the color composed of the L value, A value, and B value of the pixel points selected from each area in the CIELAB color space is approximately the color of the pixel points selected from each area that can be observed by the human eye. The L value of the pixel points selected from each area in the CIELAB color space is approximately equal, and the A value and B value of the pixel points selected from each area in the CIELAB color space can be arbitrarily combined.
[0113] Alternatively, in the second method for selecting N pixels, the M pixels are located in T pixel blocks among the Q pixel blocks, and the first device assigns an R value, a G value, and a B value in the RGB color space to each of the M pixels. The brightness indicated by the R value, G value, and B value of the pixel included in each of the T pixel blocks is an L value, and the maximum difference between the L values of each of the T pixel blocks is less than a second threshold. Exemplarily, the first device converts the R value, G value, and B value of the pixel included in each of the T pixel blocks into a CIELAB color space to obtain an L value, an A value, and a B value for each of the T pixel blocks, and the L value of each of the T pixel blocks is approximately equal. Similarly, the pixel points other than the M pixel points in the above-mentioned N pixel points are in the pixel blocks other than the T pixel blocks in the above-mentioned Q pixel blocks, and the above-mentioned first device assigns R value, G value and B value of the RGB color space to each pixel point in the above-mentioned N pixel points other than the M pixel points, and the brightness indicated by the R value, G value and B value of the pixel point included in each pixel block in the pixel blocks other than the T pixel blocks in the above-mentioned Q pixel blocks is the L value, and the maximum difference between the L values of each pixel block in the pixel blocks other than the T pixel blocks in the Q pixel blocks is less than the fourth threshold. Exemplarily, the first device converts the R value, G value, and B value of the pixel points included in each of the Q pixel blocks except the T pixel blocks mentioned above to the CIELAB color space, and obtains the L value, A value, and B value of each of the Q pixel blocks except the T pixel blocks mentioned above, and the L value of each of the Q pixel blocks except the T pixel blocks mentioned above is approximately equal.
[0114] The color composed of the L value, A value, and B value of the pixels included in each pixel block in the above example in the CIELAB color space is approximately the color of the pixels included in each pixel block that can be observed by the human eye. The L value of the pixels included in each pixel block in the CIELAB color space is approximately equal, and the A value and B value of the pixels included in each pixel block in the CIELAB color space can be arbitrarily combined.
[0115] Among them, the above-mentioned first threshold, second threshold, third threshold and fourth threshold can be set according to actual needs, and this application does not limit this.
[0116] In order to improve the accuracy of carrier demodulation, this application also provides a method, which is as follows:
[0117] The first device selects one or more first pixel points / first pixel blocks of the second layer; and the first device modulates the carrier waves corresponding to the one or more first pixel points / first pixel blocks into a constant carrier wave during the transmission of the first information.
[0118] For example, the first device may modulate the carrier corresponding to the one or more first pixel points / first pixel blocks into the above-mentioned first carrier or the above-mentioned second carrier or any other carrier, which is not limited in this application.
[0119] Modulating the carrier waves corresponding to the one or more first pixel points / first pixel blocks into a constant carrier wave helps to accurately demodulate the carrier waves modulated with the first information.
[0120] In step S212 , the first device generates a third layer based on the first layer and the second layer, and displays the third layer on the screen.
[0121] For example, as shown in FIG3 , after selecting N pixels in the above manner, the first device can set the transparency of the first layer and the transparency of the second layer, overlaying the second layer on the first layer to display a mixed layer. This mixed layer is the third layer shown in FIG3 .
[0122] For example, as shown in FIG4 , in the second method of selecting N pixels, the first device can also set the transparency of the first layer and the transparency of the second layer, overlaying the second layer on the first layer to display a mixed layer. This mixed layer is the third layer shown in FIG4 .
[0123] It should be understood that the third layer shown in Figures 3 and 4 can be the dynamic Harmony ring described in Figure 1.
[0124] It should be understood that the third layer is dynamically changing. When the screen refresh rate of the first device is 60 frames per second (FPS), the screen of the first device refreshes approximately every 16 milliseconds (ms). In other words, the playback duration of each frame of the first device is approximately 16 ms. Generally speaking, the signal after the first information is modulated by the carrier wave requires multiple frames to be transmitted to the screen of the first device.
[0125] Step S214: The second device scans the screen of the first device.
[0126] Step S216: The second device obtains second information according to the scanning result.
[0127] Step S218: The second device authenticates the second information and completes the connection with the first device.
[0128] Specifically, the second device will send the obtained second information to the first device for verification to determine whether the second information is consistent with the first information. If they are consistent, the authentication is successful, and the first device and the second device can complete the connection.
[0129] Through the device interconnection method 200 provided in the present application, pixel-level communication can be achieved by modulating different carriers on pixels to transmit an information sequence of authentication information; in addition, multiple layers for authentication can be generated in parallel, which can reduce the time used for authentication.
[0130] In addition, the frequency of any one of the at least two carrier waves provided in the present application may be 0, which can reduce the number of detection points and speed up the detection time.
[0131] In addition, the present application is not only applicable to binary information transmission, but also to multi-base information transmission. For example, in multi-base information transmission, the information to be transmitted can be modulated on pixels using multiple carriers.
[0132] Finally, the device embodiment of the embodiment of the present application is introduced.
[0133] To implement the various functions of the methods provided herein, the first device, the second device, etc. may include hardware structures and / or software modules, and the aforementioned functions may be implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules. Whether a particular one of the aforementioned functions is implemented in the form of hardware structures, software modules, or a combination of hardware structures and software modules depends on the specific application and design constraints of the technical solution.
[0134] Figure 8 is a schematic block diagram of a communication device 800 according to an embodiment of the present application. The communication device 800 includes a processor 810 and a communication interface 820. Optionally, the processor 810 and the communication interface 820 may be interconnected via a bus 830. The communication device 800 may be a first device or a second device.
[0135] Optionally, the communication device 800 may further include a memory 840. The memory 840 includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), or portable read-only memory (CD-ROM), and is used to store relevant instructions and data.
[0136] The processor 810 may be one or more central processing units (CPUs). In the case where the processor 810 is a CPU, the CPU may be a single-core CPU or a multi-core CPU.
[0137] When the communication apparatus 800 is a first device, illustratively, the communication apparatus 800 is configured to perform the following operations: generating a first layer and a second layer in parallel, etc.
[0138] When the communication apparatus 800 is the second device, illustratively, the communication apparatus 800 is configured to perform the following operations: scanning the screen of the first device, etc.
[0139] The above contents are merely exemplary descriptions. When the communication apparatus 800 is the first device / the second device, it will be responsible for executing the methods or steps related to the first device / the second device in the above method embodiments.
[0140] The above description is merely exemplary. For details, please refer to the contents of the above method embodiments. The implementation of each operation in FIG8 may also correspond to the corresponding description of the method embodiments shown in FIG2 to FIG7.
[0141] Figure 9 is a schematic block diagram of a communication device 900 according to an embodiment of the present application. The communication device 900 is used to implement the functions of the first device / the second device. The communication device 900 may be a chip in the first device / the second device.
[0142] Communication device 900 includes an input / output interface 920 and a processor 910. The input / output interface 920 may be an input / output circuit. The processor 910 may be a signal processor, a chip, or other integrated circuit capable of implementing the method of the present application. The input / output interface 920 is used for inputting or outputting signals or data.
[0143] For example, when the communication device 900 is a first apparatus, the processor 910 is configured to generate the first layer and the second layer in parallel.
[0144] For example, when the communication apparatus 900 is the second device, the input / output interface 920 is used to scan the screen of the first device, and the processor 910 is used to obtain the second information according to the scanning result.
[0145] In one possible implementation, the processor 910 implements the functions implemented by the first device / the second device by executing instructions stored in the memory.
[0146] Optionally, the communication device 900 further includes a memory.
[0147] Optionally, the processor and memory are integrated together.
[0148] Optionally, the memory is outside the communication device 900 .
[0149] In one possible implementation, the processor 910 may be a logic circuit that inputs / outputs messages or signals through the input / output interface 920. The logic circuit may be a signal processor, a chip, or other integrated circuit that can implement the method of the embodiment of the present application.
[0150] The above description of the communication device 900 is only an exemplary description. The communication device 900 can be used to execute the method described in the above embodiment. For specific content, please refer to the description of the above method embodiment, which will not be repeated here.
[0151] The present application also provides a chip, including a processor, for calling and executing instructions stored in a memory from the memory, so that a communication device equipped with the chip executes the methods in the above examples.
[0152] The present application also provides a chip, comprising: an input interface, an output interface, and a processor, wherein the input interface, the output interface, and the processor are connected via an internal connection path, and the processor is configured to execute code in a memory. When the code is executed, the processor is configured to execute the methods in the above examples. Optionally, the chip also includes a memory, which is configured to store computer programs or code.
[0153] The present application also provides a processor, which is coupled to a memory and is used to execute the methods and functions involving the first device or the second device in any of the above embodiments.
[0154] The present application provides a computer program product comprising instructions. When the computer program product is run on a computer, the method of the aforementioned embodiment is implemented.
[0155] The present application also provides a computer program. When the computer program is executed in a computer, the method of the aforementioned embodiment is implemented.
[0156] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a computer, the method described in the above embodiment is implemented.
[0157] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0158] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0159] In the several embodiments provided in this application, the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0160] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the technical solutions of the embodiments of the present application.
[0161] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0162] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of each method embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
[0163] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A device interconnection method, characterized in that: The method comprises: The first device generates a first layer and a second layer in parallel, the first layer is a background layer, the second layer includes N pixels, first information is modulated on the N pixels, and the first information is used for authentication connection between the first device and the second device; The first device generates a third layer based on the first layer and the second layer; The first device displays the third layer on a screen.
2. The method according to claim 1, characterized in that The first information includes at least two signals. The first information is modulated on the N pixel points, comprising: the first information is modulated on the N pixel points through at least two carriers, The at least two signals correspond to the at least two carriers in a one-to-one manner.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: The first device selects P areas on the second layer; The first device selects part or all of the pixels in each of the P areas, and selects the N pixels in total. Among them, N is greater than P, and N and P are both positive integers.
4. The method according to claim 3, characterized in that All pixel points selected from one of the P regions are used to modulate a signal of the first information, and the method further includes: The first device repeatedly modulates the at least two signals on pixel points selected from the P areas.
5. The method according to any one of claims 2 to 4, characterized in that The first signal of the at least two signals corresponds to the first carrier of the at least two carriers, and the method further includes: The first device modulates the first signal on M pixel points among the N pixel points through the first carrier, and the initial phases of the first carrier corresponding to the M pixel points are randomly distributed.
6. The method according to claim 5, characterized in that The M pixels are located in S areas of the P areas, and the method further includes: The first device assigns an R value, a G value, and a B value in an RGB color space to each of the M pixels, the brightness indicated by the R value, the G value, and the B value of the pixel selected from each of the S areas is an L value, and the maximum difference between the L values of each of the S areas is less than a first threshold.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The first device selects one or more first pixel points / first pixel blocks of the second layer; The first device modulates the carrier corresponding to the one or more first pixel points / first pixel blocks into a constant carrier during the process of transmitting the first information.
8. The method according to any one of claims 2 to 7, characterized in that The frequency of any one of the at least two carriers is 0.
9. A device interconnection method, characterized in that: The method comprises: The second device scans the screen of the first device, the screen displays a third layer, the third layer is generated based on the first layer and the second layer, the first layer and the second layer are generated in parallel, the first layer is a background layer, the second layer includes N pixels, the first information is modulated on the N pixels, and the first information is used for the authentication connection between the second device and the first device; The second device obtains second information according to the scanning result; The second device authenticates the second information and completes the connection with the first device.
10. The method according to claim 9, characterized in that The first information includes at least two signals, and the first information is modulated on the N pixel points, including: the first information is modulated on the N pixel points through at least two carriers, The at least two signals correspond to the at least two carriers in a one-to-one manner.
11. The method according to claim 9 or 10, characterized in that: The N pixels are obtained by selecting part or all of the pixels in each of the P areas selected on the second layer of the first device. Among them, N is greater than P, and N and P are both positive integers.
12. The method according to claim 11, characterized in that All pixels selected from one of the P regions are used to modulate a signal of the first information, When the sampling rate of the second device when scanning the screen of the first device is equal to the screen refresh rate of the first device, the at least two signals are repeatedly modulated on the pixel points selected from the P areas.
13. The method according to claim 9 or 10, characterized in that: A sampling rate of the second device when scanning the screen of the first device is greater than or equal to twice a screen refresh rate of the first device.
14. The method according to any one of claims 9 to 13, characterized in that The frequency of any one of the at least two carriers is 0.
15. A communication device, characterized in that: comprising a processor for, by executing a computer program or instructions, The communication device is caused to execute the method according to any one of claims 1 to 8, or the communication device is caused to execute the method according to any one of claims 9 to 14.
16. The communication device according to claim 15, characterized in that: The communication device further comprises a memory for storing the computer program or instructions.
17. The communication device according to claim 15, characterized in that: The communication device further comprises a communication interface, and the communication interface is used for inputting and / or outputting signals.
18. A computer-readable storage medium, characterized in that: The computer readable storage medium stores a computer program or instruction. When the computer program or instruction is executed on a computer, The method of any one of claims 1 to 8 is performed, or the method of any one of claims 9 to 14 is performed.
19. A computer program product, characterized in that Contains instructions that, when executed on a computer, The method of any one of claims 1 to 8 is performed, or the method of any one of claims 9 to 14 is performed.