Intelligent lock area authority dynamic tagging anti-channel conflict management method and intelligent lock area authority dynamic tagging anti-channel conflict management system

By generating dynamic encrypted area codes and binding permission levels in real time within the smart lock, combined with real-time positioning and electronic certificate verification, the problems of dynamic adaptability and automated arbitration in traditional anti-counterfeiting management are solved, achieving efficient anti-counterfeiting management.

CN121234409APending Publication Date: 2025-12-30SUODI (HANGZHOU) NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511264777.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-05
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Traditional anti-counterfeiting management methods are difficult to dynamically adapt to changes in dealer permissions and overlapping regions. Hardware locks lack encryption protection for regional binding, the positioning verification algorithm is not accurate enough, and it cannot effectively identify cross-regional counterfeiting behavior. There is a lack of automated arbitration for conflicts of permissions among multi-level dealers, resulting in low management efficiency.

Method used

Based on the dealer permissions and multi-level administrative division codes in the production work order, a dynamic encrypted area code with a fusion decrementing counter is generated in real time and written into the smart lock hardware chip. The permission hierarchy is bound by the weight allocation matrix configured in the background management cloud platform. Dynamic permission verification results are generated through the Haversine distance algorithm and electronic voucher verification, triggering multi-level early warning responses to achieve closed-loop control against cross-selling.

Benefits of technology

It improves the automation level and response efficiency of anti-counterfeiting management, can dynamically adapt to changes in dealer permissions and overlapping areas, improves the security and positioning accuracy of hardware locks, and realizes automated arbitration of multi-level permissions and real-time anti-counterfeiting control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121234409A_ABST
    Figure CN121234409A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent lock area authority dynamic tagging anti-channel conflict management method and system, and the method comprises the steps: generating a dynamic encryption area code fused with a decline counter in real time based on the dealer authority and a multi-level administrative division code in a production work order, and writing the dynamic encryption area code into an intelligent lock hardware chip; according to a dealer region weight distribution matrix configured by the background management cloud platform, mapping an administrative division code in the encrypted region code to a corresponding dealer jurisdiction set, and generating a region lock binding relationship with an authority level; in a terminal activation link, synchronously reading an encryption area code preset in the chip, and generating a dynamic authority verification result in combination with electronic certificate verification; and generating an abnormal confidence score based on a dynamic authority verification result, triggering a multi-level early warning response according to a score value, and outputting an anti-channel conflict closed-loop control instruction. According to the embodiment of the invention, the automation level and response efficiency of anti-channel conflict management can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of data management, in particular to a smart lock regional permission dynamic code assignment anti-channeling management method and system. BACKGROUND

[0002] Traditional anti-channeling management methods rely on static regional coding or manual verification, which is difficult to dynamically adapt to changes in dealer permissions and regional overlaps, and is prone to forgery, misjudgment and response lag. In the prior art, the regional binding of hardware locks lacks encryption protection and is easily tampered with; at the same time, the positioning verification algorithm lacks accuracy and cannot effectively identify cross-regional channeling behavior. In addition, the multi-level dealer permission conflict lacks an automatic arbitration mechanism, resulting in low management efficiency. SUMMARY

[0003] The purpose of the present application is to provide a smart lock regional permission dynamic code assignment anti-channeling management method and system to solve the problems in the prior art and improve the automation level and response efficiency of anti-channeling management.

[0004] One embodiment of the present application provides a smart lock regional permission dynamic code assignment anti-channeling management method, which comprises: Based on the dealer permissions in the production work order and the multi-level administrative division codes, a dynamic encryption regional code fused with a decrementing counter is generated in real time and written into the smart lock hardware chip, and the counter is initialized to a preset number of remaining write times, completing the regional attribute hardware-level solidification of the lock; According to the dealer regional weight distribution matrix configured by the background management cloud platform, the administrative division codes in the encryption regional code are mapped to the corresponding dealer jurisdiction set to generate a regional lock binding relationship with permission levels, wherein the weight distribution matrix performs multi-dealer conflict arbitration on overlapping county-level regions; In the terminal activation link, the pre-stored encryption regional code in the chip is read synchronously, and real-time positioning data of the current device is obtained, the deviation of the actual position and the coding target region coordinates is calculated by the Haversine distance algorithm, and when the deviation exceeds a preset threshold, an artificial audit channel is triggered and installation environment evidence is uploaded, and a dynamic permission verification result is generated in combination with electronic voucher verification; Based on the dynamic permission verification result, an abnormal confidence score is generated, a multi-level early warning response is triggered according to the score value, and an anti-channeling closed-loop control instruction is output, wherein the multi-level early warning response includes real-time alarm push, dealer account freezing or remote lock locking.

[0005] Optionally, based on the distributor authority in the production order and the multi-level administrative division code, a dynamic encryption area code with a decreasing counter is generated in real time and written into the smart lock hardware chip, and the counter is initialized to a preset remaining writing number, completing the hardware-level solidification of the lock's regional attribute, including: Real-time acquisition of structured data streams from the production order system, separation of the distributor authority field and the administrative division code field using regular expression matching algorithm, output of the distributor authority feature set and the administrative division code vector; Splicing the distributor authority feature set, the administrative division code vector, and the preset decreasing counter initial value to generate a unique serial number through a linear feedback shift register algorithm, outputting an unencrypted dynamic coding sequence, wherein the counter value is embedded in the sequence header; Using an AES-128 encryption engine, the unencrypted dynamic coding sequence is encrypted with a built-in chip key to generate an encrypted area coding block; Through the SPI interface, the encrypted area coding block is written into the protected storage area of the smart lock hardware chip, and the decreasing counter initial value is solidified into the chip counter register, outputting a writing completion signal and an initialized counter state, completing the hardware-level solidification of the regional attribute.

[0006] Optionally, according to the distributor regional weight distribution matrix configured by the background management cloud platform, the administrative division code in the encrypted area code is mapped to the corresponding distributor jurisdiction set to generate a regional lock binding relationship with authority levels, wherein the weight distribution matrix performs multi-distributor conflict arbitration on overlapping county-level regions, including: Reading the encrypted area coding block from the smart lock chip and using the built-in chip key for AES-128 decryption to extract the original administrative division code vector; Accessing the cloud platform API through the HTTPS protocol to obtain the pre-configured weight distribution matrix, which takes county-level divisions as rows, distributors as columns, and weight scores as element values, outputting the weight distribution matrix data; For overlapping county-level regions in the administrative division code vector, based on the weight distribution matrix data, fuzzy logic rules are applied to calculate the membership scores of each distributor, and the distributor with the highest score is selected as the owner, outputting the arbitrated distributor jurisdiction mapping table; According to the distributor jurisdiction mapping table, a tree structure relationship is constructed, wherein the root node of the tree structure is the provincial distributor, the child nodes are the municipal and county-level distributors, and the authority levels are marked, outputting the regional lock binding relationship tree to realize dynamic binding of authority.

[0007] Optionally, the terminal activation link synchronously reads the preset encryption area code in the chip, obtains real-time positioning data of the current device, calculates the deviation of the actual position and the target area coordinate through the Haversine distance algorithm, triggers the manual review channel when the deviation exceeds the preset threshold, uploads the installation environment evidence, generates a dynamic permission verification result combined with the electronic certificate verification, including: When the terminal is activated, the encrypted area code block is read through the chip interface, the geographical center coordinates corresponding to the administrative division code vector are extracted after decryption, and the target area coordinate is output. The current position coordinate of the device is obtained, the spherical distance between the current position coordinate and the target area coordinate is calculated by applying the Haversine formula, and the distance deviation value is output. When the distance deviation value exceeds the preset threshold, start the review process, capture the installation environment image evidence through the device camera, upload it to the cloud platform, and request the user to input the electronic certificate, output the environment evidence set and the electronic certificate data. In the cloud platform, image feature matching is performed combined with the environment evidence set, and the validity of the electronic certificate is verified to generate a verification result, and a dynamic permission verification result is output.

[0008] Optionally, the dynamic permission verification result is used to generate an abnormal confidence score, and a multi-level early warning response is triggered according to the score value, and a anti-fraud closed-loop control instruction is output, wherein the multi-level early warning response includes real-time alarm push, dealer account freezing or remote lock locking, including: Analyze the specific state of the dynamic permission verification result, extract the verification state features including the distance deviation value, historical abnormal records and the credibility of this time electronic certificate verification, input the verification state features into the pre-trained lightweight neural network model, and output the abnormal confidence score; Divide the abnormal confidence score into three levels, wherein 0-30 points correspond to real-time alarm push, 31-70 points trigger dealer account freezing, and 71-100 points activate remote lock locking, and output the early warning response strategy instruction; According to the early warning response strategy instruction, send an alarm to the administrator APP through the MQTT protocol, or call the cloud platform API to freeze the dealer account, or send a locking instruction to the intelligent lock, record the response execution state, and output the response execution log; Fuse the response execution log and the initial abnormal confidence score to generate a closed-loop control instruction, embed a timestamp and a hash check code in the closed-loop control instruction, obtain the final anti-fraud closed-loop control instruction, and complete the system self-optimization cycle.

