A charging protection system based on TypeC data line

Through the charging protection system of the Type-C data cable, the shift interaction table and mapping image technology are used to generate shift ciphertext data, which solves the problem of insufficient data security caused by key loss in the existing encryption method and realizes the security of transmission while charging.

CN119150319BActive Publication Date: 2025-10-17GUANGXI FUHONG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411177571.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2025-10-17
Estimated Expiration
2044-08-26

AI Technical Summary

Technical Problem

Existing mobile phone data transmission encryption methods have the risk of key loss, resulting in insufficient data security. Especially when data is transmitted while charging, the data can be easily illegally obtained or tampered with.

Method used

A charging protection system based on Type C data line is adopted. The shift interaction table number is generated by pre-storing the shift interaction table and facial recognition/fingerprint recognition, the interaction mapping table and image are constructed, and the shift ciphertext data is generated to achieve security protection of data transmission.

Benefits of technology

It gets rid of the dependence on keys, avoids data encryption failure caused by key loss, ensures the security of data transmitted while charging, and even if the shift interaction table is leaked, it will not affect data transmission and storage security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119150319B_ABST
    Figure CN119150319B_ABST
Patent Text Reader

Abstract

The application discloses a charging protection system based on a TypeC data line, and relates to the technical field of charging protection.The mode selection module obtains the connection mode selected by a user when a client device and a host device are connected through a data line.The charging protection module obtains the storage address of all data selected by the user for pre-transmission on the host device after the user selects a file transmission mode, obtains the address-changing data of the current connection according to the storage address, respectively constructs an interactive mapping table and an interactive mapping image according to the pre-generated address-changing interaction table and the character content of the address-changing data, obtains address-changing cipher data based on the interactive mapping table and the interactive mapping image, and receives the address-changing cipher data by the host device terminal.On the one hand, the application gets rid of the dependence on a key in the encryption process, avoids the occurrence of the data encryption invalidation caused by the loss of the key, and on the other hand, the application encrypts the transmission data in the file mode, thereby guaranteeing the security of the data transmission while charging.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of charging protection, in particular to a charging protection system based on a TypeC data line. BACKGROUND

[0002] In today's digital age, mobile phones have become an indispensable tool in people's lives, used to store a large amount of personal data such as photos, videos, documents, etc. However, the existing capacity of mobile phones is often limited, which cannot meet the growing data storage needs of users.

[0003] To solve the problem of insufficient mobile phone capacity, some users choose to regularly transfer data from the mobile phone to the computer and further save it to the cloud. In this way, not only can the storage space of the mobile phone be released to store new content, but also the data can be backed up to prevent data loss.

[0004] During the data transfer process between the mobile phone and the computer, in order to ensure the continuity and stability of data transfer, the mobile phone is usually charged while connected to the computer. This operation is particularly important for long-term data transfer, which can effectively avoid data transfer interruption caused by low battery.

[0005] However, in terms of data transfer security, the existing encryption method has certain limitations. For example, the widely used AES256 encryption algorithm relies on a key to encrypt the transmitted data, which to some extent guarantees the security of the data, but in extreme cases, the key is at risk of loss. Once the key is lost, the transmitted data may be illegally obtained or tampered with, seriously threatening the user's privacy and data security.

[0006] To solve the above problems, the present application proposes a solution. SUMMARY

[0007] The purpose of the present application is to provide a charging protection system based on a TypeC data line, in order to solve the problems raised in the background art.

[0008] The purpose of the present application can be achieved by the following technical solutions:

[0009] A charging protection system based on a TypeC data line, comprising a charging protection module:

[0010] The charging protection module is used to protect the security of the transmitted data when charging connection is made between the client device and the host device through the data line. The charging protection module pre-stores a displacement interaction table, which stores four-bit binary numbers and their numbers from 0 to 15.

[0011] When it is detected that the client device and the host device are connected through the data line, and the user selects the connection mode as the file transmission mode, the charging protection module obtains corresponding data according to the storage address of the data selected by the user on the host device, and generates address shifting data according to all the obtained data;

