Toy device pairing method and apparatus, toy device combination, electronic device, medium, and product
Patent Information
- Application Number
- CN202611060452.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]然而,玩具设备搭载的摄像头和处理器算力有限,二维码的识别需要对二维像素阵列进行复杂的定位、解码运算,运算量较大,易导致配对卡顿、失败,无法满足玩具设备配对的快速性、便捷性需求
[0084]上述玩具设备配对方法、装置、玩具设备组合、电子设备、计算机可读存储介质和计算机程序产品,对当前玩具设备的待配对玩具设备显示的彩色同步码进行识别,得到彩色同步码中的多个颜色单元格的颜色信息;根据各颜色单元格的颜色信息,确定待配对玩具设备的校验配置信息;根据校验配置信息,对待配对玩具设备显示的彩色传输码进行识别,得到彩色传输码中的多个颜色条的颜色信息;根据各颜色条的颜色信息,确定待配对玩具设备的设备认证信息;根据设备认证信息,确定当前玩具设备与待配对玩具设备的配对结果。相较于传统技术,一方面,本申请通过将包括多个颜色单元格的彩色同步码和包括多个颜色条的彩色传输码作为信息载体,在识别信息载体的过程中仅需要对颜色单元格和颜色条进行色彩判别与编码转换,无需依赖高复杂度的图像处理算法,能够降低整体运算量,避免由处理器性能不足引发的配对卡顿或失败问题,从而提升配对响应效率;另一方面,本申请采用的彩色同步码和彩色传输码仅需呈现简单的色块阵列,对玩具设备的显示精度和帧率要求较低,无需额外集成高规格显示组件,有利于控制玩具设备的硬件成本和运行功耗;再一方面,本申请先识别同步码以获取校验配置信息,再依据该校验配置对传输码进行解析,通过这种分级校验机制,当前玩具设备能够在正式提取设备认证信息之前校准色彩基准和解码规则,有利于减弱环境干扰对颜色识别准确性的影响,进而提高数据传输的可靠性和解码的准确性,实现玩具设备间的高效配对。
Smart Images