[0009] Another embodiment of the application provides an intelligent lock area permission dynamic coding anti-fraud management system, the system comprising: The encoding module is configured to generate a dynamic encryption region code fused with a decrementing counter based on the dealer authority in the production work order and the multi-level administrative division code, write the dynamic encryption region code into a smart lock hardware chip, and initialize the counter to a preset remaining writing number, thereby completing hardware-level solidification of the region attribute of the lock. The mapping module is configured to map the administrative division code in the encryption region code to a corresponding dealer jurisdiction set according to a dealer region weight distribution matrix configured by a background management cloud platform, and generate a region lock binding relationship with an authority level. The verification module is configured to read the encryption region code preset in the chip synchronously in a terminal activation link, obtain real-time positioning data of the current device, calculate a deviation of the actual position from the coordinate of the target region by using a Haversine distance algorithm, trigger an artificial review channel and upload installation environment evidence when the deviation exceeds a preset threshold, and generate a dynamic authority verification result in combination with electronic certificate verification. The output module is configured to generate an abnormal confidence score based on the dynamic authority verification result, trigger a multi-level early warning response according to the score value, and output an anti-channel-hopping closed-loop control instruction.

[0010] Another embodiment of the present application provides a storage medium having a computer program stored therein, wherein the computer program is configured to execute the method described in any one of the above embodiments when running.

[0011] Another embodiment of the present application provides an electronic device comprising a memory and a processor, wherein the memory has a computer program stored therein, and the processor is configured to execute the computer program to execute the method described in any one of the above embodiments.

[0012] Compared with the prior art, the anti-channel-hopping management method for the region authority of the smart lock provided by the present application can generate a dynamic encryption region code fused with a decrementing counter based on the dealer authority in the production work order and the multi-level administrative division code, map the administrative division code in the encryption region code to a corresponding dealer jurisdiction set according to a dealer region weight distribution matrix configured by a background management cloud platform, generate a region lock binding relationship with an authority level, read the encryption region code preset in the chip synchronously in a terminal activation link, generate a dynamic authority verification result in combination with electronic certificate verification, generate an abnormal confidence score based on the dynamic authority verification result, trigger a multi-level early warning response according to the score value, and output an anti-channel-hopping closed-loop control instruction, thereby improving the automation level and response efficiency of the anti-channel-hopping management. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 A hardware structure block diagram of a computer terminal of a smart lock regional permission dynamic code assignment anti-channeling management method provided by the embodiment of the application is shown in FIG. 1. Figure 2 A flowchart of a smart lock regional permission dynamic code assignment anti-channeling management method provided by the embodiment of the application is shown in FIG. 2. Figure 3 A structure diagram of a smart lock regional permission dynamic code assignment anti-channeling management system provided by the embodiment of the application is shown in FIG. 3. DETAILED DESCRIPTION

[0014] The embodiments described below with reference to the drawings are exemplary and are only used to explain the application, and cannot be explained as a limitation on the application.

[0015] The embodiment of the application first provides a smart lock regional permission dynamic code assignment anti-channeling management method, which can be applied to an electronic device, such as a computer terminal, specifically, a general computer, etc.

[0016] The following will be described in detail by taking a computer terminal as an example. Figure 1 A hardware structure block diagram of a computer terminal of a smart lock regional permission dynamic code assignment anti-channeling management method provided by the embodiment of the application is shown in FIG. 1. Figure 1 As shown in the figure, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory can include a non-volatile storage medium and an internal memory.

[0017] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can make the processor execute any kind of smart lock regional permission dynamic code assignment anti-channeling management method.

[0018] The processor is used to provide computing and control capabilities to support the operation of the entire computer device.

[0019] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium, which, when executed by the processor, can make the processor execute any kind of smart lock regional permission dynamic code assignment anti-channeling management method.

[0020] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 1 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or less components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0021] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0022] See Figure 2 The present invention provides a method for dynamic coding of smart lock area permissions to prevent cross-selling, which may include the following steps: S201, based on the dealer permissions and multi-level administrative division codes in the production work order, generates a dynamic encrypted area code with a fusion decrementing counter in real time and writes it into the smart lock hardware chip, and initializes the counter to the preset remaining number of writes, thus completing the hardware-level solidification of the lock's area attributes. Specifically, structured data streams can be obtained in real time from the production work order system, and regular expression matching algorithms can be used to separate the dealer permission field and the administrative division code field, and output the dealer permission feature set and the administrative division code vector. Real-time data stream acquisition and parsing mechanism: The production work order system pushes structured data streams through the Enterprise Resource Planning (ERP) interface. This data stream is encapsulated in a lightweight data exchange format (such as JSON or XML) and processes approximately 50-100 work orders per second. Each work order contains raw text fields, for example: {"distributor":"D_CN_BJ_A01","region":"110105,110106,110107"}. The `distributor` field represents the distributor's authorization code (e.g., "D_CN_BJ_A01" corresponds to a first-level distributor in Chaoyang District, Beijing, China), and the `region` field stores multi-level administrative division codes (e.g., "110105" is the national standard code for Chaoyang District, Beijing). The data stream is encrypted using Transport Layer Security (TLS) and received in real-time by the industrial control computer on the smart lock production line, then cached in a memory queue to ensure low-latency processing.

[0023] Field separation logic for regular expression matching: The predefined regular expression (RegEx) pattern library is used for field extraction. For the distributor permission field, the pattern [AZ]{1}_[AZ]{2}_[AZ]{2}_[A-Z0-9]{3} is used for matching: the first letter indicates the agency level (e.g., A for provincial level, B for municipal level), and the subsequent segments correspond to the country, province, and city codes. The administrative division code field matches a six-digit sequence (pattern d{6}), with consecutive codes separated by commas. The matching engine is implemented using a deterministic finite automaton (DFA), with single-field processing time less than 5 milliseconds. The separated distributor permission field is converted into a hash table structure (key-value pairs storing agency level and regional code), and the administrative division code is converted into an ordered integer array (e.g., [110105, 110106]), forming the DistributorPermission Feature Set and the Administrative Division Code Vector.

[0024] Encapsulation and validation of output data structures: The permission feature set is encapsulated in Binary Large Object (BLOB) format, containing metadata (such as version number and timestamp) and core fields (agent level, number of covered areas). The administrative division code vector is stored using a compact array, with each element occupying 4 bytes, and a checksum is appended to the header for tamper-proofing. Logical validation is performed before output: verifying whether the administrative division code conforms to the latest coding standards of the Ministry of Civil Affairs (e.g., 110105 belongs to Chaoyang District, Beijing), and whether the dealer's permissions are within the cloud platform's whitelist. If validation fails, a work order rollback mechanism is triggered and an error log is recorded; if successful, it is pushed to the next processing unit.

[0025] The dealer permission feature set, administrative division code vector and preset decrementing counter initial value are concatenated, and a unique serial number is generated by the linear feedback shift register algorithm. The unencrypted dynamic encoded sequence is output, in which the counter value is embedded in the sequence header. Multi-source data stitching and structured reconstruction: The preset decreasing counter initial value is set by the system configuration module (typically 255), representing the maximum number of reprogramming attempts allowed by the chip. The concatenation process proceeds in a fixed order: counter value (1 byte) → distributor authorization feature set length (2 bytes) → feature set raw data (variable length) → administrative division code vector length (2 bytes) → vector data (variable length). For example, the counter value "0xFF" (hexadecimal 255) is written to the header, and the authorization feature set "0x01A3B2C4" (assuming 4 bytes) and the code vector "0x110105110106" (6 bytes) are appended sequentially. The reconstructed data block is called the raw concatenated block, and its total length is dynamically variable (usually 20-100 bytes). Padding bits are added to the end of the block to align the length to the 8-byte boundary.