[0012] The charging protection module constructs an interactive mapping table according to the number and character content of each four-bit binary number in the address shifting interactive table, and the interactive mapping table is a 5-column 16-row table, wherein each cell is filled with a plurality of characters, and the first, second, third and fourth mapping table sequences are obtained according to the characters filled in each cell in the interactive mapping table.

[0013] An interactive mapping image based on the address shifting data is constructed, and according to each character in the binary format address shifting data, a plurality of pixel points are selected from a plurality of rows of the image, and a plurality of mapping image sequences are obtained by one-to-one correspondence between the characters in the address shifting data.

[0014] For each mapping image sequence, the first, second, third and fourth mapping table sequences are traversed to obtain the address shifting segment sequence of each mapping image sequence, and the address shifting segment sequences of the plurality of mapping image sequences are spliced to obtain the address shifting ciphertext data.

[0015] Further, when the user selects the connection mode as the file transmission mode, the client device opens the authority to the host device, and the user can access the storage address of all data in the client device through the host device.

[0016] Further, the number of the 16 four-bit binary numbers in the address shifting interactive table is generated by the client device after the user independently completes the initial authentication when the client device and the host device are connected for the first time, and the client device and the host device save it after generation. The initial authentication includes face recognition and fingerprint recognition.

[0017] Further, the client device is charged through the connected host device and transmits data to the host device in the file transmission mode.

[0018] Further, it also includes a host device terminal for receiving the address shifting data, and the host device terminal restores and stores the address shifting data according to the address shifting interactive table stored in the host device terminal after receiving the transmitted address shifting data.

[0019] The beneficial effects of the present application are:

[0020] (1) the application obtains the connection mode selected by the user when the client device and the host device are connected through the data line by the mode selection module, the charge protection module obtains the storage address of all data selected by the user for pre-transmission on the host device after the user selects the file transmission mode, the address shifting data of this connection is obtained according to the storage address, the interactive mapping table and the interactive mapping image are respectively constructed according to the pre-generated address shifting interaction table and the character content of the address shifting data, the mapping bit number of each character in the binary format address shifting data is found based on the interactive mapping table and the interactive mapping image to obtain the address shifting ciphertext data, which is received by the host device terminal, in this way, on the one hand, the dependence on the key in the encryption process is avoided, and the occurrence of data encryption failure caused by key loss is avoided, on the other hand, the transmission data in the file mode is encrypted, and the security of the data transmission while charging is ensured.

[0021] (2) when constructing the interactive mapping table, the corresponding character is filled into the table according to the number of each four-bit binary number in the address shifting interaction table, the first, second, third and fourth mapping table sequences are obtained based on the characters filled in each cell in the same column, when constructing the interactive mapping image, the number of rows of mapping is selected according to the total number of characters in the binary format address shifting data, the number of pixel points selected as mapping in each row is increased by one row by row, then based on the number of times each mapping pixel point in each row is selected, a plurality of row mapping image sequences converted based on the address shifting data are obtained, at this time, the first position conversion of the address shifting data is completed, which is based on the logical position and does not need to depend on the rest of the specific data, then the character content in the first, second, third and fourth mapping table sequences is sequentially scanned based on the content of the characters in each mapping image sequence, the bit number of the characters in each mapping image sequence in the corresponding mapping table sequence is obtained, at this time, the second conversion of the address shifting data is completed, the address shifting ciphertext data is generated based on the conversion result, the address shifting ciphertext data is converted, on the one hand, the security of the address shifting data transmission under the charging condition is ensured through multiple conversions, on the other hand, the conversion process only depends on the address shifting interaction table, and the conversion logic depends on the address shifting interaction table, even if the address shifting interaction table is leaked, the transmission and storage of the address shifting data will not be affected. BRIEF DESCRIPTION OF DRAWINGS

[0022] The application will be further described below with reference to the drawings.

[0023] Figure 1 is the system block diagram of the application;

[0024] Figure 2 is the method flow chart of the application. DETAILED DESCRIPTION

[0025] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be described clearly and completely. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0026] As shown in Figure 1 、 2 , a charging protection system based on TypeC data line includes a mode selection module, a charging protection module and a host device terminal.

