Method and electronic device for information transmission

By using specially designed images and combining color space conversion and image processing technology when transmitting information between devices, the problem of long interaction paths when scanning QR codes is solved, enabling convenient device connection and information transmission, and improving the user experience.

CN119520502BActive Publication Date: 2025-12-19HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411563437.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-14
Publication Date
2025-12-19
Estimated Expiration
2044-05-14

AI Technical Summary

Technical Problem

In existing technologies, the QR code scanning method for information transmission between devices is a lengthy and inconvenient interaction path, especially when switching devices or cloning data.

Method used

The first device displays a specially designed image, and the second device obtains information from the image by scanning or capturing it. Color space conversion and image processing technology are used to reduce glare interference and quickly decode device connection information.

Benefits of technology

It shortens the interaction path for information transmission between devices, enhances the convenience and technological feel of operation, reduces manual operation by users, and improves the efficiency of device connection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520502B_ABST
    Figure CN119520502B_ABST
Patent Text Reader

Abstract

The application provides a method, an electronic device and a system for information transmission. The method can be applied to an electronic device, and the method comprises: when a device exists around a first electronic device, a first image can be displayed, the image comprising a first part and a second part; a second electronic device can acquire N frames of the first image and identify first information encoded by the second part, and based on the first information, the device connection, data transmission, account login, participation and the like can be realized. In the technical solution, the second electronic device can scan the image displayed by the first electronic device to acquire the first information therein, so as to realize information transmission between the two devices. For example, when a new device is replaced or data is cloned, the interaction path of the device can be shortened, and the sense of technology can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application, the original application's application number is 202410601613.4, the original application's filing date is 2024-05-14, the invention name is "information transmission method and electronic device", the original application's entire content is incorporated by reference in this application. TECHNICAL FIELD

[0002] The present application relates to the technical field of electronics, and more particularly, to an information transmission method and electronic device. BACKGROUND

[0003] In some scenarios where information needs to be transmitted between devices, a two-dimensional code scanning method is usually used for device connection pairing, account login, etc. For example, when a user uses a first device to change a device or clone data, data needs to be transmitted from a second device to the first device, and the second device needs to scan a two-dimensional code displayed on the first device to perform connection pairing. However, the two-dimensional code scanning method has a long interaction path and is not convenient. SUMMARY

[0004] Embodiments of the present application provide an information transmission method and electronic device. In the technical solution, the second electronic device can scan the image displayed by the first electronic device to obtain the first information therein, so as to realize information transmission between the two devices. For example, when changing a device or cloning data, the device interaction path can be shortened, and the sense of technology can be improved.

[0005] In a first aspect, the present application provides a system including a first electronic device and a second electronic device. The first electronic device is configured to send a first message for discovering devices around the first electronic device. The second electronic device is configured to receive the first message and send first indication information according to the first message. The first electronic device is further configured to display a first image according to the first indication information, the first image including a first part and a second part. The second electronic device is further configured to obtain N frames of the first image, each frame of the N frames of the first image including the first part and the second part, the positions of the second parts of two adjacent frames of the N frames of the image being the same, where N is greater than or equal to 2. The second electronic device is further configured to decode first information according to the second part.

[0006] It should be understood that the first part can be the background of the first image, and the second part can be the part of the first image encoding the first information. Exemplarily, the second part can be superimposed in the first part.

[0007] The first information can include, but is not limited to, device connection information, account login information, a verification code, a website address, a conference link, data information to be transmitted, screen projection information, etc.

[0008] The device connection information can include, but is not limited to, a connection pairing code, a product serial number, or a media access control (MAC) address.

[0009] The first indication information can be used to indicate that there is a device around the first electronic device, or the first indication information can be confirmation information after the first message is scanned.

[0010] It should also be understood that the embodiments of the present application do not limit the specific operation of the second electronic device after obtaining the first information.

[0011] In other examples, the colors of the second parts of any two adjacent frames of the N frames of images can be different. Alternatively, the colors of the second parts of any three consecutive frames of the N frames of images can be different, and the embodiments of the present application are not limited thereto.

[0012] In other examples, the second parts of the adjacent two frames of the N frames of images can encode the same information or different information. When encoding different information, the first electronic device can divide the information to be encoded into multiple parts and encode them in the second parts of different frames of images. Alternatively, the consecutive multiple frames of the N frames of images can encode different information, and the N frames of images can encode multiple groups of information, and the embodiments of the present application are not limited thereto.

[0013] In other examples, the first parts of the adjacent two frames of the N frames of images can be the same or different, and the embodiments of the present application are not limited thereto.

[0014] Based on the system provided by the embodiments of the present application, the first electronic device can encode the first information to be transmitted in the second part of the first image, and the second electronic device can obtain N frames of first images and decode the first information based on the second part.

[0015] For example, when connecting the device, the second electronic device can scan or capture the image displayed by the first electronic device to obtain the device connection information (connection pairing code) therein, so that the device connection can be quickly established. When performing new device replacement or data cloning, the path of device interaction can be shortened, and the sense of technology can be improved.

[0016] In some implementations, before the second electronic device decodes the first information based on the second part, the second electronic device is further configured to perform color space conversion on the N frames of first images to obtain N frames of second images.

[0017] Based on the embodiments of the present application, the second electronic device can reduce the influence of reflections in the first image by performing color space conversion on the first image.

[0018] For example, the first image is converted from an RGB color space to an HSV color space, or a hue, saturation, and intensity (HSI) color space, etc.

[0019] In some embodiments, the second electronic device is specifically configured to: convert the N frames of first images from a red, green, and blue (RGB) color space to a hue, saturation, and value (HSV) color space; filter a hue (H) domain of each frame of image in the N frames of first images to obtain N frames of second images, the second images including an H domain corresponding to an angle value greater than a first preset value and less than a second preset value; perform a binarization process on the N frames of second images to obtain N frames of third images; and determine the second part according to the N frames of third images.

[0020] It should be understood that the embodiments of the present application do not limit the specific values of the first preset value and the second preset value.

[0021] Based on the embodiments of the present application, by converting the color space and performing the threshold filtering, the existing reflection phenomenon in the first images can be filtered out, the interference of the reflection on the second electronic device in acquiring the second part is reduced, and the possibility of successful decoding is improved.

[0022] In some embodiments, the second electronic device is specifically configured to: perform a closing operation on the N frames of third images; determine the second part according to a result of the closing operation; or perform a clustering analysis on particle points in the N frames of third images; and determine the second part according to a result of the clustering analysis.

[0023] Based on the embodiments of the present application, the second part is determined by the closing operation, which can reduce the interference of the reflection on the second electronic device in acquiring the second part and improve the possibility of successful decoding. In addition, for the case that the second part has more or serious occlusion, the second part can still be successfully acquired by the result of the clustering analysis, which improves the possibility of successful decoding of the second part by the electronic device subsequently.

[0024] In some embodiments, before the second electronic device performs the clustering analysis on the N frames of third images, the second electronic device is further configured to: filter particle points in the N frames of third images with an area less than a first area threshold.

[0025] Based on the embodiments of the present application, the particle points with a small area in the third images can be filtered out, so that the interference of the particle points with a small area on the acquisition of the second part can be reduced.

[0026] In some implementations, the second electronic device is specifically configured to: perform intra-frame difference processing on the second part of each of the N frames of first images to obtain N frames of grayscale images, wherein the intra-frame difference processing is an absolute value obtained by performing difference processing on the first channel image of the second part with the second channel image and the third channel image respectively and summing the results, the first channel image, the second channel image and the third channel image are one of red R channel image, green G channel image and blue B channel image, and each is different; performing inter-frame difference processing on the N frames of grayscale images to obtain N frames of difference images; performing binarization processing on the N frames of difference images to obtain N frames of fourth images; performing or operation processing on the N frames of fourth images to obtain a first target image; and obtaining the first information according to the first target image.

[0027] Exemplarily, the first channel image is a B channel image, the second channel image is an R channel image, and the third channel image is a G channel image.

[0028] Based on the embodiments of the present application, the second electronic device can decode the second part included in the N frames of images to successfully obtain the first information encoded therein.

[0029] In some implementations, the second electronic device is specifically configured to: filter particle points with an area smaller than a second area threshold in the first target image to obtain a second target image; and decode the first information according to the second target image.

[0030] Based on the embodiments of the present application, by filtering the particle points in the first target image, the particle points with a small area in the first target image can be filtered out, so that the interference of the particle points with a small area on the decoding result can be reduced.

[0031] In some implementations, before the second electronic device performs binarization processing on the N frames of difference images, the second electronic device is further configured to: determine the degree of moire in each of the N frames of difference images respectively; wherein the second electronic device is specifically configured to: filter out pixel points with a grayscale value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of moire; and perform binarization processing on the filtered N frames of difference images to obtain N frames of fourth images.

[0032] Based on the embodiments of the present application, the second electronic device can further determine the degree of moire in the image, and set a filtering threshold according to the degree of moire, so that the interference caused by the moire can be reduced, and the probability of successful decoding can be improved.

[0033] In some implementations, the first electronic device is specifically configured to: send the first message after the first electronic device is powered on for the first time; or, when data cloning is performed, send the first message in response to the user selecting an operation for indicating a new device, or in response to the user selecting an operation for indicating an old device type.

[0034] In this way, the electronic device can send the first message to the outside to discover the surrounding devices when the electronic device is powered on for the first time or when data cloning is performed for the first time. This technical solution is beneficial for the first electronic device to discover the devices when needed to perform the subsequent device connection operation, so that the power consumption of the electronic device can be saved to a certain extent.

[0035] In some implementations, the first electronic device is further configured to receive the first data information sent by the second electronic device, and the first data information includes account information logged in on the second electronic device and / or wireless network information connected by the second electronic device.

[0036] It should be understood that the wireless network information connected by the second electronic device can include the historical connection or the current connection.

[0037] In other examples, the first data information can further include privacy statements, settings, and the like of the second electronic device, which are not limited in the embodiments of the present application.

[0038] According to the embodiments of the present application, the second electronic device can send the account information, the wireless network information and the like to the first electronic device, so that the user does not need to manually log in the account on the first electronic device, connect the wireless and the like, thereby improving the operation experience of the user on the first electronic device. For example, the first electronic device is a new smart phone purchased by the user, and in this way, the new phone can automatically log in the account of the user and automatically access the wireless network.

[0039] In some implementations, the first electronic device is further configured to receive the second indication information sent by the second electronic device, the second indication information is used to indicate the second data information in the second electronic device, display the second display interface according to the second indication information, and the second display interface includes the first display card and the second display card. The first display card is used to indicate the import of the second data information from the second electronic device, and the second display card is used to indicate the download of the third data information from the cloud server.

[0040] According to the embodiments of the present application, the first electronic device can display the options for data transmission for the user to select.

[0041] In some implementations, the first electronic device is further configured to display a third display interface in response to the operation of the user clicking the first display card, the third display interface includes the type and size of the second data information, send third indication information to the second electronic device in response to the operation of the user in the third display interface indicating the import of data, the third indication information is used to indicate the start of the import of the data corresponding to the second data information, receive the data corresponding to the second data information sent by the second electronic device, or,

[0042] In response to the operation of the user clicking the second display card, a fourth display interface is displayed, the fourth display interface including a type and a size of the third data information; and in response to an operation performed by the user in the fourth display interface for indicating to import data, data corresponding to the third data information is imported from the cloud server.

[0043] Based on the embodiments of the present application, the first electronic device can realize transmission according to the operation of the user, so that the fast usability of the first electronic device can be realized.

[0044] In some implementations, the second part is in a ring pattern; and the distance between the second electronic device and the first electronic device is less than or equal to a preset distance.

[0045] It should be understood that the second part can also be in other shapes, and the embodiments of the present application are not limited thereto.

[0046] In a second aspect, the present application provides a method for information transmission, applied to a second electronic device, including: receiving a first message; sending first indication information according to the first message; obtaining N frames of first images, each frame of image in the N frames of first images including a first part and a second part, the positions of the second parts of two adjacent frames of images in the N frames of images being the same, wherein N is greater than or equal to 2; and decoding first information according to the second part.