[0026] Sequence generation for linear feedback shift registers: The Linear Feedback Shift Register (LFSR) algorithm is used to generate unpredictable unique sequence numbers. It employs a 16-bit register configuration, with tap positions set according to the polynomial x^16 + x^14 + x^13 + x^11 + 1. The initialization seed is generated by XORing the hash value of the concatenated block (SHA-256 truncated to 16 bits) with the production batch number. The register shifts clockwise: one bit to the right each time, with the most significant bit filled by the XOR result of the tap bits. After 128 consecutive shifts, a 16-byte (128-bit) pseudo-random sequence is output. This sequence is XORed bitwise with the original concatenated block to generate an unencrypted dynamic encoding sequence. A 2-byte identifier (e.g., 0x55AA) is reserved at the beginning of the sequence, followed by the embedded counter value (e.g., 0xFF), ensuring the counter position is addressable.

[0027] Sequence output and fault tolerance mechanisms: The output sequence is appended with a Cyclic Redundancy Check (CRC-16) code, with a check polynomial of 0x8005. If the LFSR operation is interrupted due to a hardware failure (such as a register overflow), the system automatically switches to a backup algorithm (such as a clock-based pseudo-random number generator) and sets an exception flag (0xF0) at the end of the sequence. The sequence generation success rate is required to be ≥99.99%, and the maximum processing time per cycle is 50 milliseconds. The final sequence is temporarily stored in a secure buffer, awaiting use by the encryption engine.

[0028] The AES-128 encryption engine is used to encrypt the unencrypted dynamic encoding sequence with the chip's built-in key, generating an encrypted region encoding block; Encryption engine initialization and key loading: The AES-128 encryption engine (Advanced Encryption Standard 128-bit Engine) is implemented within the hardware security module (HSM) of the smart lock chip. A unique embedded key is pre-programmed into the chip at the factory. This key is generated by a Physically Unclonable Function (PUF), is 128 bits long, cannot be read externally, and is resistant to side-channel attacks. Before encryption, the engine performs a self-check: verifying that the integrity flag in the key storage area is 0xAA (normal), and initializing the AES round key expansion table. Key expansion uses the Rijndael key scheduling algorithm to expand the original 128-bit key into 11 round keys (128 bits each), taking less than 2 microseconds.

[0029] Dynamic sequence encryption process: The unencrypted sequence is input in 16-byte (128-bit) blocks. Each block undergoes 10 rounds of encryption: initial round key addition (AddRoundKey) → 9 rounds of standard processing (SubBytes byte substitution, ShiftRows row shifting, MixColumns column mixing, AddRoundKey) → final round (MixColumns omitted). The SubBytes stage uses pre-computed S-boxes for non-linear transformations, with S-box index addresses mapped from sequence byte values ​​(e.g., input 0x53 mapped to 0xED). MixColumns uses finite field multiplication (GF(2^8)) with fixed matrix coefficients of 0x02, 0x03, and 0x01. The entire encryption process is performed in a hardware-isolated area, with intermediate results not exposed to the bus. The output ciphertext blocks are concatenated to form an Encrypted Region Code Block, with a length identical to the input sequence (e.g., 128-bit input corresponds to 128-bit output).

[0030] Enhanced security and performance assurance: To resist Differential Power Analysis (DPA), the engine integrates Random Delay Insertion (RDI) technology: inserting a no-op (NOP) of 1-10 random clock cycles between rounds of operations. A Message Authentication Code (MAC) is appended to the end of the encrypted block, generating a 4-byte checksum using AES-CBC-MAC mode. The engine throughput is no less than 50Mbps, supporting parallel processing of multiple work order data streams. After encryption is complete, an interrupt signal is triggered to notify the main controller.

[0031] The encrypted area code block is written into the protected memory area of ​​the smart lock hardware chip via the SPI interface. At the same time, the initial value of the decrement counter is fixed into the chip counter register, and the write completion signal and the initialization counter status are output to complete the hardware-level fixing of the area attributes.

[0032] SPI Interface Communication and Memory Addressing: The SPI (Serial Peripheral Interface) uses a four-wire full-duplex communication system: clock line (SCLK), master-in / slave-out (MOSI), master-in / slave-out (MISO), and chip select line (SS). The clock frequency is configured to 10MHz, and the data width is 8 bits. The encrypted block is transmitted to the protected storage area of ​​the smart lock chip in page write mode. This storage area is a physical partition of electrically erasable programmable read-only memory (EEPROM), with an address range of 0x1000-0x1FFF. Write operations require privileged mode (the privilege flag is controlled by the HSM). During transmission, the master controller first sends a write enable instruction (0x06), followed by a 24-bit start address (e.g., 0x100000) and the encrypted block data stream, with each page of 256 bytes transmitted in multiple transmissions.

[0033] Parallel hardening of counter registers: The initial value of the decrement counter (e.g., 0xFF) is written to the ChipCounter Register via an independent register bus. This register is a 32-bit decrement-only counter located within the chip's security core; a write operation requires triggering a fuse program command (0xFC). After writing, the register value is automatically decremented by 1 with each reprogramming attempt, and the write enable signal is locked when the value reaches zero. The hardening process is synchronized with the memory write: when transmitting encrypted blocks via the SPI interface, the counter value is written to the register via the Direct Memory Access (DMA) channel; the atomicity of both is guaranteed by a hardware mutex.

[0034] Status feedback and solidification verification: After the memory area is written, the chip returns a status byte: bit 7 (write enable flag) is cleared and bit 0 (write complete flag) is set to 1. Counter register read verification: The main controller sends a read command (0x0B) and returns the current count value (which should be consistent with the initial value). If both are successful, the chip pulls high the write complete signal GPIO pin (e.g., P1.7) and outputs an initialized counter status message via serial port (format: STATUS: COUNTER=0xFF, EEPROM_ADDR=0x1000). Finally, memory area readback verification is performed: the written encrypted block is read and compared byte-by-byte with the original encrypted block, with an error rate requirement of 0. This completes the hardware-level regional attribute solidification.

[0035] S202, based on the dealer area weight allocation matrix configured in the back-end management cloud platform, the administrative division code in the encrypted area code is mapped to the corresponding dealer jurisdiction set to generate a regional lock binding relationship with permission level, wherein the weight allocation matrix performs multi-dealer conflict arbitration for overlapping county-level areas; Specifically, the encrypted area code block can be read from the smart lock chip, and the chip's built-in key can be used for AES-128 decryption to extract the original administrative division code vector. The system first establishes a secure communication link with the smart lock hardware chip via the SPI (Serial Peripheral Interface) interface. The SPI interface uses a master-slave mode, with the management system acting as the master and the chip as the slave. Data is transmitted via four signal lines (clock line SCK, master-slave input / output line MOSI, master-slave output line MISO, and chip select line CS). When it is necessary to read an encrypted block, the management system sends a specific read command code (e.g., hexadecimal 0x0B) to the chip, followed by the start address (e.g., 0x1000) and data length (e.g., 128 bytes) of the memory area to be read. Upon receiving a valid command, the chip extracts the encrypted data block from the protected storage area (PSA) and returns it byte-by-byte to the management system via the MISO line. This process uses a timing encryption mechanism, inserting a pseudo-random delay during data transmission to prevent side-channel attacks from stealing the key.

[0036] After acquiring the encrypted region's encoded block, the system calls the chip's built-in hardware encryption engine to perform decryption. This engine uses the AES-128 algorithm (Advanced Encryption Standard, 128-bit key length). The decryption key is a unique device key (UDK) pre-programmed into the chip at the factory, stored in the chip's one-time programmable memory (OTP), and cannot be read through an external interface. The decryption process is completed within the chip's security island: the engine loads the encrypted block into 128-bit blocks into the input buffer, generates 11 round keys based on the UDK using the key expansion module, and then performs byte substitution, row shifting, column mixing, and round key addition operations through round function processing, finally outputting a plaintext dynamically encoded sequence. After decryption, the system extracts the Administrative Division Code Vector (ADCV) from the sequence. This vector is composed of provincial, municipal, and county-level administrative division codes (e.g., [440000,440300,440305] represents Nanshan District, Shenzhen City, Guangdong Province) in hierarchical order.

[0037] To ensure the security of the decryption process, the system implements a multi-layered protection mechanism: Key security: UDK calls require verification of the system's digital certificate, which is issued by a trusted root certificate authority (Root CA) to prevent unauthorized access.

[0038] Data integrity verification: After decryption, calculate the Cyclic Redundancy Check (CRC, such as CRC-32) code for the plaintext sequence and compare it with the check value embedded at the end of the sequence. If they do not match, a tamper alarm is triggered.

[0039] Anti-replay attack: The decrement counter (DC) value in the sequence is verified synchronously. If an abnormal counter value is detected (such as repeated use), the process is immediately stopped and the chip is locked.

