Goods fleeing prevention method, system and chip

By dividing storage areas inside the chip and setting permission encoding, the complex management and control problems caused by the embedding of the source code of the engineering source code and the serial code in the prior art are solved, and the separate management of serial code information and the engineering source code is realized, which improves security and efficiency, and reduces costs and development cycles.

CN120010870AInactive Publication Date: 2025-05-16SHENZHEN SINONE CHIP ELECTRONIC CO. LTD.
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510133944.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-06
Publication Date
2025-05-16
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the engineering source code and the string code of the string protocol are embedded together, resulting in complex management and control and inability to manage independently, increasing R&D and maintenance costs, and the process of writing string information into the chip is complicated, making it difficult to ensure security.

Method used

The first storage area and the second storage area are divided inside the chip, which are used to store string code information and engineering source code respectively, and permission encoding is set through built-in programmable tools to ensure that string code information is read-only and the reading and writing functions of the project source code are encrypted, so as to realize the separate control of string code information and engineering source code.

Benefits of technology

The control process of writing string information into the chip is simplified, the security of string information is improved, the difficulty of controlling the project source code is reduced, the cost of R&D and maintenance is reduced, and the development and mass production cycle of product iteration is shortened.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010870A_ABST
    Figure CN120010870A_ABST
Patent Text Reader

Abstract

The invention provides a channel conflict prevention method and system and a chip, and the method comprises the steps: dividing the interior of the chip into a first storage region and a second storage region when a built-in programmable tool of the chip is triggered; acquiring string code information and an engineering source code; and writing the string code information into the first storage area, and burning the engineering source code into the second storage area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip technology, and in particular to a method, system and chip for preventing counterfeiting. Background Art

[0002] At present, the process of serial code writing is that R&D personnel embed the serial code protocol source code into the engineering source code during the development stage, and compile and mix to generate the engineering burning file. On the product line, the engineering burning file is burned into the chip through the offline mass production programmable tool of the chip. The burned good products are distributed to the product line for assembly and barcodes are affixed. The barcode information is read through a specific serial code tool to obtain the serial code information. According to the serial code protocol source code, the serial code information is transmitted to the chip through the communication interface, and the serial code information is written by the in-application programming module inside the chip. The manual judgment on whether the serial code writing is successful is based on the information displayed by the scanning tool. The shortcomings in the process include: Complex management and control of engineering source code: Because the engineering source code and the serial code protocol source code are embedded together, the engineering source code and the serial code protocol source code cannot be independently managed, which makes the management and control very complicated. Summary of the invention

[0003] The present application provides a method, system and chip for preventing counterfeiting, which are used to simplify the management and control process of writing serial code information into chips, improve the security of serial code information, reduce the difficulty of managing engineering source code, reduce R&D and maintenance costs, shorten the development and mass production cycle of product iterations, and have broad application value in chip production and development.

[0004] In a first aspect, an embodiment of the present application provides a method for preventing channeling, the method comprising: When a built-in programmable tool of the chip is triggered, a first storage area and a second storage area are divided inside the chip; Get serial code information and project source code; The serial code information is written into the first storage area, and the engineering source code is burned into the second storage area.

[0005] In some embodiments, after dividing the first storage area and the second storage area inside the chip, the method further includes: A first permission code is set in the first storage area and a second permission code is set in the second storage area by the built-in programmable tool.

[0006] In some embodiments, after writing the serial code information into the first storage area and burning the engineering source code into the second storage area, the method further includes: By means of the built-in programmable tool, the first storage area is encrypted as read-only but not write-only according to the first permission code, and the read and write functions of the second storage area are encrypted according to the second permission code.

[0007] In some embodiments, after encrypting the first storage area as read-only but not write-only according to the first permission code by the built-in programmable tool, and encrypting the read and write functions of the second storage area according to the second permission code, the method further includes: Through the built-in programmable tool, according to the first permission code and the second permission code, operation verification is performed on the first storage area and the second storage area respectively, and the process ends after the operation verification passes.

[0008] In some embodiments, before the built-in programmable tool is triggered, the method further includes: When the built-in programmable tool obtains the trigger signal of the preset serial code tool, the built-in programmable tool performs identity detection on the preset serial code tool. When the result of the identity detection is passed, the built-in programmable tool is triggered.

[0009] In some embodiments, the obtaining of the serial code information and the engineering source code includes: Obtaining the to-be-verified serial code sequence from the preset serial code tooling through the built-in programmable tool, performing a rationality check on the to-be-verified serial code sequence, and setting the to-be-verified serial code sequence as the serial code information when the result of the rationality check is passed; The engineering source code is obtained from the preset serial code tool through a built-in programmable tool.