[0047] Based on the embodiments of the present application, the second electronic device can obtain N frames of images, and decode the second part in the N frames of images to obtain the first information therein, and based on the first information, the second electronic device can perform corresponding operations. The technical solution can conveniently realize information transmission between the two devices, shorten the interactive path of information transmission between the devices, and improve the sense of technology.

[0048] In an implementation, the method further includes: sending first data information to the first electronic device, the first data information including account information logged in the second electronic device and / or wireless network information connected by the second electronic device.

[0049] In other examples, the first data information can further include privacy declaration, settings, and other contents of the second electronic device, and the embodiments of the present application are not limited thereto.

[0050] Based on the embodiments of the present application, the second electronic device can send account information, wireless network information, and other data to the first electronic device, so that the user does not need to manually log in the account, connect the wireless, and other operations on the first electronic device, thereby improving the operation experience of the user on the first electronic device. For example, the first electronic device is a newly purchased smart phone of the user, and through this way, the new phone can automatically log in the account of the user and automatically access the wireless network.

[0051] In an implementation manner, before decoding the first information according to the second part, the method further includes: performing color space conversion on the N frames of first images to obtain N frames of second images.

[0052] According to the embodiment of the present application, the second electronic device can reduce the influence of the reflection in the first image by performing color space conversion on the first image.

[0053] In an implementation manner, the color space conversion on the N frames of first images to obtain N frames of second images includes: converting the N frames of first images from a red-green-blue (RGB) color space to a hue-saturation-value (HSV) color space; filtering a hue H domain of each frame of image in the N frames of first images to obtain the N frames of second images, the second images including an angle value corresponding to the hue H domain greater than a first preset value and less than a second preset value; the method further includes: performing binarization processing on the N frames of second images to obtain N frames of third images; and determining the second part according to the N frames of third images.

[0054] It should be understood that the embodiment of the present application does not limit the specific values of the first preset value and the second preset value.

[0055] According to the embodiment of the present application, by color space conversion and corresponding threshold filtering, the existing reflection phenomenon in the first image can be filtered out, the interference of the reflection on the second electronic device to obtain the second part is reduced, and the possibility of decoding success is improved.

[0056] In an implementation manner, before decoding the first information according to the second part, the second part is determined according to the N frames of third images, including: performing a closing operation on the N frames of third images; determining the second part according to the result of the closing operation; or performing clustering analysis on particle points in the N frames of third images; and determining the second part according to the result of the clustering analysis.

[0057] According to the embodiment of the present application, by performing the closing operation on the third image, the interference of the reflection on the second electronic device to obtain the second part is reduced, and the possibility of decoding success is improved. In addition, for the case that the second part is blocked or seriously reflected, the second part can still be successfully obtained through the result of the clustering analysis, and the possibility of decoding success of the electronic device to the second part is improved.

[0058] In an implementation manner, before performing the clustering analysis on the N frames of third images, the method further includes: filtering particle points in the N frames of third images with an area less than a first area threshold.

[0059] According to the embodiment of the present application, the particle points with small area in the third image can be filtered out, so that the interference of the particle points with small area on obtaining the second part can be reduced.

[0060] In an implementation manner, the decoding the first information according to the second part comprises: performing intra-frame difference processing on the second part of each of the N frames of first images to obtain N frames of gray images, wherein the intra-frame difference processing is an absolute value obtained by performing difference processing and summing on the first channel image of the second part with the second channel image and the third channel image respectively, the first channel image, the second channel image and the third channel image are one of red R channel image, green G channel image and blue B channel image, and each is different; performing inter-frame difference processing on the N frames of gray images to obtain N frames of difference images; performing binaryzation processing on the N frames of difference images to obtain N frames of fourth images; performing or operation processing on the N frames of fourth images to obtain a first target image; and obtaining the first information according to the first target image.

[0061] Exemplarily, the first channel image is a B channel image, the second channel image is an R channel image, and the third channel image is a G channel image.

[0062] According to the embodiment of the present application, the second electronic device can decode the second part included in the N frames of images to successfully obtain the first information encoded therein.

[0063] In an implementation manner, the decoding the first information according to the first target image comprises: filtering particle points with an area less than a second area threshold in the first target image to obtain a second target image; and decoding the first information according to the second target image.

[0064] According to the embodiment of the present application, by filtering the particle points in the first target image, the particle points with a small area in the first target image can be filtered out, so that the interference of the particle points with a small area on the decoding result can be reduced.

[0065] In an implementation manner, before the binaryzation processing on the N frames of difference images, the method further comprises: determining a degree of moire in each of the N frames of difference images respectively; wherein the binaryzation processing on the N frames of difference images to obtain N frames of fourth images comprises: filtering out pixel points with a gray value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of moire; and performing binaryzation processing on the filtered N frames of difference images to obtain N frames of fourth images.

[0066] According to the embodiment of the present application, the second electronic device can further determine the degree of moire in the image, and set a filtering threshold according to the degree of moire, so that the interference caused by the moire can be reduced, and the probability of successful decoding can be improved.

[0067] In an implementation manner, the first information comprises at least one of a connection pairing code, account login information, a product serial number and a media access control (MAC) address.

[0068] It should be understood that other information, such as a verification code, a website address, and the like, can also be included in the first information, which is not limited in the embodiments of the present application.

[0069] In a third aspect, the present application provides an electronic device, comprising: one or more processors; one or more memories; the one or more memories store one or more programs, when the one or more programs are executed by the one or more processors, the method for information transmission in the second aspect and any possible implementation manner thereof is executed.

[0070] In a fourth aspect, the present application provides an apparatus, comprising modules for implementing the method for information transmission in the second aspect and any possible implementation manner thereof.

[0071] In a fifth aspect, the present application provides a chip, comprising a processor and a communication interface, the communication interface is used for receiving a signal and transmitting the signal to the processor, the processor processes the signal, so that the method for information transmission in the second aspect and any possible implementation manner thereof is executed.

[0072] In a sixth aspect, the present application provides a readable storage medium, the readable storage medium stores instructions, when the instructions run on an electronic device, the method for information transmission in the second aspect and any possible implementation manner thereof is executed.

[0073] In a seventh aspect, the present application provides a program product, the program product comprises program codes, when the program codes run on an electronic device, the method for information transmission in the second aspect and any possible implementation manner thereof is executed. BRIEF DESCRIPTION OF DRAWINGS

[0074] Figure 1 FIG. 1 is a structural schematic diagram of an electronic device provided by the embodiments of the present application.

[0075] Figure 2 FIG. 2 is a software structural schematic diagram of an electronic device provided by the embodiments of the present application.

[0076] Figure 3 FIG. 3 is a schematic diagram of a group of graphical user interfaces (GUIs) provided by the embodiments of the present application.

[0077] Figure 4 FIG. 4 is a schematic diagram of a group of GUIs provided by the embodiments of the present application.

[0078] Figure 5 FIG. 5 is a schematic diagram of full screen display of an electronic device provided by the embodiments of the present application.

[0079] Figure 6 FIG. 6 is a schematic diagram of another group of GUIs provided by the embodiments of the present application.

[0080] Figure 7A process for obtaining a ring pattern is provided in embodiments of the present application.

[0081] Figure 8 Another process for obtaining a ring pattern is provided in embodiments of the present application.

[0082] Figure 9 is a schematic diagram of a process for obtaining device connection information provided in embodiments of the present application.

[0083] Figure 10 is a schematic diagram of a ring area provided in embodiments of the present application.

[0084] Figure 11 is a schematic diagram of determining connection pairing code in combination with the results of multiple decoding provided in embodiments of the present application.

[0085] Figure 12 is a schematic interaction diagram of a method for information transmission provided in embodiments of the present application.

[0086] Figure 13 is a schematic flowchart of a method for information transmission provided in embodiments of the present application.

[0087] Figure 14 is a schematic block diagram of any one of electronic devices provided in embodiments of the present application. DETAILED DESCRIPTION

[0088] The technical solutions in the present application will be described below with reference to the accompanying drawings.

[0089] The method in embodiments of the present application can be applied to electronic devices such as smartphones, tablet computers, notebook computers, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, in-vehicle devices, smart TVs, wearable devices, foldable devices, internet of things (Iot) devices, etc.

[0090] Figure 1A structural diagram of the electronic device 100 is shown. The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0091] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0092] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.

[0093] In the embodiments of the present application, the processor 110 or the GPU can include an encoding module, which can be used to encode the device connection information. For example, the processor 110 or the GPU encodes the connection pairing code into the ring pattern.

[0094] The processor 110 or the GPU can include a feature enhancement module, which can be used for feature particle point extraction, particle point filtering, superimposition, etc.

[0095] The processor 110 or the GPU can also include a decoding module, which can be used to decode the feature particle points and obtain the connection pairing code.

[0096] The processor 110 or the GPU can also include a multi-frame fusion module, which can be used to fuse the decoding results of multiple times to determine the final connection pairing code.

[0097] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals to complete the control of instruction fetching and instruction execution.

[0098] The processor 110 can also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can save instructions or data that the processor 110 has just used or repeatedly uses. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0099] In some embodiments, the processor 110 can include one or more interfaces. The interface can include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver / transmitter (universal asynchronous receiver / transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input / output (general-purpose input / output, GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and / or a universal serial bus interface, etc.

[0100] The I2C interface is a bidirectional synchronous serial bus, which includes a serial data line (serial data line, SDA) and a serial clock line (derail clock line, SCL).

[0101] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled with the audio module 170 through the I2S buses to enable communication between the processor 110 and the audio module 170.

[0102] The PCM interface can also be used for audio communication, which samples, quantizes and encodes analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled through the PCM bus interface.

[0103] The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a bidirectional communication bus. It converts data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually used to connect the processor 110 and the wireless communication module 160.

[0104] The MIPI interface can be used to connect the processor 110 and peripheral devices such as the display screen 194 and the camera 193.

[0105] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 and the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.

[0106] The USB interface 130 is an interface that meets the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transmit data between the electronic device 100 and a peripheral device.

[0107] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In some other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.

[0108] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can supply power to the electronic device through the power management module 141 while charging the battery 142.

[0109] The power management module 141 is configured to connect the battery 142 and the charging management module 140 to the processor 110.

[0110] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.

[0111] The mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 100.

[0112] The modem processor can include a modulator and a demodulator. The modulator is configured to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is configured to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A and the microphone 170B, etc.) or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be a separate device. In other embodiments, the modem processor can be independent of the processor 110 and be arranged in the same device as the mobile communication module 150 or other functional modules.

[0113] The wireless communication module 160 can provide solutions for wireless communication applied on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth low energy (BLE), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), and the like.

[0114] In the embodiments of the present application, the wireless communication module 160 can further include a connection authentication module, which can be used to verify the connection pairing code and establish a connection relationship with the other device after verification.

[0115] In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0116] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected with the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs, which execute program instructions to generate or change display information.

[0117] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be made of liquid crystal display (LCD), organic light-emitting diode (OLED), active-matrix organic light-emitting diode (AMOLED), flex light-emitting diode (FLED), miniled, microled, micro-oled, quantumdot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1.

[0118] In some embodiments, the display screen 194 can also be configured to display a ring pattern (e.g., a Harmony ring) including connection information of an encoding device.

[0119] The electronic device 100 can implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.

[0120] The ISP is configured to process data fed back by the camera 193. The camera 193 is configured to capture still images or videos. In some embodiments, the camera 193 in the old device can be used to scan a display interface of another electronic device to obtain an image including a ring pattern.

[0121] The digital signal processor is configured to process digital signals. In addition to processing digital image signals, the digital signal processor can also process other digital signals.

[0122] The video codec is configured to compress or decompress digital videos.

[0123] The external memory interface 120 can be configured to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.

[0124] The internal memory 121 can be configured to store computer executable program codes including instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121.

[0125] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc.

[0126] The audio module 170 is used to convert digital audio information into analog audio signals output, and is also used to convert analog audio input into digital audio signals.

[0127] The speaker 170A, also called "loudspeaker", is used to convert audio electrical signals into sound signals.

[0128] The receiver 170B, also called "earpiece", is used to convert audio electrical signals into sound signals.

[0129] The microphone 170C, also called "microphone", "sound transducer", is used to convert sound signals into electrical signals.