[0040] Access the cloud platform API via HTTPS protocol to obtain a pre-configured weight allocation matrix. This matrix is ​​arranged with county-level districts as rows and distributors as columns, with element values ​​being weight scores. Output the weight allocation matrix data. The system establishes a secure connection with the backend management cloud platform via HTTPS (Hypertext Transfer Protocol Secure). First, it executes the TLS 1.3 handshake protocol (Transport Layer Security): The client sends a ClientHello message containing the supported cipher suites (such as TLS_AES_256_GCM_SHA384) and an ephemeral public key.

[0041] The cloud platform returns a ServerHello message, selecting the cryptographic suite and attaching its CA-signed server certificate.

[0042] After verifying the validity of the certificate chain, the system generates a pre-master secret and transmits it encrypted with the server's public key. Both parties derive the session key from this secret for subsequent communication. Once the connection is established, the system constructs an API request message containing an authentication token (AT) and an administrative division code vector (ADCV), with the target API being / api / v1 / weight_matrix.

[0043] After receiving the request, the cloud platform loads the WeightAllocation Matrix (WAM) from a distributed cache (such as a Redis cluster). This matrix has a two-dimensional structure: Row Index: Codes of all county-level administrative divisions in China (such as 440305, 110108, etc.), encoded according to the national standard GB / T2260.

[0044] Column index: Unique ID of the contracted dealer (e.g., D001, D002, etc.).

[0045] Matrix elements: Weight Score (WS), ranging from 0 to 100, dynamically calculated by the cloud platform based on indicators such as Dealer Coverage Density (DCD) and Historical Sales Ratio (HSR). For example, the WS for Nanshan District (440305) might be: Dealer D001 70 points (primary agent), Dealer D002 30 points (secondary agent). Matrix data is returned in JSON format, for example: {"matrix":[{"county_code":440305,"dealers":[{"id":"D001","score":70},{"id":"D002","score":30}]}]}.

[0046] To improve data real-time performance, the cloud platform adopts an incremental update strategy: Triggering condition: When a dealer contract changes or regional sales data is updated, the Weight Calculation Engine (WCE) recalculates the WS.

[0047] Push mechanism: Matrix change notifications are pushed to connected systems via the WebSocket Channel, and the systems can proactively request to refresh the data.

[0048] Caching strategy: The local system sets a time-to-live (TTL, such as 24 hours) for matrix data, and forces a re-fetch after the timeout to ensure the timeliness of the weights.

[0049] For overlapping county-level areas in the administrative division code vector, based on the weight allocation matrix data, fuzzy logic rules are applied to calculate the membership score of each dealer, select the dealer with the highest score as the affiliation, and output the arbitrated dealer jurisdiction mapping table. The system identifies overlapping county regions (OCRs) in the administrative division code vector ADCV. OCR is defined as: in the weight assignment matrix WAM, regions where the same county code corresponds to multiple dealers and their weight scores (WS) are all greater than 0 (e.g., Nanshan District 440305 is associated with both D001 and D002). For each OCR, the system activates a fuzzy logic arbiter (FLA), whose core is a three-step reasoning process: Fuzzification: Converting input variables (such as WS value, dealer credit rating CR) into fuzzy sets. For example, the fuzzy set of WS is defined as {low, medium, high}, and the corresponding membership function is a trapezoidal distribution (WS<30 belongs to "low", 30≤WS<70 belongs to "medium", WS≥70 belongs to "high").

[0050] Rule-based inference: The pre-defined rule base includes priority policies, for example: Rule 1: If WS is "High" and CR is "Excellent", then the membership degree MF increases by 0.7; Rule 2: If WS is "Medium" and the installation density ID is "High", then MF increases by 0.5.

[0051] Defuzzification: The centroid method is used to calculate the final membership score (MS), ranging from 0 to 1.

[0052] The calculation of membership scores (MS) depends on multi-source data fusion: Static weights: directly taken from the WS value in WAM (e.g., 70 points for D001).

[0053] Dynamic factors: Obtain dealer credit rating (CR, value A / B / C) and regional installation density (ID, unit: units / square kilometer) in real time from the cloud platform.

[0054] Historical arbitration records: Query the past arbitration results of this OCR. If a distributor wins three times in a row, MS will add an extra weight of 0.1 to this result.

[0055] The final MS is calculated using the weighted formula: MS = α×WS_normalized + β×CR_score + γ×ID_ratio + δ×History_bonus. Where α, β, γ, and δ are adjustable coefficients (default values ​​are 0.6, 0.2, 0.1, and 0.1), and WS_normalized is the normalized value of WS (e.g., 70 points → 0.7).

[0056] Arbitration outcome generation and conflict resolution: Highest score selection: Compare the MS values ​​of all dealers under the same OCR and select the highest one as the dealer to be assigned (e.g., MS=0.82 for D001 > MS=0.61 for D002, then it is assigned to D001).

[0057] Tiebreaker: If the highest scores are tied, a second-level arbitration will be initiated. Prioritize those with higher raw WS values; If the WS are still the same, choose the one with the higher CR rating; If the CR values ​​are still the same, the cloud platform administrator will make a manual decision.

[0058] Output mapping table: Generates a Dealer Jurisdiction Mapping Table (DJMT), the structure of which may include: county code, affiliated dealer ID, membership score, arbitration flag, etc.

[0059] Based on the dealer jurisdiction mapping table, a tree structure relationship is constructed, where the root node of the tree structure is the provincial dealer, the child nodes are the city and county dealers, and the permission level is marked. The regional lock binding relationship tree is output to realize dynamic permission binding.

[0060] The system takes the Distributor Jurisdiction Mapping Table (DJMT) as input and constructs a multi-way tree structure: Root Node: The distributor corresponding to a provincial-level administrative division (e.g., Guangdong Province 440000 → Distributor D_B). If there are multiple distributors in the same province, a virtual root node is created, whose child nodes are the actual provincial-level distributors. Intermediate Node: A municipal-level administrative division distributor (e.g., Shenzhen 440300 → Distributor D_S), serving as a sub-node of a provincial-level distributor; Leaf Node: A county-level administrative division dealer (e.g., Nanshan District 440305 → Dealer D001) serves as a sub-node of a city-level dealer.

[0061] Each node contains the following attributes: administrative division code, dealer ID, permission level (Level), and maximum number of locks that can be managed (Max_Locks).

[0062] Permission Level Tagging Rules: Hierarchical definition: The root node is Level-1 (provincial level), and the Level value of each child node increases by 1 for each level it descends (Level-2 for city level, Level-3 for county level).

[0063] Permission inheritance: The superior node automatically has the management permissions of the subordinate node (e.g., the provincial agent can view all city and county-level locks in the province).

[0064] Level-3 overriding control: If a county-level distributor (Level-3) directly serves a provincial distributor, it can apply for a temporary upgrade to Level-2.5, granting it some city-level permissions (subject to cloud platform approval).

[0065] Hierarchical data is written to the permission_level field of the node, and a permission mask (PermissionMask, PM) is generated at the same time. For example, the PM for Level-2 is binary 110 (indicating that resources at this level and below can be operated).

[0066] The final output is the Regional Lock Binding Tree (RLBT): Storage structure: JSON tree structure or XML document storage is used for easy API transmission and parsing, as shown in the example below: json { "code": 440000, "dealer_id": "D_B", "level": 1, "children": [ { "code": 440300, "dealer_id": "D_S", "level": 2, "children": [ {"code":440305, "dealer_id":"D001", "level":3, "children":[]} ] } ] }

[0067] Dynamic binding mechanism: When administrative divisions are adjusted or distributors are changed, the cloud platform pushes a Tree Update Command (TUC). The system locates the node that needs to be modified through depth-first search (DFS), and the version number is incremented after the update (e.g., v1.2→v1.3).

[0068] Application of binding relationships: When a smart lock is activated, its administrative division code is used to retrieve the belonging path in the RLBT (Logical Linking Toolkit) to determine the scope of operation permissions (e.g., locks in Nanshan District only allow operation by D001 and its superiors D_S and D_B). Complete process example: Scenario: A batch of smart locks are written with the code [440000, 440300, 440305] (Nanshan District, Shenzhen, Guangdong Province), and the counter is initialized to 100 times.

[0069] Decryption and extraction: The encrypted block is read through the SPI interface, and the original ADCV [440000,440300,440305] is obtained by decryption using the AES-128 chip inside the chip.

[0070] Obtain the weight matrix: HTTPS request to the cloud platform API, returns WAM data for Nanshan District: {"county_code":440305,"dealers":[{"id":"D001","score":70},{"id":"D002","score":30}]}.

[0071] Conflict arbitration: Identify OCR (440305 related to D001 / D002); MS calculation: D001's WS=70 → normalization 0.7, CR rating A → bonus 0.2, final MS=0.9; D002's WS=30 → normalization 0.3, CR rating B → bonus 0.1, final MS=0.4; Arbitration result: D001 (MS is the highest).