[0027] The mode selection module is configured to obtain a connection mode selected by a user of a client device when the client device is connected to a host device through a data line. In an embodiment, the client device refers to a mobile phone of a user.

[0028] When it is monitored that the client device is connected to the host device through the data line, the mode selection module provides several connection modes for the user of the client device to select a unique mode. The host device includes, but is not limited to, a notebook computer, a desktop computer, etc. In an embodiment, the host device refers to a desktop computer.

[0029] In an embodiment, there are three connection modes, namely, a charging only mode, a file transfer mode and a USB debugging mode. In the charging only mode, the client device is only charged by the connected host device without data transmission. In the file transfer mode, the client device is charged by the connected host device and transmits data to the host device. In the USB debugging mode, it is mainly used for developers to perform debugging and application installation operations during development.

[0030] For the file transfer mode selected by the user, the mode selection module generates a charging interaction instruction and transmits it to the charging protection module and the host device terminal, respectively.

[0031] The charging protection module is configured to protect the safety of transmitted data when the client device is connected to the host device through the data line. The charging protection module pre-stores a displacement interaction table. The displacement interaction table includes four-bit binary numbers corresponding to numbers 0-15 and their numbers.

[0032] In the embodiment, the number of the 16 four-bit binary numbers in the address shifting interaction table is generated by the client device after the user completes the initial authentication when the client device and the host device are connected for the first time, and is saved by both the client device and the host device. In the embodiment, the initial authentication includes but is not limited to face recognition and fingerprint recognition.

[0033] The charging protection module opens the charging interaction permission to the host device after receiving the transmitted charging interaction instruction.

[0034] The host device terminal monitors whether the client device opens the charging interaction permission to it in real time after receiving the transmitted charging interaction instruction, and if yes, the host device terminal charges the client device at this time.

[0035] Meanwhile, after the client device opens the charging interaction permission to the host device, the user can access the storage addresses of all data in the client device through the host device and select the data corresponding to the storage addresses for transmission. The data in the client device includes user data, system data, application data and cache data.

[0036] After the host device terminal obtains the storage addresses of all data selected by the user in the host device and needs to be stored in the host device, the host device terminal generates an address shifting instruction according to all the selected storage addresses, and transmits the address shifting instruction to the charging protection module.

[0037] The charging protection module receives the transmitted address shifting instruction, obtains all the storage addresses carried in the address shifting instruction, and obtains the corresponding data according to the storage addresses. The charging protection module generates address shifting data according to the data obtained according to all the storage addresses carried in the address shifting instruction.

[0038] The charging protection module protects the transmission process of the address shifting data according to the preset interaction protection rule. The interaction protection rule is as follows:

[0039] S11: Obtain the 16 four-bit binary numbers and their numbers stored in the address shifting interaction table, and mark the 16 four-bit binary numbers as A1, A2,..., A16 in order from small to large according to the numbers.

[0040] S12: Convert the address shifting data into binary format, and re-label the converted data as address shifting conversion data. According to the order from left to right, mark all characters constituting the address shifting conversion data as E1, E2,..., Ee, e≥1.

[0041] S13: Construct an interaction mapping table according to the preset first construction rule. The first construction rule is as follows:

[0042] S131: Create an empty table of 5 columns and 16 rows using spreadsheet software, and label all cells in the first column as B1, B2,..., B16 in order from top to bottom and right to left;

[0043] Then fill the four-bit binary numbers A1, A2,..., A16 into cells B1, B2,..., B16 in turn;

[0044] S132: According to the physical position of each cell in the table, mark all cells in the same row as cell B1, and mark all cells in the same row as cell B1 in the table as BC1, BC2, BC3, BC4 in order from near to far according to the distance of each cell from cell B1.

[0045] S133: Label all characters that make up four-bit binary number A1 as D1, D2, D3, and D4 in order from right to left.

[0046] S134: Fill character D1 into cell BC1 for association mapping, and similarly fill characters D2, D3, and D4 into cells BC2, BC3, and BC4, respectively.

[0047] S135: Perform character filling on all cells in the same row as S134 for cells B2, B3,..., B16 in turn.