[0130] The earphone interface 170D is used to connect wired earphones.

[0131] The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, an acceleration sensor 180E, a distance sensor 180F, a fingerprint sensor 180H, a touch sensor 180K, a bone conduction sensor 180M, etc.

[0132] The key 190 includes a power-on key, a volume key, etc.

[0133] The motor 191 can generate a vibration prompt.

[0134] The indicator 192 can be an indicator light, which can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, etc.

[0135] The SIM card interface 195 is used to connect a SIM card.

[0136] Figure 2 is a software structure block diagram of the electronic device 100 of the embodiment of the application. The layered architecture divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the operating system is divided into four layers, from top to bottom, the application program layer, the application program framework layer, the system library, and the kernel layer. The application program layer can include a series of application program packages.

[0137] As shown in Figure 2 , the application program package can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, wallet, etc. application program (application, App).

[0138] The application framework layer provides an application programming interface (API) and programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0139] As shown in Figure 2 the application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0140] The window manager is used to manage window programs. The window manager can acquire the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc.

[0141] The content provider is used to store and acquire data, and make the data accessible to the applications. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phone books, etc.

[0142] The view system includes visual controls, such as a control for displaying text, a control for displaying pictures, etc. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0143] The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call state (including call connection, call hang-up, etc.).

[0144] The resource manager provides various resources for the applications, such as localized strings, icons, pictures, layout files, video files, etc.

[0145] The notification manager enables the applications to display notification information in the status bar, which can be used to convey a type of message that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform the completion of the download, message reminders, etc. The notification manager can also be a notification in the form of a chart or a scroll bar text appearing in the top status bar of the system, such as a notification of an application running in the background, or a notification in the form of a dialog window appearing on the screen. For example, the text information is prompted in the status bar, a prompt sound is emitted, the electronic device is vibrated, the indicator light flashes, etc.

[0146] The core library includes two parts: one part is the function function required to be called by the java language, and the other part is the core library.

[0147] The application program layer and the application framework layer run in a virtual machine. The virtual machine executes the java files of the application program layer and the application framework layer as binary files. The virtual machine is used to perform functions such as management of object life cycle, stack management, thread management, management of security and exceptions, and garbage collection.

[0148] The system library can include a plurality of functional modules. For example, a surface manager, media libraries, a three-dimensional graphics processing library (e.g., OpenGL ES), a 2D graphics engine (e.g., SGL), and the like.

[0149] The surface manager is used to manage a display subsystem and provides fusion of 2D and 3D layers for a plurality of application programs.

[0150] The media libraries support playback and recording of a plurality of commonly used audio, video formats, and still image files. The media libraries can support a plurality of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, and the like.

[0151] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, composition, and layer processing, and the like.

[0152] The 2D graphics engine is a drawing engine for 2D drawing.

[0153] The kernel layer is a layer between hardware and software. The kernel layer includes at least display drivers, camera drivers, audio drivers, and sensor drivers.

[0154] In some scenarios in which information needs to be transmitted between devices, a two-dimensional code is usually scanned to connect and pair the devices, log in an account, and the like. For example, when a user uses a first device to change a device or clone data, data needs to be transmitted from an old device to the first device, and the old device needs to scan a two-dimensional code displayed on the first device to connect and pair. However, the scanning of the two-dimensional code has a long interaction path and is not convenient enough.

[0155] Therefore, embodiments of the present application provide a method and an electronic device for information transmission. In the technical solution, a first device can superimpose information to be transmitted in a specially designed image. For example, when device connection is needed, the first device can display the specially designed image, and a second device can scan the image to obtain device connection information in the image, so as to realize connection between the first device and the second device. When the first device is changed or data is cloned, the interaction path of the device can be shortened, and a sense of technology can be improved.

[0156] Before introducing the technical solution of the present application, first, some professional terms that can be involved in the present application are introduced as follows.

[0157] Region of interest (ROI): In image processing, the region that needs to be processed from the image is delineated using methods such as rectangles, circles, ellipses, and irregular polygons. This region is called the region of interest.

[0158] Hue, Saturation, and Value (HSV) color space: A color space that uses hue, saturation, and value to represent color, commonly used in image processing. Hue (H) represents color, saturation (S) represents the lightness or darkness of a color, and value (V) represents the brightness or darkness of a color.

[0159] The red, green, and blue (RGB) color space is a color space that uses red, green, and blue as the three primary colors and creates a rich and wide range of colors by layering them to varying degrees. The RGB color space is commonly used in video, multimedia, and web design, and electronic device displays are based on the RGB color space.

[0160] Moiré patterns: High-frequency interference stripes that appear on a photosensitive element; these are irregular, high-frequency, colored stripes that appear on an image.

[0161] Image binarization: Setting the grayscale value of pixels in an image to 0 or 255. After image binarization, the entire image presents a visual effect with only black and white.

[0162] The following section will describe the device replacement process and data cloning process of the first device in this application, using several graphical user interfaces (GUIs). The following explanation will use electronic device 200 as an example of the first device.

[0163] For example, Figure 3 This is a schematic diagram of a set of GUIs provided in an embodiment of this application. Among them, from Figure 3 (a) through (k) in the diagram illustrate the process of a user experiencing the power-on process on electronic device 200.

[0164] See Figure 3 In (a), the GUI is the power-on display interface 210 of the electronic device 200. This display interface 210 may include multiple language options for the user to choose from. For example, the user may select Simplified Chinese, or the electronic device 200 may default to Simplified Chinese.

[0165] The display interface 210 may also include a start function button 211. When the electronic device 200 detects that the user has clicked the start function button 211, it can display the following: Figure 3 The GUI shown in (b) is shown in the image.

[0166] See Figure 3 In (b) of the diagram, the GUI is a display interface 220 on the electronic device 200 for the user to select a region. This display interface 220 may include a card 221 and a continue function button 222. The card 221 may include multiple countries or regions. For example, the user can select China from card 221.

[0167] For example, when the electronic device 200 detects that the user has clicked the continue function button 222, it can display something like this: Figure 3 The GUI shown in (c) is shown in the image.

[0168] See Figure 3 In (c), the GUI is the display interface 230 of the electronic device 200. The display interface 230 may include the text "Quick Start" and icons 231 for indicating the electronic device.

[0169] Before or while the electronic device 200 displays the display interface 230, the electronic device 200 may broadcast a Bluetooth message to discover nearby second devices. The display interface 230 may display the text "Discovering nearby devices".

[0170] When a user brings the second device close to the electronic device 200, for example, when the distance between the second device and the electronic device 200 is less than or equal to a preset distance, a settings card can be displayed on the second device. When the second device detects that the user has clicked the settings function button in the settings card, it can send an instruction message to the electronic device 200 via Bluetooth, so that the electronic device 200 can display, for example... Figure 3 The GUI shown in (d) is shown in the image.

[0171] See Figure 3 In section (d), the GUI is the display interface 240 used by the electronic device 200 for connection verification. The display interface 240 may include specially designed images, such as dynamic patterns. These specially designed images can be used for device connection, account login, data transmission, and seamless connection between the electronic device 200 and other electronic devices. They can also be used for screen projection and meeting participation by the electronic device 200.

[0172] For example, the dynamic pattern can be a ring, such as the Harmony Ring, or other shapes, such as rectangles, circles, ellipses, etc. This application embodiment uses a ring as an example to illustrate the dynamic pattern. The ring can be composed of multiple white and blue alternating particles, and these particles can implicitly contain the first information of the electronic device 200. These multiple white and blue alternating particles can be dynamic or static.

[0173] For example, the first information can include device connection information, a verification code, account login information, screen projection information, conference information, and the like. The device connection information can be a connection pairing code, such as the connection pairing code being a 6-digit number "147258". In other examples, the connection pairing code can also include English letters, or the connection pairing code can also be 4 digits or 8 digits, and the like.

[0174] Alternatively, the device connection information can also include other information of the electronic device 200, such as a device identifier, a model, a media access control (MAC) address, and the like.

[0175] It should be understood that the embodiments of the present application take the first information including the device connection information as an example for illustration, where the device connection information is the connection pairing code.

[0176] It should be understood that the electronic device 200 can hide the connection pairing code in the ring pattern in a certain encoding manner.

[0177] In some examples, the electronic device 200 can divide the ring into a plurality of regions, and each region can represent a digit. For example, the electronic device 200 can divide the ring pattern into 6 equal regions, and each region can include a different number of particles, thereby distinguishing different digits.

[0178] It can be understood that the electronic device 200 can also divide the ring pattern into 9 equal regions, and the 9 regions can include a part of the same connection pairing code. Through this redundant encoding manner, the success rate of decoding by the opposite electronic device can be improved. For example, when the opposite electronic device scans the ring pattern, it can only successfully decode part of the regions of the ring pattern due to interference such as reflection and moire. In this case, even if the opposite electronic device decodes part of the regions, the complete connection pairing code can be obtained, and the device connection can be completed.

[0179] Alternatively, the electronic device 200 can also divide the ring pattern into a larger number of regions, such as including three or more groups of connection pairing codes, which are not limited in the embodiments of the present application.

[0180] It should be understood that the electronic device 200 can also use other encoding manners, for example, each region can display particles in a corresponding position according to a preset order, thereby distinguishing different digits.

[0181] After the electronic device 200 displays the annular pattern, the user can use the second device to scan the annular pattern, or the user can use the second device to take a photo of the display interface 240 of the electronic device 200, so that the second device can acquire the annular pattern and decode the connection pairing code in the annular pattern, and the second device uses the connection pairing code to perform connection pairing to perform device connection. In this way, the second device only needs to take a photo or scan the annular pattern displayed by the first device to complete device connection, thereby improving the efficiency and technology of device connection.

[0182] After device connection, the electronic device 200 can display a GUI as shown in (e) of Figure 3 .

[0183] Referring to (e) of Figure 3 , the GUI is a display interface 250 of the electronic device 200 for verifying the lock screen password of the second device. The display interface 250 can be used for the user to input the lock screen password of the second device. In this way, the security of device connection can be improved. It should be understood that the lock screen password of the second device input by the user will be used as the lock screen password of the electronic device 200. In this way, the user does not need to separately set the lock screen password in the electronic device 200, which simplifies the operation of the user and improves the interaction efficiency of the user and the electronic device 200.

[0184] When the electronic device 200 detects that the user inputs the correct lock screen password, a GUI as shown in (f) of Figure 3 may be displayed.

[0185] It should be understood that (e) of the above Figure 3 is an optional solution. In some examples, after the second device scans the annular pattern in the display interface 240 and performs device connection, the electronic device 200 can directly display a GUI as shown in (f) of Figure 3 .

[0186] Referring to (f) of Figure 3 , the GUI is a display interface 255 of the electronic device 200. The display interface 255 can include text content “Setting…” and a loading icon.

[0187] It should be understood that when the electronic device 200 displays the display interface 255, the second device can transmit part of data to the electronic device 200, such as Huawei account information, Wi-Fi information (such as the name and password of the wireless local area network successfully accessed by the second device), protocol declaration or privacy, etc. In this way, the account and wireless network can be quickly migrated without the user separately setting in the electronic device 200, thereby simplifying the operation of the user.

[0188] When the electronic device 200 detects that the above data transmission is completed, a GUI as shown in (g) of Figure 3the GUI shown in (g) in FIG. 10.

[0189] Referring to Figure 3 In (g) in FIG. 10, the GUI is a display interface 260 for data import of the electronic device 200. The display interface 260 can include a display card 261 and a display card 262. The display card 261 can include text content "Import directly from active device" and time required for data import (e.g., about 20 minutes), and the display card 262 can include text content "Download from cloud backup" and time required for data import (e.g., about 15 minutes).

[0190] The display interface 260 can further include a function button 263 for not transmitting data. When the user taps the function button 263, the electronic device 200 does not perform a data import process.

[0191] In other examples, when the electronic device 200 detects a user tap on the display card 262, the electronic device 200 can download data of the second device from the cloud server.

[0192] For example, when the electronic device 200 detects a user tap on the display card 261, the electronic device 200 can display a GUI as shown in (h) in FIG. 11. Figure 3