[0072] Constructing a relationship tree: Root node: 440000 → D_B (Level-1); Child node: 440300 → D_S (Level-2); Sun node: 440305→D001 (Level-3).

[0073] Permissions activated: When locks in Nanshan District are activated, only D001 and its superiors D_S and D_B can operate, and the anti-counterfeiting zone binding is completed.

[0074] S203, during the terminal activation process, synchronously reads the pre-set encrypted area code in the chip and obtains the real-time location data of the current device. It calculates the deviation between the actual location and the coordinates of the coded target area using the Haversine distance algorithm. When the deviation exceeds the preset threshold, it triggers the manual review channel and uploads the installation environment evidence. Combined with the electronic certificate verification, it generates a dynamic permission verification result. Specifically, when the terminal is activated, the encrypted area code block can be read through the chip interface, decrypted, and the geographic center coordinates corresponding to the administrative division code vector can be extracted and the target area coordinates can be output. Terminal activation signal triggering and encrypted block reading: When a user initiates the smart lock activation process via a mobile app or dedicated handheld device, the system sends an activation command (AC) to the smart lock's main control chip. This command is transmitted via the Serial Peripheral Interface (SPI) or the Inter-Integrated Circuit (I2C) bus. 2 C) Protocol communicates with the hardware security chip. The pre-installed Encrypted Region Code Block (ERCB) in the chip's Protected Storage Area (PSA) is read into the terminal buffer. This process verifies the validity of the terminal device certificate (DC) to prevent unauthorized terminals from reading the data. For example, a Mutual Authentication Protocol (MAP) is used to ensure that only terminals authorized by the cloud platform can access the chip data.

[0075] Hardware-level decryption and coordinate mapping: The terminal device utilizes the AES-128 decryption engine (Advanced Encryption Standard with 128-bit key) built into the smart lock chip. This engine uses a unique key (Chip-UniqueKey, CUK) embedded in the chip's secure area to decrypt the encrypted area's encoded blocks, restoring the original dynamic code sequence (ODCS). The administrative division code vector (ADCV) within the sequence is extracted, typically a six-digit combination (e.g., "110101" represents Dongcheng District, Beijing). The terminal performs real-time matching using a locally pre-loaded geo-database (PGD), converting the code vector into precise geographic center coordinates (GCC). For example, the code "110101" maps to coordinates "116.41667°E, 39.91667°N" (decimal degrees), representing the administrative center or geographic centroid of the district.

[0076] Coordinate output and fault tolerance mechanism: The target region coordinates (TRC) are output to the terminal memory in the standard WGS-84 coordinate system (World Geodetic System 1984), containing two floating-point values: longitude (LON) and latitude (LAT). If a match fails (e.g., due to code errors or missing database data), the terminal automatically sends an incremental coordinate request (ICR) to the cloud platform. The platform returns supplementary coordinate data and updates the local database. Data validation (DVC) is performed before output, such as verifying that the coordinates are within a reasonable range (longitude -180° to 180°, latitude -90° to 90°), ensuring the validity of the target region coordinates.

[0077] Obtain the current position coordinates of the device, apply the Haversine formula to calculate the spherical distance between the current position coordinates and the target area coordinates, and output the distance deviation value; Multi-source positioning data fusion acquisition: The terminal device obtains its real-time location using three technologies: Global Positioning System (GPS), Cell Tower Triangulation (CTT), and Wi-Fi Positioning System (WPS). The Location Module (LM) continuously collects 10 sets of raw coordinates at a 1-second sampling period (SP). After removing signal jump points (SJP), a Kalman Filter Algorithm (KFA) is used for trajectory smoothing. The final output Current Position Coordinates (CPC) accuracy is controlled within 5 meters (High-Accuracy Mode, HAM). For example, a positioning result might be "116.41801°E, 39.91582°N," with a timestamp in UTC format (e.g., "2025-04-11T08:30:45Z").

[0078] Spherical distance calculation and Haversine optimization: The terminal invokes the Lightweight Geo-Engine (LGE) and applies the Haversine Distance Algorithm (HDA). This algorithm, based on the Earth Spheroid Model (ESM), converts the latitude and longitude difference between the target area coordinates (TRC) and the current location coordinates (CPC) into radians (RC). The core calculation involves four steps: Calculate the radian values ​​of the latitude difference (Δφ) and the longitude difference (Δλ); Substitute into the Haversine function formula; Combined with the Earth's average radius (Mean Earth Radius, MER = 6371 km).

[0079] The final output is the spherical distance (SD), with the unit being meters by default. For example, when the TRC and CPC are 350 meters apart, the output will be "SD=350".

[0080] Deviation threshold determination and output standardization: The Distance Deviation Value (DDV) is defined as the absolute value of the Distance Deviation (SD). The system presets a Dynamic Threshold (DT), which adjusts according to the administrative division level. Provincial-level region: Threshold = 50 kilometers; City-level area: Threshold = 10 kilometers; County-level area: Threshold = 2 kilometers.

[0081] The comparison between the deviation value DDV and the threshold DT triggers subsequent logic. A confidence tag (CT) is appended to the output, for example, "DDV=1200 meters, CT=95%" (confidence is calculated based on the positioning signal strength).

[0082] When the distance deviation exceeds the preset threshold, the review process is initiated. This process involves capturing environmental image evidence through the device's camera and uploading it to the cloud platform. At the same time, the user is requested to input electronic credentials, and the environmental evidence set and electronic credentials data are output. Threshold triggering and approval process initialization: If DDV > DT (e.g., a deviation of 2500 meters > 2 kilometers is detected in a county-level area), the terminal immediately interrupts the automatic activation process and pushes an Audit Initiation Notice (AIN) to the user interface. This notice includes deviation details (e.g., "Current location is 2.5 kilometers from the center of the target area") and audit procedure instructions. Simultaneously, the terminal's backend registers an Audit Task ID (ATID) with the cloud platform's Audit Center (AC), and the status is marked as "Pending Verification" (PV).

[0083] Multimodal evidence collection and uploading: The user completed the submission of two pieces of evidence as instructed: Environmental image evidence: The system uses the terminal camera (Camera Resolution ≥ 12MP) to capture panoramic photos (PP) and close-up shots (CS) of the installation site. The system automatically overlays geotags (GeoTag, GT) and timestamps (Timestamp, TS), and enables tamper-proof watermarking (TPW). For example, a photo of a door frame keyhole will have a watermark containing "ATID=20250411001".

[0084] Electronic credential input: Users enter the Electronic Authorization Code (EAC) issued by the distributor (formatted as "EAC-8B3F-47D2") or scan the Dynamic QR Code (DQC). The credential validity period (VP) is verified in real time by the cloud platform; expired credentials are rejected.

[0085] Evidence set encapsulation and secure transmission: The Environmental Evidence Set (EES) includes image files (JPEG format), audio notes (optional), and a Device Hardware Fingerprint (DHF). Electronic Credential Data (ECD) is encrypted using AES-GCM (256-bit key) and packaged together with the EES into an Audit Request Package (ARP). This is uploaded to the cloud platform via an HTTPS two-way authentication channel (TLS 1.3 protocol), with a transmission latency (TL) requirement of less than 500 milliseconds.

[0086] On the cloud platform, image feature matching is performed by combining environmental evidence sets, the validity of electronic credentials is verified, verification results are generated, and dynamic permission verification results are output.

[0087] Intelligent analysis of image evidence: After receiving the Environmental Evidence Set (EES), the cloud platform's Audit Engine (AE) performs multi-stage image processing: Scene recognition: A pre-trained convolutional neural network (CNN) model is used to identify the lock installation environment (such as residential wooden doors, shopping mall glass doors). If a prohibited scene is identified (such as warehouse shelves), it is directly marked as high risk.

[0088] Feature matching: Extract SIFT (Scale-Invariant Feature Transform) feature points from the close-up image of the lock and compare them with the standard images in the product database for similarity score (SS), with a threshold set at 85%.

[0089] Metadata analysis: Verify the deviation between the geotag (GT) and the reported location (must be <100 meters), and check the integrity of the watermark (if the TPW verification fails, the evidence is deemed invalid).

[0090] Multidimensional verification of electronic vouchers: The Credential Verification Module (CVM) synchronously processes electronic credential data (ECD): Validation: Query the issue record (IR), usage status (US), and bound dealer (BD) of the credential in the Distributed Ledger (DL).