[0048] In this embodiment, the spreadsheet software refers to office software, and the independent authentication table created is an excel table. In this embodiment, the table is described from top to bottom and right to left based on the physical position of each cell in the table.

[0049] S14: Concatenate the characters filled in all cells in the second column to obtain the first mapping table sequence in order from top to bottom and right to left. Similarly, concatenate the characters filled in all cells in the third, fourth, and fifth columns to obtain the second, third, and fourth mapping table sequences, respectively.

[0050] S15: Construct an interactive mapping image based on the address data according to the preset construction rule, and the second construction rule is as follows:

[0051] S151: Create an n*n image data using image processing software, where all pixel values of the image data are (255, 255, 255), i.e., each pixel in the image is white, and n is a predetermined threshold value. The image processing software includes but is not limited to Adobe Photoshop, Canva, and OpenCV Python.

[0052] S152: in the order from top to bottom, sequentially selecting the pixel points in the first, second,..., gth rows corresponding to the number of rows;

[0053] In the order from left to right, the pixel point in the first column in the first row is selected as the mapping pixel point of the first row and marked as F1, the pixel points in the first and second columns in the second row are sequentially selected as the mapping pixel points of the second row and marked as F2 and F3, and so on, the pixel points in the first, second,..., gth columns in the gth row are sequentially selected as the mapping pixel points of the gth row and marked as F 1+2+...+g , F 1+2+...+g+1 ,..., F e ; wherein the value of g is determined by the total number of characters constituting the address shifting conversion data;

[0054] S153: then, in the order of selection of each mapping pixel point, the mapping pixel points of all rows are respectively associated with the characters E1, E2,..., Ee to establish a corresponding mapping, and the pixel values of the mapping pixel points of all rows are modified to (255, 0, 0); it should be noted that each mapping pixel point corresponds to only one character;

[0055] After the establishment of the character association mapping, an interactive mapping image based on the address shifting data is obtained;

[0056] S16: h mapping image sequences are obtained according to a preset splicing rule, and the splicing rule is as follows:

[0057] S161: the total number of mapping pixel points in the (g-1)th and gth rows is obtained and marked as H1 and H2, respectively, and the values of H1 and H2 are determined; if the values of H1 and H2 satisfy the equation H1+1=H2, the mapping pixel points in the gth row are included in the mapping range; otherwise, the mapping pixel points in the gth row are not included in the splicing range;

[0058] S162: first, in the order from right to left, the first, second,..., hth selected mapping pixel points in the first, second,..., hth rows are sequentially obtained from the interactive mapping image based on the address shifting data; in the order of acquisition, all the mapping pixel points are spliced to obtain a mapping image sequence;

[0059] S163: according to S162, the second, third,..., gth selected mapping pixel points in the first, second,..., gth rows are sequentially obtained from the interactive mapping image based on the address shifting data, and h-1 mapping image sequences are obtained accordingly; if there is no mapping pixel point selected at the corresponding position in a row, the mapping pixel point at the corresponding position is not obtained;

[0060] If the pixel point of the gth row is included in the mapping range, the value of h is g, otherwise the value of h is g-1;

[0061] S17: sequentially label all the mapping image sequences as I1, I2,..., Ih according to the order of splicing;

[0062] S18: obtain the address shifting segmented sequence of the mapping image sequences I1, I2,..., Ih according to a preset mapping rule, and the mapping rule is as follows:

[0063] S181: sequentially label all the characters in the mapping image sequence I1 as J1, J2,..., Jh according to the left-to-right order;

[0064] S182: perform non-0 judgment on the character J1, if the character J1 is 0, traverse all the characters in the first mapping table sequence according to the left-to-right order, obtain the bit number of the first character with a value of 0 in the first mapping table sequence, and take the bit number as the mapping bit number of the character J1, otherwise, obtain the bit number of the first character with a value of 1 in the first mapping table sequence, and take the bit number as the mapping bit number of the character J1;

[0065] At this time, the bit number is recorded as the flag bit number of the first mapping table sequence;