[0193] Referring to Figure 3 In (h) in FIG. 11, the GUI is a display interface 265 for data import options of the electronic device 200. The display interface 265 can include a display card 2651 for basic data, a display card 2652 for applications and data, a display card 2653 for system settings, and a function button 2654 for starting import.

[0194] The display card 2651 can include the number of items (e.g., 1526 items) and the size of memory (e.g., 45.3 GB) of the basic data in the second device. The display card 2652 can include the number of items (e.g., 2531 items) and the size of memory (e.g., 35.6 GB) of the applications and data in the second device. The display card 2653 can include the number of items (e.g., 531 items) and the size of memory (e.g., 5 MB) of the system settings data.

[0195] For example, when the electronic device 200 detects a user tap on the function button 2654 for starting import, the electronic device 200 can display a GUI as shown in (i) in FIG. 12. Figure 3

[0196] Referring to Figure 3 ​​In (i) of FIG. 6, the GUI is a display interface 270 of the electronic device 200 displaying a data import progress. The display interface 270 can include a progress bar 271 of the data import progress and a remaining time length of the data import.

[0197] When the electronic device 200 detects that the data import is completed, a GUI as shown in (j) of FIG. 6 can be displayed. Figure 3

[0198] Referring to (j) of FIG. 6, the GUI can be a display interface 275 of the electronic device. The display interface 275 can include icons of a plurality of electronic devices and a function button 2751 of immediately experiencing. Figure 3 When the electronic device 200 detects that the user clicks the function button 2751, a GUI as shown in (k) of FIG. 6 can be displayed.

[0199] Figure 4 It should be understood that in other examples, when the electronic device 200 detects that the data import is completed, the electronic device 200 can also directly display the GUI as shown in (k) of FIG. 6, which is not limited in the embodiments of the present application.

[0200] Referring to (k) of FIG. 6, the GUI is a display interface 280 of the electronic device 200. The display interface 280 can be a display desktop of the electronic device 200, and the display interface 280 can include a plurality of application programs, and the layout of the application programs in the display interface 280 is the same as that of the display desktop on the second device. Thus, after the user powers on, the data migration from the second device to the first device is completed. Figure 4 Based on the embodiments of the present application, when the user uses the first device, the device connection information can be hidden in a specially designed image (such as a ring pattern), the second device scans the specially designed image to obtain the device connection information, and establishes a connection relationship with the first device according to the device connection information, so that the process of device connection can be simplified, and the technological sense of device connection can be improved. After the device connection, the first device can obtain the data in the second device through a convenient operation on the first device, complete the data migration, make the new machine quickly available, and improve the user's experience of powering on the first device.

[0201] Figure 4 The above introduces the process of the user's operation on the first device, and the following will introduce the process of the user's operation on the second device during the boot experience.

[0202] Exemplarily,

[0203] The above introduces the process of the user's operation on the first device, and the following will introduce the process of the user's operation on the second device during the boot experience. Figure 4 Figure 4

[0204] Exemplarily, Figure 4 ​​​​​is a schematic diagram of a set of GUIs provided by an embodiment of the present application. Among them, from (a) to (g) in Figure 4 show the process of the user operating on the second device to transmit data to the first device.

[0205] Referring to (a) in Figure 4 , the GUI is a display desktop 310 of the electronic device 300. The display desktop 310 can include a plurality of application programs in the electronic device 300.

[0206] It should be understood that the Bluetooth of the electronic device 300 is in an open state, and after the electronic device 300 detects the Bluetooth broadcast message of the electronic device 200, the GUI shown in (b) in Figure 4 may be displayed.

[0207] Alternatively, after the electronic device 300 detects the Bluetooth broadcast message of the first device (such as the electronic device 200), the first distance with the electronic device 200 can be determined by Bluetooth ranging, and when the first distance is less than or equal to the preset distance, the electronic device 300 can display the GUI shown in (b) in Figure 4 .

[0208] In other examples, the electronic device 300 can also be in a lock screen display interface or other application display interface before displaying the GUI shown in (b) in Figure 4 , and the present application does not limit this.

[0209] Referring to (b) in Figure 5 , the electronic device 300 can display a display interface 311. The display interface 311 can include an indication icon 3111 of the first device, a model (such as P60) of the first device, and a setting function button 3112. The display interface 311 can also include a closing function button for closing the display interface 311.

[0210] After the electronic device 300 detects the user's operation of clicking the setting function button 3112, the GUI shown in (c) in Figure 5 may be displayed.

[0211] As described above, after the user clicks the setting function button 3112, the electronic device 200 displays the display interface 240 which implicitly contains the connection pairing code.

[0212] Referring to (c) in Figure 5 , the electronic device 300 can display a display interface 312. The display interface 312 can include a viewfinder 3121 and text content such as "scan verification", "align the viewfinder with the pattern on the new device", etc.

[0213] Exemplarily, the new device is the first device.

[0214] In other examples, the display interface 312 can also be a viewfinder display interface of a camera or a viewfinder display interface of a camera, which is not limited in the embodiments of the present application.

[0215] It should be understood that the display interface 312 can be a part of the display interface 310, that is, the display interface 312 can be displayed in a semi-modal manner. The specific position of the display interface 312 is not limited in the embodiments of the present application. The display interface 312 can be located at the bottom of the display interface 310, or at the top of the display interface 310, or in the middle part of the display interface 310. The viewfinder frame 3121 can be located at the center of the display interface 312, or at other positions of the display interface 312, which is not limited in the embodiments of the present application.

[0216] In other examples, the display interface 312 can also be a full-screen display. For example, the display interface 312 can be a full-screen display of the display interface 240 of the electronic device 200. Figure 4 The (c) in the (c) can be replaced by Figure 4 The (c) in the (c) can be replaced by Figure 4 FIG. 3 is a schematic diagram of a full-screen display of an electronic device according to an embodiment of the present application. Referring to FIG. 3, the electronic device 300 can display the display interface 312 in full screen, which can be referred to the description in the foregoing. Figure 4

[0217] Exemplarily, the user can use the electronic device 300 to scan the display interface 240 of the electronic device 200, obtain the annular region therein, and decode the annular region to obtain the connection pairing code contained therein, and use the connection pairing code to establish a connection relationship with the electronic device 200.

[0218] It should also be understood that the viewfinder frame 3121 can also display a breathing animation or a loading animation when taking a view of the annular region, which is not limited in the embodiments of the present application.

[0219] For example, the breathing animation can be understood as that the viewfinder frame 3121 can gradually obtain the annular region from large to small when taking a view of the annular region. The annular region obtained by the viewfinder frame 3121 can also display a dynamic change effect of a colored outline. It should be understood that the colored outline can be regular or irregular, the colored outline can also rotate according to a preset direction, or the colored outline can dynamically change from large to small or from small to large. Alternatively, the viewfinder frame 3121 can also display a dynamic icon for indicating loading content in the obtained annular region when obtaining the annular region. Alternatively, the viewfinder frame 3121 can also display a dynamic change effect of a loading process in the obtained annular region when obtaining the annular region.

[0220] ​For example, after the electronic device 300 detects that the viewfinder has scanned a circular area, it can display something like this. Figure 4 The GUI shown in (d) is shown in the image.

[0221] It should be understood that the following description, in conjunction with specific embodiments, will introduce the process by which an electronic device decodes a ring-shaped area to obtain a connection pairing code, which will not be detailed here.

[0222] It should be understood that the display interface 312 may also include a manual verification option. When the electronic device 300 detects that the user clicks manual verification, it will display an interface for entering a 6-digit connection pairing code. At this time, the electronic device 200 will display an interface including the 6-digit connection pairing code. After the user enters the connection pairing code, the electronic device 300 and the electronic device 200 can establish a connection relationship after mutual verification. At this time, the electronic device 300 can display as follows: Figure 4 The GUI shown in (d) is shown in the image.

[0223] See Figure 4 In (d), the electronic device 300 can display a display interface 313. The display interface 313 may include icons indicating that the two devices are connecting and the text "Connecting".

[0224] After electronic device 300 is connected to electronic device 200, electronic device 300 can display as follows: Figure 4 The GUI shown in (e) is shown in the image.

[0225] See Figure 4 In (e), the electronic device 300 may display a display interface 314. The display interface 314 may include an icon showing the connection between the two devices and the text "Operate on new device".

[0226] For example, the new device is the first device.

[0227] For example, at this time, the electronic device 200 can display a display interface 250 to enhance the security of the device connection. After the user selects data on the electronic device 200 to perform data operations, for example, when the electronic device 200 detects that the user clicks the start import function button 2654, the electronic device 300 can display as follows: Figure 6 The GUI shown in (f) is shown in the image.

[0228] See Figure 6 In (f), the electronic device 300 can display a display interface 315. This display interface 315 can display instructions for migrating data from one device to another, as well as the text "Data import in progress".

[0229] Once the electronic device 300 detects that the data import is complete, it can display something like this:Figure 6 GUI shown in (g) in FIG. 6.

[0230] Referring to Figure 6 In (g) in FIG. 6, the electronic device 300 can display a display interface 316. The display interface 316 is used to prompt the user that the data import is completed.

[0231] Based on the embodiments of the present application, when the user uses the first device, the second device can be used to scan the annular pattern displayed on the first device to obtain the connection pairing code therein, and establish a connection relationship with the first device based on the connection pairing code. After that, when the second device transmits data to the first device, the second device can also display operation guidance and the progress of transmitting data, so as to facilitate the user to obtain the data transmission situation.

[0232] In some cases, for the electronic device that is not powered on for the first time, the second device can also use the scanning annular pattern method to establish device connection when cloning data. The technical solutions will be introduced in the following Figure 6 .

[0233] Exemplarily, Figure 6 is another set of GUI provided by the embodiments of the present application. In (a) to (k) in FIG. 7, the process of the user operating the electronic device 400 to clone data is shown. Figure 6

[0234] Referring to Figure 6 In (a) in FIG. 7, the GUI can be a display desktop 410 of the electronic device 400. The display desktop 410 can include a plurality of application programs. For example, the plurality of application programs can include a first application, which can be an application program for data cloning, such as mobile phone cloning.

[0235] Exemplarily, when the electronic device 400 detects that the user clicks the operation of the first application, a GUI as shown in (b) in FIG. 7 can be displayed. Figure 6

[0236] Referring to Figure 6 In (b) in FIG. 7, the GUI is a display interface 420 of the first application. The display interface 420 can include a display card 421 and a display card 422. In the display card 421, the text content “This is the second device” and an icon can be included. In the display card 422, the text content “This is the first device” and an icon can be included.

[0237] When the electronic device 400 detects that the user clicks the operation of the display card 422, a GUI as shown in (c) in FIG. 7 can be displayed. Figure 6

[0238] Referring to Figure 6 ​​​In (c), the electronic device 400 can display a display interface 430. This display interface 430 can include various types of second devices, such as Huawei and Android. This display interface 430 can be used by the user to select the type of second device.

[0239] For example, when the electronic device 400 detects that the user has selected "Huawei" as the type, it can display something like this: Figure 6 The GUI shown in (d) is shown in the image.

[0240] It is understandable that electronic device 400 can broadcast Bluetooth messages. When a second device (such as electronic device 300) detects the Bluetooth message, and the distance between electronic device 300 and electronic device 400 is less than or equal to a preset distance, electronic device 300 can display display interface 311. After the user clicks the settings function button 3112, electronic device 300 can send instruction information to electronic device 400. At this time, electronic device 400 can display, for example... Figure 3 The GUI shown in (d) is shown in the image.

[0241] In other examples, when the electronic device 400 detects that the user has selected "Huawei" as the type of operation, it can also directly display something like this. Figure 6 The GUI shown in (e) is shown in the image.

[0242] See Figure 3 In section (d), the GUI is a display interface 450 used by the electronic device 400 for connection verification. This display interface 450 may include specially designed images, such as animated patterns, which can be used to enable the electronic device 400 to connect with other electronic devices.

[0243] It should be understood that Figures 3-6 For details regarding (d) in the text, please refer to [link / reference]. Figures 7-11 The relevant description in (d) of the document.

[0244] It should also be understood that Figures 7-8 (e) to (k) can be found in [reference]. Figure 7 For the sake of brevity, the relevant descriptions of (e) to (k) in the table will not be repeated here.