Figure CN122908951A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of toy communication pairing technology, and in particular to a toy device pairing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] In traditional technology, communication and pairing between toy devices typically uses QR code scanning. A QR code is a two-dimensional pixel array that stores information through a two-dimensional arrangement of black and white pixels. The current toy device scans and identifies the QR code containing information about the toy device to be paired, thus achieving pairing between the two.
[0003] However, the cameras and processors in toy devices have limited computing power. Recognizing QR codes requires complex positioning and decoding calculations on a two-dimensional pixel array, resulting in a large computational load and making pairing prone to stuttering and failure. This fails to meet the speed and convenience requirements of toy device pairing. Furthermore, the display modules of toy devices are typically simple and cannot support QR code display. Forcing the integration of QR code display functionality would increase the hardware cost and power consumption of the toy devices. Summary of the Invention
[0004] Therefore, it is necessary to provide a toy device pairing method, apparatus, toy device combination, electronic device, computer-readable storage medium, and computer program product to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for pairing toy devices, including:
[0006] The color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code;
[0007] Based on the color information of each color cell, determine the verification configuration information of the toy device to be paired;
[0008] Based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code;
[0009] Based on the color information of each of the color bars, determine the device authentication information of the toy device to be paired;
[0010] Based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined.
[0011] In one embodiment, the verification configuration information includes version information and identification configuration information;
[0012] The step of determining the verification configuration information of the toy device to be paired based on the color information of each color cell includes:
[0013] Determine the first color cell among the aforementioned color cells that is used to represent version information;
[0014] Based on the first mapping information and the color information of the first color cell, the version information corresponding to the first color cell is determined; the first mapping information represents the mapping relationship between color information and version information.
[0015] Based on the version information, determine the second mapping information corresponding to the other color cells besides the first color cell; the second mapping information represents the mapping relationship between color information and recognition configuration information;
[0016] The identification configuration information of the toy device to be paired is determined based on the second mapping information and the color information of the remaining color cells other than the first color cell.
[0017] In one embodiment, the step of identifying the color transmission code displayed by the toy device to be paired based on the verification configuration information, and obtaining the color information of multiple color bars in the color transmission code, includes:
[0018] The color transmission code displayed by the toy device to be paired is scanned to obtain a second color image;
[0019] The validity of the second color image is verified based on the identification configuration information.
[0020] If the second color image fails the validity verification, return to the step of scanning the color transmission code displayed by the toy device to be paired;
[0021] If the second color image passes the validity verification, color recognition is performed on the second color image to obtain the color information of multiple color bars in the color transmission code; the color information of the color bars is used to indicate the encoding result of the device authentication information represented by the color bars.
[0022] In one embodiment, the identification configuration information includes the target number of color bars for the color transmission code;
[0023] The step of validating the second color image based on the recognition configuration information includes:
[0024] Determine the total number of color bars included in the second color image;
[0025] If the total number is not equal to the number of target color bars, it is determined that the second color image has not passed the validity verification;
[0026] If the total number equals the number of target color bars, the second color image is determined to have passed the validity verification.
[0027] In one embodiment, the second mapping information includes first sub-mapping information; the first sub-mapping information represents the mapping relationship between color information and the number of target color bars;
[0028] The number of target color bars is obtained through the following steps:
[0029] Determine the second color cell in each of the aforementioned color cells that is used to represent the number of target color bars;
[0030] The number of target color bars for the color transmission code is determined based on the color information of the second color cell and the first sub-mapping information.
[0031] In one embodiment, the identification configuration information includes a check code for the color transmission code;
[0032] The step of validating the second color image based on the recognition configuration information includes:
[0033] Determine the verification value based on the remaining identification configuration information other than the verification code;
[0034] If the verification value does not match the verification code, it is determined that the second color image has failed the validity verification.
[0035] If the check value matches the check code, the second color image is determined to have passed the validity verification.
[0036] In one embodiment, the second mapping information includes second sub-mapping information; the second sub-mapping information represents the mapping relationship between color information and check code;
[0037] The verification code is obtained through the following steps:
[0038] Determine the third color cell in each of the aforementioned color cells that is used to represent the check code;
[0039] Based on the color information of the third color cell and the second sub-mapping information, a check code for the color transmission code is determined.
[0040] In one embodiment, the identification configuration information includes refresh interval information for the color transmission code;
[0041] The step of scanning the color transmission code displayed by the toy device to be paired to obtain a second color image includes:
[0042] The effective scanning time point is determined based on the refresh interval information for the color transmission code;
[0043] Based on the effective scanning time point, the color transmission code is scanned to obtain a second color image.
[0044] In one embodiment, the second mapping information includes third sub-mapping information; the third sub-mapping information represents the mapping relationship between color information and refresh interval information;
[0045] The refresh interval information is obtained through the following steps:
[0046] Determine the fourth color cell in each of the aforementioned color cells that is used to represent the refresh interval information;
[0047] Based on the color information of the fourth color cell and the third sub-mapping information, the refresh interval information for the color transmission code is determined.
[0048] In one embodiment, the step of identifying the color synchronization code displayed by the to-be-paired toy device of the current toy device to obtain color information of multiple color cells in the color synchronization code includes:
[0049] The color synchronization code displayed by the toy device to be paired with the current toy device is scanned to obtain the first color image;
[0050] Color recognition is performed on the first color image to obtain color information of multiple color cells in the color synchronization code; the color information of the color cells is used to indicate the encoding result of the verification configuration information represented by the color cells.
[0051] In one embodiment, the verification configuration information of the toy device to be paired includes the verification configuration information represented by each of the color cells;
[0052] The step of determining the verification configuration information of the toy device to be paired based on the color information of each color cell includes:
[0053] For each color cell, the information type corresponding to the current color cell is determined based on the third mapping information and the position of the current color cell in the color synchronization code; the third mapping information represents the mapping relationship between the position of the color cell in the color synchronization code and the information type.
[0054] Based on the information type and the color information of the current color cell, determine the verification configuration information represented by the current color cell.
[0055] In one embodiment, the device authentication information includes the identification information and pairing data of the toy device to be paired;
[0056] The step of determining the pairing result between the current toy device and the toy device to be paired based on the device authentication information includes:
[0057] The identity of the toy device to be paired is verified based on its identification information and pairing data.
[0058] If the toy device to be paired passes authentication, it is determined that the current toy device and the toy device to be paired have been successfully paired.
[0059] Secondly, this application also provides a toy device matching device, comprising:
[0060] The first identification module is used to identify the color synchronization code displayed by the toy device to be paired with the current toy device, and obtain the color information of multiple color cells in the color synchronization code;
[0061] The first determining module is used to determine the verification configuration information of the toy device to be paired based on the color information of each color cell;
[0062] The second identification module is used to identify the color transmission code displayed by the toy device to be paired according to the verification configuration information, and obtain the color information of multiple color bars in the color transmission code;
[0063] The second determining module is used to determine the device authentication information of the toy device to be paired based on the color information of each of the color bars;
[0064] The pairing module is used to determine the pairing result between the current toy device and the toy device to be paired based on the device authentication information.
[0065] Thirdly, this application also provides a toy device combination, including a first toy device and a second toy device, wherein the first toy device is paired with the second toy device according to the method provided in the first aspect, and the second toy device is paired with the first toy device according to the method provided in the first aspect.
[0066] Fourthly, this application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0067] The color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code;
[0068] Based on the color information of each color cell, determine the verification configuration information of the toy device to be paired;
[0069] Based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code;
[0070] Based on the color information of each of the color bars, determine the device authentication information of the toy device to be paired;
[0071] Based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined.
[0072] Fifthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0073] The color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code;
[0074] Based on the color information of each color cell, determine the verification configuration information of the toy device to be paired;
[0075] Based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code;
[0076] Based on the color information of each of the color bars, determine the device authentication information of the toy device to be paired;
[0077] Based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined.
[0078] Sixthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0079] The color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code;
[0080] Based on the color information of each color cell, determine the verification configuration information of the toy device to be paired;
[0081] Based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code;
[0082] Based on the color information of each of the color bars, determine the device authentication information of the toy device to be paired;
[0083] Based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined.
[0084] The aforementioned toy device pairing method, apparatus, toy device assembly, electronic device, computer-readable storage medium, and computer program product identify the color synchronization code displayed by the toy device to be paired with the current toy device, and obtain the color information of multiple color cells in the color synchronization code; determine the verification configuration information of the toy device to be paired based on the color information of each color cell; identify the color transmission code displayed by the toy device to be paired based on the verification configuration information, and obtain the color information of multiple color bars in the color transmission code; determine the device authentication information of the toy device to be paired based on the color information of each color bar; and determine the pairing result between the current toy device and the toy device to be paired based on the device authentication information. Compared to traditional technologies, this application, on the one hand, uses a color synchronization code comprising multiple color cells and a color transmission code comprising multiple color bars as information carriers. During the identification of these information carriers, only color discrimination and encoding conversion of the color cells and color bars are required, eliminating the need for highly complex image processing algorithms. This reduces the overall computational load and avoids pairing stutters or failures caused by insufficient processor performance, thereby improving pairing response efficiency. On the other hand, the color synchronization code and color transmission code used in this application only need to present a simple color block array, placing lower requirements on the display accuracy and frame rate of the toy device. This eliminates the need for additional high-specification display components, which helps control the hardware cost and power consumption of the toy device. Furthermore, this application first identifies the synchronization code to obtain verification configuration information, and then parses the transmission code based on this verification configuration. Through this hierarchical verification mechanism, the current toy device can calibrate the color reference and decoding rules before formally extracting device authentication information, which helps reduce the impact of environmental interference on color recognition accuracy, thereby improving the reliability of data transmission and the accuracy of decoding, and achieving efficient pairing between toy devices. Attached Figure Description
[0085] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0086] Figure 1 This is a diagram illustrating the application environment of a toy device pairing method in one embodiment;
[0087] Figure 2 This is a flowchart illustrating a toy device pairing method in one embodiment;
[0088] Figure 3 This is a schematic diagram of the arrangement of color synchronization codes in one embodiment;
[0089] Figure 4 This is a schematic diagram of the arrangement of color transmission codes in one embodiment;
[0090] Figure 5 This is a flowchart illustrating the color transmission code recognition step in one embodiment;
[0091] Figure 6 This is a flowchart illustrating a toy device pairing method in another embodiment;
[0092] Figure 7 This is a structural block diagram of a toy device pairing device in one embodiment;
[0093] Figure 8 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0094] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0095] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various objects, but these objects are not limited by these terms. These terms are only used to distinguish the first object from the second object. The term "comprising" and any variations thereof, as used in this application, are intended to cover non-exclusive inclusion. The term "multiple" as used in this application refers to two or more.
[0096] In some embodiments, the toy device pairing method provided in this application can be applied to electronic devices equipped with image acquisition components. The electronic device can refer to any device including a memory, such as a terminal. The terminal can be, but is not limited to, various terminals equipped with image acquisition components, such as toy devices equipped with image acquisition components. The image acquisition component can include a camera unit and a processing unit. The camera unit can be, but is not limited to, various cameras with image acquisition capabilities, such as monocular cameras and binocular cameras. The processing unit can be, but is not limited to, a microcontroller unit (MCU), a dedicated ISP (Image Signal Processor), and a low-power embedded microprocessor.
[0097] In one exemplary embodiment, such as Figure 2 As shown, a toy device pairing method is provided, which is applied to Figure 1 Taking a toy device (from the device) as an example, the method includes the following steps:
[0098] Step S201: Identify the color synchronization code displayed by the toy device to be paired with the current toy device, and obtain the color information of multiple color cells in the color synchronization code.
[0099] Among them, the toy device to be paired with the current toy device can refer to the toy device that will soon be paired with the current toy device (e.g., Figure 1 Toy devices (e.g., slave devices) that are paired with slave devices. Figure 1 (The host shown). A color synchronization code can refer to a two-dimensional color-coded graphic composed of multiple color cells arranged in a preset matrix. A color cell can refer to the smallest coloring unit that constitutes the color synchronization code, and each color cell is evenly distributed in a two-dimensional array in space. The color information of a color cell can refer to the encoded data corresponding to the specific color identified from the color cell (for example, red corresponds to the hexadecimal "2").
[0100] For example, such as Figure 1 As shown, in two toy devices that need to be paired, the current toy device can act as the slave device, and the toy device to be paired with the current toy device can act as the master device. During the actual identification process, the toy device to be paired can display a color synchronization code or a color transmission code through its color display component. Since the color synchronization code and the color transmission code differ structurally, the current toy device can quickly distinguish between them using its image acquisition component. If the current toy device determines that the toy device to be paired is displaying a color synchronization code, the current toy device can identify the color synchronization code through its image acquisition component, obtaining the color information of multiple color cells within the color synchronization code.
[0101] In one specific implementation of this embodiment, the color synchronization code is a grid consisting of four color cells, where adjacent cells in the left and right columns on the same horizontal direction are configured to have different colors, such as... Figure 3 As shown; the color transmission code consists of N color bars, each arranged vertically, with no color transitions in the same horizontal direction, such as... Figure 4 As shown. Based on this, in the actual identification process, if the current toy device detects a color jump in the display content of the toy device to be paired in the same horizontal direction, the current toy device can determine that the toy device to be paired is displaying a color synchronization code.
[0102] Step S202: Determine the verification configuration information of the toy device to be paired based on the color information of each color cell.
[0103] The verification configuration information of the toy device to be paired may refer to the configuration information used to guide the subsequent color transmission code parsing process.
[0104] For example, the current toy device can first acquire the color information of each color cell in the color synchronization code and the position of each color cell in the color synchronization code through its image acquisition component. Then, based on the position of each color cell in the color synchronization code, it determines the information type corresponding to each color cell. The information type is also the category of the verification configuration information represented by the color cell, such as version number, private information, refresh interval information, and verification information. For each color cell, if the information type corresponding to the current color cell is refresh interval information, then based on the color-configuration mapping relationship associated with the refresh interval information, the refresh interval information corresponding to the color information of the current color cell is determined (e.g., the color bar in the color transmission code refreshes every 10 seconds). This refresh interval information is also the verification configuration information represented by the current color cell.
[0105] Step S203: Based on the verification configuration information, identify the color transmission code displayed by the to-be-paired toy device to obtain the color information of multiple color bars in the color transmission code.
[0106] Among them, color transmission code can refer to a color linear encoded graphic composed of multiple color bars arranged sequentially along a one-dimensional direction, such as... Figure 4 As shown. A color bar can refer to the smallest coloring unit that constitutes a color transmission code, and each color bar is arranged linearly in one dimension in space, with the length and height of each color bar being consistent and the spacing between each color bar being fixed. The color information of the color bar can refer to the encoded data corresponding to the specific color identified from the color bar (for example, blue corresponds to the hexadecimal "4").
[0107] For example, the current toy device can use its image acquisition component to first perform preliminary recognition of the color transmission code displayed by the toy device to be paired, and then verify the validity of the preliminary recognition result according to the verification configuration information. If the preliminary recognition result passes the validity verification, the current toy device can use its image acquisition component to first obtain the specific colors of multiple color bars in the color transmission code based on the preliminary recognition result, and then, according to the pre-established mapping relationship between specific colors and encoded data (for example, black corresponds to the hexadecimal value "0", white corresponds to the hexadecimal value "1", red corresponds to the hexadecimal value "2", green corresponds to the hexadecimal value "3", blue corresponds to the hexadecimal value "4", and yellow corresponds to the hexadecimal value "5"), map the specific colors of each color bar to encoded data, that is, obtain the color information of each color bar. The spacing between each color bar can be set to 0.5 to 1 times the width of the color bar, which can ensure that the camera in the image acquisition component can quickly identify each color bar when scanning the color transmission code.
[0108] Step S204: Determine the device certification information of the toy device to be paired based on the color information of each color bar.
[0109] Among them, the device certification information of the toy device to be paired can refer to the core data related to the identity and security certification of the toy device to be paired, which can be used to identify and verify the legitimate identity of the toy device to be paired.
[0110] For example, the color transmission code includes three color bars, whose specific colors are "red," "red," and "white" in sequence, i.e., their color information is "2," "2," and "1" in sequence; the device authentication information is the MAC (Media Access Control) address. The current toy device can use its image acquisition component to first determine, based on the color information of each color bar in the color transmission code and the position of each color bar within the code, that the set of color information formed by the color bars is "221," which is the hexadecimal representation of the MAC address of the toy device to be paired. Subsequently, since MAC addresses are usually represented in hexadecimal, for ease of authentication, the current toy device can use its image acquisition component to convert this hexadecimal representation to hexadecimal representation: 221 (hexadecimal) = 0x55 (hexadecimal).
[0111] In one specific implementation of this embodiment, the total number of color bars included in the color transmission code can be flexibly varied. Specifically, if a color bar includes 40 pixels, and the display screen of the toy device to be paired for displaying the color transmission code has dimensions of width * height = 320 * 240 (unit: pixels), and the color bars in the color transmission code are arranged sequentially along the height direction of the display screen, then the display screen of the toy device to be paired can display 240 / 40 = 6 color bars.
[0112] Step S205: Determine the pairing result between the current toy device and the toy device to be paired based on the device authentication information.
[0113] The pairing result between the current toy device and the toy device to be paired can include whether the current toy device and the toy device to be paired are successfully paired.
[0114] For example, the current toy device can use its image acquisition component to verify the communication link and interaction data between the current toy device and the toy device to be paired, and determine whether the current toy device and the toy device to be paired meet the target pairing conditions based on the verification results; if they meet the conditions, it can be determined that the current toy device and the toy device to be paired are successfully paired; otherwise, the pairing fails.
[0115] In the above toy device pairing method, the color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code; based on the color information of each color cell, the verification configuration information of the toy device to be paired is determined; based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code; based on the color information of each color bar, the device authentication information of the toy device to be paired is determined; based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined. Compared to traditional technologies, this embodiment offers several advantages. First, by using a color synchronization code comprising multiple color cells and a color transmission code comprising multiple color bars as information carriers, the process of identifying these information carriers only requires color discrimination and encoding conversion of the color cells and color bars. This eliminates the need for highly complex image processing algorithms, reducing overall computational load and avoiding pairing stutters or failures caused by insufficient processor performance, thereby improving pairing response efficiency. Second, the color synchronization code and color transmission code used in this embodiment only need to present a simple color block array, placing lower requirements on the display accuracy and frame rate of the toy device. This eliminates the need for additional high-specification display components, helping to control the hardware cost and power consumption of the toy device. Third, this embodiment first identifies the synchronization code to obtain verification configuration information, and then parses the transmission code based on this verification configuration. Through this hierarchical verification mechanism, the toy device can calibrate its color reference and decoding rules before formally extracting device authentication information. This helps to reduce the impact of environmental interference on color recognition accuracy, thereby improving the reliability of data transmission and the accuracy of decoding, and achieving efficient pairing between toy devices.
[0116] In an exemplary embodiment, the verification configuration information includes version information and identification configuration information. Step S202, determining the verification configuration information of the toy device to be paired based on the color information of each color cell, may include:
[0117] Identify the first color cell in each color cell that represents version information; determine the version information corresponding to the first color cell based on the first mapping information and the color information of the first color cell; the first mapping information represents the mapping relationship between color information and version information; determine the second mapping information corresponding to the remaining color cells other than the first color cell based on the version information; the second mapping information represents the mapping relationship between color information and identification configuration information; determine the identification configuration information of the toy device to be paired based on the second mapping information and the color information of the remaining color cells other than the first color cell.
[0118] For example, the color information of a color cell refers to the encoded data corresponding to the specific color of the color cell (e.g., black → color information "0", white → color information "1", red → color information "2", green → color information "3", blue → color information "4", yellow → color information "5"). Version information is the version number. The first mapping information is a color information-version number mapping table (e.g., color information "0" → version number "0", color information "1" → version number "1", color information "2" → version number "2", color information "3" → version number "3", color information "4" → version number "4", color information "5" → version number "5), which can represent the mapping relationship between color information and version number. Identification configuration information includes private information, refresh interval information, and verification information. The second mapping information includes a color information-private information mapping table, a color information-refresh interval information mapping table (e.g., color information "0" → refresh interval information "the color bar in the color transmission code refreshes every 5 seconds", color information "1" → "the color bar in the color transmission code refreshes every 10 seconds", color information "2" → "the color bar in the color transmission code refreshes every 20 seconds", color information "3" → "the color bar in the color transmission code refreshes every 30 seconds", color information "4" → "the color bar in the color transmission code refreshes every 40 seconds", color information "5" → "the color bar in the color transmission code refreshes every 1 minute"), and a color information-verification information mapping table.
[0119] In one specific implementation of this embodiment, the current toy device can, through its image acquisition component, first identify the first color cell in the color synchronization code located at a fixed anchor point (e.g., the upper left corner) and its specific color as black, according to preset position configuration information (e.g., the first color cell representing version information is located at the upper left corner of the color synchronization code). Since black corresponds to the hexadecimal value "0", the color information of the first color cell is 0. Subsequently, the current toy device can, through its image acquisition component, first index the color information-version number mapping table according to the color information "0" to determine that the version number corresponding to the first color cell is 0. Different version numbers correspond to different color information-recognition configuration information mapping tables. Next, for the other color cells besides the first color cell, for example... Figure 3 As shown in color cell 3, the current toy device can use its image acquisition component to call the color information-refresh interval information mapping table corresponding to version number 0, and index the color information "5" of color cell 3 in the color information-refresh interval information mapping table to determine that the refresh interval information represented by the first color cell is "the color bar in the color transmission code is refreshed once every 1 minute".
[0120] In this embodiment, the version number is quickly determined based on the color of the first color cell at a fixed anchor point in the color synchronization code. The corresponding mapping table is then dynamically called based on the version number. This mapping table is used to parse the remaining color cells in the color synchronization code, excluding the first color cell. This approach ensures rapid location while enabling smooth iteration of the synchronization code version and flexible expansion of configuration information, effectively improving decoding efficiency and robustness in multi-version compatibility scenarios.
[0121] In one exemplary embodiment, such as Figure 5 As shown, in step S203, the color transmission code displayed by the to-be-paired toy device is identified according to the verification configuration information to obtain the color information of multiple color bars in the color transmission code, which may include:
[0122] Step S501: Scan the color transmission code displayed on the toy device to be paired to obtain a second color image.
[0123] For example, the current toy device can use its image acquisition component (e.g., the toy device's camera) to align with the color transmission code displayed on the display area of the toy device to be paired. When the color transmission code in the image is detected to be complete and in focus, the current toy device can use the image acquisition component to capture the current frame as a second color image.
[0124] Step S502: Verify the validity of the second color image based on the recognition configuration information.
[0125] For example, identifying configuration information can characterize configuration requirements such as the number of color bars for a color transmission code (e.g., the target number of color bars for a color transmission code is 8), refresh rate, etc.
[0126] In one specific implementation of this embodiment, the current toy device can use its image acquisition component (e.g., a processor built into the toy device) to locate the areas where each color bar in the second color image is located and count the total number of color bars. If the total number meets the configuration requirements related to the number of color bars in the recognition configuration information, then the second color image is determined to have passed the validity verification. If the total number does not meet the configuration requirements related to the number of color bars in the recognition configuration information, then the second color image is determined to have failed the validity verification.
[0127] Step S503: If the second color image fails the validity verification, return to the step of scanning the color transmission code displayed on the toy device to be paired.
[0128] For example, if it is determined that the second color image fails the validity verification, the current toy device can restart the camera and return to step S501, that is, continue to scan the color transmission code displayed by the toy device to be paired with the camera until an image that can pass the validity verification is obtained, and then step S504 is executed.
[0129] Step S504: If the second color image passes the validity verification, perform color recognition on the second color image to obtain the color information of multiple color bars in the color transmission code; the color information of the color bars is used to indicate the encoding result of the device authentication information represented by the color bars.
[0130] For example, if the second color image passes the validity verification, the current toy device enters the color bar decoding stage. Specifically, the current toy device can use its image acquisition component (e.g., the low-power processor built into the current toy device) to first identify multiple color bars in the second color image and determine the specific color of each color bar (e.g., black, red, and blue). Then, based on the pre-established mapping relationship between specific colors and encoded data (e.g., black corresponds to the hexadecimal value "0", white corresponds to the hexadecimal value "1", red corresponds to the hexadecimal value "2", green corresponds to the hexadecimal value "3", blue corresponds to the hexadecimal value "4", and yellow corresponds to the hexadecimal value "5"), the specific color of each color bar is mapped to encoded data, that is, the color information of each color bar is obtained.
[0131] In one specific implementation of this embodiment, a color bar is used as an example for explanation. Specifically, if the toy device determines that the specific color of the color bar is red through a low-power processor, then according to the pre-established mapping relationship between specific colors and encoded data, red corresponds to the hexadecimal number "2". Therefore, the encoded data of the color bar is 2, that is, the color information of the color bar is "5".
[0132] In this embodiment, by verifying the validity of the second color image, the anti-interference capability and pairing success rate of color transmission code recognition can be improved. Moreover, the encoding and mapping method based on the color sequence can ensure that the device authentication information of the toy device to be paired can be efficiently and accurately transmitted to the current toy device.
[0133] In an exemplary embodiment, the identification configuration information includes the target number of color bars for the color transmission code. Step S502, verifying the validity of the second color image based on the identification configuration information, may include:
[0134] Determine the total number of color bars included in the second color image; if the total number is not equal to the target number of color bars, determine that the second color image has failed the validity verification; if the total number is equal to the target number of color bars, determine that the second color image has passed the validity verification.
[0135] For example, the current toy device can use its image acquisition component to first perform a color bar segmentation operation on the second color image according to preset color bar specification information (such as color bar height and color bar width) to identify the edge contours of each color bar, thereby determining the total number of color bars included in the second color image. Subsequently, the current toy device can use its image acquisition component to obtain the target number of color bars from the identification configuration information, and then compare the total number of color bars included in the second color image with the target number of color bars. If the total number equals the target number of color bars, the second color image is determined to have passed the validity verification; if the total number does not equal the target number of color bars, the second color image is determined to have failed the validity verification.
[0136] In this embodiment, by comparing the actual total number with the number of target color bars obtained from the color synchronization code parsing, invalid images caused by damage or occlusion can be quickly filtered out with low memory usage and computational overhead in the decoding pre-stage of the color transmission code, thereby significantly improving the overall throughput efficiency of the decoding process.
[0137] In an exemplary embodiment, the second mapping information includes first sub-mapping information; the first sub-mapping information represents the mapping relationship between color information and the target number of color bars. The target number of color bars can be obtained through the following steps:
[0138] Determine the second color cell in each color cell to represent the number of target color bars; based on the color information of the second color cell and the first sub-mapping information, determine the number of target color bars for the color transmission code.
[0139] For example, the current toy device can first use its image acquisition component to index the position-information type mapping table according to the position of each color cell in the color synchronization code to determine the information type (e.g., version number, private information (which may carry the target number of color bars for the color transmission code), refresh interval information, verification information) of each color cell. Based on this, the current toy device can use its image acquisition component to determine the second color cell representing the target number of color bars in each color cell, and determine that the color information of the second color cell is "5". Subsequently, the current toy device can use its image acquisition component to index the color information-private information mapping table according to the color information of the second color cell being "5", thereby determining that the private information represented by the second color cell is "the target number of color bars for the color transmission code is 3".
[0140] In this embodiment, a two-level mapping mechanism is used to decouple the information type from the number of target color bars for the color transmission code through position and color, respectively. This enables the flexible carrying of various private information within a limited number of color cells and simplifies the recognition logic of current toy devices.
[0141] In an exemplary embodiment, the identification configuration information includes a check code for the color transmission code. Step S502, verifying the validity of the second color image based on the identification configuration information, may include:
[0142] Based on the remaining identification configuration information excluding the check code, a check value is determined; if the check value and the check code are inconsistent, the second color image is determined to have failed the validity verification; if the check value and the check code are consistent, the second color image is determined to have passed the validity verification.
[0143] For example, the current toy device can use its image acquisition component to concatenate the remaining identification configuration information (such as version number, private information, refresh interval information, and encoding format) into a binary data stream in a predetermined order, except for the checksum. A preset verification algorithm (such as CRC-16, MD5 truncation, or XOR checksum) is then used to calculate the checksum value from this data stream. Subsequently, the toy device can use its image acquisition component to obtain the checksum for the color transmission code from the identification configuration information and compare the calculated checksum value with the checksum. If the two do not match, it indicates that the second color image may have been tampered with or damaged during transmission or decoding, and in this case, it can be determined that the second color image has not passed the validity verification. If the two match, it indicates that the identification configuration information is complete and correct, and in this case, it can be determined that the second color image has passed the validity verification.
[0144] In this embodiment, the use of a check code for validity verification enables the rapid interception of abnormal images during the decoding pre-stage, effectively ensuring the data integrity and anti-interference capability of the color transmission code.
[0145] In an exemplary embodiment, the second mapping information includes second sub-mapping information; the second sub-mapping information represents the mapping relationship between color information and the check code. The check code can be obtained through the following steps:
[0146] Determine the third color cell in each color cell that represents the check code; based on the color information of the third color cell and the second sub-mapping information, determine the check code for the color transmission code.
[0147] For example, the current toy device can first use its image acquisition component to index the position-information type mapping table according to the position of each color cell in the color synchronization code to determine the information type (e.g., version number, private information, refresh interval information, verification information) of each color cell. Based on this, the current toy device can use its image acquisition component to determine the third color cell used to represent the verification code in each color cell, and determine that the color information of the third color cell is "4". Subsequently, the current toy device can use its image acquisition component to index the color information-verification information mapping table according to the color information of the third color cell being "4", thereby determining that the verification information represented by the third color cell is "the hexadecimal parity check code for the color transmission code is 0".
[0148] In this embodiment, the third color cell used to represent the check code can be quickly located through the location-information type mapping table. Based on the color information of the third color cell, the check code can be quickly obtained by indexing the color information-check information mapping table. This enables data integrity verification to be completed with extremely low computational overhead, effectively improving the anti-tampering capability of the color transmission code.
[0149] In an exemplary embodiment, the identification configuration information includes refresh interval information for the color transmission code. Step S501, scanning the color transmission code displayed by the to-be-paired toy device to obtain a second color image, may include:
[0150] Based on the refresh interval information for the color transmission code, the effective scanning time point is determined; based on the effective scanning time point, the color transmission code is scanned to obtain the second color image.
[0151] For example, the current toy device can first obtain the refresh interval information for the color transmission code from the identification configuration information through its image acquisition component (e.g., a low-power processor), and then calculate one or more valid scanning time points based on the current system time and the refresh interval information. After determining the valid scanning time points, the current toy device can trigger a capture operation on the color transmission code displayed by the toy device to be paired at the valid scanning time points through its image acquisition component (e.g., a low-power camera) to obtain a second color image.
[0152] In this embodiment, the effective scanning time point is dynamically calculated based on the refresh interval information, and the snapshot is triggered at the effective scanning time point. This can avoid the color aliasing problem caused by cross refresh cycles, thereby improving the accuracy of low computing power devices in collecting dynamic color codes and the success rate of decoding.
[0153] In an exemplary embodiment, the second mapping information includes third sub-mapping information; the third sub-mapping information represents the mapping relationship between color information and refresh interval information. The refresh interval information can be obtained through the following steps:
[0154] Determine the fourth color cell in each color cell to represent the refresh interval information; based on the color information of the fourth color cell and the third sub-mapping information, determine the refresh interval information for the color transmission code.
[0155] For example, the current toy device can use its image acquisition component to first index the position-information type mapping table according to the position of each color cell in the color synchronization code to determine the information type (e.g., version number, private information (which can carry the number of target color bars for the color transmission code), refresh interval information, verification information) of each color cell. Based on this, the current toy device can use its image acquisition component to determine the fourth color cell in each color cell that represents the refresh interval information, and determine the color information of the fourth color cell as "3". Subsequently, the current toy device can use its image acquisition component to index the color information of the fourth color cell as "3" in the color information-refresh interval information mapping table (e.g., color information "0" → refresh interval information "the color bar in the color transmission code refreshes every 5 seconds", color information "1" → "the color bar in the color transmission code refreshes every 10 seconds", color information "2" → "the color bar in the color transmission code refreshes every 20 seconds", color information "3" → "the color bar in the color transmission code refreshes every 30 seconds", color information "4" → "the color bar in the color transmission code refreshes every 40 seconds", color information "5" → "the color bar in the color transmission code refreshes every 1 minute"), thereby determining that the private information represented by the fourth color cell is "the color bar in the color transmission code refreshes every 30 seconds".
[0156] In this embodiment, the color information of the color cell is directly converted into a specific refresh cycle parameter through the color information-refresh interval information mapping table, without the need for additional parsing calculations. This reduces the processor load and is especially suitable for toy device pairing scenarios with limited computing resources.
[0157] In an exemplary embodiment, step S201, identifying the color synchronization code displayed by the to-be-paired toy device of the current toy device to obtain color information of multiple color cells in the color synchronization code, may include:
[0158] The color synchronization code displayed by the toy device to be paired with the current toy device is scanned to obtain a first color image; color recognition is performed on the first color image to obtain the color information of multiple color cells in the color synchronization code; the color information of the color cells is used to indicate the encoding result of the verification configuration information represented by the color cells.
[0159] For example, the image acquisition component on the current toy device (i.e., the slave device) may include a camera unit and a processing unit; the camera unit may be a low-power camera; the processing unit may be a low-power processor. The color display component on the toy device to be paired (i.e., the master device) may be a display screen capable of displaying color graphics. Here, the low-power camera and low-power processor refer to a camera and processor with limited computing power. In the actual pairing process, the toy device to be paired may first display a color synchronization code on its display screen. Subsequently, the current toy device can focus on and capture an image of the display screen of the toy device to be paired using the low-power camera, obtaining a first color image containing the color synchronization code. Next, the current toy device, through its low-power processor, performs cropping processing on the first color image to remove useless background areas and parses the RGB (Red, Green, Blue) color data of the remaining image area, thereby distinguishing multiple color cells in the color synchronization code and determining the specific color of each color cell. Then, the current toy device, through its low-power processor, maps the specific color of each color cell to the encoded data according to the pre-established mapping relationship between specific colors and encoded data (for example, black corresponds to the hexadecimal value "0", white corresponds to the hexadecimal value "1", red corresponds to the hexadecimal value "2", green corresponds to the hexadecimal value "3", blue corresponds to the hexadecimal value "4", and yellow corresponds to the hexadecimal value "5"), thus obtaining the color information of each color cell.
[0160] In one specific implementation of this embodiment, a particular color cell is used as an example for explanation. Specifically, if the current toy device determines that the specific color of the color cell is yellow through a low-power processor, then according to the pre-established mapping relationship between specific colors and encoded data, yellow corresponds to the hexadecimal number "5". Therefore, the encoded data of the color cell is 5, that is, the color information of the color cell is "5".
[0161] In this embodiment, by adopting a color step-by-step encoding and decoding mechanism, the computational burden in the pairing process is greatly transferred to the simple color discrimination and encoding mapping stage, so that toy devices equipped with low computing power cameras and low computing power processors can also complete pairing stably and efficiently, thereby avoiding the problem of lag or failure caused by insufficient computing power in the recognition process.
[0162] In an exemplary embodiment, the verification configuration information of the toy device to be paired includes verification configuration information represented by each color cell. Step S202, determining the verification configuration information of the toy device to be paired based on the color information of each color cell, may include:
[0163] For each color cell, the information type corresponding to the current color cell is determined based on the third mapping information and the position of the current color cell in the color synchronization code; the third mapping information represents the mapping relationship between the position of the color cell in the color synchronization code and the information type; based on the information type and the color information of the current color cell, the verification configuration information represented by the current color cell is determined.
[0164] For example, the third mapping information is a position-information type mapping table, which can characterize the mapping relationship between the position of the color cell in the color synchronization code and the information type. In the actual recognition process, the current toy device can use its image acquisition component to first identify the target color cell (e.g., the upper left corner) in the color synchronization code at a fixed anchor point position (e.g., the upper left corner) according to a pre-set physical positioning configuration. Figure 3 The target color cell (cell 1) is identified, and its specific color is mapped to a version number. Subsequently, the toy device, through its image acquisition component, determines the total number of color cells included in the location-information type mapping table and the color synchronization code based on this version number. Next, for each color cell in the color synchronization code other than the target color cell, the toy device, through its image acquisition component, indexes the current color cell in the location-information type mapping table according to its position in the color synchronization code to determine the information type (e.g., version number, private information, refresh interval information, verification information) of the current color cell. Then, based on the specific color of the current color cell and the information type it belongs to, the verification configuration information represented by the current color cell is determined.
[0165] In one specific implementation of this embodiment, the current toy device identifies the version number as "0", thereby determining that the color synchronization code is a grid consisting of four color cells, and determining its position-information type mapping table specifically as follows: "the information type corresponding to the top left color cell 1 is the version number, the information type corresponding to the top right color cell 2 is private information, the information type corresponding to the bottom left color cell 3 is refresh interval information, and the information type corresponding to the bottom right color cell 4 is verification information," such as... Figure 3 As shown. The private information can carry the target number of color bars for the color transmission code. Then, for each color cell in color cell 2, color cell 3, and color cell 4, for example, color cell 3, the current toy device can first identify the specific color of color cell 3 as white through its image acquisition component. Since white corresponds to the hexadecimal value "1", the color information of color cell 3 is "1". Then, based on the color information "1" and the decoding configuration corresponding to the information type "refresh interval information" (for example, color information "0" corresponds to "the color bars in the color transmission code refresh every 5 seconds", color information "1" corresponds to "the color bars in the color transmission code refresh every 10 seconds", and color information "2" corresponds to "the color bars in the color transmission code refresh every 20 seconds"), the verification configuration information represented by color cell 3 is determined to be "the color bars in the color transmission code refresh every 10 seconds".
[0166] In another specific implementation of this embodiment, if the current toy device identifies version number "1", then the color synchronization code is determined to include 9 color cells, presented as a 3×3 grid. If the current toy device identifies version number "2", then the color synchronization code is determined to include 16 color cells, presented as a 4×4 grid. The number of cells and decoding configuration of the color synchronization code are determined by the version number, facilitating future iterations and upgrades.
[0167] In this embodiment, by using position-type mapping and color-value conversion, the refresh interval information and other verification configuration information are quickly parsed out, providing a standardized configuration basis for subsequent color bar decoding.
[0168] In an exemplary embodiment, the device authentication information includes the identification information and pairing data of the toy device to be paired. Step S205, determining the pairing result between the current toy device and the toy device to be paired based on the device authentication information, may include:
[0169] Based on the identification information and pairing data of the toy device to be paired, the toy device to be paired is authenticated; if the toy device to be paired passes the authentication, it is determined that the current toy device and the toy device to be paired have been successfully paired.
[0170] For example, the current toy device can first obtain the identity information and pairing data of the toy device to be paired from the device authentication information through its image acquisition component. Then, based on a locally pre-stored list of legitimate devices, it uses the identity information (e.g., MAC address) and pairing data of the toy device to be paired to authenticate the toy device. For example, by determining whether the MAC address of the toy device to be paired is in the whitelist and whether the key or verification code in the pairing data of the toy device to be paired matches, it can determine whether the toy device to be paired has passed authentication. Subsequently, if the toy device to be paired has passed authentication, the current toy device can determine that the current toy device and the toy device to be paired have successfully paired and record the pairing status; if the toy device to be paired has failed authentication, the current toy device can determine that the current toy device and the toy device to be paired have failed to pair.
[0171] In this embodiment, by performing dual verification on the identification information and pairing data of the toy device to be paired, it is possible to effectively prevent illegal or unauthorized devices from accessing the device, thereby improving the security and reliability of the pairing process and ensuring that only legitimate devices can successfully establish a connection.
[0172] In related technologies, QR code scanning is commonly used for communication and pairing between toys. This method uses the ordered arrangement of black and white pixels on a two-dimensional plane, employing the position and shape of geometric shapes to represent the bit stream of "0" and "1", thereby encoding and storing information. QR codes have advantages such as high encoding density and strong fault tolerance, and are therefore widely used in general pairing scenarios.
[0173] However, in the toy industry, especially in toys designed for low cost and miniaturization, the aforementioned technical solutions have significant shortcomings. Firstly, such toys typically only have simple cameras and low-power processors, with extremely limited computing resources. The QR code recognition process requires complex positioning, distortion correction, grid division, and decoding operations on a two-dimensional pixel array, resulting in a large computational load and potentially causing pairing delays or even failures, failing to meet the actual needs for speed and convenience in toy pairing. Secondly, toy display modules are often quite simple, typically only capable of displaying simple graphics or characters, unable to support the fine pixel-level display content required for QR codes. Forcing the integration of QR code display functionality into toys necessitates increasing the display resolution and adding driving circuitry, significantly raising hardware costs and overall power consumption, contradicting the toy industry's design philosophy of low cost and low power consumption.
[0174] In this regard, in one exemplary embodiment, such as Figure 6As shown, a toy device pairing method is also provided, which can be applied to a toy device combination. The toy device combination includes a first toy device and a second toy device. Bidirectional master-slave pairing is supported between the first and second toy devices. If the first toy device is designated as the current toy device (slave device), the second toy device becomes the toy device to be paired with the current toy device (master device); conversely, if the second toy device is designated as the current toy device (slave device), the first toy device becomes the toy device to be paired with the current toy device (master device). Both scenarios can achieve bidirectional pairing interaction between the first and second toy devices by executing the following steps S601 to S608.
[0175] Step S601: Determine the six-color hexadecimal mapping relationship.
[0176] In this example, the toy device to be paired can select six colors—black, white, red, green, blue, and yellow—as its coded color set. These six colors are mapped to the hexadecimal numbers 0, 1, 2, 3, 4, and 5, respectively, forming a six-color hexadecimal mapping relationship: black → 0, white → 1, red → 2, green → 3, blue → 4, and yellow → 5. The RGB color data for each color is set to a fixed value, i.e., the hexadecimal value mentioned above.
[0177] Step S602: Generate a color synchronization code.
[0178] In this example, such as Figure 3 As shown, the color synchronization code for the toy device to be paired is in a 2x2 grid format, meaning the color synchronization code consists of 4 color cells. The specific configuration information for these 4 color cells is as follows:
[0179] The color cell 1, located in the top left corner of the grid, represents the version number. The version number determines the total number of color cells in the color synchronization code and the mapping rules for the remaining color cells (excluding color cell 1), facilitating subsequent iterative upgrades. Different version numbers use different capacities for the color synchronization code. For example, in this example, the version number is 0, so the color synchronization code uses a grid with 4 color cells. For another example, with version number 1, the color synchronization code can be expanded to a 9x9 grid with 9 color cells; with version number 2, the color synchronization code can be expanded to a 16x16 grid with 16 color cells.
[0180] Color cell 2, located in the upper right corner of the grid, represents private information. This private information can carry the target number of color bars for the color transmission code. The target number of color bars represents the total number of color bars that the color transmission code needs to include. The toy device to be paired can encode the target number of color bars into a hexadecimal value, and then map this hexadecimal value to a specific color, so that color cell 2 displays that specific color. For example, in this example, the target number of color bars is 3. The toy device to be paired encodes this target number of color bars to obtain the hexadecimal value "5"; then, according to the six-color hexadecimal mapping relationship, the hexadecimal value "5" is mapped to yellow, so the display color of color cell 2 is set to yellow.
[0181] Color cell 3, located in the lower left corner of the grid, represents the refresh interval information. The refresh interval indicates how often the color bars in the color transmission code are refreshed. The toy device to be paired can encode the refresh interval information into a hexadecimal value, and then map this hexadecimal value to a specific color, causing color cell 3 to display that specific color. For example, in this example, the refresh interval information is that the color bars in the color transmission code refresh every 10 seconds. The toy device to be paired encodes this target number of color bars into a hexadecimal value "1"; then, according to the six-color hexadecimal mapping relationship, the hexadecimal value "1" is mapped to white, so the display color of color cell 3 is set to white.
[0182] Color cell 4, located in the bottom right corner of the grid, is used to represent check information. This check information can refer to a parity check code, used to prevent misidentification. The toy device to be paired encodes the parity check code into a hexadecimal value, and then maps this hexadecimal value to a specific color, causing color cell 4 to display that specific color. For example, in this example, the parity check code is 0. The toy device to be paired encodes this parity check code to obtain the hexadecimal value "0"; then, according to the six-color hexadecimal mapping relationship, the hexadecimal value "0" is mapped to black, so the display color of color cell 4 is set to black.
[0183] It should be noted that in order for the camera of the current toy device to be able to identify color cell 1 in the color synchronization code at a glance, the adjacent color cells in the color synchronization code cannot be set to the same color. Based on the color change characteristics of the color synchronization code, it is easy to locate color cell 1.
[0184] Step S603: Convert the device authentication information of the toy device to be paired into a hexadecimal value.
[0185] In this example, the device authentication information of the toy device to be paired may include the MAC address of the toy device to be paired, pairing data, etc. In this example, the MAC address of the toy device to be paired is 0x55. The toy device to be paired can convert 0x55 to hexadecimal and represent it in MSB format, specifically: 0x55 (hexadecimal) = 85 (decimal), 85 (decimal) = 221 (hexadecimal); 221 (the high byte (2) is sent first, then the middle byte (2), and finally the low byte (1)).
[0186] It should be noted that this example transmits data using six color cells / color bars, meaning hexadecimal values are used during data transmission. For color bars, a higher base means each color bar can carry more information. Transmitting the same MAC address requires fewer hexadecimal color bars; fewer color bars mean faster camera recognition and less computation. According to user-agreed specifications, MAC addresses are sent in MSB format by default.
[0187] Step S604: Generate color transmission code.
[0188] In this example, the hexadecimal value obtained from the device authentication information of the toy device to be paired is 221. The toy device to be paired maps this hexadecimal value to red, red, and white according to the six-color hexadecimal mapping relationship. Based on this, the toy device to be paired arranges the red, red, and white color bars sequentially from top to bottom along the height of the color bars to form a color transmission code. The length and height of these three color bars are consistent, and the spacing between the color bars is fixed (e.g., 0.5 to 1 times the width of the color bar) to ensure that the camera can quickly identify each color bar during scanning.
[0189] Step S605: Scan the color synchronization code displayed on the toy device to be paired.
[0190] In this example, the current toy device scans and identifies the display content of the screen of the toy device to be paired using an image acquisition component. If the current toy device detects a color jump in the display content of the toy device to be paired along the same horizontal direction, it can determine that the toy device to be paired is displaying a color synchronization code. The image acquisition component includes a low-power camera and a low-power processor. Subsequently, the current toy device focuses on and captures an image of the screen of the toy device to be paired using the low-power camera, obtaining a first color image containing the color synchronization code.
[0191] Step S606: parse the version number, refresh interval information, parity check code, and target color bar number.
[0192] In this example, the current toy device uses its low-power processor to parse the first color image acquired by the low-power camera, resulting in a version number of 0, a refresh interval of 10 seconds for the color bars in the color transmission code, a parity check value of 0, and a target number of 3 color bars. The specific parsing process is as follows:
[0193] First, the current toy device, using its built-in low-power processor, indexes the position-information type mapping table according to the position of each color cell in the color synchronization code. It then identifies color cell 1, which represents the version number, and determines that the specific color of color cell 1 is black. Based on the six-color hexadecimal mapping relationship, black is mapped to the hexadecimal value "0," meaning the color information of color cell 1 is 0. Following this color information "0," it indexes the color information-version number mapping table to determine that the version number corresponding to color cell 1 is "0." Therefore, it is determined that the color synchronization code displayed by the toy device to be paired is a grid consisting of four color cells, and its position-information type mapping table is specifically determined as follows: "The information type corresponding to the top-left color cell 1 is the version number, the information type corresponding to the top-right color cell 2 is private information, the information type corresponding to the bottom-left color cell 3 is refresh interval information, and the information type corresponding to the bottom-right color cell 4 is verification information." Figure 3 As shown.
[0194] Subsequently, for color cell 2, the toy device, through its built-in low-power processor, first indexes the position-information type mapping table based on the position of color cell 2 in the color synchronization code to determine that the information type corresponding to color cell 2 is private information. This private information carries the target number of color bars for the color transmission code. The toy device, through its built-in low-power processor, identifies the specific color of color cell 2 as yellow. Based on the six-color hexadecimal mapping relationship, yellow is mapped to the hexadecimal value "5," meaning the color information of color cell 2 is "5." Following this color information "5," the device indexes the color information-private information mapping table to determine that the private information represented by color cell 2 is "the target number of color bars for the color transmission code is 3."
[0195] For color cell 3, the current toy device, through its built-in low-power processor, first indexes the position of color cell 3 in the color synchronization code in the aforementioned position-information type mapping table to determine that the information type corresponding to color cell 3 is refresh interval information. The refresh interval information characterizes how often the color bars in the color transmission code are refreshed. The current toy device, through its built-in low-power processor, identifies the specific color of color cell 3 as white. Based on the six-color hexadecimal mapping relationship, white is mapped to the hexadecimal value "1," meaning the color information of color cell 3 is "1." According to this color information "1," it indexes the color information-refresh interval information mapping table to determine that the private information represented by color cell 3 is "the color bars in the color transmission code refresh every 10 seconds."
[0196] For color cell 4, the current toy device, using its built-in low-power processor, first indexes the position-information type mapping table based on the position of color cell 4 in the color synchronization code to determine that the information type corresponding to color cell 4 is verification information. This verification information is a parity check code. The current toy device, through its built-in low-power processor, identifies the specific color of color cell 4 as black. According to the six-color hexadecimal mapping relationship, black is mapped to the hexadecimal value "0", meaning the color information of color cell 4 is "0". Based on this color information "0", it indexes the color information-private information mapping table to determine that the verification information represented by color cell 4 is "parity check code is 0".
[0197] Step S607: Scan the color transmission code displayed on the toy device to be paired.
[0198] In this example, after the current toy device completes the scanning and recognition of the color synchronization code, the physical button of the toy device to be paired needs to be pressed manually to switch the toy device to the next mode. At this time, the display screen of the toy device to be paired switches to display the color transmission code. The current toy device, through its built-in low-power processor, determines one or more valid scanning time points according to the refresh interval information obtained in step S606. The current toy device, through its onboard camera, focuses and captures the display screen of the toy device to be paired according to the determined valid scanning time points, to obtain a second color image containing the color transmission code.
[0199] Step S608: Restore the device authentication information of the toy device to be paired, and complete the pairing of the current toy device with the toy device to be paired.
[0200] In this example, the toy device, using its built-in low-power processor, first verifies the validity of the second color image based on the number of target color bars and the parity check code obtained in step S606. If the second color image fails the validity verification, the process returns to step S607. If the second color image passes the validity verification, the toy device, using its built-in low-power processor, first identifies the multiple color bars in the second color image and determines that the specific colors of each color bar are red, red, and white in sequence. Then, according to the six-color hexadecimal mapping relationship, it maps red, red, and white to the hexadecimal value 221. This hexadecimal value 221 is used to represent the MAC address of the toy device to be paired. Since MAC addresses are usually in hexadecimal, the toy device, using its built-in low-power processor, converts the hexadecimal value 221 to the hexadecimal value 0x55. Subsequently, the toy device, using its built-in low-power processor, determines whether the toy device to be paired has passed authentication by judging whether the MAC address of the toy device to be paired is in the whitelist and whether the key or check code in the pairing data of the toy device to be paired matches. If the toy device to be paired is authenticated, the current toy device can determine that the pairing has been successful. If the toy device to be paired is not authenticated, the current toy device can determine that the pairing has failed.
[0201] Specifically, the second color image is validated based on the number of target color bars and the parity check code obtained in step S606, as follows:
[0202] First, the toy device uses its built-in low-power processor to perform color bar segmentation on the second color image to determine the total number of color bars included in the second color image. Then, it compares the total number of color bars in the second color image with the target number of color bars obtained in step S606. If the total number equals the target number of color bars, the second color image is determined to have passed the validity verification; if the total number does not equal the target number of color bars, the second color image is determined to have failed the validity verification.
[0203] Subsequently, the toy device, through its built-in low-power processor, encodes information such as the version number, the number of target color bars, and the refresh interval into a binary data stream. A preset verification algorithm is then used to calculate a verification value from this data stream, which is compared with the parity check code obtained in step S606. If the two values do not match, the second color image is determined to have failed the validity verification; if they match, the second color image is determined to have passed the validity verification.
[0204] Compared to related technologies, this example, through the collaborative design of a six-color hexadecimal mapping and a color synchronization code / transmission code, achieves toy device pairing while simultaneously ensuring low cost, high efficiency, reliability, and scalability. Firstly, replacing complex code images with color blocks allows the recognition task to be completed with only a low-power camera and processor, significantly reducing the hardware cost of the toy device. Simultaneously, hexadecimal encoding allows each color bar to carry more information, thereby reducing the number of color bars required to transmit data such as MAC addresses, effectively shortening scanning time and improving pairing efficiency. Secondly, the parity check code and target color bar number comparison mechanism built into the synchronization code effectively prevent misreading or missing color bars, enhancing anti-interference capabilities and ensuring the accuracy of data reconstruction. Thirdly, the introduction of a version number field allows for flexible expansion of the code image capacity (e.g., upgrading from 2x2 to 4x4), reserving ample space for subsequent functional iterations without requiring changes to the core logic. Moreover, in terms of security, this example combines MAC address whitelisting and key verification to achieve device authentication and supports bidirectional master-slave pairing, enabling both devices to actively initiate connections and adapt to various interaction scenarios. As a result, it achieves a balance between hardware cost control, improved operational efficiency, guaranteed transmission reliability, and future scalability.
[0205] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0206] Based on the same inventive concept, this application also provides a toy device pairing apparatus for implementing the toy device pairing method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more toy device pairing apparatus embodiments provided below can be found in the limitations of the toy device pairing method described above, and will not be repeated here.
[0207] In one exemplary embodiment, such as Figure 7 As shown, a toy device pairing device is provided, comprising the following modules:
[0208] The first identification module 701 is used to identify the color synchronization code displayed by the toy device to be paired with the current toy device, and obtain the color information of multiple color cells in the color synchronization code.
[0209] The first determining module 702 is used to determine the verification configuration information of the toy device to be paired based on the color information of each color cell.
[0210] The second identification module 703 is used to identify the color transmission code displayed by the toy device to be paired according to the verification configuration information, and obtain the color information of multiple color bars in the color transmission code.
[0211] The second determining module 704 is used to determine the device certification information of the toy device to be paired based on the color information of each color bar.
[0212] The pairing module 705 is used to determine the pairing result between the current toy device and the toy device to be paired based on the device authentication information.
[0213] In an exemplary embodiment, the verification configuration information includes version information and identification configuration information. The first determining module 702 is further configured to: determine a first color cell in each color cell that represents version information; determine the version information corresponding to the first color cell based on the first mapping information and the color information of the first color cell; the first mapping information represents the mapping relationship between color information and version information; determine second mapping information corresponding to the remaining color cells (excluding the first color cell) based on the version information; the second mapping information represents the mapping relationship between color information and identification configuration information; and determine the identification configuration information of the toy device to be paired based on the second mapping information and the color information of the remaining color cells (excluding the first color cell).
[0214] In an exemplary embodiment, the second identification module 703 is further configured to scan the color transmission code displayed by the toy device to be paired to obtain a second color image; verify the validity of the second color image according to the identification configuration information; if the second color image fails the validity verification, return to the step of scanning the color transmission code displayed by the toy device to be paired; if the second color image passes the validity verification, perform color recognition on the second color image to obtain the color information of multiple color bars in the color transmission code; the color information of the color bars is used to indicate the encoding result of the device authentication information represented by the color bars.
[0215] In one exemplary embodiment, the identification configuration information includes the target number of color bars for the color transmission code. The second identification module 703 is further configured to determine the total number of color bars included in the second color image; if the total number is not equal to the target number of color bars, determine that the second color image has not passed the validity verification; if the total number is equal to the target number of color bars, determine that the second color image has passed the validity verification.
[0216] In an exemplary embodiment, the second mapping information includes first sub-mapping information; the first sub-mapping information represents the mapping relationship between color information and the target number of color bars. The second identification module 703 is further configured to determine a second color cell in each color cell that represents the target number of color bars; and to determine the target number of color bars for the color transmission code based on the color information of the second color cell and the first sub-mapping information.
[0217] In one exemplary embodiment, the identification configuration information includes a check code for the color transmission code. The second identification module 703 is further configured to determine a check value based on the remaining identification configuration information other than the check code; if the check value does not match the check code, determine that the second color image has not passed the validity verification; if the check value matches the check code, determine that the second color image has passed the validity verification.
[0218] In an exemplary embodiment, the second mapping information includes second sub-mapping information; the second sub-mapping information represents the mapping relationship between color information and check code. The second identification module 703 is further configured to determine a third color cell in each color cell that represents the check code; and to determine the check code for the color transmission code based on the color information of the third color cell and the second sub-mapping information.
[0219] In an exemplary embodiment, the identification configuration information includes refresh interval information for the color transmission code. The second identification module 703 is further configured to determine a valid scanning time point based on the refresh interval information for the color transmission code; and scan the color transmission code according to the valid scanning time point to obtain a second color image.
[0220] In an exemplary embodiment, the second mapping information includes third sub-mapping information; the third sub-mapping information represents the mapping relationship between color information and refresh interval information. The second identification module 703 is further configured to determine a fourth color cell in each color cell that represents refresh interval information; and to determine refresh interval information for the color transmission code based on the color information of the fourth color cell and the third sub-mapping information.
[0221] In an exemplary embodiment, the first identification module 701 is further configured to scan the color synchronization code displayed by the toy device to be paired with the current toy device to obtain a first color image; perform color recognition on the first color image to obtain color information of multiple color cells in the color synchronization code; the color information of the color cells is used to indicate the encoding result of the verification configuration information represented by the color cells.
[0222] In an exemplary embodiment, the verification configuration information of the toy device to be paired includes verification configuration information represented by each color cell. The first determining module 702 is further configured to, for each color cell, determine the information type corresponding to the current color cell based on the third mapping information and the position of the current color cell in the color synchronization code; the third mapping information represents the mapping relationship between the position of the color cell in the color synchronization code and the information type; and determine the verification configuration information represented by the current color cell based on the information type and the color information of the current color cell.
[0223] In one exemplary embodiment, the device authentication information includes the identification information and pairing data of the toy device to be paired. The pairing module 705 is further configured to authenticate the toy device to be paired based on its identification information and pairing data; and if the toy device to be paired passes authentication, determine that the current toy device and the toy device to be paired have successfully paired.
[0224] Each module in the aforementioned toy pairing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0225] In one exemplary embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a toy device pairing method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.
[0226] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0227] In one exemplary embodiment, a toy device combination is provided, including a first toy device and a second toy device. The first toy device can be paired with the second toy device according to the steps in the above method embodiments, and the second toy device can be paired with the first toy device according to the steps in the above method embodiments.
[0228] In one exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0229] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0230] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0231] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0232] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0233] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for pairing toy devices, characterized in that, The method includes: The color synchronization code displayed by the toy device to be paired with the current toy device is identified to obtain the color information of multiple color cells in the color synchronization code; Based on the color information of each color cell, determine the verification configuration information of the toy device to be paired; Based on the verification configuration information, the color transmission code displayed by the toy device to be paired is identified to obtain the color information of multiple color bars in the color transmission code; Based on the color information of each of the color bars, determine the device authentication information of the toy device to be paired; Based on the device authentication information, the pairing result between the current toy device and the toy device to be paired is determined.
2. The method according to claim 1, characterized in that, The verification configuration information includes version information and identification configuration information; The step of determining the verification configuration information of the toy device to be paired based on the color information of each color cell includes: Determine the first color cell among the aforementioned color cells that is used to represent version information; Based on the first mapping information and the color information of the first color cell, the version information corresponding to the first color cell is determined; the first mapping information represents the mapping relationship between color information and version information. Based on the version information, determine the second mapping information corresponding to the other color cells besides the first color cell; the second mapping information represents the mapping relationship between color information and recognition configuration information; The identification configuration information of the toy device to be paired is determined based on the second mapping information and the color information of the remaining color cells other than the first color cell.
3. The method according to claim 2, characterized in that, The step involves identifying the color transmission code displayed by the toy device to be paired based on the verification configuration information, and obtaining the color information of multiple color bars in the color transmission code, including: The color transmission code displayed by the toy device to be paired is scanned to obtain a second color image; The validity of the second color image is verified based on the identification configuration information. If the second color image fails the validity verification, return to the step of scanning the color transmission code displayed by the toy device to be paired; If the second color image passes the validity verification, color recognition is performed on the second color image to obtain the color information of multiple color bars in the color transmission code; the color information of the color bars is used to indicate the encoding result of the device authentication information represented by the color bars.
4. The method according to claim 3, characterized in that, The identification configuration information includes the target number of color bars for the color transmission code; The step of validating the second color image based on the recognition configuration information includes: Determine the total number of color bars included in the second color image; If the total number is not equal to the number of target color bars, it is determined that the second color image has not passed the validity verification; If the total number equals the number of target color bars, the second color image is determined to have passed the validity verification.
5. The method according to claim 4, characterized in that, The second mapping information includes first sub-mapping information; the first sub-mapping information represents the mapping relationship between color information and the number of target color bars; The number of target color bars is obtained through the following steps: Determine the second color cell in each of the aforementioned color cells that is used to represent the number of target color bars; The number of target color bars for the color transmission code is determined based on the color information of the second color cell and the first sub-mapping information.
6. The method according to claim 3, characterized in that, The identification configuration information includes a check code for the color transmission code; The step of validating the second color image based on the recognition configuration information includes: Determine the verification value based on the remaining identification configuration information other than the verification code; If the verification value does not match the verification code, it is determined that the second color image has failed the validity verification. If the check value matches the check code, the second color image is determined to have passed the validity verification.
7. The method according to claim 6, characterized in that, The second mapping information includes second sub-mapping information; the second sub-mapping information represents the mapping relationship between color information and check code; The verification code is obtained through the following steps: Determine the third color cell in each of the aforementioned color cells that is used to represent the check code; Based on the color information of the third color cell and the second sub-mapping information, a check code for the color transmission code is determined.
8. The method according to claim 3, characterized in that, The identification configuration information includes refresh interval information for the color transmission code; The step of scanning the color transmission code displayed by the toy device to be paired to obtain a second color image includes: The effective scanning time point is determined based on the refresh interval information for the color transmission code; Based on the effective scanning time point, the color transmission code is scanned to obtain a second color image.
9. The method according to claim 8, characterized in that, The second mapping information includes third sub-mapping information; the third sub-mapping information represents the mapping relationship between color information and refresh interval information; The refresh interval information is obtained through the following steps: Determine the fourth color cell in each of the aforementioned color cells that is used to represent the refresh interval information; Based on the color information of the fourth color cell and the third sub-mapping information, the refresh interval information for the color transmission code is determined.
10. The method according to claim 1, characterized in that, The process of identifying the color synchronization code displayed by the toy device to be paired with the current toy device, and obtaining the color information of multiple color cells in the color synchronization code, includes: The color synchronization code displayed by the toy device to be paired with the current toy device is scanned to obtain the first color image; Color recognition is performed on the first color image to obtain color information of multiple color cells in the color synchronization code; the color information of the color cells is used to indicate the encoding result of the verification configuration information represented by the color cells.
11. The method according to claim 1, characterized in that, The verification configuration information of the toy device to be paired includes the verification configuration information represented by each of the color cells; The step of determining the verification configuration information of the toy device to be paired based on the color information of each color cell includes: For each color cell, the information type corresponding to the current color cell is determined based on the third mapping information and the position of the current color cell in the color synchronization code; the third mapping information represents the mapping relationship between the position of the color cell in the color synchronization code and the information type. Based on the information type and the color information of the current color cell, determine the verification configuration information represented by the current color cell.
12. The method according to claim 1, characterized in that, The device authentication information includes the identification information and pairing data of the toy device to be paired; The step of determining the pairing result between the current toy device and the toy device to be paired based on the device authentication information includes: The identity of the toy device to be paired is verified based on its identification information and pairing data. If the toy device to be paired passes authentication, it is determined that the current toy device and the toy device to be paired have been successfully paired.
13. A toy device pairing device, characterized in that, The device includes: The first identification module is used to identify the color synchronization code displayed by the toy device to be paired with the current toy device, and obtain the color information of multiple color cells in the color synchronization code; The first determining module is used to determine the verification configuration information of the toy device to be paired based on the color information of each color cell; The second identification module is used to identify the color transmission code displayed by the toy device to be paired according to the verification configuration information, and obtain the color information of multiple color bars in the color transmission code; The second determining module is used to determine the device authentication information of the toy device to be paired based on the color information of each of the color bars; The pairing module is used to determine the pairing result between the current toy device and the toy device to be paired based on the device authentication information.
14. A toy device assembly comprising a first toy device and a second toy device, characterized in that, The first toy device is paired with the second toy device according to any one of claims 1 to 12, and the second toy device is paired with the first toy device according to any one of claims 1 to 12.
15. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.