[0066] S183: perform non-0 judgment on the character J2, if the character J2 is 0, traverse all the characters in the second mapping table sequence according to the left-to-right order, obtain the bit number of the first character with a value of 0 in the first mapping table sequence, and take the bit number as the mapping bit number of the character J2, otherwise, obtain the bit number of the first character with a value of 1 in the second mapping table sequence, and take the bit number as the mapping bit number of the character J2, at this time, the bit number is recorded as the flag bit number of the second mapping table sequence;

[0067] Similarly, the mapping bit numbers of the characters J3 and J4 and the flag bit numbers of the third and fourth mapping table sequences can be obtained, wherein the mapping bit number of the character J3 is obtained from the third mapping table sequence, and the mapping bit number of the character J4 is obtained from the fourth mapping table sequence;

[0068] S184: perform non-0 judgment on the character J5 according to the order of J1, J2,..., Jh, at this time, if the character J5 is 0, traverse all the bit numbers arranged to the right of the flag bit number of the first mapping table sequence again according to the left-to-right order, obtain the bit number of the first character with a value of 0 as the mapping bit number of the character J5, at this time, take the bit number as the new flag bit number of the first mapping table sequence;

[0069] If not, the mapping bit number of the character J5 is obtained by traversing all bit numbers arranged right to the flag bit number of the first mapping table sequence in the left-to-right order again, and the bit number of the first character with a value of 1 is taken as the mapping bit number of the character J5, and the bit number is taken as the flag bit number of the first mapping table sequence at this time;

[0070] S185: A non-0 judgment is performed on the character J6, and if the character J6 is 0, the mapping bit number of the character J6 is obtained by traversing all bit numbers arranged right to the flag bit number of the second mapping table sequence in the left-to-right order again, and the bit number of the first character with a value of 0 is taken as the mapping bit number of the character J6, and the bit number is taken as the flag bit number of the second mapping table sequence at this time;

[0071] If not, the mapping bit number of the character J6 is obtained by traversing all bit numbers arranged right to the flag bit number of the second mapping table sequence in the left-to-right order again, and the bit number of the first character with a value of 1 is taken as the mapping bit number of the character J6, and the bit number is taken as the flag bit number of the second mapping table sequence at this time;

[0072] Similarly, the mapping bit numbers of the characters J7 and J8 and the new flag bit numbers of the third and fourth mapping table sequences can be obtained;

[0073] S186: The mapping bit numbers of the characters J9, J10,..., and Jh are obtained in sequence according to S181 to S187, and then the mapping bit numbers of the characters J1, J2,..., and Jj are spliced to obtain the address-shifting segmented sequence of the mapping image sequence I1 in the order of the characters J1, J2,..., and Jj;

[0074] In the process of obtaining the flag bit number of the character, the first, second, third, and fourth mapping table sequences are traversed, that is, after the first, second, third, and fourth mapping table sequences are all traversed once, the traversal is restarted from the first mapping table sequence;

[0075] S187: The address-shifting segmented sequences of the mapping image sequences I2, I3,..., and Ih are obtained in sequence according to S181 to S186;

[0076] The charging protection module splices the address-shifting segmented sequences of the mapping image sequences I1, I2,..., and Ih in the order of the address-shifting segmented sequences of the mapping image sequences I1, I2,..., and Ih to obtain address-shifting ciphertext data;

[0077] The charging protection module transmits the address-shifting ciphertext data to the host device terminal;

[0078] The host device terminal receives the transmitted address ciphertext data, and restores the address ciphertext data into address data according to the address interaction table stored in the host device terminal, and stores the address data. It should be noted that if the address interaction table does not exist in the host device terminal, the address ciphertext data is always stored in the form of ciphertext in the host device terminal.

[0079] It should be noted that when constructing the image, the color is modified because in some cases, using the snapshot technology for the image can more quickly identify the content in the image.

[0080] In the description of the specification, the description of the terms "one embodiment", "example", "specific example" and the like means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are contained in at least one embodiment or example of the present application. In the specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0081] The above is only an example and description of the present application, and those skilled in the art can make various modifications or supplements or use similar ways to replace the described specific embodiments, as long as they do not deviate from the invention or exceed the scope defined by the claims, and should belong to the protection scope of the present application.