[0245] Based on the embodiments of this application, during data cloning, the first device can hide its connection information within a specially designed image (such as a circular pattern). The second device scans this specially designed image to obtain the connection information and establishes a connection with the first device based on this information. This simplifies the device connection process and enhances the technological feel of the connection. After the devices are connected, convenient operations on the first device allow it to acquire data from the second device, completing the data migration.

[0246] In other examples, the device A can also encode the account information into a specially designed image (such as a ring pattern). When the account login is needed, the device A can display the ring pattern, and the device B can scan the ring pattern displayed by the device A and parse it to achieve the account login function. It should be understood that the above scheme is also applicable to the scenarios of device connection establishment, data transmission, account login, screen projection, smooth connection, video participation, etc.

[0247] The above introduces the process of quick availability of new machines and data cloning in combination with the GUI of Figure 7 . The following will introduce the process of the electronic device obtaining and decoding the ring pattern in the embodiments of the present application in combination with Figure 7 .

[0248] It should be understood that the embodiments of the present application take the first device encoding the device connection information in the ring pattern as an example for illustration. First, the process of the second device obtaining the ring pattern is introduced in combination with Figure 8 .

[0249] Exemplarily, Figure 8 the process of the second device obtaining the ring pattern is introduced in combination with .

[0250] When the device connection is performed, the first device encodes the device connection information in the ring pattern and displays a display interface containing the ring pattern. After the second device scans the display interface containing the ring pattern on the first device using the camera, the second device will first identify the ring pattern from the image. As shown in Figure 8 , the process of the second device obtaining the ring pattern can include steps 1 to 5.

[0251] Step 1: The second device converts the RGB image containing the ring pattern into an HSV image.

[0252] Exemplarily, the image containing the ring pattern obtained by the second device is generally an RGB image, and the second device converts the RGB into an HSV image. In the HSV image, there are corresponding numerical distributions in the H domain, the S domain and the V domain.

[0253] It should be understood that the second device can convert the RGB image containing the ring pattern into an HSV image using the following formula.

[0254]

[0255] v = max

[0256] where (r, g, b) represent the red, green and blue coordinates of a color, respectively, and the values are real numbers between 0 and 1. max is the maximum value of r, g and b. min is the minimum value of r, g and b.

[0257] Step 2: The second device performs threshold filtering in the H domain, the S domain, and the V domain, respectively.

[0258] Exemplarily, the H domain can be measured by an angle, and the value range is 0 degree to 360 degrees. In the embodiment of the present application, the second device can retain the components with the angle greater than a first angle and less than or equal to a second angle in the H domain of the image, and filter out the rest of the angles.

[0259] In some examples, the ring pattern is mainly blue, and the first angle can be 210 degrees, and the second angle can be 270 degrees. The second device can retain the blue components in the image by this filtering manner, and filter out the rest of the color components. In this way, even if the image containing the ring pattern obtained by the second device has reflection, the part of the reflection can be filtered out, and the interference caused by the reflection can be reduced.

[0260] In other examples, the ring pattern is mainly green, and the first angle can be 90 degrees, and the second angle can be 150 degrees. The second device can retain the green components in the image by this filtering manner, and filter out the rest of the color components.

[0261] It should be understood that the first angle and the second angle can be set by the developer according to experience, and can also be determined by the second device according to the numerical distribution of the H domain. The specific acquisition manner of the first angle and the second angle is not limited in the embodiment of the present application.

[0262] Similarly, the S domain represents the saturation, which represents the degree of color close to the spectral color, and can be represented by 0 to 1 (or 100%). Among them, 0 represents the lowest saturation (pure white), and 1 represents the highest saturation, which is closest to the spectral color of the color.

[0263] The V domain represents the brightness, which represents the light and dark degree of the color, and can be represented by 0 to 1 (or 100%). Among them, 0 represents the lowest brightness (pure black), and 1 represents the highest brightness, which is the brightest color.

[0264] By setting the S threshold and the V threshold, the relatively dark colors in the image can be filtered out.

[0265] For example, the second device can retain the components with the value greater than a first saturation threshold and less than or equal to a second saturation threshold in the S domain, and retain the components with the value greater than a first brightness threshold in the V domain.

[0266] It should be understood that the specific values of the first saturation threshold, the second saturation threshold, and the first brightness threshold are not limited in the embodiment of the present application. For example, the first saturation threshold is 0.3 or 0.35, the second saturation threshold is 0.9 or 0.85, and the first brightness threshold is 0.5 or 0.6.

[0267] In other examples, the second device can also perform threshold filtering in the H domain only in this step 2, and not perform threshold filtering in the S and V domains.

[0268] Step 3: The second device performs binarization on the image.

[0269] After threshold filtering in step 2, the second device can perform binarization on the image. For example, the second device can set a gray threshold in the S and V domains, and the part greater than the gray threshold is valued as 1 (or the gray value is 255), that is, white, and the part less than or equal to the threshold is valued as 0 (or the gray value is 0), that is, black.

[0270] For example, in the S domain, the second device can set a first gray threshold, and the part greater than the first gray threshold is valued as 1, indicating white, and the part less than or equal to the first gray threshold is valued as 0, indicating black.

[0271] In the V domain, the second device can set a second gray threshold, and the part greater than the second gray threshold is valued as 1, indicating white, and the part less than or equal to the second gray threshold is valued as 0, indicating black.

[0272] In this way, the second device can obtain a binarized image A, which only includes black or white.

[0273] Step 4: The second device performs a closing operation on the binarized image A.

[0274] For example, the second device can first perform dilation on the image A, and then perform erosion, so that the discrete points form a connected domain. Continuing to refer to FIG. 6, the second device can first perform dilation on the image A, and then perform erosion, so that the discrete white points in the image A form a connected domain. Figure 7 After the closing operation on the image A, the discrete white points in the image A form a connected domain.

[0275] For example, the dilation on the image A can be understood as using a first rectangle (m pixels wide and n pixels high), for each pixel X in the image A, the pixel X is centered in the first rectangle, and all other pixels covered by the first rectangle are traversed, and the value of the pixel X is modified to the maximum value of the pixels covered by the first rectangle.

[0276] The erosion on the image A can be understood as using a first rectangle (m pixels wide and n pixels high), for each pixel X in the image A, the pixel X is centered in the first rectangle, and all other pixels covered by the first rectangle are traversed, and the value of the pixel X is modified to the minimum value of the pixels covered by the first rectangle.

[0277] In other examples, the second device can also perform a closing operation on the image A in other ways, which are not limited by the embodiments of the present application.

[0278] Step 5: The second device extracts a region of interest (ROI) which is the area where the ring pattern is located.

[0279] Exemplarily, the second device can perform ellipse fitting on the connected domain to extract the ROI containing the ring pattern.

[0280] It should be understood that the embodiments of the present application do not limit the fitting manner. In other examples, the second device can also use rectangular fitting, etc.

[0281] Based on the embodiments of the present application, the second device can successfully obtain the ring pattern displayed in the first device.

[0282] In some cases, due to serious reflection or partial occlusion of the ring pattern, the second device cannot form a connected domain from discrete points when performing a closing operation on the binarized image, which may cause the second device to fail to recognize the complete ring pattern, resulting in the failure of device connection. Therefore, for such cases, the embodiments of the present application can use the particle point clustering method to obtain the complete ring pattern. The technical solutions will be introduced below in combination with Figure 8 .

[0283] Exemplarily, Figure 9 another process for obtaining the ring pattern provided by the embodiments of the present application. As Figure 9 shown, the process for obtaining the ring pattern by the electronic device can include steps 1 to 5.

[0284] Step 1: The second device converts the image containing the ring pattern into an HSV image.

[0285] Step 2: The second device performs threshold filtering in the H, S and V domains respectively.

[0286] Step 3: The second device performs binarization processing on the image.

[0287] It should be understood that the above steps 1 to 3 can refer to the related descriptions in steps 1 to 3 in the foregoing Figure 9 . For brevity, details are not repeated here.

[0288] Step 4: The second device performs particle point filtering on the binarized image A.

[0289] The second device obtains image A after binarizing the image, which includes black and white colors, and the white particle points are distributed in a discrete manner in the image A. Since there may be some interfering points in these particle points, for example, some particle points with large areas may be interfering points. Therefore, the second device can perform filtering processing on the particle points included in the image A.

[0290] Exemplarily, the second device can set an area threshold of the particle points, retain the particle points with an area less than or equal to a first threshold m1, or retain the particle points with an area less than or equal to the first threshold m1 and greater than a second threshold m2, and filter out the rest of the particle points.

[0291] In this way, the second device can filter out part of the interfering particle points in the image, which helps to improve the possibility of subsequent decoding.

[0292] It should be understood that step 4 is an optional step.

[0293] In other examples, before step 4, the second device can first perform edge detection on the binarized image A and extract the contours in the image A to determine the area in which the display screen of the first device is located.

[0294] Step 5: The second device extracts the ROI, which is the area in which the ring pattern is located.

[0295] Exemplarily, the second device can use a ring clustering algorithm to cluster the particle points to obtain a plurality of annular rings. Then, the second device can select an annular ring with an aspect ratio approximately equal to 1 and a ratio of the center of the annular ring to the particle point density in the annular ring area greater than a third density threshold from the plurality of annular rings, and take the annular ring as the extracted ROI.

[0296] Alternatively, the second device can also select an annular ring with an aspect ratio approximately equal to 1 and a particle point density in the annular ring area greater than a fourth density threshold from the plurality of annular rings, and take the annular ring as the extracted ROI.

[0297] It should be understood that the ring clustering algorithm may, for example, be a spectral clustering algorithm, a clustering algorithm based on Euclidean distance such as K-means algorithm, etc.

[0298] Continuing to refer to Figure 8 , the ROI finally extracted by the second device can include the complete ring pattern. In other examples, if the ring pattern is partially occluded, the ROI finally obtained by the second device can include part of the ring pattern, such as 60% or 75% of the entire ring pattern, etc. However, due to the existence of partial redundancy in the encoding by the first device, the second device can still successfully decode and obtain the device connection information even if it obtains part of the entire ring pattern.

[0299] After the second device successfully extracts the ROI including the ring pattern, the second device can process the ROI to obtain the device connection information encoded therein. The technical solution will be introduced below in combination with Figure 10 .

[0300] Exemplarily, Figure 10 is a schematic diagram of obtaining a connection pairing code provided by an embodiment of the present application. As shown in FIG. 1, a first device 100 and a second device 200 are connected to each other.Figure 11 As shown, the process of the second device acquiring the device connection information can include steps 1 to 7.

[0301] The second device can extract the ROI from the continuous or discontinuous multi-frame images in the manner of Figure 11 to obtain multi-frame images including the ring pattern.

[0302] Step 1: The second device respectively performs intra-frame difference processing on img1, img2 to imgn to obtain gray images img1-1, img2-1 and imgn-1. n is greater than or equal to 2.

[0303] Taking the intra-frame difference processing of the second device on img1 as an example to illustrate the process of intra-frame difference.

[0304] img1 has RGB three channels, and the second device first performs RGB three-channel decomposition on img1 to obtain R channel image, G channel image and B channel image, and the corresponding values are R1, G1 and B1 respectively.

[0305] In one example, the second device can use the formula img1-1 = |(B1-R1)+(B1-G1)| to perform intra-frame difference processing to obtain the gray image img1-1.

[0306] In another example, the second device can use the formula img1-1 = |(G1-R1)+(G1-B1)| to perform intra-frame difference processing to obtain the gray image img1-1.

[0307] Similarly, the second device respectively performs intra-frame difference processing on img2 to imgn to obtain gray images img2-1 to imgn-1.

[0308] In this way, by respectively performing intra-frame difference processing on img1, img2 to imgn, the feature particle points included in the obtained gray images can be more obvious, which is conducive to the second device to acquire the connection pairing code encoded therein.

[0309] Step 2: The second device respectively performs inter-frame difference processing on img1-1, img2-1 to imgn-1 to obtain difference images img1-2, img2-2 to imgn-2.

[0310] Exemplarily, the second device can respectively perform pairwise difference processing on img1-1, img2-1 to imgn-1.