[0010] In some embodiments, the serial code sequence to be verified is obtained by scanning a preset two-dimensional code with the preset serial code tooling.

[0011] In a second aspect, an embodiment of the present application provides an anti-channelling system, which executes the computer program and performs the anti-channelling method as described in any one of the embodiments of the present application when executing the computer program.

[0012] In a third aspect, an embodiment of the present application provides a chip, including a built-in programmable tool for executing the anti-channelling method as described in any one of the embodiments of the present application.

[0013] The embodiment of the present application provides a method for preventing counterfeiting, the method comprising: when the built-in programmable tool of the chip is triggered, dividing the first storage area and the second storage area inside the chip; obtaining the serial code information and the engineering source code; writing the serial code information into the first storage area, and burning the engineering source code into the second storage area. Through the above method, by storing the serial code information and the engineering source code in partitions, the separate control of the serial code information and the engineering source code is achieved. At the same time, the entire process only needs to call the built-in programmable tool once to complete the burning of the serial code information and the engineering source code, which simplifies the control process of writing the serial code information into the chip, improves the security of the serial code information, reduces the difficulty of controlling the engineering source code, reduces the cost of R&D and maintenance, shortens the development and mass production cycle of product iterations, and has a wide range of application value in chip production and development. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0015] Figure 1 A schematic flow chart of a first method for preventing counterfeiting provided in an embodiment of the present application; Figure 2 A schematic flow chart of a second method for preventing counterfeit goods from being sold in a different manner provided in an embodiment of the present application. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0017] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions.

[0018] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0019] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0020] See also Figure 1 , Figure 1 The embodiment of the present application also provides a schematic flow chart of the first anti-channelling method. Figure 1 The anti-channelling method shown is executed by a chip, the chip includes a built-in programmable tool, and its specific steps include: S101-S103.

[0021] S101 . When a built-in programmable tool of a chip is triggered, a first storage area and a second storage area are divided inside the chip.

[0022] The first storage area is fixed so that the serial code information in the first area can be read without interfering with the engineering source code. On the other hand, the first storage area can only be operated by the built-in programmable tool to solve the risk of the application programming module inside the chip accidentally rewriting the first storage area.

[0023] S102, obtaining serial code information and project source code.

[0024] S103, writing the serial code information into the first storage area, and burning the project source code into the second storage area.

[0025] The embodiment of the present application provides a method for preventing counterfeiting, which includes: when the built-in programmable tool of the chip is triggered, dividing the first storage area and the second storage area inside the chip; obtaining the serial code information and the engineering source code; writing the serial code information into the first storage area, and burning the engineering source code into the second storage area. Through the above method, the control process of writing the serial code information into the chip is simplified, the security of the serial code information is improved, the control difficulty of the engineering source code is reduced, the cost of R&D and maintenance is reduced, and the development and mass production cycle of product iteration is shortened, which has a wide range of application value in chip production and development.

[0026] In order to more clearly introduce the technical solution of the present application, the technical solution of the present application will be introduced through specific embodiments below. It should be noted that the specific embodiments are used to expand the technical solution of the present application, but are not intended to limit the present application.

[0027] In some embodiments, after dividing the first storage area and the second storage area inside the chip, the method further includes: setting a first permission code in the first storage area and setting a second permission code in the second storage area by a built-in programmable tool.

[0028] The first permission code and the second permission code restrict the operation permissions of the first storage area and the second storage area to prevent accidental overwriting.

[0029] In some embodiments, after writing the serial code information into the first storage area and burning the engineering source code into the second storage area, the method also includes: encrypting the first storage area to read-only but not write-only according to the first permission code through a built-in programmable tool, and encrypting the read and write functions of the second storage area according to the second permission code.

[0030] Exemplarily, the serial code information in the first storage area is fixed to read only and not write, and does not change with the change of the program. On the other hand, the first storage area can only be operated by the built-in programmable tool to solve the risk of accidental rewriting of the application programming module inside the chip.

[0031] In some embodiments, after encrypting the first storage area as read-only and not write-only according to the first permission code through the built-in programmable tool, and encrypting the read and write functions of the second storage area according to the second permission code, the method also includes: performing operation verification on the first storage area and the second storage area respectively according to the first permission code and the second permission code through the built-in programmable tool, and ending the process after the operation verification passes.

[0032] After verification, it is ensured that the first storage area and the second storage area are both in an encrypted state.