[0091] Behavioral analysis: Check the historical usage frequency of the voucher (e.g., if the daily usage is >3 times, it will trigger an anomaly), and compare the DHF difference between the applied device and the activated device (a difference value >70% is considered high risk).

[0092] Spatiotemporal correlation: Verify the reasonableness of the application location (AL) and installation location (IL) (e.g., the distance between the two locations should not exceed 500 kilometers).

[0093] Dynamic permission decision-making and output: The Audit Decider (AD) integrates image analysis results (e.g., SS=92%), voucher verification results (e.g., "EAC valid but DHF mismatch"), and deviation data (DDV=2500 meters), and applies fuzzy inference rules (FIR): If the image matches well and the credentials are valid → it is determined to be a "false alarm" and activation is allowed; If the certificate is invalid or the environment is incompatible, it will be judged as "parallel import behavior" and activation will be refused.

[0094] Output the Dynamic Permission Verification Result (DPVR), which includes three core data items: Verification Status (VS): PASS / FAIL; Confidence Level (CL): 0-100 (e.g., CL=85); Risk Tag (RT): LOW / MEDIUM / HIGH.

[0095] The results are pushed to the terminal in real time via the WebSocket protocol and written to the blockchain for evidence storage (BlockchainEvidence, BE).

[0096] S204, Based on the dynamic permission verification result, an abnormal confidence score is generated, and a multi-level early warning response is triggered according to the score value, and an anti-counterfeiting closed-loop control command is output. The multi-level early warning response includes: real-time alarm push, dealer account freezing, or remote lock locking.

[0097] Specifically, the specific status of the dynamic permission verification result can be analyzed, and verification status features including the distance deviation value, historical abnormal records, and the credibility of the current electronic certificate verification can be extracted. The verification status features are then input into a pre-trained lightweight neural network model to output an anomaly confidence score. Once the system obtains the dynamic permission verification result (i.e., the permission verification conclusion generated during the terminal activation process), it first performs structured parsing. This result contains multi-dimensional status information: the Deviation Value (DV, in kilometers) represents the physical offset between the device's actual location and the target area; for example, a smart lock's installation location is detected to be 15.7 kilometers off from the target area coordinates. The Historical Anomaly Record (HAR) is retrieved from the cloud database, showing the number of times the device or associated dealer has triggered audits and their severity levels within the past 30 days; for example, a dealer's account has 3 low-risk deviation records. The Credential Verification Reliability (CVR) is a score from 0 to 100, calculated by the cloud platform's audit module based on the authenticity of the certificate (e.g., the validity of a tax invoice QR code) and the matching degree of environmental evidence (e.g., the consistency between the installation site photos and the declared address); for example, the current certificate verification score is 82. The system normalizes DV, HAR, and CVR into standard numerical feature vectors (FV) through a feature extraction engine, such as [15.7, 3, 82].

[0098] The normalized feature vector FV is input into a pre-trained lightweight neural network (PLNN) model. This model employs a three-layer fully connected architecture (3 input nodes, 8 hidden nodes, and 1 output node) and is trained on a massive dataset of historical parallel import cases. The model processing flow is as follows: The input layer receives the FV, maps the DV to the 0-1 range through linear scaling (e.g., 15.7 km is mapped to 0.785), weights the HAR by the number of records (3 records are mapped to 0.3), and directly divides the CVR by 100 to convert it to 0.82.

[0099] The hidden layer applies the ReLU activation function (a non-linear operation that outputs a raw value greater than 0) to transform the feature combination and extract non-linear relationships. For example, the model learns that the combination of "high DV + low CVR" carries a greater risk of cross-selling than "high DV + high CVR".

[0100] The output layer generates an Anomaly Confidence Score (ACS) ranging from 0 to 100 using the Sigmoid function (which compresses arbitrary values ​​to the 0-1 range). For example, if the input features are [0.785, 0.3, 0.82], the model calculates an ACS score of 68, indicating that the device is highly suspected of being sold illegally.

[0101] Key parameters relied upon for model computation include the weight matrix (WM, storing the connection strength between neurons) and the bias vector (BV, adjusting the neuron activation threshold). These parameters are optimized and solidified during the training phase using the backpropagation algorithm. To ensure real-time performance, the model is deployed on an edge computing gateway in TensorFlow Lite format, with a single inference time of less than 50 milliseconds (ms). After each score is generated, the system records the input feature FV, model version number (e.g., PLNN_v2.1), and ACS value to the audit log for model iteration optimization and post-processing review.

[0102] The abnormal confidence score is divided into three levels: 0-30 points correspond to real-time alarm push, 31-70 points trigger dealer account freezing, and 71-100 points activate remote lock locking and output early warning response strategy instructions. The system implements a three-level classification strategy based on the numerical range of the Anomaly Confidence Score (ACS): Level 1 Response (0-30 points): Determined as a low-risk anomaly, for example, ACS=25 points may be caused by location signal drift. At this time, only a real-time alarm push (RAP) is triggered, sending a notification message to the regional administrator's WeChat, DingTalk, or dedicated APP, which includes the device ID, a map link to the deviation location, and suggested verification actions. Level 2 Response (31-70 points): Determined as medium-risk cross-selling, for example, ACS=68 points indicates multiple anomalies and insufficient credibility of supporting documents. At this time, the system automatically triggers the Distributor Account Freeze Trigger (AFT), prohibiting the Distributor account from logging into the cloud platform, adding device bindings, or modifying regional permissions; Level 3 Response (71-100 points): Determined to be a high-risk malicious cross-selling situation, for example, ACS=90 points accompanied by evidence of forged documents. In this case, the remote lock activation command (LAC) is immediately activated, putting the smart lock in question into an irreversible disabled state.

[0103] The implementation of a tiered strategy needs to be combined with a dynamic threshold adjustment mechanism: Time Decay Factor (TDF): Introduces a time weight to historical anomaly records (HARs), reducing the weight of records from six months ago to 30% of the current weight.

[0104] Regional Sensitivity Coefficient (RSC): The threshold for areas with high rates of cross-border sales (such as inter-provincial border areas) is compressed by 20%. For example, the actual threshold for a certain border county is adjusted to 0-24 points, 25-56 points, and 57-100 points.

[0105] Manual review channel: When the ACS score is at a critical value (such as 30.5 or 70.8), it is automatically transferred to a risk control specialist for review to avoid automated misjudgment. The system generates the final warning response strategy command (RSC) based on the above factors. For example, the output command code "RSC_AFT_2" indicates that a secondary account freeze will be executed.

[0106] The output format of the policy instructions is a JSON structured data packet, which contains the following key fields: Response Level (RL): Values ​​1, 2, and 3 correspond to three response levels; Target Object (TO): Distributor ID or device serial number; Effective Duration (ED): If the account is frozen, the default is 7 days; otherwise, it is permanently locked. Command Signature (CS): A digital signature based on the RSA-2048 algorithm to prevent command tampering. This data packet is relayed to the execution engine via a message queue.

[0107] Based on the early warning response strategy instructions, the system sends alarms to the administrator APP via the MQTT protocol, or calls the cloud platform API to freeze the dealer account, or sends a locking command to the smart lock, while recording the response execution status and outputting the response execution log. After the response execution engine parses the alert response policy instruction (RSC), it triggers actions according to different channels: Real-time Alarm Push (RAP): Alarm information is published to a topic via the MQTT protocol (Message Queuing Telemetry Transport, a lightweight IoT messaging protocol), such as the topic name " / alert / region_05". Region administrators who subscribe to this topic can receive push notifications instantly via mobile apps (such as Android / iOS applications). The message body includes the device location, ACS value, and quick access to processing information.

[0108] Dealer Account Freeze (AFT): Call the cloud platform account management API (Application Programming Interface), the interface address is "api.vendorcontrol.com / freeze". The POST request carries the dealer ID, the freeze reason code (e.g., Reason_Code=102 indicates cross-selling violation), and the authorization token. After the API is executed, it returns the account status change result.

[0109] Remote Lock Locking (LAC): A locking command packet is sent to the target smart lock via an HTTPS two-way authentication channel. The command includes a 128-bit AES-encrypted disable command (e.g., Command=0xFE) and a command counter (to prevent replay attacks). The lock's MCU (microcontroller unit) verifies the command's legitimacy and then blows the control circuit.

[0110] All operations must be accompanied by status feedback and log recording: MQTT push: The message broker server (such as EMQX) returns the Publish Status (PS), such as QoS=1 (delivered at least once) and receives a read receipt (RR) from the APP. API call: The cloud platform returns an HTTP status code (e.g., 200 indicates successful freezing, 404 indicates the account does not exist) and an operation timestamp; Lock locking: The smart lock sends back an operation confirmation code via NB-IoT (Narrowband Internet of Things) (e.g., Ack_Code=0xAA indicates successful locking).

