Channel establishment and information transmission method, device, storage medium and program product
By introducing display screens and front-facing image acquisition elements into the device, and using image recognition technology to establish channels, the security risks existing in NFC technology in close-range communication is solved, and a safer communication channel establishment is achieved.
Patent Information
- Application Number
- CN202210212145.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-03-04
AI Technical Summary
Existing NFC technology has security risks in close-range communication, such as being easily maliciously stolen when in a backpack or pocket.
By introducing a display screen and a front-facing image acquisition element into the device, an image recognition technology is used to establish a channel. The specific steps include displaying an image of the device ID, using the pre-image acquisition element to acquire and parse the image of the peer device until the device ID of the peer device is identified, thereby establishing a communication channel.
This method can establish a short-range communication channel more securely, prevent the device from being stolen and brushed in the obstructed state, and improve communication security.
Smart Images

Figure CN114727267B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular, to a channel establishment and information transmission method, device, storage medium, and program product. Background Art
[0002] With the development of communication technology, mobile phones are increasingly used for short-range communication, such as through NFC chips. However, the application of NFC technology also has certain security risks. There is a risk of malicious theft through a backpack or pocket. Therefore, how to improve the security of short-range communication is an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present application provide a channel establishment and information transmission method, device, storage medium and program product, which are intended to establish a short-range communication channel more securely.
[0004] In a first aspect, an embodiment of the present application provides a method for establishing a communication channel, which is applied to a first device, wherein the first device has a display screen and a front image acquisition element, and the method includes:
[0005] displaying an image including the device ID of the first device;
[0006] Using its own front image acquisition element to acquire the image displayed by the second device;
[0007] Parsing the captured image, and when the device ID of the second device is parsed, displaying an image at least including the device ID of the second device, and continuing to use its own front image acquisition element to capture the image displayed by the second device;
[0008] The captured image is parsed, and when the device ID of the first device is parsed, it is determined that the communication channel between the first device and the second device is successfully established.
[0009] Optionally, before parsing the collected image, the method further includes:
[0010] Using its own front image acquisition element to sense the screen-on time period of the single-frame image repeatedly displayed by the second device;
[0011] According to the sensing result, the exposure time period of the front image acquisition element of the device is adjusted to overlap with the screen light time period;
[0012] Analyze the collected images, including:
[0013] The image acquired by its own front image acquisition element after adjusting the exposure time period is analyzed.
[0014] Optionally, before displaying the first device ID image, the method further includes:
[0015] When it is detected that a trigger button on the first device is pressed, triggering a communication channel establishment mode; or,
[0016] In the case where both the first device and the second device have sensor elements, when the sensor element of the first device senses the sensor signal sent by the second device, a communication channel establishment mode is triggered, and the sensor element is: a touch element set on the display screen, and / or other sensor elements set in the first device.
[0017] Optionally, the single-frame image displayed by the second device is one of the multiple consecutive synchronous images in the first image sequence or an image containing the device ID of the second device, and the display time period of the single-frame image includes a screen-on time period and a screen-off time period;
[0018] The front image acquisition element of the second device is used to sense the screen-on time period of the single-frame image repeatedly displayed by the second device, including:
[0019] Using its own front image acquisition element to acquire and analyze each single frame image in the first image sequence repeatedly displayed by the second device;
[0020] According to the sensing result, the exposure time period of the front image acquisition element is adjusted to overlap with the screen light time period, including:
[0021] When it is analyzed that the single-frame image displayed by the second device is a synchronous image, estimating a screen-on time period of a next synchronous image;
[0022] The exposure time period of its own front image acquisition element is adjusted to overlap with the bright screen time period of the next synchronous image.
[0023] Optionally, displaying an image including the device ID of the first device includes:
[0024] repeatedly displaying an image including the device ID of the first device, or
[0025] Repeatedly displaying a second image sequence, where the second image sequence includes a plurality of consecutive synchronous images and an image including the device ID of the first device, and a display time period of a single frame image in the second image sequence includes a screen-on time period and a screen-off time period;
[0026] Displaying an image including at least the device ID of the second device includes:
[0027] repeatedly displaying an image including at least the device ID of the second device, or
[0028] A third image sequence is repeatedly displayed, wherein the third image sequence includes a plurality of consecutive synchronous images and an image at least including the device ID of the second device, and a display time period of a single frame image in the third image sequence includes a screen-on time period and a screen-off time period.
[0029] Optionally, it also includes:
[0030] The same image is displayed in multiple display areas of its own display screen, and the image displayed in each display area carries the number of the display area;
[0031] receiving display area indication information sent by the second device, where the display area indication information includes a target number carried by an image captured by the second device;
[0032] According to the number, it is determined that the display area of the image to be displayed subsequently is the display area of the target number.
[0033] Optionally, the front image acquisition element is a fingerprint module arranged below the display screen.
[0034] Optionally, at least one of the image including the device ID of the first device and the image including at least the device ID of the second device displayed by the first device is a pattern of a target coding type;
[0035] The synchronous image displayed by the first device is a full white image or a high brightness image, and the brightness of the high brightness image is higher than the display brightness in the normal display mode.
[0036] In a second aspect, an embodiment of the present application provides an information transmission method, which is applied to a first device, wherein the first device at least has a display screen, including:
[0037] displaying a first information image;
[0038] When receiving a prompt message sent by the second device to request the next information, a second information image is displayed, wherein the prompt message indicates that the second device obtains the information contained in the first information image after capturing and analyzing the image through its own front image capturing element.
[0039] Optionally, the first device further comprises a front image acquisition component, and the method further comprises:
[0040] Using its own front image acquisition element to acquire the image displayed by the second device;
[0041] parsing the captured image to obtain information transmitted by the second device;
[0042] When it is determined through analysis that the information transmitted by the second device is repeated, a prompt message for requesting next information is sent to the second device.
[0043] Optionally, before displaying the first information image, the method further includes:
[0044] According to the communication channel establishment method described in the first aspect of the embodiment, a communication channel is established between the first device and the second device.
[0045] Optionally, in a case where both the first device and the second device have a communication component that supports a target communication protocol, displaying a first information image includes:
[0046] A first information image for describing connection assistance information for the second device to connect to the first device based on the target communication protocol is displayed.
[0047] Optionally, when both the first device and the second device support the offline payment protocol, displaying the first information image includes:
[0048] An offline payment image is displayed for describing an offline payment permission file of the first device, wherein the offline payment permission file is used for the second device to transfer virtual currency.
[0049] Optionally, displaying the first information image includes:
[0050] Repeating the display of the first information image, or
[0051] Repeatingly displaying a fourth image sequence, the fourth image sequence comprising a plurality of consecutive synchronous images and the first information image, wherein a display time period of a single frame image in the fourth image sequence comprises a screen-on time period and a screen-off time period;
[0052] Displaying a second information image, including:
[0053] repeatedly displaying the second information image, or
[0054] The fifth image sequence is repeatedly displayed, wherein the fifth image sequence includes a plurality of consecutive synchronous images and the second information image, and the display time period of a single frame image in the fifth image sequence includes a screen-on time period and a screen-off time period.
[0055] Optionally,
[0056] At least one of the first information image and the second information image is a pattern of a target coding type.
[0057] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the communication channel establishment method described in the first aspect of the embodiment, or the information transmission method described in the second aspect of the embodiment.
[0058] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program / instruction stored thereon, which, when executed by a processor, implements the communication channel establishment method described in the first aspect of the embodiment, or the information transmission method described in the second aspect of the embodiment.
[0059] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the communication channel establishment method described in the first aspect of the embodiment, or the information transmission method described in the second aspect of the embodiment.
[0060] Beneficial effects:
[0061] During the process of establishing a channel in the channel establishment method of the present application, the first device displays an image including the device ID of the first device itself, and uses its own front image acquisition element to acquire and parse the image displayed by the second device. When the device ID of the second device is parsed, an image including at least the device ID of the second device is displayed, indicating that the first device has recognized the second device. Then, the first device continues to acquire and parse the image displayed by the second device using its own front image acquisition element. When the image acquired from the second device is parsed to obtain the device ID of the first device, it indicates that the second device has also recognized the first device, and it is determined that the communication channel between the first device and the second device is successfully established.
[0062] Because the two devices need to face each other when establishing communication, so as to display patterns to the other end and use their own front-end image acquisition components to capture the patterns displayed by the other end, therefore, a short-range communication channel can be established more safely. When the mobile phone is in a backpack or pocket, the mobile phone screen is blocked and cannot establish a communication channel with other devices, reducing the possibility of the mobile phone being stolen.
[0063] During the information transmission method of the present application, the first device uses its own display screen to display the first information image for the second device to collect and analyze. When the first device receives a prompt message sent by the second device to request the next information, the second information image is displayed. The prompt message indicates that the second device obtains the information contained in the first information image after collecting and analyzing the image through its own front-end image collection element.
[0064] During the information transmission process, in order to facilitate the other party to collect the first information image displayed on its own display screen to realize information transmission, the display screens of the two devices still need to remain relative. Therefore, if the device is placed in a backpack or pocket, information transmission will not be possible. This can improve the security of information transmission and prevent information from being stolen by others. At the same time, the first device replaces the second information image on the premise that the second device has received the information represented by the first information image, which can enhance the accuracy of information received by the other party and avoid missing information. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0066] Figure 1 is a flowchart of the steps of a communication channel establishment method proposed in an embodiment of the present application;
[0067] Figure 2 is a flowchart of the steps of the information transmission method proposed in one embodiment of the present application;
[0068] Figure 3 is a flow chart of establishing a communication channel between a first device and a second device proposed in an embodiment of the present application;
[0069] Figure 4 is a flow chart of information transmission between a first device and a second device proposed in an embodiment of the present application;
[0070] Figure 5 It is a functional module diagram of a communication channel establishment device proposed in one embodiment of the present application;
[0071] Figure 6 It is a functional module diagram of an information transmission device proposed in one embodiment of the present application. DETAILED DESCRIPTION
[0072] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0073] In order to reduce the insecurity of short-range communications, this application establishes a communication channel more safely based on visible light communication technology. Visible light communication is a new type of optical wireless communication technology based on visible light (400THz-790THz). Due to its LoS (Line of Sight) characteristics, visible light communication can provide short-range, safe, and interference-free wireless links. Compared with traditional radio frequency communications, visible light wireless communication does not require spectrum application and can also avoid electromagnetic wave interference.
[0074] Reference Figure 1 , shows a flow chart of the steps of a method for establishing a communication channel in an embodiment of the present invention, which is applied to a first device, wherein the first device has a display screen and a front image acquisition element, and the method may specifically include the following steps:
[0075] S101: Displaying an image including the device ID of the first device.
[0076] In the process of establishing a communication channel, the first device displays an image of its own device ID on its display screen for collection by the front image collection element of the second device. The image containing the device ID of the first device may be an image containing the device ID itself, and the device ID of the first device may be obtained by performing text recognition on the collected image; the image containing the device ID of the first device may also be a pattern obtained by encoding the device ID of the first device, and the device ID of the first device may be obtained by decoding the collected pattern.
[0077] S102: using its own front image acquisition component to acquire the image displayed by the second device.
[0078] The first device and the second device include a mobile phone or a tablet computer, and the second device also has a display screen and a front image acquisition element. During the process of establishing a channel, an image containing the device ID of the first device is displayed on the display screen of the first device for acquisition by the front image acquisition element of the second device. Since the two devices need to display patterns on the display screens and use their own front image acquisition elements to acquire patterns displayed by the other end, the two devices need to keep the display screens relative to each other.
[0079] The forms of images displayed by the first device and the second device are not restricted, including combinations of different types of patterns and different display durations, combinations of different types of patterns and different display brightness, and combinations of different types of patterns, display durations, and brightness. Various combinations can convey more information, wherein the patterns are target coding type patterns, and target coding type patterns include QR codes, bar codes, Hanxin codes, and other types.
[0080] The display form of the image containing the device ID of the first device displayed by the first device can be customized by the first device. In one embodiment, the form of the image used to display the device ID of the first device can be randomly displayed within the range of the customized setting. For example, the form of the image used to display the device ID of the first device during the current communication channel establishment process can be different from the image displayed when the communication channel is established next time. For example, the device ID of the first device is displayed in a QR code encoding type pattern in this image, and the device ID of the first device can be displayed in a bar code encoding type pattern next time.
[0081] The front image acquisition element of the first device includes its own front camera or a fingerprint module under the display screen (including a touch display screen with touch function). When the fingerprint module under the screen is used for image acquisition, the display screen of the first device can be attached to the display screen of the second device, or the distance between the display screen of the first device and the display screen of the second device is less than a redundant distance threshold, wherein the redundant distance threshold is determined according to the acquisition range of the fingerprint module under the display screen.
[0082] S103: Parse the captured image, and when the device ID of the second device is parsed, display an image at least including the device ID of the second device, and continue to use its own front image capture element to capture the image displayed by the second device.
[0083] In actual implementation, step S101 may be performed again when the device ID of the second device is parsed, that is, after the first device parses the device ID of the second device, a pattern including its own device ID is displayed.
[0084] In the implementation manner of the present application, there is no limitation on the display timing of the first device displaying the image including its own device ID. The display timing may be before or after executing step S102, or the display timing is: the moment when the device ID of the second device is parsed.
[0085] In a specific implementation, the display format of the image displayed by the second device to reflect the device ID of the second device is also not restricted, and in the process of establishing a communication channel, the formats of the first device and the second device to reflect their own device IDs may be different. For example, in the process of establishing this communication channel, the first device uses an image of a QR code encoding type pattern to display the device ID of the first device, and the second device may be consistent with the first device, or may use an image of a bar code encoding type pattern to display the device ID of the second device, as long as the first device can parse the device ID of the second device based on the captured image.
[0086] In the process of establishing a communication channel, the first device and the second device first display images containing their own device IDs, and the front image acquisition component of the first device acquires and analyzes the image containing the device ID of the second device displayed on the second device. When the first device obtains the device ID of the second device after analyzing the acquired image, it indicates that the first device has recognized the second device. At this time, the image containing the device ID of the first device displayed by itself is replaced with an image containing the device ID of the second device, wherein the image containing the device ID of the second device displayed by the first device may be an image containing only the device ID of the second device, or may be an image containing both the device ID of the first device and the device ID of the second device. The form of the image containing the device ID of the second device displayed by the first device is similar to the form of the aforementioned image containing the device ID of the first device. In the process of establishing a communication channel once, the encoding types of the patterns in the images of the two devices may be the same or different.
[0087] When the first device displays the device ID of the second device, it means that the first device has recognized the second device. However, in the specific implementation process, the two devices may not process information synchronously. Therefore, the first device needs to continue to collect the pattern displayed by the second device and wait for the second device to recognize the first device.
[0088] S104: Parse the captured image, and when the device ID of the first device is parsed, determine that the communication channel between the first device and the second device is successfully established.
[0089] The collection and analysis process of the second device is the same as that of the first device, but the collection and analysis process of the pattern displayed on the second device by the first device may not be synchronized with the collection and analysis process of the pattern displayed on the first device by the second device.
[0090] After the second device uses its own front-end image acquisition element to acquire and analyze the pattern containing the device ID of the first device and obtains the device ID of the first device, the second device will also display an image containing the device ID of the first device, indicating that the second device has recognized the first device; and when the first device, through continuous acquisition and analysis, parses the content represented by the pattern displayed on the display screen of the second device to be the device ID of the first device itself, it means that both devices have recognized the other end, so that the communication channel is successfully established and the acquisition and analysis process can be stopped.
[0091] The communication channel established by the method may be full-duplex communication, and continued information transmission may be performed through the established communication channel.
[0092] In the method for establishing a communication channel of the present application, because the two devices need to have their display screens facing each other during the process of establishing communication so as to display patterns to the other end and use their own front image acquisition elements to capture the patterns displayed by the other end, a short-range communication channel can be established more safely. When the mobile phone is in a backpack or pocket, the mobile phone screen is blocked and cannot establish a communication channel with other devices, reducing the possibility of the mobile phone being stolen.
[0093] In a feasible implementation manner, the communication channel establishment method may further include the following steps:
[0094] S201: Triggering a communication channel establishment mode.
[0095] In one embodiment, the method for the first device or the second device to trigger the communication channel establishment mode may be to trigger the communication channel establishment mode when detecting that a trigger button on the first device is pressed; wherein the trigger button includes a physical button, a virtual button, or a virtual gesture. For example, the user can trigger the communication channel mode by triggering the power button and the volume button at the same time through custom settings, or by turning on the virtual button for establishing the communication channel displayed on the display screen to trigger the communication channel mode, or by a custom virtual gesture, such as touching the display screen with three fingers at the same time and moving in one direction, or drawing a corresponding pattern on the display screen, etc. When the trigger button is used to start the communication channel establishment mode, the triggering method of the first device and the second device may be different.
[0096] In another embodiment, when both the first device and the second device have sensor elements, when the sensor element of the first device senses a sensor signal sent by the second device, a communication channel establishment mode is triggered; the sensor element is: a touch element arranged on the display screen, and / or other sensor elements arranged in the first device.
[0097] For example, if the first device or the second device is configured with a touch element such as a touch display screen, when a regional touch signal of its own touch display screen is detected, a communication channel establishment mode is triggered. The regional touch signal refers to a touch signal generated by a local touch area or a full-screen touch area of the touch display screen.
[0098] For touch screens, another method for triggering a communication channel establishment mode may be that if the suppliers of the touch screens of the two devices are the same manufacturer, or if the suppliers of the two touch screens are not the same manufacturer but are equipped with a communication protocol for a touch chip, when the touch screens of the two devices are in contact with each other or the distance between the two touch screens is less than a threshold, the touch screens of the two devices can sense the communication signal of the touch screen of the other device, thereby the two devices triggering a communication channel establishment mode.
[0099] For example, other sensor elements configured in the first device or the second device, such as an inertial measurement unit (IMU), a mobile phone vibrator or other sensor devices, such as a mobile phone's flash and camera, can also trigger the communication channel establishment mode. For example, in a specific implementation, two devices configured with an inertial measurement unit IMU are close to or attached to each other, and the communication channel establishment mode is triggered by shaking the two devices synchronously, or the screens of the two mobile phones display a prompt light for indicating the establishment of a communication channel, and the communication channel establishment is triggered when the camera of the other device senses the prompt light.
[0100] Triggering the establishment of a communication channel includes waking up the screen of the device when the screen is off, or entering a preparation stage for establishing a communication channel when the screen is on.
[0101] S202: Displaying an image including the device ID of the first device, and using its own front image acquisition component to acquire the image displayed by the second device.
[0102] The timing of displaying the image including the device ID of the first device in step S202 is not limited either, and the specific description is as mentioned above.
[0103] In one embodiment, in order to avoid the other end failing to capture the image, the image containing the device ID of the first device or the second device is displayed repeatedly; the image containing the device ID of the first device or the second device can be a single-frame image, and each single-frame image consists of a screen on and a screen off. For example, the duration of a single-frame image is T1, the screen on duration is T2, and the screen off duration is T3, then T1=T2+T3, and a pattern containing valid information is displayed when the screen is on.
[0104] Taking the acquisition process of the front image acquisition unit of the first device as an example, in order to enable the front image acquisition element of the first device to capture effective information, it is necessary to adjust the exposure time of the front image acquisition element of the first device, such as adjusting the exposure time of the under-screen fingerprint module or the exposure time of the front camera, so that within the exposure time period of the front image acquisition element of the first device, at least one single-frame image is displayed on the display screen of the opposite end.
[0105] When a device captures an image displayed by the other end, in the initial stage, the exposure time of the front image acquisition unit of the first device may not overlap with the screen-on time of the image displayed by the second device. Therefore, there may be a situation where the image cannot be captured. In order to avoid this situation, when capturing the image of the other end, first use its own front image acquisition element to sense the screen-on time period of the single-frame image displayed by the second device; according to the sensing result, adjust the exposure time period of its own front image acquisition element to an overlapping time period with the screen-on time period, for example: let most of the exposure time of its own front image acquisition element fall within the screen-on time period of the single-frame image displayed by the second device; when the exposure time period of the front image acquisition element is successfully adjusted, analyze the captured image to obtain the information expressed by the image displayed on the display screen of the other end.
[0106] The above is a process of adjusting the exposure time by taking the front image acquisition element of the first device as an example. The process of adjusting the exposure time of the front image acquisition element of the second device is the same as that of the first device.
[0107] In another embodiment, the first device or the second device may also display an image sequence. Similarly, in order to avoid the other end failing to capture the image, the image sequence displayed on the first device or the second device may also be displayed repeatedly; the exposure time of the front image capture element of the device may also be adjusted through the image sequence.
[0108] Take the process of adjusting the front image acquisition component of the first device as an example:
[0109] The single-frame image displayed by the second device is one of the multiple consecutive synchronous images in the first image sequence or an image containing the device ID of the second device, wherein the display time period of the single-frame image includes a screen-on time period and a screen-off time period, that is, the first image sequence may include N frames of synchronous images and N frames of second device ID images arranged in sequence, wherein the function of the synchronous image is for the first device to adjust the exposure time of its own front-end acquisition element, and the bright screen time period in the synchronous image may display a full-white image or a high-brightness image with a calibrated brightness, and the brightness of the high-brightness image is higher than the display brightness in the normal display mode, and the synchronous image may not contain valid information and is only used for exposure synchronization. In other embodiments, the synchronous image may also contain other valid information.
[0110] When the first device captures an image displayed by the second device, it uses its own front-end image capture element to capture and analyze each single-frame image in the image sequence displayed by the second device. The first device first captures N frames of synchronous images. When the synchronous image currently displayed by the second device is analyzed, the screen-on time period of the next synchronous image is estimated; the exposure time period of its own front-end image capture element is adjusted to overlap with the screen-on time period of the next synchronous image.
[0111] Furthermore, through N-frame synchronization images, the first device can adjust the exposure time period of its own front-end image acquisition element, so that when the first device starts to capture N frames of the second device ID image, the exposure time period can be synchronized with the bright screen time period of the image displayed by the second device.
[0112] S203: Parse the captured image, and when the device ID of the second device is parsed, display an image at least including the device ID of the second device, and continue to use its own front image capture element to capture the image displayed by the second device.
[0113] This step refers to step S103, and the image containing the device ID of the second device displayed by the first device, or the image containing the device ID of the first device displayed by the second device can be a repeatedly displayed single-frame image or a repeatedly displayed image sequence.
[0114] Taking the example of the first device displaying an image that at least includes the device ID of the second device: it may be a repeated display of an image that at least includes the device ID of the second device, or a repeated display of a third image sequence, wherein the third image sequence includes a plurality of consecutive synchronized images and an image that at least includes the device ID of the second device, and the display time period of a single frame image in the third image sequence includes a screen-on time period and a screen-off time period.
[0115] S204: Parse the captured image, and when the device ID of the first device is parsed, determine that the communication channel between the first device and the second device is successfully established.
[0116] This step refers to the aforementioned step S104 and will not be described again here.
[0117] In the process of establishing the communication channel, the first device and the second device execute the same steps. When both devices sense the other end, the communication channel is successfully established and information can be transmitted through the established communication channel.
[0118] In a feasible implementation, in the process of establishing a communication channel using the present method, the display screens of the two devices can be fully-screened and closely aligned, or part of the screens can be closely aligned or closely aligned, provided that their front-facing image acquisition elements can acquire the image displayed on the other end. For example, when the fingerprint module under the screen is used for acquisition, the screen area where the fingerprint module is provided can be closely aligned or closely aligned.
[0119] In order to save display costs and improve privacy, full-screen display can be performed on both devices in the initial stage of displaying images. After the area where the front image acquisition element of the other end can be collected is determined, the position of the subsequent pattern display can be adjusted, which specifically includes the following steps:
[0120] A1: The same image is displayed in multiple display areas of its own display screen, and the image displayed in each display area carries the number of the display area;
[0121] A2: receiving display area indication information sent by the second device, where the display area indication information includes a target number carried by an image captured by the second device;
[0122] A3: According to the number, determine that the display area of the image to be displayed subsequently is the display area of the target number.
[0123] For example, the screen of the first device displays multiple identical images or image sequences in multiple areas, and each image or image sequence carries the number of the display area. For example, 6 identical images or image sequences are displayed with numbers 1-6. After the second device collects and analyzes the images, it determines that the number of the display area carried in the image is 4, and then sends indication information of the display area number 4 to the first device; the display area indication information of the second device can be encoded in the image displayed by the second device. For example, the second device can encode the display area number 4 in all subsequent images displayed by itself, or it can encode the display area number in a group of images for display. After the first device collects or analyzes the image containing the display area number displayed by the second device, it displays subsequent patterns in its own display area No. 4. The subsequent displayed patterns include a repeatedly displayed image containing the device ID of the first device, a repeatedly displayed image containing the device ID of the second device, an image containing transmission information content after the channel is successfully established, and other images containing prompt information (such as requesting the next information content); the processing on the second device side is the same as that of the first device, and will not be repeated here.
[0124] The present application also provides an information transmission method, referring to Figure 2 , shows a flowchart of the steps of an information transmission method provided in an embodiment of the present application. The information transmission method is applied to a first device, and the first device at least has a display screen. The method specifically includes the following steps:
[0125] S301: Display a first information image.
[0126] On the premise that the first device and the second device establish a communication channel, the first device and the second device can transmit information. The method for establishing the communication channel between the first device and the second device can be the communication channel establishment method proposed in the present application. In other implementations, channels established by other methods can also be used.
[0127] Taking the first device to the second device as an example, the display screen of the first device displays the first information image, and the second device uses its own front image acquisition element to acquire the image on the display screen of the first device. Therefore, the first device and the second device need to be opposite to each other. If the front image acquisition elements of the first device and the second device are both front cameras, the distance between the two screens of the first device and the second device is less than or equal to the calibration distance. If at least one of the front image acquisitions of the first device and the second device is a fingerprint module under the screen, the distance between the display screen of the first device and the display screen of the second device is less than a redundant distance threshold, where the redundant distance threshold is determined based on the acquisition range of the fingerprint module under the display screen.
[0128] The first information image displayed by the first device may be a single-frame image of the first information image that is repeatedly displayed, or a fourth image sequence that is repeatedly displayed, wherein the fourth image sequence includes a plurality of consecutive synchronous images and the first information image, and the display time period of the single-frame image includes a screen-on time period and a screen-off time period; wherein the screen-on time period of the single-frame displayed first information image and the multiple frames of synchronous images in the image sequence are used to assist the other end in adjusting the exposure time of its own front-end image acquisition unit, see the process in step S202 for details.
[0129] The screen-on time period of the first information image is used to express effective transmission information. Different effective information can be displayed by combining the display duration of the screen-on time period of the first information image, the displayed patterns of different coding types, and the display brightness. The patterns of different coding types can be QR codes, bar codes, Hanxin codes, and other types.
[0130] In this method, the process or form of displaying the information image by the second device is the same as that of the first device, and the information content represented by the information images of the first device and the second device is not limited. For example, the information content represented by the information image can be text, music, or even video.
[0131] In one embodiment, when both the first device and the second device have communication components that support the target communication protocol, the first information image displayed may be a first information image for describing connection auxiliary information, and the connection auxiliary information is used for the second device to connect to the first device based on the target communication protocol.
[0132] For example, the first device collects and analyzes the image displayed by the second device, determines the password of the other party's WiFi, Bluetooth or personal hotspot, and can perform handshake and key transmission through the channel established by this method to quickly establish advanced channels such as WiFi or Bluetooth.
[0133] In another embodiment, when both the first device and the second device support the offline payment protocol, the first information image displayed may also be an offline payment image for describing an offline payment permission file of the first device, and the offline payment permission file is used by the second device to transfer virtual currency. Furthermore, the communication channel established by this method may also realize the transfer of virtual currency between devices.
[0134] S302: When receiving a prompt message sent by the second device to request next information, display a second information image, wherein the prompt message indicates that the second device obtains the information included in the first information image after capturing and analyzing the image through its own front image capturing element.
[0135] After the second device collects, analyzes and processes the first information image displayed by the first device, the first information image is still displayed repeatedly on the display screen of the first device. In order to receive the next valid information, the second device can send a prompt message to the first device to request the next information.
[0136] In one embodiment, the prompt message of the next information can be a prompt image displayed on the display screen of the second device. During the process of displaying the information image, the first device can also start its own configured front image acquisition element to capture the image on the second device. After the first device captures, analyzes and processes the prompt image of the second device, it displays the second information image on its own display screen.
[0137] The display form of the second information image is similar to that of the first information image, and can be a repeated display of the second information image, or a repeated display of a fifth image sequence, wherein the fifth image sequence includes a plurality of consecutive synchronous images and the second information image, and the display time period of a single frame image in the fifth image sequence includes a screen-on time period and a screen-off time period. If the first information image and the second information image are displayed as an image sequence consisting of a continuous synchronous image and an information image, exposure synchronization is performed each time information is transmitted, thereby improving the efficiency of acquisition.
[0138] In a feasible implementation, in the information transmission method, in addition to displaying an information image for the second device to receive information, the first device may also utilize its own front-end image acquisition element to acquire the information image displayed by the second device, parse the acquired image, obtain the information transmitted by the second device, and process the information; when it is determined through analysis that the information transmitted by the second device is repeated, a prompt message for requesting the next information is sent to the second device.
[0139] Consistent with the process of the second device prompting the first device to change the image, the first device can display an image containing a prompt message requesting the next information on the display screen. After the second device performs analysis and processing, the second device can replace the next image containing the new information. When the first device parses and finds that the second device has changed the image, it continues to display the last displayed information image so that the second device can continue to collect, analyze and process it. Until the first device parses and processes the image containing the prompt message requesting the next information displayed by the second device, the first device replaces the next image containing the new information. This process is repeated to realize data transmission between the first device and the second device.
[0140] When the transmission of the first device or the second device is completed, an image indicating that the information transmission has been completed can be displayed. After the other end collects, analyzes and processes the image indicating that the information transmission has been completed, it stops collecting information. In this embodiment, during the information transmission process, if the first device and the second device are separated from each other, for example, the first device and the second device collect information through the under-screen fingerprint module, but the distance between the two devices exceeds the redundant distance threshold, the communication channel established between the first device and the second device can be disconnected, and the information transmission is terminated.
[0141] This application has at least the following beneficial effects:
[0142] 1. During the process of establishing the communication channel, based on the existing display screen and the front image acquisition element of the device, in this application, because the two devices need to have their display screens facing each other during the process of establishing communication, so as to display patterns to the other end and collect the patterns displayed by the other end, a short-range communication channel can be established more safely. When the mobile phone is in a backpack or pocket, the mobile phone screen is blocked and cannot establish a communication channel with other devices, reducing the possibility of the mobile phone being stolen.
[0143] 2. During the information transmission process, in order to facilitate the transmission of information by collecting the first information image displayed on its own display screen with the other party, the display screens of the two devices still need to remain relative to each other. Therefore, if the device is placed in a backpack or pocket, information transmission will not be possible. This can improve the security of information transmission and prevent information from being stolen by others. At the same time, the first device replaces the second information image on the premise that the second device has received the information represented by the first information image, which can enhance the accuracy of information received by the other party and avoid missing information.
[0144] 3. The display form of the image can be a variety of combinations, which can transmit more information;
[0145] 4. The position of subsequent pattern display can be determined according to the range that can be collected by the front image collection element of the other end, which has the effect of reducing display costs and improving privacy;
[0146] 5. The established communication channels can be used in different scenarios, including assisting in the establishment of advanced channels and digital currency payments.
[0147] The technical solution of the embodiment of the present application is described below with a specific example.
[0148] In one embodiment, the method is applied to mobile phone 1 and mobile phone 2. Both mobile phone 1 and mobile phone 2 are mobile phones equipped with touch screens, and both mobile phones are equipped with under-screen fingerprint modules. The process of establishing a communication channel and information transmission between mobile phone 1 and mobile phone 2 is as follows:
[0149] Reference Figure 3 , showing a flow chart of establishing a communication channel between mobile phone 1 and mobile phone 2, Figure 3 The figure focuses on the process of mobile phone 1 in establishing the communication channel, and the process of mobile phone 2 is the same as that of mobile phone 1.
[0150] like Figure 3First, place the screens of mobile phone 1 and mobile phone 2 close together. After mobile phone 1 triggers the communication channel establishment mode, the display screen is turned on; then the first device ID image is displayed, and the fingerprint module under the screen is started to collect N frames of synchronous images for exposure synchronization. If the exposure is not synchronized and the exposure synchronization times out, if it times out, it will prompt the image information of failed establishment and end; if the exposure is not synchronized but has not timed out, continue to execute the exposure synchronization process until the exposure time is adjusted to the exposure synchronization; after the exposure synchronization is successful, the image of the second device is read. If the image of the second device is parsed as the device ID of the second device, the device ID of the first device and the device ID of the second device are displayed on its own screen. The image of the device ID is obtained, and exposure synchronization and acquisition are continued; if the image parsed to the second device does not express the device ID of the second device, but expresses the device ID of the first device and the device ID of the second device, it indicates that the first device has recognized the second device, and the under-screen fingerprint module stops acquiring and waits for the second phone to recognize the first phone and then establish a communication channel; if the image parsed to the second device does not express the device ID of the second device, nor does it express the device ID of the first device and the device ID of the second device, exposure synchronization acquisition is continued. At this time, it means that there is a problem with the image displayed by the second phone. The first phone can display a prompt image to make the second phone display the second device ID image.
[0151] Reference Figure 4 , showing a flow chart of information transmission between mobile phone 1 and mobile phone 2, Figure 4 The figure focuses on the process of mobile phone 1 during data transmission, and the process of mobile phone 2 is the same as that of mobile phone 1.
[0152] like Figure 4 , it is assumed that mobile phone 2 now transmits information to mobile phone 1, mobile phone 1 is the receiving end, and mobile phone 2 is the sending end. First, keep the touch screens of the two mobile phones in contact, mobile phone 1 collects the image displayed by mobile phone 2, and the image displayed by mobile phone 2 includes N frames of synchronization images and N frames of information images. Mobile phone 1 performs exposure synchronization on the N frames of synchronization images, and then reads and decodes the N frames of information images. After decoding, it is determined whether it is a repeated parsed image. If not, it indicates that the image is an image containing new information. According to the information obtained after parsing, the information is processed, and then exposure synchronization and acquisition are continued; if it is determined to be a repeated parsed image after decoding, it indicates that the information expressed by the image has been processed, and exposure synchronization and acquisition are continued; mobile phone 1 can also change from a receiving end to a sending end after repeated parsing to an image or after processing information, and display an image containing a prompt message requesting the next information, so that mobile phone 2 displays an image containing the next new information to transmit new information data, and then change from a sending end to a receiving end, and continue to expose and parse the image of mobile phone 2 until the transmission process is completed.
[0153] Reference Figure 5 , shows a functional module diagram of a communication channel establishment device provided in an embodiment of the present application, wherein the communication channel establishment device comprises:
[0154] A first display module 101, configured to display an image including a device ID of the first device;
[0155] The acquisition module 102 is used to acquire the image displayed by the second device using its own front image acquisition element;
[0156] The parsing module 103 is used to parse the captured image, and when the device ID of the second device is parsed, display the image at least including the device ID of the second device, and continue to use its own front image acquisition element to capture the image displayed by the second device;
[0157] The channel establishing module 104 is used to parse the collected image, and when the device ID of the first device is parsed, determine that the communication channel between the first device and the second device is successfully established.
[0158] Optionally, the device further comprises:
[0159] A screen-on time period sensing module, used to sense the screen-on time period of a single-frame image repeatedly displayed by the second device using its own front-end image acquisition element;
[0160] An adjustment module, used for adjusting the exposure time period of its front image acquisition element to a time period overlapping with the screen light time period according to the sensing result;
[0161] The parsing module comprises:
[0162] The first analyzing unit is used to analyze the image acquired by its front image acquisition element after adjusting the exposure time period.
[0163] Optionally, the device further comprises:
[0164] A first trigger module, configured to trigger a communication channel establishment mode when detecting that a trigger button on the first device is pressed;
[0165] The second trigger module is used to trigger the communication channel establishment mode when the sensor element of the first device senses the sensor signal sent by the second device when both the first device and the second device have sensor elements. The sensor element is: a touch element arranged on the display screen, and / or other sensor elements arranged in the first device.
[0166] Optionally, the single-frame image displayed by the second device is one of the multiple consecutive synchronous images in the first image sequence or an image containing the device ID of the second device, and the display time period of the single-frame image includes a screen-on time period and a screen-off time period;
[0167] The screen-on time period sensing module comprises:
[0168] A first sensing unit, configured to use its own front image acquisition element to acquire and analyze each single frame image in the first image sequence repeatedly displayed by the second device;
[0169] The adjustment module comprises:
[0170] A first adjustment unit is used to estimate a screen-on time period of a next synchronous image when it is parsed that the single-frame image displayed by the second device is a synchronous image;
[0171] The second adjustment unit is used to adjust the exposure time period of its own front image acquisition element to an overlapping time period with the bright screen time period of the next synchronous image.
[0172] Optionally, the first display module includes:
[0173] a first repeating unit, configured to repeatedly display an image including the device ID of the first device, or repeatedly display a second image sequence, wherein the second image sequence includes a plurality of consecutive synchronous images and an image including the device ID of the first device, and a display time period of a single frame image in the second image sequence includes a screen-on time period and a screen-off time period;
[0174] The parsing module also includes:
[0175] The second repeating unit is used to repeatedly display an image that at least includes the device ID of the second device, or to repeatedly display a third image sequence, wherein the third image sequence includes a plurality of consecutive synchronized images and an image that at least includes the device ID of the second device, and the display time period of a single frame image in the third image sequence includes a screen-on time period and a screen-off time period.
[0176] Optionally, the first display module includes:
[0177] A first display unit, configured to display the same image in multiple display areas of its own display screen, wherein the image displayed in each display area carries the number of the display area in which it is located;
[0178] A first processing unit, configured to receive display area indication information sent by the second device, where the display area indication information includes a target number carried by an image captured by the second device;
[0179] The second display unit is used to determine, according to the number, that a display area of an image to be subsequently displayed by itself is a display area of the target number.
[0180] Reference Figure 6 , shows a functional module diagram of an information transmission device provided in an embodiment of the present application, the information transmission device comprising:
[0181] The second display module 201 is used to display a first information image;
[0182] The third display module 202 is used to display a second information image when receiving a prompt message sent by the second device to request the next information. The prompt message indicates that the second device obtains the information contained in the first information image after capturing and analyzing the image through its own front image capture element.
[0183] Optionally, the first device further comprises a front image acquisition element, and the apparatus further comprises:
[0184] A second acquisition module, used to acquire the image displayed by the second device using its own front image acquisition element;
[0185] A second parsing module, used to parse the collected image to obtain information transmitted by the second device;
[0186] The prompt module is used to send a prompt message for requesting the next information to the second device when it is obtained through analysis that the information transmitted by the second device is repeated.
[0187] Optionally, the device further comprises:
[0188] The communication channel establishing module is used to establish a communication channel between the first device and the second device through the communication channel establishing method in the present application.
[0189] Optionally, when both the first device and the second device have a communication component supporting a target communication protocol, the second display module includes:
[0190] The connection auxiliary information display unit is used to display a first information image for describing connection auxiliary information, wherein the connection auxiliary information is used for the second device to connect to the first device based on the target communication protocol.
[0191] Optionally, when both the first device and the second device support an offline payment protocol, the second display module includes:
[0192] The offline payment image display unit is used to display an offline payment image used to describe the offline payment permission file of the first device, and the offline payment permission file is used by the second device to transfer virtual currency.
[0193] Optionally, the second display module includes:
[0194] The third repeating unit is used to repeatedly display the first information image, or repeatedly display a fourth image sequence, wherein the fourth image sequence includes a plurality of consecutive synchronous images and the first information image, and the display time period of a single frame image in the fourth image sequence includes a screen-on time period and a screen-off time period.
[0195] The third display module comprises:
[0196] The fourth repeating unit is used to repeatedly display the second information image, or repeatedly display the fifth image sequence, wherein the fifth image sequence includes a plurality of consecutive synchronous images and the second information image, and the display time period of a single frame image in the fifth image sequence includes a screen-on time period and a screen-off time period.
[0197] An embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the communication channel establishment method described in the embodiment, or the information transmission method described in the embodiment.
[0198] An embodiment of the present application also provides a computer-readable storage medium having a computer program / instruction stored thereon. When the computer program / instruction is executed by a processor, the communication channel establishment method described in the embodiment or the information transmission method described in the embodiment is implemented.
[0199] An embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the communication channel establishment method described in the embodiment, or the information transmission method described in the embodiment.
[0200] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0201] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, devices, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0202] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0203] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable terminal device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0205] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.
[0206] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0207] Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for establishing a communication channel, characterized in that: Applied to a first device, the first device having a display screen and a front image acquisition element, the method comprises: displaying an image including the device ID of the first device; Using its own front image acquisition element to acquire the image displayed by the second device; Parsing the captured image, and when the device ID of the second device is parsed, displaying an image at least including the device ID of the second device, and continuing to use its own front image acquisition element to capture the image displayed by the second device; The captured image is parsed, and when the device ID of the first device is parsed, it is determined that the communication channel between the first device and the second device is successfully established.
2. The method according to claim 1, characterized in that Before parsing the acquired image, it also includes: Using its own front image acquisition element to sense the screen-on time period of the single-frame image repeatedly displayed by the second device; According to the sensing result, the exposure time period of the front image acquisition element of the device is adjusted to overlap with the screen light time period; Analyze the collected images, including: The image acquired by its own front image acquisition element after adjusting the exposure time period is analyzed.
3. The method according to claim 1, characterized in that Before displaying the first device ID image, it also includes: When it is detected that a trigger button on the first device is pressed, triggering a communication channel establishment mode; or, In the case where both the first device and the second device have sensor elements, when the sensor element of the first device senses the sensor signal sent by the second device, a communication channel establishment mode is triggered, and the sensor element is: a touch element set on the display screen, and / or other sensor elements set in the first device.
4. The method according to claim 2, characterized in that: The single-frame image displayed by the second device is one of the multiple synchronous images in the first image sequence or an image containing the device ID of the second device, and the display time period of the single-frame image includes a screen-on time period and a screen-off time period; The front image acquisition element of the second device is used to sense the screen-on time period of the single-frame image repeatedly displayed by the second device, including: Using its own front image acquisition element to acquire and analyze each single frame image in the first image sequence repeatedly displayed by the second device; According to the sensing result, the exposure time period of the front image acquisition element is adjusted to overlap with the screen light time period, including: When it is analyzed that the single-frame image displayed by the second device is a synchronous image, estimating a screen-on time period of a next synchronous image; The exposure time period of its own front image acquisition element is adjusted to overlap with the bright screen time period of the next synchronous image.
5. The method according to claim 1, characterized in that Displaying an image including the device ID of the first device includes: repeatedly displaying an image including the device ID of the first device, or Repeatedly displaying a second image sequence, where the second image sequence includes a plurality of consecutive synchronous images and an image including the device ID of the first device, and a display time period of a single frame image in the second image sequence includes a screen-on time period and a screen-off time period; Displaying an image including at least the device ID of the second device includes: repeatedly displaying an image including at least the device ID of the second device, or A third image sequence is repeatedly displayed, wherein the third image sequence includes a plurality of consecutive synchronous images and an image at least including the device ID of the second device, and a display time period of a single frame image in the third image sequence includes a screen-on time period and a screen-off time period.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: The same image is displayed in multiple display areas of its own display screen, and the image displayed in each display area carries the number of the display area; receiving display area indication information sent by the second device, where the display area indication information includes a target number carried by an image captured by the second device; According to the number, it is determined that the display area of the image to be displayed subsequently is the display area of the target number.
7. The method according to any one of claims 1 to 6, characterized in that: The front image acquisition element is a fingerprint module arranged below the display screen.
8. The method according to any one of claims 1 to 7, characterized in that: At least one of the image including the device ID of the first device and the image including at least the device ID of the second device displayed by the first device is a pattern of a target coding type; The synchronous image displayed by the first device is a full white image or a high brightness image, and the brightness of the high brightness image is higher than the display brightness in the normal display mode.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the communication channel establishment method according to any one of claims 1-8.
10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instruction is executed by a processor, the communication channel establishment method described in any one of claims 1-8 is implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the communication channel establishment method described in any one of claims 1-8 is implemented.
Citation Information
Patent Citations
Connection establishment method, terminal and device
CN104540088A
Image collection method, terminal and computer storage medium
CN107948584A