[0033] In some embodiments, before the built-in programmable tool is triggered, the method also includes: when the built-in programmable tool obtains the trigger signal of the preset serial code tool, the preset serial code tool is identified by the built-in programmable tool, and when the result of the identity detection is passed, the built-in programmable tool is triggered.

[0034] For example, only the serial code tooling that has been detected as qualified by the built-in programmable tool can communicate with the built-in programmable tool, thereby improving information security and preventing the chip from being damaged by malicious attacks.

[0035] In some embodiments, obtaining serial code information and engineering source code includes: obtaining a serial code sequence to be verified from a preset serial code tooling through a built-in programmable tool, performing a rationality check on the serial code sequence to be verified, and when the result of the rationality check is passed, setting the serial code sequence to be verified as the serial code information; obtaining the engineering source code from the preset serial code tooling through a built-in programmable tool.

[0036] For example, the serial code information written into the chip is the identity mark of the chip. If incorrect or non-compliant serial code information is written into the chip, the chip will be unable to be recognized, resulting in the risk of the chip being scrapped. Therefore, the obtained serial code sequence must be tested for rationality before it can be written into the chip as serial code information.

[0037] In some embodiments, the serial code sequence to be verified is obtained by scanning a preset two-dimensional code with a preset serial code tool.

[0038] In some embodiments, the judgment of the serial code tooling is determined based on the protocol information format of the serial code sequence, so the transmission format of the serial code sequence is fixed. The transmission format of the serial code sequence includes: a custom frame header, a custom anti-counterfeiting code of the first 4 bytes, a data frame, an accumulation frame and a check frame, and a frame tail. In some embodiments, the first storage area is the serial code sequence writing area, and the second storage area is the engineering source code writing area, wherein the writing area of ​​the engineering source code: the APROM area is the program running interval. The writing area of ​​the serial code sequence: the non-APROM area, a specific encryptable ROM interval, that is, the serial code confidential storage area, does not support program running, but supports interface access to internal data.

[0039] Exemplarily, the serial code sequence writing area includes: area A and area B. Among them, area A is the serial code storage area, and area B is the serial code security protection area. The serial code is allowed to be written to area A only under the condition that the serial code security protection area permits, otherwise an alarm operation will be automatically triggered. The specific operation logic is as follows: the built-in programmable tool judges the B area of ​​the chip in the burning mode. When the state of area B is read as not operated (b0=FFH), area A is allowed to be rewritten or accessed, and the serial code sequence is burned to area A while verifying the serial code write information. When the verification meets the requirements, the encryption operation of area B is triggered, and the state of area B is rewritten to the encrypted state (b0=5CH). In this state, only read operations of area A and area B are supported. When illegal rewriting occurs, area B will automatically clear b0=00H. When area B is read as an illegal state (b0=00H), an alarm is issued.

[0040] For the encrypted serial code information (b0=5C), if the serial code information needs to be rewritten during product maintenance or secondary development, you need to apply for permission to decide whether to rewrite area A. If the permission is insufficient, a forced operation will cause an alarm.

[0041] When making a secondary modification, you need to update the status of area B first. Only when area B is changed to the decrypted state can the serial code information in area A be changed. The change of the decrypted state is done by rewriting the decrypted status code of the 13 sets of custom data segments given by the authority. Direct rewriting of the serial code sequence is not supported. If it is rewritten directly, area B will be automatically cleared (b0=00H) and enter an invalid state.

[0042] The permission is granted by the built-in background of the firmware. 13 groups of custom data segments are input into the B area of ​​the burning mode. The burning mode allows rewriting only when it receives the 13 groups of custom data segments that meet these 13 groups of custom data segments. These 13 groups of custom data segments are given by the host computer of the development end. The custom data is given according to the current barcode type.

[0043] The embodiment of the present application provides a method for generating a custom data segment, and the specific steps include: S111-S115.

[0044] S111. Perform binary conversion and 8-bit fixed-length segmentation processing on the 32-bit product code to obtain an initial data block, perform feature index calculation and hash encryption on the initial data block to obtain an encrypted index table.

[0045] Exemplarily, scan the code to obtain the 32-bit product code, perform digital segmentation on the product code, and convert it into a binary sequence. The binary sequence is segmented, each segment is 8 bits long, to form an initial data block. A corresponding feature index value is generated for each initial data block, and the index value is used for subsequent matching of image edge features. A feature index table is established to record the corresponding relationship between each data block and its index value. The index table is encrypted and stored using a hash algorithm to ensure data security.

[0046] S112, graying and performing Canny edge detection processing on the input image to obtain an edge feature map, dividing the edge feature map into blocks of 16×16 pixels and calculating edge features to obtain a feature database.