[0111] The system integrates the above feedback to generate a Response Execution Log (REL). Each log entry includes: the original RSC command, the start / end time of execution (precision milliseconds), the operation result status code (RC), and the execution duration (ED).

[0112] Log storage employs a tiered strategy: Real-time caching layer: Redis cluster temporarily stores the logs of the last 24 hours, supporting real-time display on risk control dashboards; Database analysis: ElasticSearch indexes key fields (such as RC, ED) for rapid aggregation analysis; Long-term archive: The HDFS distributed file system stores raw logs in daily partitions, with a retention period of 5 years.

[0113] The log output format is the standardized Syslog (System Log Protocol), with additional enterprise-defined tags such as...<AntiDiversion_Module> This facilitates data collection by third-party auditing systems.

[0114] The response execution log is integrated with the initial anomaly confidence score to generate closed-loop control instructions. Timestamps and hash check codes are embedded in the closed-loop control instructions to obtain the final anti-counterfeiting closed-loop control instructions, thus completing the system's self-optimization loop.

[0115] The system performs spatiotemporal alignment and fusion of the Response Execution Log (REL) and the Initial Anomaly Confidence Score (ACS): Time alignment: Based on the ACS generation time, associate the REL records within the next 10 seconds.

[0116] Data Fusion: Create a fused data unit (FDU) containing the ACS value, the operation result status code (RC) in REL, and the execution time (ED). For example, FDU={ACS:68, RC:200, ED:1200ms} means that a score of 68 triggered an account freeze and the API call took 1.2 seconds to complete.

[0117] Closed-loop control commands (CCCs) are generated based on the FDU. The core logic of the commands includes: Dynamic threshold adjustment: If three freeze events with ACS scores > 60 occur in the same area within 72 hours, the RSC threshold for that area will be automatically lowered by 10%. Model retraining trigger: When 50 consecutive locking operations with ACS > 70 points are overturned by manual review, the current model version is marked as needing optimization.

[0118] To ensure instruction integrity and resistance to tampering: Embedded timestamp (TS): in ISO 8601 format, accurate to milliseconds, such as "2025-04-11T14:30:25.843Z".

[0119] Add Hash Verification Code (HVC): Use the SHA-256 algorithm to generate a 64-bit hexadecimal digest of "CCC instruction body + timestamp + random salt value (Salt)", for example "9f86d08188c7...7d21".

[0120] The final anti-diversion closed-loop command (ACC) is generated, with the following structure: ACC_HEADER: [Protocol version V2.3 | Instruction type CCC]; ACC_BODY: {Dynamic threshold parameters, model retraining markers...}; ACC_AUTH: {TS:2025-04-11T14:30:25.843Z, HVC:9f86d081...}.

[0121] Instruction dispatch and self-optimization implementation: Command takes effect: ACC is broadcast via the message bus to the policy executor, threshold configuration library, and model training platform. For example, the policy executor applies the new response threshold immediately upon receiving the command.

[0122] Model Iteration: When the ACC contains a model retraining marker, the incremental learning process is triggered: the current FDU is added to the training set, and a 30-minute rapid fine-tuning is started on the GPU cluster to generate the PLNN_v2.2 model and release it in a canary release.

[0123] Closed-loop verification: After the new model runs for 24 hours, compare the accuracy rate (AR) for identifying counterfeit goods with the false freeze rate (FFR). If the AR improves by more than 3% while the FFR remains unchanged, then the system is fully deployed to complete the self-optimization cycle. The system simultaneously generates a closed-loop verification report (VR) and archives it to the knowledge base.

[0124] As can be seen, based on the dealer permissions and multi-level administrative division codes in the production work order, a dynamic encrypted area code with a fused decrementing counter is generated in real time and written into the smart lock hardware chip; according to the dealer area weight allocation matrix configured by the back-end management cloud platform, the administrative division code in the encrypted area code is mapped to the corresponding dealer jurisdiction set, generating a regional lock binding relationship with permission levels; during the terminal activation process, the pre-set encrypted area code in the chip is read synchronously, and a dynamic permission verification result is generated in combination with electronic voucher verification; based on the dynamic permission verification result, an abnormal confidence score is generated, and a multi-level early warning response is triggered according to the score value, outputting anti-counterfeiting closed-loop control instructions, thereby improving the automation level and response efficiency of anti-counterfeiting management.

[0125] Another embodiment of the present invention provides a smart lock area access control dynamic coding anti-counterfeiting management system, see [link to relevant documentation]. Figure 3 The system may include: The encoding module 301 is used to generate a dynamic encrypted area code with a decrementing counter in real time based on the dealer permissions and multi-level administrative division codes in the production work order, and write it into the smart lock hardware chip. It also initializes the counter to the preset remaining number of writes, thus completing the hardware-level solidification of the lock's area attributes. The mapping module 302 is used to map the administrative division code in the encrypted area code to the corresponding dealer jurisdiction set according to the dealer area weight allocation matrix configured by the back-end management cloud platform, and generate a regional lock binding relationship with permission level. The weight allocation matrix performs multi-dealer conflict arbitration for overlapping county-level areas. The verification module 303 is used to synchronously read the pre-set encrypted area code in the chip during the terminal activation process, obtain the real-time positioning data of the current device, calculate the deviation between the actual position and the coordinates of the coded target area through the Haversine distance algorithm, and trigger the manual review channel and upload the installation environment evidence when the deviation exceeds the preset threshold. Combined with the electronic certificate verification, a dynamic permission verification result is generated. The output module 304 is used to generate an abnormal confidence score based on the dynamic permission verification result, trigger a multi-level early warning response according to the score value, and output an anti-counterfeiting closed-loop control command. The multi-level early warning response includes: real-time alarm push, dealer account freezing, or remote lock locking.

[0126] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0127] Specifically, in this embodiment, the storage medium can be configured to store a computer program for performing the following steps: S201, based on the dealer permissions and multi-level administrative division codes in the production work order, generates a dynamic encrypted area code with a fusion decrementing counter in real time and writes it into the smart lock hardware chip, and initializes the counter to the preset remaining number of writes, thus completing the hardware-level solidification of the lock's area attributes. S202, based on the dealer area weight allocation matrix configured in the back-end management cloud platform, the administrative division code in the encrypted area code is mapped to the corresponding dealer jurisdiction set to generate a regional lock binding relationship with permission level, wherein the weight allocation matrix performs multi-dealer conflict arbitration for overlapping county-level areas; S203, during the terminal activation process, synchronously reads the pre-set encrypted area code in the chip and obtains the real-time location data of the current device. It calculates the deviation between the actual location and the coordinates of the coded target area using the Haversine distance algorithm. When the deviation exceeds the preset threshold, it triggers the manual review channel and uploads the installation environment evidence. Combined with the electronic certificate verification, it generates a dynamic permission verification result. S204, Based on the dynamic permission verification result, an abnormal confidence score is generated, and a multi-level early warning response is triggered according to the score value, and an anti-counterfeiting closed-loop control command is output. The multi-level early warning response includes: real-time alarm push, dealer account freezing, or remote lock locking.

[0128] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0129] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0130] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program: S201, based on the dealer permissions and multi-level administrative division codes in the production work order, generates a dynamic encrypted area code with a fusion decrementing counter in real time and writes it into the smart lock hardware chip, and initializes the counter to the preset remaining number of writes, thus completing the hardware-level solidification of the lock's area attributes. S202, based on the dealer area weight allocation matrix configured in the back-end management cloud platform, the administrative division code in the encrypted area code is mapped to the corresponding dealer jurisdiction set to generate a regional lock binding relationship with permission level, wherein the weight allocation matrix performs multi-dealer conflict arbitration for overlapping county-level areas; S203, during the terminal activation process, synchronously reads the pre-set encrypted area code in the chip and obtains the real-time location data of the current device. It calculates the deviation between the actual location and the coordinates of the coded target area using the Haversine distance algorithm. When the deviation exceeds the preset threshold, it triggers the manual review channel and uploads the installation environment evidence. Combined with the electronic certificate verification, it generates a dynamic permission verification result. S204, Based on the dynamic permission verification result, an abnormal confidence score is generated, and a multi-level early warning response is triggered according to the score value, and an anti-counterfeiting closed-loop control command is output. The multi-level early warning response includes: real-time alarm push, dealer account freezing, or remote lock locking.