[0082] The above describes one embodiment of the present application in detail, but the content described is only the preferred embodiment of the present application, and cannot be considered as limiting the scope of the present application. Any equivalent changes and improvements made in accordance with the scope of the present application should still belong to the patent scope of the present application.

Claims

1. A charging protection system based on Type C data line, characterized in that: Including charging protection module: A charging protection module, used to protect the security of data transmission when charging is connected between the client device and the host device via a data cable. The charging protection module pre-stores a shift interaction table, which stores four-digit binary numbers from 0 to 15 digits and their numbers; When it is detected that the client device and the host device are connected via a data cable and the user selects the file transfer mode, the charging protection module obtains the corresponding data according to the storage addresses of the data selected by the user on the host device, and generates the shift data based on all the obtained data; The charging protection module constructs an interactive mapping table based on the number and character content of each four-bit binary number in the shift interaction table. The interactive mapping table is a table with 5 columns and 16 rows, in which each cell is filled with a number of characters. The first, second, third, and fourth mapping table sequences are obtained based on the characters filled in each cell in the interactive mapping table. Constructing an interactive mapping image based on the shifted data, and selecting a number of pixel points from a number of rows of the interactive mapping image according to each character in the shifted data in binary format, and obtaining a number of mapping image sequences by corresponding the pixels to the characters in the shifted data one by one; For each mapping image sequence, the first, second, third and fourth mapping table sequences are traversed to obtain the shift segment sequence of each mapping image sequence, and the shift segment sequences of several mapping image sequences are spliced ​​to obtain the shift ciphertext data.

2. A charging protection system based on Type C data line according to claim 1, characterized in that: When the user selects the file transfer mode as the connection mode, the client device opens permissions to the host device, and the storage address of all data in the client device can be accessed through the host device.

3. The charging protection system based on Type C data line according to claim 1, characterized in that: The 16 four-digit binary numbers in the shift interaction table are generated by the client device after the user independently completes the initial authentication when the client device and the host device are connected for the first time. After generation, both the client device and the host device save and back up the numbers. The independent completion of the initial authentication includes facial recognition and fingerprint recognition.

4. A charging protection system based on Type C data line according to claim 2, characterized in that: In the file transfer mode, the client device is charged by the connected host device and transmits data to the host device.

5. The charging protection system based on Type C data line according to claim 1, characterized in that: The steps to obtain the first, second, third and fourth mapping table sequences are as follows: S11: Obtain 16 four-bit binary numbers and their numbers stored in the shift interaction table, and mark the 16 four-bit binary numbers as A1, A2, ..., A16 in ascending order of numbers; S12: Convert the shift data into binary format data, recalibrate the converted data into shift conversion data, and mark all characters constituting the shift conversion data as E1, E2, ..., Ee in order from left to right, where e≥1; S13: Construct an interactive mapping table according to a preset first construction rule. The first construction rule is as follows: S131: Use spreadsheet software to create a blank table with 5 columns and 16 rows. Label all cells in the first column as B1, B2, ..., B16 in order from top to bottom and from right to left. Then fill the four-digit binary numbers A1, A2, ..., A16 into cells B1, B2, ..., B16 in sequence; S132: Mark all cells in the same row as cell B1 in the table based on the physical location of each cell in the table. Mark all cells in the same row as cell B1 in the table as BC1, BC2, BC3, and BC4 in descending order based on the distance between each cell and cell B1. S133: Mark all characters constituting the four-digit binary number A1 as D1, D2, D3, and D4 in order from right to left; S134: Fill character D1 into cell BC1 for association mapping. Similarly, fill characters D2, D3, and D4 into cells BC2, BC3, and BC4 respectively. S135: Fill all cells in the same row, B2, B3, ..., B16, with characters in sequence according to S134; S14: From top to bottom and from right to left, the characters filled in all cells in the second column are concatenated to obtain a first mapping table sequence. Similarly, the characters filled in all cells in the third, fourth, and fifth columns are concatenated to obtain a second, third, and fourth mapping table sequence, respectively.