[0047] Exemplarily, the input original image is grayed to eliminate color interference. The Canny edge detection algorithm is used to extract the edge features of the image to obtain an edge feature map. The edge feature map is divided into blocks, and the size of each block is 16×16 pixels. The edge density and directional distribution characteristics of each block are calculated. Specifically, a feature block database is established to store edge feature blocks and their feature values.

[0048] S113. Screen and sort the feature database according to the feature index value to obtain 13 candidate feature blocks, and perform enhancement processing and position mapping on the candidate feature blocks to obtain an enhanced feature block set.

[0049] Exemplarily, according to the numerical value of the feature index value, the feature block screening condition is set. The entropy value and complexity of each feature block are calculated, and a scoring mechanism is established. According to the scoring results, the most suitable 13 edge feature blocks are selected. The selected feature blocks are enhanced to improve the uniqueness of the features. A feature block position mapping table is generated to record the position information of the feature blocks in the original image.

[0050] In some embodiments, the present application further provides an edge feature block selection method, and the specific steps of the method include: S1131-S1135.

[0051] S1131. Divide the feature index values ​​0-255 into 5 intervals: [0, 50), [50, 100), [100, 150), [150, 200), [200, 255]. The index values ​​in the interval [0, 50) correspond to the selection of feature blocks with edge point density greater than 75%. The index values ​​in the interval [50, 100) correspond to the selection of feature blocks with edge point distribution variance less than 0.3. The index values ​​in the interval [100, 150) correspond to the selection of feature blocks with edge connectivity greater than 0.8. The index values ​​in the interval [150, 200) correspond to the selection of feature blocks with edge direction consistency greater than 0.7. The index values ​​in the interval [200, 255] correspond to the selection of feature blocks with edge curvature change rate less than 0.2.

[0052] S1132, calculate the Euclidean distance from each edge point in the feature block to the center point of the image. Calculate the distance difference between adjacent edge points in the feature block. Calculate the angle distribution histogram of the edge points in the feature block. Calculate the entropy value of the edge point density distribution of the feature block. Calculate the edge line segment length distribution of the feature block.

[0053] S1133. Filter out feature blocks whose standard deviation of Euclidean distance is within the range of [5, 15] pixels, filter out feature blocks whose mean value of adjacent point distance difference is within the range of [2, 8] pixels, filter out feature blocks whose angle distribution entropy value is within the range of [1.5, 3.5], and filter out feature blocks whose edge point density entropy value is within the range of [2.0, 4.0]. Keep feature blocks that meet the above conditions at the same time as the candidate set.

[0054] S1134. Calculate the comprehensive score of each candidate feature block: Score = w1 × density score + w2 × direction score + w3 × connectivity score + w4 × curvature score, where w1 = 0.3, w2 = 0.25, w3 = 0.25, w4 = 0.2. Sort the candidate feature blocks in descending order according to the comprehensive score, and select the top 20 feature blocks with the highest scores as the preferred feature blocks. Calculate the similarity matrix between the preferred feature blocks, and eliminate the feature blocks with high repetition according to the similarity matrix.

[0055] S1135. Divide the image into 3×3 sub-regions, select at least 1 feature block and no more than 2 feature blocks in each sub-region. The distance between the center points of adjacent feature blocks is not less than 32 pixels. The total number of edge points of the selected feature blocks is not less than 40% of the total number of edge points of the original image. Traverse the preferred feature block sequence in turn and select 13 candidate feature blocks according to the above constraints.

[0056] S114, performing XOR operation and AES encryption processing on the initial data block and the enhanced feature block set to obtain an encrypted data segment, adding a checksum and associated information to the encrypted data segment to obtain 13 encrypted segments.

[0057] Exemplarily, each data block is XORed with the corresponding edge feature block. The result of the operation is encrypted using a dynamic key. 13 encrypted data segments are generated, each containing edge feature information and an encrypted product code segment. A checksum is added to each data segment to ensure data integrity. The association between the data segments is recorded to facilitate subsequent restoration.

[0058] S115. Perform Huffman coding and run-length compression on the 13 encrypted segments to obtain a compressed data stream, perform feature coding and dictionary mapping on the compressed data stream to obtain 13 custom data segments.

[0059] Exemplarily, an adaptive coding algorithm is used to convert each encrypted data segment into a fixed-length code. The encoded data is losslessly compressed to reduce data redundancy. A compression signature is generated, which contains the necessary information required for decompression. A coding dictionary is established to record the coding rules and compression parameters. 13 custom data segments are generated.