[0131] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A dynamic code assignment method for preventing goods diversion in a smart lock area permission, characterized in that, The method comprises: Based on the dealer authority and multi-level administrative division code in the production order, real-time generation of dynamic encryption region coding with a decreasing counter is performed, and the smart lock hardware chip is written, and the counter is initialized to a preset remaining write number, completing the hardware-level solidification of the lock attribute; According to the dealer region weight distribution matrix configured by the background management cloud platform, the administrative division code in the encrypted region code is mapped to the corresponding dealer jurisdiction set to generate a region lock binding relationship with permission level, wherein the weight distribution matrix performs multi-dealer conflict arbitration on overlapping county-level regions; In the terminal activation link, the pre-stored encrypted region code in the chip is synchronously read, and the real-time positioning data of the current device is obtained, the deviation of the actual position and the coding target region coordinates is calculated through the Haversine distance algorithm, and when the deviation exceeds a preset threshold, an artificial review channel is triggered and installation environment evidence is uploaded, and a dynamic permission verification result is generated by combining electronic voucher verification; Based on the dynamic permission verification result, an abnormal confidence score is generated, a multi-level early warning response is triggered according to the score value, and a anti-escape control instruction is output, wherein the multi-level early warning response includes real-time alarm push, dealer account freezing or remote lock locking.

2. The method of claim 1, wherein, The method comprises: Real-time acquisition of structured data stream from the production order system, separation of the dealer authority field and the administrative division code field by using regular expression matching algorithm, output of the dealer authority feature set and the administrative division code vector; Splicing the dealer authority feature set, the administrative division code vector and the preset decreasing counter initial value, generating a unique serial number through a linear feedback shift register algorithm, and outputting an unencrypted dynamic coding sequence, wherein the counter value is embedded in the sequence header; Using an AES-128 encryption engine, the unencrypted dynamic coding sequence is encrypted with the built-in chip key to generate an encrypted region code block; Through the SPI interface, the encrypted region code block is written to the protected storage area of the smart lock hardware chip, and the decreasing counter initial value is solidified to the chip counter register, and a write completion signal and an initialized counter state are output, completing the hardware-level solidification of the region attribute.

3. The method of claim 2, wherein, The method comprises: Reading the encrypted region code block from the smart lock chip, using the built-in chip key for AES-128 decryption, and extracting the original administrative division code vector; Accessing the cloud platform API through the HTTPS protocol to obtain the pre-configured weight distribution matrix, which takes county-level division as the row, dealer as the column, and weight score as the element value, and outputs the weight distribution matrix data; For the overlapping county-level areas in the administrative division code vector, based on the weight distribution matrix data, the membership score of each distributor is calculated by applying fuzzy logic rules, the distributor with the highest score is selected as the attribution, and the arbitrated distributor jurisdiction mapping table is output; According to the distributor jurisdiction mapping table, a tree structure relationship is constructed, wherein the root node of the tree structure is a provincial distributor, the child nodes are municipal and county-level distributors, and the authority level is marked, and a regional lock binding relationship tree is output to realize dynamic binding of authority.

4. The method of claim 3, wherein, In the terminal activation link, the encrypted region code preset in the chip is synchronously read, and the real-time positioning data of the current device is obtained, the deviation of the actual position and the target region coordinate is calculated through the Haversine distance algorithm, when the deviation exceeds the preset threshold, the artificial audit channel is triggered and the installation environment evidence is uploaded, and the dynamic authority verification result is generated by combining the electronic certificate verification, including: When the terminal is activated, the encrypted region code block is read through the chip interface, the geographic center coordinates corresponding to the administrative division code vector are extracted after decryption, and the target region coordinate is output; The current position coordinate of the device is obtained, the spherical distance between the current position coordinate and the target region coordinate is calculated by applying the Haversine formula, and the distance deviation value is output; When the distance deviation value exceeds the preset threshold, the audit process is started, wherein the installation environment image evidence is captured through the device camera and uploaded to the cloud platform, and the user is requested to input the electronic certificate, and the environment evidence set and the electronic certificate data are output; On the cloud platform side, image feature matching is performed on the environment evidence set, and the validity of the electronic certificate is verified to generate a verification result, and a dynamic authority verification result is output.

5. The method of claim 4, wherein, The abnormal confidence score is generated based on the dynamic authority verification result, and a multi-level early warning response is triggered according to the score value, and a anti-parallel goods closed-loop control instruction is output, wherein the multi-level early warning response includes: real-time alarm push, distributor account freezing or remote lock locking, including: The specific state of the dynamic authority verification result is analyzed, and the verification state features including the distance deviation value, the historical abnormal record and the credibility of this time electronic certificate verification are extracted, the verification state features are input into the pre-trained lightweight neural network model, and the abnormal confidence score is output; The abnormal confidence score is divided into three levels, wherein 0-30 points correspond to real-time alarm push, 31-70 points trigger distributor account freezing, and 71-100 points activate remote lock locking, and the early warning response strategy instruction is output; According to the early warning response strategy instruction, the alarm is sent to the administrator APP through the MQTT protocol, or the cloud platform API is called to freeze the distributor account, or the lock instruction is sent to the intelligent lock, and the response execution state is recorded, and the response execution log is output; The response execution log and the initial abnormal confidence score are fused to generate a closed-loop control instruction, a time stamp and a hash check code are embedded in the closed-loop control instruction to obtain the final anti-parallel goods closed-loop control instruction, and the system self-optimization cycle is completed.

6. A smart lock area permission dynamic coding anti-channeling management system, characterized in that, The system comprises: The encoding module is configured to generate a dynamic encryption region code fused with a decrementing counter in real time based on the dealer authority in the production order and the multi-level administrative division code, write the dynamic encryption region code into a smart lock hardware chip, and initialize the counter to a preset remaining writing number, thereby completing hardware-level solidification of the region attribute of the lock. The mapping module is configured to map the administrative division code in the encryption region code to a corresponding dealer jurisdiction set according to a dealer region weight distribution matrix configured by a background management cloud platform, and generate a region lock binding relationship with an authority level, wherein the weight distribution matrix performs multi-dealer conflict arbitration on overlapping county-level regions. The verification module is configured to, in a terminal activation link, synchronously read the encryption region code pre-stored in the chip, obtain real-time positioning data of the current device, calculate the deviation of the actual position and the coordinate of the coding target region by using a Haversine distance algorithm, and when the deviation exceeds a preset threshold, trigger an artificial review channel and upload installation environment evidence, and generate a dynamic authority verification result in combination with electronic voucher verification. The output module is configured to generate an abnormal confidence score based on the dynamic authority verification result, trigger a multi-level early warning response according to the score value, and output an anti-contraband closed-loop control instruction, wherein the multi-level early warning response includes real-time alarm pushing, dealer account freezing, or remote lock locking.

7. The system of claim 6, wherein, The encoding module is specifically configured to: obtain a structured data stream from a production order system in real time, separate a dealer authority field and an administrative division code field by using a regular expression matching algorithm, and output a dealer authority feature set and an administrative division code vector; splice the dealer authority feature set, the administrative division code vector, and a preset decrementing counter initial value, generate a unique serial number by using a linear feedback shift register algorithm, and output an unencrypted dynamic coding sequence, wherein the counter value is embedded in the sequence header; use an AES-128 encryption engine to encrypt the unencrypted dynamic coding sequence by using a chip-embedded key, and generate an encryption region code block; write the encryption region code block into a protected storage area of a smart lock hardware chip through an SPI interface, simultaneously solidify the decrementing counter initial value to a chip counter register, output a writing completion signal and an initialized counter state, and complete hardware-level solidification of the region attribute.

8. The system of claim 7, wherein, The mapping module is specifically configured to: read the encryption region code block from the smart lock chip, perform AES-128 decryption by using a chip-embedded key, and extract an original administrative division code vector; access a cloud platform API through an HTTPS protocol, and obtain a preconfigured weight distribution matrix, which takes county-level divisions as rows, dealers as columns, and weight scores as element values, and output weight distribution matrix data; for overlapping county-level regions in the administrative division code vector, calculate the membership scores of each dealer based on the weight distribution matrix data by using fuzzy logic rules, select the dealer with the highest score as the owner, and output an arbitrated dealer jurisdiction mapping table. According to the dealer jurisdiction mapping table, a tree structure relationship is constructed, wherein a root node of the tree structure is a provincial dealer, child nodes are municipal and county dealers, and a permission level is marked, and a regional lock binding relationship tree is output, and dynamic permission binding is realized.

9. A storage medium, characterized by The storage medium has stored therein a computer program, wherein the computer program is configured to execute the method of any one of claims 1-5 when executed.

10. An electronic device comprising a memory and a processor, characterized in that, The memory has stored therein a computer program, and the processor is configured to execute the computer program to execute the method of any one of claims 1-5.