[0311] For example, taking n as 3 as an example. The second device can perform difference operation on img1-1 and img2-1 as image img1-2; the second device can perform difference operation on img2-1 and img3-1 as image img2-2; and the second device can perform difference operation on img3-1 and img1-1 as image img3-2.

[0312] It should be understood that the difference operation can be understood as a process of subtracting the gray values of the corresponding pixel points of two frames of images and taking the absolute value.

[0313] It should be understood that the embodiments of the present application do not limit the specific execution order of steps 1 and 2. In some examples, the second device can also perform step 2 first and then perform step 1.

[0314] It should be understood that between steps 1 and 2, the second device can also perform multi-frame alignment processing on the gray images img1-1, img2-1 to imgn-1.

[0315] For example, taking n as 3 as an example. The second device can perform alignment processing on img1-1 and img1-3 with the intermediate image img2-1 as a reference.

[0316] For example, the second device can perform alignment processing on img1-1 and img1-3 in the manner of affine transformation or feature point alignment, so as to reduce the misalignment influence of the second device when obtaining the image of the ROI due to shaking.

[0317] In other examples, the second device can also perform multi-frame image alignment processing with img1-1 or img1-3 as a reference.

[0318] It should be understood that the second device can also perform alignment processing on the above-mentioned images in other existing multi-frame alignment manners, and the embodiments of the present application do not limit this.

[0319] Step 3: The second device determines the degree of moire in img1-2, img2-2 to imgn-2.

[0320] For example, taking img1-2 as an example, the second device performs binarization processing on the image img1-2 to obtain the binarized image img1-2, and determines the degree of moire according to the density of the particle points in the image img1-2.

[0321] For example, the second device can divide the moire into three degrees of none, low and high according to the density of the particle points. Alternatively, the second device can also divide the degree of moire according to other indicators, which is not limited by the present application.

[0322] For example, the second device determines that the density of the particle points is less than the first density threshold, and can determine that there is no moire. The second device determines that the density of the particle points is greater than the first density threshold or less than or equal to the second density threshold, which is twice the first density threshold, and can determine that the degree of moire is low. The second device determines that the density of the particle points is greater than the second density threshold, and can determine that the degree of moire is high.

[0323] It should be understood that the second device can also divide the moire into two degrees of none or presence, or the second device can also divide the moire into more degrees, which is not limited in the present application.

[0324] In this way, the second device can determine the severity of the moire in the image, which helps subsequent removal of the moire.

[0325] Step 4: The second device sets a binary threshold according to the degree of the moire in img1-2, img2-2 to imgn-2, respectively, to obtain binary images img1-3, img2-3 to imgn-3.

[0326] For example, taking img1-2 as an example, if there is no moire in img1-2, the second device can set a first gray threshold to filter out part of the pixel points in the gray image whose gray value is less than the first gray threshold. If there is moire in img1-2, and the degree of the moire is low, the second device can set a second gray threshold to filter out part of the pixel points in the gray image whose gray value is less than the second gray threshold. If there is moire in img1-2, and the degree of the moire is high, the second device can set a third gray threshold w3 to filter out part of the pixel points in the gray image whose gray value is less than the third gray threshold.

[0327] Wherein, the higher the degree of the moire, the greater the corresponding gray threshold. Correspondingly, the first gray threshold is less than the second gray threshold, and the second gray threshold is less than the third gray threshold.

[0328] It should be understood that the first gray threshold, the second gray threshold and the third gray threshold can be set by the developer, or can be determined by the second device according to the distribution of the moire, which is not limited in the present application.

[0329] In this way, the second device sets the corresponding filtering threshold according to the degree of the moire, so as to filter out the moire as much as possible and reduce the influence of the moire on the recognition result.

[0330] Step 5: The second device performs an or operation on the binary images img1-3, img2-3 to imgn-3 to obtain an image img-a.

[0331] The second device can obtain more feature particle points in img-a by performing an OR operation on the plurality of binary images, so as to improve the decoding probability of the second device.

[0332] It should be understood that step 5 is an optional step, and in some examples, step 5 can not be performed.

[0333] Step 6: The second device performs threshold filtering on the areas of the particle points in the image img-a to obtain an image img-f.

[0334] For example, the second device can determine the areas of all the particle points in the image img-a, and sort the particle points in descending order of the areas. Then, the second device can set a first area threshold to filter the particle points. For example, the first area threshold is 70%, and the second device can retain the top 70% of the particle points.

[0335] It should be understood that the first area threshold can also be other values, such as 65% or 75%, and the specific value of the first area threshold is not limited in the embodiments of the present application.

[0336] In other examples, the second device can determine the areas of all the particle points in the image img-a, and set a second area threshold to filter the particle points. For example, the particle points with an area less than or equal to the second area threshold are filtered out, and the particle points with an area greater than the second area threshold are retained.

[0337] Step 7: The second device parses the image img-f to obtain device connection information.

[0338] It should be understood that the specific execution order of steps 1-7 is not limited in the embodiments of the present application. In other examples, steps 3-6 in steps 1-7 are optional steps.

[0339] The device connection information can be a connection pairing code. Alternatively, the device connection information can also include a device identifier, a MAC address, and the like of the first device. In the embodiments of the present application, the device connection information is taken as a 6-digit numerical connection pairing code as an example.

[0340] In one example, the second device can divide the annular region in which the particle points in the image img-f are located into a plurality of regions in an average manner, and determine a corresponding number according to the number of particle points in each region.

[0341] For example, Figure 9 is a schematic diagram of an annular region provided by the embodiments of the present application. Referring to Figure 10The second device can divide the annular region into n regions in sequence, i.e., region 1, region 2, region 3,..., and region n, and decode the n regions respectively to obtain the corresponding numbers. It should be understood that the application does not limit the specific value of n. For example, n is 6, and region 1 to region 6 can encode a group of connection pairing codes. Alternatively, n is 9, in which case the second device can redundantly decode part of the connection pairing codes, and correspondingly, the first device also redundantly encodes part of the connection pairing codes. Through such a redundant encoding mode, when there are some regions in region 1 to region n that cannot be recognized by the second device, the second device can still successfully obtain the connection pairing code, thereby improving the possibility of successful decoding of the second device.

[0342] It should be understood that the first device can cyclically encode the n regions. For example, when n is 18, the first device can cyclically encode a 6-digit connection pairing code, and can encode 3 groups of 6-digit connection pairing codes. Through such a redundant encoding mode, the possibility of successful decoding of the second device can be improved.

[0343] In other examples, the first device can also set a check bit in the first region of each group of connection pairing codes or in the region before the region of each group of connection pairing codes, so that the second device can determine the order of the numbers of the connection pairing codes.

[0344] The second device can determine the encoded number according to the number of particle points in each region. For example, for region 1, if there is one particle point, it can be determined that the encoded number is 1, and for region 2, if there are 4 particle points, it can be determined that the encoded number is 4.

[0345] Through the above decoding mode, the second device can obtain the final 6-digit connection pairing code, such as 147258.

[0346] It should be understood that the second device can also divide the annular region into more regions in sequence, such as 15 regions, 18 regions, or 24 regions, thereby improving the possibility of successful decoding of the second device.

[0347] In another example, the second device can divide the annular region where the particle points in the image img-f are located into multiple regions, such as 6 regions, and determine the corresponding numbers according to the distribution of the particle points in each region.

[0348] For example, for region 1, the second device can divide region 1 into 10 grids (numbered 0 to 9), and if there is one particle point in region 1, the particle point is located in the grid, and the number represented by the region can be determined. For example, the particle point is located in the first grid, and the corresponding number of region 1 is determined to be 1.

[0349] If there are multiple particle points in the region 1, the number of the grid including the most particle points is determined as the decoded number. For example, if the number of the particle points included in the second grid is the most, it can be determined that the region 1 corresponds to the number 2.

[0350] In some cases, in order to improve the probability of successfully decoding the correct connection pairing code by the second device, the second device can also determine the final connection pairing code in combination with multiple decoding results.

[0351] Exemplarily, Figure 11 is a schematic diagram of determining a connection pairing code in combination with multiple decoding results provided by an embodiment of the present application. As Figure 12 indicated, through the decoding modes of Figure 12 and Figure 3 , the second device decodes three images of image 1, image 2 and image 3 to obtain a connection pairing code one “147258”, decodes three images of image 2, image 3 and image 4 to obtain a connection pairing code two “147256”, and decodes three images of image 3, image 4 and image 5 to obtain a connection pairing code three “147258”, and then the second device can finally determine that the obtained connection pairing code is “147258”. In this way, even if the last digit of the connection pairing code two decoded by the second device is incorrect, the second device can determine the final correct connection pairing code in combination with the connection pairing code one and the connection pairing code three.

[0352] It should be understood that Figure 9 in the above description, only three results obtained by the second device are taken as examples for illustration, and in other examples, the second device can also obtain more results to improve the correctness of the finally determined connection pairing code.

[0353] Based on the embodiments of the present application, the second device can determine the final connection pairing code in combination with multiple decoding results, so that the phenomenon of device connection failure caused by incorrect decoding can be avoided.

[0354] It should be understood that after the device connection information is obtained by the second device, the device connection information can be used to establish a connection relationship with the first device.

[0355] Figure 7 is a schematic interaction diagram of a method of information transmission provided by an embodiment of the present application. As Figure 8 indicated, the method 600 can be applied to a first electronic device and a second electronic device, and the method 600 can at least include steps 610 to 650.

[0356] It should be understood that the first electronic device can be the first device in the foregoing description, and the second electronic device can be the second device in the foregoing description.

[0357] 610, the first electronic device sends a first message. Correspondingly, the second electronic device receives the first message.

[0358] Exemplarily, the first message can be a Bluetooth broadcast message. The first message can also be other wireless messages, which are not limited by the embodiments of the present application.

[0359] The first message can be used to discover devices around the first electronic device.

[0360] 620, the second electronic device sends first indication information to the first electronic device according to the first message.

[0361] The first indication information can be used to indicate that there are devices around the first electronic device. Alternatively, the first indication information can be confirmation information after scanning the first message.

[0362] In some examples, the second electronic device also displays a target display interface according to the first message, the target display interface can include related information of the first electronic device, and the second electronic device can send the above-mentioned first indication information to the first electronic device in response to user operation in the target display interface.

[0363] 630, the first electronic device displays a first image according to the first indication information, the first image includes a first part and a second part.

[0364] It should be understood that the first part can be the background of the first image, and the second part can be the part of the first image encoding the first information. Exemplarily, the second part can be superimposed in the first part.

[0365] Exemplarily, referring to (d) in FIG. 2B, the first image can be the image corresponding to the display interface 240, the second part can be the information point in the annular pattern, and the first part can be the background part outside the information point. Figure 8

[0366] It should be understood that when the electronic device displays N frames of the first image, the positions of the second part in the adjacent two frames of the N frames of the first image are the same, and N is greater than or equal to 2.

[0367] In other examples, in other examples, the colors of the second part in the adjacent two frames of the N frames of images can be different. Alternatively, the colors of the second part in any three consecutive frames of the N frames of images can be different, which are not limited by the embodiments of the present application.

[0368] ​In other examples, the second part of two adjacent images in the N images can encode the same information or different information. When encoding different information, the first electronic device can divide the information to be encoded into multiple parts and encode them in the second part of the images of different frames respectively. Alternatively, a plurality of consecutive images in the N images can encode different information, and the N images can encode a plurality of groups of information, and the embodiments of the present application are not limited thereto.

[0369] When the second part of the plurality of first images encodes different information, the first electronic device can split the information to be encoded into multiple parts, and each image can encode a part of the information, and the plurality of images can encode the complete information.

[0370] For example, taking 3 images as an example, the first electronic device can divide the information to be encoded into information A, information B and information C, and encode them in the consecutive 3 images respectively.

[0371] In other examples, the first part of two adjacent images in the N first images can be the same or different, for example, the part of the particle points included in the first part can move or change in color.

[0372] In some examples, the first part or the second part can have an animation effect. For example, a plurality of particle points constituting a ring pattern can gradually converge into a ring and have a flowing effect.