[0060] The present application also provides a specific embodiment, which is only used to explain the technical solution of the present application but not to limit the present application.

[0061] See also Figure 2 , Figure 2 The embodiment of the present application also provides a schematic flow chart of a second method for preventing counterfeiting. Figure 2 As shown, the specific steps of the anti-channelling method include: S201-S211.

[0062] S201, chip goes online.

[0063] S202: Prepare chip engineering code.

[0064] S203, scanning the QR code of the chip through the serial code tooling to obtain the serial code information.

[0065] S204, the built-in programmable tool is triggered to receive the serial code sequence.

[0066] S205, the built-in programmable tool verifies the serial code tooling. If the verification fails, the built-in programmable tool executes step S206 and alarms; if the verification passes, step S207 is executed.

[0067] S207, the built-in programmable tool verifies the serial code information. If the verification fails, the built-in programmable tool executes step S206 and alarms; if the verification passes, step S208 is executed.

[0068] S208 . The built-in programmable tool divides the chip into a first storage area and a second storage area.

[0069] S209, encrypting and writing the serial code information and the engineering code into the first storage area and the second storage area respectively.

[0070] S210, performing operation detection on the first storage area and the second storage area respectively. If the detection fails, the built-in programmable tool executes step S206 and alarms; if the detection passes, executes step S211.

[0071] S211, the process ends.

[0072] The anti-counterfeiting method, system and chip of the present application change the serial code information from being embedded in the engineering source code to being burned into a preset first storage area through a serial code tooling and a programmable tool, and reasonably handle the detection, security area and encryption operations of the serial code information, thereby improving the security of the serial code information, reducing the difficulty of managing and controlling the engineering source code, reducing the cost of research and development and maintenance, shortening the development and mass production cycle of product iterations, and having broad application value in chip production and development.

[0073] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for preventing counterfeiting, characterized in that: The method comprises: When a built-in programmable tool of the chip is triggered, a first storage area and a second storage area are divided inside the chip; Get serial code information and project source code; The serial code information is written into the first storage area, and the engineering source code is burned into the second storage area.

2. The method for preventing counterfeiting of goods according to claim 1, characterized in that: After dividing the first storage area and the second storage area inside the chip, the method further includes: A first permission code is set in the first storage area and a second permission code is set in the second storage area by the built-in programmable tool.

3. The method for preventing counterfeiting as claimed in claim 2, characterized in that: After writing the serial code information into the first storage area and burning the engineering source code into the second storage area, the method further includes: By means of the built-in programmable tool, the first storage area is encrypted as read-only but not write-only according to the first permission code, and the read and write functions of the second storage area are encrypted according to the second permission code.

4. The method for preventing counterfeiting of goods according to claim 1, characterized in that: After encrypting the first storage area to be read-only but not write-only according to the first permission code by the built-in programmable tool, and encrypting the read and write functions of the second storage area according to the second permission code, the method further includes: Through the built-in programmable tool, according to the first permission code and the second permission code, operation verification is performed on the first storage area and the second storage area respectively, and the process ends after the operation verification passes.

5. The method for preventing counterfeiting of goods according to claim 1, characterized in that: Before the built-in programmable tool is triggered, the method further includes: When the built-in programmable tool obtains the trigger signal of the preset serial code tool, the built-in programmable tool performs identity detection on the preset serial code tool. When the result of the identity detection is passed, the built-in programmable tool is triggered.

6. The method for preventing counterfeiting of goods as claimed in claim 5, characterized in that: The obtaining of serial code information and engineering source code includes: Obtaining the to-be-verified serial code sequence from the preset serial code tooling through the built-in programmable tool, performing a rationality check on the to-be-verified serial code sequence, and setting the to-be-verified serial code sequence as the serial code information when the result of the rationality check is passed; The engineering source code is obtained from the preset serial code tool through a built-in programmable tool.

7. The method for preventing counterfeiting of goods as claimed in claim 6, characterized in that: The serial code sequence to be verified is obtained by scanning a preset two-dimensional code with the preset serial code tool. 8.An anti-channelling system, characterized in that: Used to implement the anti-channelling method as described in any one of claims 1 to 7.

9. A chip, characterized in that: It comprises a built-in programmable tool for executing the anti-channelling method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A combination method based on polar code coding encryption and OFDM system peak-to-average ratio suppression

    CN109743279A

  • Burning detection method and device for preventing cross-talk codes and computer readable storage medium

    CN109961114A

  • Anti-channel conflict method and system

    CN111159711A

  • Product parameter burning method and device

    CN115756506A

  • Hybrid encryption method and system for power detection data and medium

    CN116723004A