6. A charging protection system based on Type C data line according to claim 5, characterized in that: The steps to construct an interactive mapping image based on the shifted data are as follows: S151: Use image processing software to create a image data, wherein the pixel values ​​of all pixels in the image data are (255, 255, 255), and n is a preset rated number threshold; S152: From top to bottom, select the number of pixels that matches the number of rows in the first, second, ..., g rows; from left to right, select the pixels in the first column from the first row as the mapping pixels of the first row, marked as F1; from the second row, select the pixels in the first and second columns as the mapping pixels of the second row, marked as F2 and F3 respectively; and so on, select the pixels in the first, second, ..., g columns from the g row as the mapping pixels of the g row, marked as F 1+2+...+g 、F 1+2+...+g+1 ,...,F e ; The value of g is determined by the total number of characters that make up the shift conversion data; S153: Then, according to the order in which each mapping pixel point is selected, establish association mappings between the mapping pixel points of all rows and the characters E1, E2, ..., Ee, and modify the pixel values ​​of the mapping pixel points of all rows to (255, 0, 0).

7. A charging protection system based on Type C data line according to claim 6, characterized in that: The steps for obtaining a plurality of mapping image sequences according to the interactive mapping image based on the shifted data are as follows: S161: sequentially acquiring, from right to left, the first selected mapping pixel in the first, second, ..., g rows from the interactive mapping image based on the shift data, and concatenating all the mapping pixels in the acquisition order to obtain a mapping image sequence; S162: According to S161, the second, third, ..., g selected mapping pixels in the first, second, ..., g rows are sequentially obtained from the interactive mapping image based on the shift data, and g-1 mapping image sequences are obtained accordingly. If the selected mapping pixel at the corresponding position does not exist in a row, the mapping pixel at the corresponding position is not obtained. S17: according to the order in which each mapping image sequence is spliced, all mapping image sequences are marked as I1, I2, ..., Ig.

8. The charging protection system based on Type C data line according to claim 7, characterized in that: The steps to obtain the shift segment sequence of each mapped image sequence are as follows: S181: Mark all characters constituting the mapping image sequence I1 as J1, J2, ..., Jg in order from left to right; S182: Determine whether character J1 is non-zero. If character J1 is zero, traverse all characters in the first mapping table sequence from left to right, obtain the number of bits of the first character whose value is 0 in the first mapping table sequence, and use the number of bits as the mapping number of character J1. Conversely, obtain the number of bits of the first character whose value is 1 in the first mapping table sequence, and use the number of bits as the mapping number of character J1. At this time, the number of bits is recorded as the flag number of the first mapping table sequence; S183: According to S182, the mapping bit counts of characters J2, J3, and J4 and the flag bit counts of the second, third, and fourth mapping table sequences are obtained. The mapping bit count of character J2 is obtained from the second mapping table sequence, the mapping bit count of character J3 is obtained from the third mapping table sequence, and the mapping bit count of character J4 is obtained from the fourth mapping table sequence. S184: In the order of J1, J2, ..., Jg, character J5 is checked for non-zero values. If character J5 is zero, all the digits to the right of the flag digit in the first mapping table sequence are traversed from left to right again, and the digit of the first character with a value of 0 is obtained as the mapping digit of character J5. This digit is then used as the new flag digit of the first mapping table sequence. Otherwise, all the digits arranged to the right of the flag digit in the first mapping table sequence are traversed again from left to right, and the digit of the first character with a value of 1 is obtained as the mapping digit of character J5. This digit is then used as the flag digit of the first mapping table sequence. S185: According to S184, the mapping bits of characters J6, J7, and J8 and the new flag bits of the second, third, and fourth mapping table sequences are obtained; S186: Obtain the mapping bit numbers of characters J9, J10, ..., Jg in sequence according to S181 to S187, and then concatenate the mapping bit numbers of characters J1, J2, ..., Jg in the order of characters J1, J2, ..., Jg to obtain a shift segment sequence of the mapping image sequence I1; S187: Calculate and obtain the shift segment sequence of the mapping image sequence I2, I3, ..., Ig in sequence according to S181 to S186.

Citation Information

Patent Citations

  • Data transmission method based on charging cable and electronic equipment

    CN114297127A

  • Charging protection system based on TypeC data line

    CN115549261A