[0373] 640, the second electronic device acquires N first images, each of the N first images includes a first part and a second part, and the positions of the second parts of two adjacent images in the N images are the same, where N is greater than or equal to 2.

[0374] For example, the second electronic device can call the camera to acquire the N first images, or the second electronic device can call the camera to acquire the first images.

[0375] 650, the second electronic device decodes the first information according to the second part.

[0376] For example, referring to Figure 9 The second part can be the particle point corresponding to img-f, and the first information can be the connection pairing code. The second electronic device can obtain the connection pairing code 147258 by decoding img-f. The second part encodes the first information that the second electronic device needs to transmit, and the second electronic device decodes the second part in the acquired image to determine the first information therein.

[0377] For example, when the second part of each of the N frames of first images encodes the same first information, the second electronic device can decode a plurality of consecutive frames (e.g., 2 or 3 frames) of images, and determine the first information encoded in each frame of image according to the decoding result of each frame of image. Alternatively, the second electronic device can also select one frame of image to decode, to determine the first information encoded in the frame of image.

[0378] For example, when the second part of each of the N frames of first images encodes different information, the second electronic device can decode the second part of a plurality of consecutive frames of first images, and combine the decoding results to determine the final first information.

[0379] Optionally, after obtaining the first information by decoding, the second electronic device can perform a first operation according to the first information.

[0380] For example, the first information can be device connection information, in which case the first operation is to send a device connection request. When the second electronic device needs to establish a connection relationship with the first electronic device, the second electronic device can send a device connection request to the first electronic device according to the device connection information, and establish a connection relationship with the first electronic device.

[0381] For example, the first information can be account login information, in which case the first operation can be an operation of logging in an account.

[0382] For example, the first information can also be first data, in which case the first operation can be an operation of obtaining the first data.

[0383] For example, the first information can also be a conference link, in which case the first operation is an operation of participating in a conference.

[0384] For example, the first information can also be a website, in which case the first operation is an operation of accessing the website.

[0385] For example, the first information can also be screen projection information, in which case the first operation is an operation of screen projection.

[0386] It should be understood that the first information can also include other contents, which are not limited by the embodiments of the present application.

[0387] Based on the system provided by the embodiments of the present application, the first electronic device can encode the first information to be transmitted in the second part of the first image, and the second electronic device can obtain N frames of first images, and decode the first information based on the second part.

[0388] For example, when device connection is performed, the second electronic device can scan or capture the image displayed by the first electronic device to obtain the device connection information (connection pairing code) in the image, so that the device connection can be quickly established. When a new device is replaced or data is cloned, the path of device interaction can be shortened, and the sense of technology can be improved.

[0389] In some implementations, before the second electronic device decodes the first information according to the second part, the second electronic device is further configured to perform color space conversion on the N frames of first images to obtain N frames of second images.

[0390] Based on the embodiments of the present application, the second electronic device can reduce the influence of the reflection in the first image by performing color space conversion on the first image.

[0391] For example, the first image is converted from an RGB color space to an HSV color space, or a hue, saturation, and lightness (HSI) color space.

[0392] In some embodiments, the second electronic device is specifically configured to:

[0393] convert the N frames of first images from a red, green, and blue (RGB) color space to a hue, saturation, and value (HSV) color space;

[0394] filter a hue (H) domain of each of the N frames of first images to obtain N frames of second images, the second images including a hue H domain corresponding to an angle value greater than a first preset value and less than a second preset value;

[0395] perform binarization processing on the N frames of second images to obtain N frames of third images;

[0396] determine the second part according to the N frames of third images.

[0397] For example, referring to Figure 9 For example, referring to one of the frames of images. The second image can be an image containing a blue component obtained by filtering the hue H domain. The third image can be an image obtained by performing binarization processing on the second image.

[0398] The second part can be a ring-shaped region, or a part of information points included in the ring-shaped region.

[0399] It should be understood that the embodiments of the present application do not limit the specific values of the first preset value and the second preset value.

[0400] Based on the embodiments of the present application, by color space conversion and corresponding threshold filtering, the reflection phenomenon existing in the first image can be filtered out, the interference of the reflection on the second electronic device obtaining the second part is reduced, and the possibility of successful decoding is improved.

[0401] In some embodiments, the second electronic device is specifically configured to:

[0402] perform a close operation on the N frames of third images; determine the second part according to a result of the close operation; or

[0403] perform clustering analysis on particle points in the N frames of third images; and determine the second part according to a result of the clustering analysis.

[0404] For example, referring to Figure 9 For some scenes with more serious reflection or more missing ring-shaped areas, the second electronic device can perform particle point clustering analysis on the third images obtained by the binarization processing to determine the ring-shaped area. The second part can be the ring-shaped area or part of the information points included in the ring-shaped area.

[0405] According to the embodiments of the present application, the second part is determined by the close operation, which can reduce the interference of reflection on the acquisition of the second part by the second electronic device and improve the possibility of successful decoding. In addition, for the case where the second part is blocked by a large number of parts or has serious reflection, the second part can still be successfully acquired through the result of the clustering analysis, thereby improving the possibility of successful decoding of the second part by the electronic device.

[0406] In some embodiments, before the second electronic device performs clustering analysis on the N frames of third images, the second electronic device is further configured to filter particle points with an area less than a first area threshold in the N frames of third images.

[0407] For example, referring to Figure 13 Step 4 in the foregoing method, the particle points with an area less than the first area threshold in the third images can be filtered.

[0408] According to the embodiments of the present application, the particle points with a small area in the third images can be filtered out, thereby reducing the interference of the particle points with a small area on the acquisition of the second part.

[0409] In some embodiments, the second electronic device is specifically configured to:

[0410] perform intra-frame difference processing on the second part of each of the N frames of first images to obtain N frames of grayscale images, wherein the intra-frame difference processing is to perform difference processing and summation of absolute values on the first channel image of the second part with the second channel image and the third channel image respectively, the first channel image, the second channel image and the third channel image are one of red R channel image, green G channel image and blue B channel image, and each is different;

[0411] perform inter-frame difference processing on the N frames of grayscale images respectively to obtain N frames of difference images;

[0412] perform binarization processing on the N frames of difference images to obtain N frames of fourth images;

[0413] performing or operation processing on the N frames of fourth images to obtain a first target image;

[0414] obtain first information according to the first target image.

[0415] Exemplarily, the first channel image is a B channel image, the second channel image is an R channel image, and the third channel image is a G channel image.

[0416] It should be understood that the intra-frame difference processing and the inter-frame difference processing can refer to the related description in the foregoing Figure 13 , which will not be described here again.

[0417] Exemplarily, referring to Figure 14 , the fourth image can be img1-3 to imgn-3, and the first target image can be img-a.

[0418] According to the embodiments of the present application, the second electronic device can decode the second part included in the N frames of images to successfully obtain the first information encoded therein.

[0419] In some embodiments, the second electronic device is specifically configured to:

[0420] filtering particle points in the first target image with an area less than a second area threshold to obtain a second target image;

[0421] decode the first information according to the second target image.

[0422] Exemplarily, referring to Figure 14 , the second target image can be img-f.

[0423] According to the embodiments of the present application, by filtering the particle points in the first target image, the particle points with a small area in the first target image can be filtered out, so that the interference of the particle points with a small area on the decoding result can be reduced.

[0424] In some embodiments, before the second electronic device performs the binarization processing on the N frames of difference images, the second electronic device is further configured to:

[0425] respectively determine a degree of moire in each of the N frames of difference images;

[0426] The second electronic device is specifically configured to:

[0427] filter out pixel points with a gray value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of moire;

[0428] perform binarization processing on the filtered N frames of difference images to obtain N frames of fourth images.

[0429] It should be understood that the second electronic device determining the degree of moire can refer to the foregoing description of the second device determining the degree of moire, and the embodiments of the present application are not limited thereto.

[0430] Based on the embodiments of the present application, the second electronic device can also determine the degree of moire in the image, and set the filtering threshold according to the degree of moire, so as to reduce the interference caused by moire and improve the probability of successful decoding.

[0431] In some embodiments, the first message is sent after the first time the first electronic device is powered on; or, the first message is sent in response to the user selecting an operation for indicating a new device, or in response to the user selecting an operation for indicating the type of the old device, when data cloning is performed.

[0432] In this way, the electronic device can send the first message outward when it is powered on for the first time or when data cloning is performed for the first time, so as to discover the surrounding devices. This technical solution is beneficial for the first electronic device to discover the devices when needed, so as to perform the subsequent operation of connecting the devices, thereby saving the power consumption of the electronic device to a certain extent.

[0433] In some embodiments, the first electronic device is further configured to receive the first data information sent by the second electronic device, and the first data information includes account information logged in the second electronic device and / or wireless network information connected by the second electronic device.

[0434] It should be understood that the wireless network information connected by the second electronic device can include the historical connection or the current connection.

[0435] In other examples, the first data information can also include the privacy declaration, settings, and the like of the second electronic device, and the embodiments of the present application are not limited thereto.

[0436] Based on the embodiments of the present application, the second electronic device can send the account information, wireless network information and the like to the first electronic device, so that the user does not need to manually log in the account, connect the wireless and the like on the first electronic device, thereby improving the operation experience of the user on the first electronic device. For example, the first electronic device is a new smart phone purchased by the user, and through this way, the new phone can automatically log in the account of the user and automatically access the wireless network.

[0437] In some embodiments, the first electronic device is further configured to: receive second indication information sent by the second electronic device, the second indication information being used to indicate second data information in the second electronic device; and display a second display interface according to the second indication information, the second display interface including a first display card and a second display card, wherein the first display card is used to indicate importing the second data information from the second electronic device, and the second display card is used to indicate downloading third data information from a cloud server.

[0438] According to the embodiments of the present application, the first electronic device can display options for data transmission for the user to select.

[0439] In some embodiments, the first electronic device is further configured to: in response to an operation of the user clicking the first display card, display a third display interface, the third display interface including a type and a size of the second data information; in response to an operation of the user in the third display interface indicating importing data, send third indication information to the second electronic device, the third indication information being used to indicate starting to import data corresponding to the second data information; receive the data corresponding to the second data information sent by the second electronic device; or,

[0440] in response to an operation of the user clicking the second display card, display a fourth display interface, the fourth display interface including a type and a size of the third data information; and in response to an operation of the user in the fourth display interface indicating importing data, import the data corresponding to the third data information from the cloud server.

[0441] According to the embodiments of the present application, the first electronic device can implement transmission transmission according to the operation of the user, so that the fast usability of the first electronic device can be realized.

[0442] In some embodiments, the second part is in a ring pattern; and the distance between the second electronic device and the first electronic device is less than or equal to a preset distance.

[0443] It should be understood that the second part can also be in other shapes, and the embodiments of the present application are not limited thereto.

[0444] ​ is a schematic flowchart of a method of information transmission provided by the embodiments of the present application. As shown in ​ the method 800 can be applied to a second electronic device, and the method 800 can at least include steps 810 to 840.

[0445] 810, the second electronic device receives a first message.

[0446] The first message can be a message for discovering a device, for example, the first message is a Bluetooth broadcast message.

[0447] 820, the second electronic device sends first indication information according to the first message.

[0448] 830, the second electronic device acquires N frames of first images, each frame of image in the N frames of first images includes a first part and a second part, the positions of the second parts of two adjacent frames of images in the N frames of images are the same, wherein N is greater than or equal to 2.

[0449] In other examples, the colors of the second parts of two adjacent frames of images in the N frames of images are different.

[0450] The second parts in the N frames of images can encode the same information or different information, which is not limited by the embodiments of the application.

[0451] 840, the second electronic device decodes the first information according to the second part.

[0452] Exemplarily, the first information can include device connection information such as a connection pairing code. When the second electronic device needs to establish a connection relationship with the first electronic device, the second electronic device can send a device connection request to the first electronic device based on the device connection information, and establish a connection relationship with the first electronic device.

[0453] Exemplarily, the first information can be account login information, in which case the second electronic device can log in to an account based on the account login information.

[0454] Exemplarily, the first information can also be first data, in which case the second electronic device can acquire the first data.

[0455] Exemplarily, the first information can also be a conference link, in which case the second electronic device can participate in the conference based on the conference link.

[0456] Exemplarily, the first information can also be a website, in which case the second electronic device can access the website.

[0457] Exemplarily, the first information can also be screen projection information, in which case the second electronic device can perform screen projection.

[0458] It should be understood that the first information can also include other content, which is not limited by the embodiments of the application.

[0459] It should also be understood that the embodiments of the application are not limited to the operation performed by the second electronic device after acquiring the first information.

[0460] Based on the embodiments of the present application, the second electronic device can obtain N frames of images, and decode the second part in the N frames of images to obtain the first information therein, and based on the first information, the corresponding operation can be performed. The technical solution can conveniently realize information transmission between the two, shorten the interactive path of information transmission between devices, and improve the sense of technology.

[0461] In an implementation manner, before decoding the first information according to the second part, the method further includes: performing color space conversion on the N frames of first images to obtain N frames of second images.

[0462] Based on the embodiments of the present application, the second electronic device can reduce the influence of reflection in the first image by performing color space conversion on the first image.

[0463] In some embodiments, performing color space conversion on the N frames of first images to obtain N frames of second images includes:

[0464] Converting the N frames of first images from a red-green-blue (RGB) color space to a hue-saturation-value (HSV) color space;

[0465] Filtering a hue H domain of each image in the N frames of first images to obtain N frames of second images, the second images including an angle value corresponding to the hue H domain greater than a first preset value and less than a second preset value;

[0466] Performing binarization processing on the N frames of second images to obtain N frames of third images;

[0467] Determining the second part according to the N frames of third images.

[0468] In some embodiments, determining the second part according to the N frames of third images includes:

[0469] Performing clustering analysis on particle points in the N frames of third images;

[0470] Determining the second part according to a result of the clustering analysis; or

[0471] Performing clustering analysis on particle points in the N frames of third images;

[0472] Determining the second part according to a result of the clustering analysis.

[0473] In some embodiments, before performing clustering analysis on the N frames of third images, the method further includes: filtering particle points in the N frames of third images with an area less than a first area threshold.

[0474] In some embodiments, decoding the first information according to the second part includes:

[0475] performing intra-frame difference processing on the second part of each of the N frames of first images to obtain N frames of gray-scale images, wherein the intra-frame difference processing is an absolute value of sum of difference processing of the first channel image of the second part with the second channel image and the third channel image respectively, the first channel image, the second channel image and the third channel image are one of red R channel image, green G channel image and blue B channel image, and each is different; performing inter-frame difference processing on the N frames of gray-scale images respectively to obtain N frames of difference images;

[0476] performing binarization processing on the N frames of difference images to obtain N frames of fourth images;

[0477] performing or operation processing on the N frames of fourth images to obtain a first target image;

[0478] obtaining first information according to the first target image.

[0479] In some embodiments, decoding the first information according to the first target image comprises: filtering particle points with an area less than a second area threshold in the first target image to obtain a second target image; and decoding the first information according to the second target image.

[0480] In some embodiments, the method further comprises:

[0481] respectively determining a degree of moire in each of the N frames of difference images;

[0482] wherein the binarization processing on the N frames of difference images to obtain N frames of fourth images comprises:

[0483] filtering out pixel points with a gray-scale value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of moire;

[0484] performing binarization processing on the filtered N frames of difference images to obtain N frames of fourth images.

[0485] In some embodiments, the first information comprises at least one of a connection pairing code, account login information, a product serial number and a media access control (MAC) address.

[0486] It should be understood that the first information can further include other information such as a verification code, a website address, etc., which are not limited by the embodiments of the present application.

[0487] ​ is a schematic block diagram of an electronic device provided by an embodiment of the present application. As shown in ​As shown, the electronic device 700 can include one or more processors 710; one or more memories 720; the one or more memories 720 store one or more instructions, when the instructions are executed by the one or more processors 710, cause the method of information transmission as described in any possible implementation manner above to be performed.

[0488] Exemplarily, the electronic device 700 can be the first device, the second device, the electronic device 200, the electronic device 300, the electronic device 400 and the like in the foregoing.

[0489] The embodiments of the present application further provide an apparatus, including a processor and a communication interface, the communication interface is configured to receive a signal and transmit the signal to the processor, and the processor processes the signal, so that the method of information transmission as described in any possible implementation manner above is performed.

[0490] The apparatus can be a chip. For example, the chip can be a chip system or an independent chip, etc.

[0491] The embodiments of the present application further provide a readable storage medium, the readable storage medium stores instructions, when the instructions are run on an electronic device, cause the electronic device to perform the related method steps to achieve the method of information transmission in the embodiments described above.

[0492] The embodiments of the present application further provide a program product, when the program product is run on an electronic device, cause the electronic device to perform the related steps to achieve the method of information transmission in the embodiments described above.

[0493] The embodiments of the present application further provide an apparatus, including modules for implementing the method of information transmission as described in any embodiment above.

[0494] In addition, the embodiments of the present application further provide an apparatus, the apparatus can be a chip, a component or a module, the apparatus can include a connected processor and a memory; wherein the memory is configured to store instructions, when the apparatus is running, the processor can execute the instructions stored in the memory, so that the apparatus performs the method of information transmission in the method embodiments described above.

[0495] Among them, the device, readable storage medium, program product or apparatus provided by the embodiments of the present application are all used to execute the corresponding method provided above, so the beneficial effects they can achieve can refer to the beneficial effects in the corresponding method provided above, which will not be repeated here.

[0496] Those skilled in the art can clearly understand that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed in hardware or software 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 beyond the scope of the present application.

[0497] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working processes of the above-described system, device and unit can refer to the corresponding processes in the foregoing method embodiments, which will not be repeated here.

[0498] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0499] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0500] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically independently, or two or more units can be integrated into one unit.

[0501] If the functions are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the present application that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk.

[0502] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A system for information transmission, characterized in that The system comprises a first electronic device and a second electronic device, wherein, The first electronic device is configured to send a first message, the first message being used to discover devices around the first electronic device; The second electronic device is configured to: receive the first message; send first indication information according to the first message; The first electronic device is further configured to display a first image according to the first indication information, the first image comprising a first part and a second part; The second electronic device is further configured to: obtain N frames of first images, each frame of the N frames of first images comprising the first part and the second part, the positions of the second parts of two adjacent frames of the N frames of images being the same, and the first part and the second part of each frame being superimposed, wherein N is greater than or equal to 2; perform color space conversion on the N frames of first images to obtain N frames of second images; perform binarization processing on the N frames of second images to obtain N frames of third images; determine the second part according to the N frames of third images; and decode first information according to the second part.

2. The system of claim 1, wherein, Before the binarization processing on the N frames of second images, the second electronic device is specifically configured to: convert the N frames of first images from a red-green-blue (RGB) color space to a hue-saturation-value (HSV) color space; filter a hue H domain of each frame of the N frames of first images to obtain the N frames of second images, the hue H domain of the second image corresponding to an angle value greater than a first preset value and less than a second preset value.

3. The system of claim 2, wherein, The determination of the second part according to the N frames of third images, the second electronic device is specifically configured to: perform a closing operation on the N frames of third images; determine the second part according to a result of the closing operation; or perform clustering analysis on particle points in the N frames of third images; determine the second part according to a result of the clustering analysis.

4. The system of any one of claims 1-3, wherein, The decoding of the first information according to the second part, the second electronic device is specifically configured to: perform intra-frame difference processing on the second part of each frame of the N frames of first images to obtain N frames of grayscale images, wherein the intra-frame difference processing is an absolute value obtained by performing difference processing and summation on a first channel image, a second channel image and a third channel image of the second part respectively, the first channel image, the second channel image and the third channel image being one of a red (R) channel image, a green (G) channel image and a blue (B) channel image, and each being different; perform inter-frame difference processing on the N frames of grayscale images to obtain N frames of difference images; perform binarization processing on the N frames of difference images to obtain N frames of fourth images; perform or operation processing on the N frames of fourth images to obtain a first target image; and obtain the first information according to the first target image.

5. The system of claim 4, wherein, Before the second electronic device performs the binarization processing on the N frames of difference images, the second electronic device is further configured to: determine a degree of moire of each frame of difference image in the N frames of difference images respectively; wherein the second electronic device is specifically configured to: Filtering out pixel points with a gray value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of the moire; Performing binaryzation processing on the filtered N frames of difference images to obtain N frames of fourth images.

6. A method of information transmission, characterized by The method is applied to a second electronic device, and the method comprises: receiving a first message; sending first indication information according to the first message; obtaining N frames of first images, each frame of image in the N frames of first images comprising a first part and a second part, the positions of the second parts of adjacent two frames of images in the N frames of images being the same, wherein the first part and the second part of each frame of image are superimposed, and N is greater than or equal to 2; performing color space conversion on the N frames of first images to obtain N frames of second images; performing binaryzation processing on the N frames of second images to obtain N frames of third images; determining the second part according to the N frames of third images; decoding first information according to the second part.

7. The method of claim 6, wherein, The method of performing color space conversion on the N frames of first images to obtain N frames of second images comprises: converting the N frames of first images from a red-green-blue (RGB) color space to a hue-saturation-value (HSV) color space; filtering a hue H domain of each frame of image in the N frames of first images to obtain the N frames of second images, the angle value corresponding to the hue H domain of the N frames of second images being greater than a first preset value and less than a second preset value.

8. The method of claim 7, wherein, The method of determining the second part according to the N frames of third images comprises: performing a closing operation on the N frames of third images; determining the second part according to the result of the closing operation; or performing clustering analysis on the N frames of third images; determining the second part according to the result of the clustering analysis.

9. The method of claim 8, wherein, Before the method of performing clustering analysis on the N frames of third images, the method further comprises: filtering out particle points with an area less than a first area threshold in the N frames of third images.

10. The method according to any one of claims 6-9, characterized in that, The method of decoding first information according to the second part comprises: performing intra-frame difference processing on the second part of each frame of image in the N frames of first images to obtain N frames of gray images, wherein the intra-frame difference processing is an absolute value obtained by performing difference processing and summing on a first channel image of the second part with a second channel image and a third channel image respectively, the first channel image, the second channel image and the third channel image being one of a red (R) channel image, a green (G) channel image and a blue (B) channel image, and each being different; performing inter-frame difference processing on the N frames of gray images respectively to obtain N frames of difference images; performing binaryzation processing on the N frames of difference images to obtain N frames of fourth images; performing or operation processing on the N frames of fourth images to obtain a first target image; decoding the first information according to the first target image.

11. The method of claim 10, wherein, The method of decoding the first information according to the first target image comprises: filtering out particle points with an area less than a second area threshold in the first target image to obtain a second target image; decoding the first information according to the second target image.

12. The method of claim 10, wherein, Before the method of performing binaryzation processing on the N frames of difference images, the method further comprises: respectively determine the degree of moire in each of the N frames of difference images; The binarization processing of the N frames of difference images comprises: filtering out pixel points with a gray value less than a third preset value in the N frames of difference images, wherein the third preset value is related to the degree of moire; binarization processing of the filtered N frames of difference images to obtain the N frames of fourth images.

13. The method according to any one of claims 6-9, characterized in that, The first information includes at least one of a connection pairing code, account login information, a product serial number, and a media access control (MAC) address.

14. The method according to any one of claims 6-9, characterized in that, The method further comprises: sending first data information, wherein the first data information includes account information logged on the second electronic device or wireless network information connected to the second electronic device.

15. An electronic device, comprising: comprises: one or more processors; one or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the information transmission method as claimed in any one of claims 6 to 14 is executed.

16. A chip, characterized by The chip comprises a processor and a communication interface, the communication interface is used to receive a signal and transmit the signal to the processor, and the processor processes the signal, so that the information transmission method as claimed in any one of claims 6 to 14 is executed.

17. A readable storage medium, characterized by, The readable storage medium stores instructions, and when the instructions run on the device, the information transmission method as claimed in any one of claims 6 to 14 is executed.

18. A program product, characterized by The program product comprises program code, and when the program code runs on the electronic device, the information transmission method as claimed in any one of claims 6 to 14 is executed.

Citation Information

Patent Citations

  • Data transmission method and electronic equipment

    CN104899537A

  • Method and apparatus for sharing content via encoded data representaions

    US20140203071A1