An electric vehicle inventory management and control method and system based on device traceability code
Patent Information
- Application Number
- CN202611174561.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-09-18
AI Technical Summary
[0004]鉴于上述问题,本发明的目的是提供一种基于设备溯源码的电动车进销存管控方法及系统,以解决现有技术中溯源码以静态形式贯穿流通全环节、无法在发生跨区域违规激活时追溯泄露源头商户的问题
本发明针对现有基于溯源码的方案中激活凭证泄露后无法追溯源头商户的技术缺陷,通过在出库加密时向激活密钥中嵌入商户身份水印,并在激活验证失败时反向解析该水印以锁定泄密商户,有效克服了上述缺陷。相较于现有方案中溯源码以静态形式贯穿全环节、泄露后无法定位违规商户的局限,本发明使激活密钥自出库生成之时即携带可追溯的商户身份标识,在验证失败时仍能从失效密钥中反向锁定泄密源头商户,实现了“即使防不住,也能查得清”的溯源能力。
Smart Images

Figure CN122779413A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data management technology, and in particular to a method and system for managing the purchase, sale and inventory of electric vehicles based on equipment traceability codes. Background Technology
[0002] With the continuous growth in the number of electric bicycles, the digital management of the entire process of purchasing, selling, and inventorying electric bicycles has become an important foundation for industry governance. Currently, the industry has widely adopted a traceability code-based electric bicycle management approach. By assigning a unique traceability code to each electric bicycle, information recording and tracking of the vehicle from factory to warehousing, sales, and activation are achieved. A typical existing electric bicycle anti-counterfeiting management system works as follows: a unique traceability code is generated when the vehicle leaves the factory, and this code is bound to the vehicle's identity information; when the vehicle is stored at a dealer, the system associates the traceability code with the dealer's account; when the vehicle is finally activated by a user, the system obtains the geographical location from the activation request and compares it with the dealer's pre-authorized sales area in the database. If the geographical location is within the authorized area, activation is allowed; otherwise, it is considered counterfeiting and an alert is triggered.
[0003] However, in the aforementioned existing technical solutions, the traceability code's encoded content remains fixed after it is generated at the factory. It exists in static plaintext form throughout the entire distribution process, serving only as an identifier repeatedly recorded and queried. When this traceability code or the activation certificate generated based on it is leaked by a distributor to a third party in an unauthorized area, although the system can identify the activation request originating from the unauthorized area through geographical location comparison, it cannot trace back to which distributor the leak originated. In other words, the existing solution can only identify the occurrence of "parallel importing," but cannot locate the "source merchant of the leaked parallel importing key," resulting in a lack of effective means to trace and hold accountable those responsible for internal violations by distributors. Summary of the Invention
[0004] In view of the above problems, the purpose of this invention is to provide a method and system for managing the purchase, sale and inventory of electric vehicles based on device traceability codes, so as to solve the problem that the traceability codes in the prior art are static and run through the entire circulation process, and cannot trace the source merchants when cross-regional illegal activation occurs.
[0005] This invention provides a method for managing the purchase, sale, and inventory of electric vehicles based on device traceability codes, comprising: Step 1: In response to the target electric vehicle entering the warehouse to the target merchant, the factory inspection code parsed from the equipment traceability code of the target electric vehicle is statically bound to the merchant account of the target merchant to generate a merchant anchoring evidence record. Step 2: When the target electric vehicle leaves the warehouse, the factory inquiry code is watermarked and encrypted based on the unique feature code of the target merchant, the authorized sales area data and the current timestamp in the merchant anchoring certificate record, and a regional time-limited activation key carrying the merchant's identity watermark is generated. Step 3: In response to the vehicle activation request, use the regional time-limited activation key to perform spatiotemporal consistency collision verification on the real-time geographical location information carried in the vehicle activation request initiated by the user terminal. If the verification passes, a compliant activation license is generated. If the verification fails, the merchant identity watermark carried in the regional time-limited activation key is reverse-parsed to generate a leakage source tracing label. Step 4: Based on the merchant identity watermark and corresponding real-time geographical location obtained by reverse parsing, perform cluster analysis on the collision failure records of multiple vehicle terminals within the same preset statistical period to generate a regional cross-selling risk cluster map. Step 5: Based on the compliant activation license, the leakage source traceability label, and the regional cross-selling risk cluster map, generate and output the multi-dimensional ownership confirmation and transfer file of the target electric vehicle.
[0006] This invention also provides an electric vehicle inventory management system based on device traceability codes, the system comprising: Warehouse entry binding module: In response to the entry of the target electric vehicle into the warehouse to the target merchant, the factory inspection code parsed from the equipment traceability code of the target electric vehicle is statically bound to the merchant account of the target merchant, and a merchant anchoring evidence record is generated. Outbound encryption module: When the target electric vehicle leaves the warehouse, it uses the unique feature code of the target merchant in the merchant anchoring certificate record, the authorized sales area data and the current timestamp to perform watermark fusion encryption on the outbound inquiry code, and generate a regional time-limited activation key carrying the merchant identity watermark; Activation verification module: In response to vehicle activation requests, it uses the regional time-limited activation key to perform spatiotemporal consistency collision verification on the real-time geographical location information carried in the vehicle activation request initiated by the user terminal. If the verification passes, a compliant activation license is generated. If the verification fails, the merchant identity watermark carried in the regional time-limited activation key is parsed in reverse to generate a leakage source tracing label. Risk clustering module: Based on the merchant identity watermark and corresponding real-time geographical location obtained by reverse parsing, it performs cluster analysis on the collision failure records of multiple vehicle terminals within the same preset statistical period to generate a regional cross-selling risk cluster map. The document generation module is used to generate and output a multi-dimensional ownership transfer document for the target electric vehicle based on the compliant activation license, the leakage source traceability label, and the regional cross-selling risk cluster map.
[0007] As can be seen from the above technical solution, the electric vehicle inventory management method and system based on equipment traceability codes provided by this invention has the following beneficial effects: This invention addresses the technical deficiency of existing traceability code-based solutions, which fail to trace the source merchant after activation credential leakage. By embedding a merchant identity watermark into the activation key during the outgoing encryption process, and then reversing the watermark to pinpoint the leaking merchant upon activation verification failure, this invention effectively overcomes the aforementioned shortcomings. Compared to existing solutions where the traceability code is static and pervasive throughout the entire process, making it impossible to locate the offending merchant after leakage, this invention ensures that the activation key carries a traceable merchant identity identifier from the moment it is generated. Even in the event of verification failure, the source merchant can still be traced back from the invalid key, achieving a traceability capability that ensures "even if prevention fails, it can still be clearly identified."
[0008] In the implementation of the above-mentioned watermark embedding and reverse parsing technical solution, since the watermark embedding utilizes the low-order distribution segment of the challenge code hash value, it does not disrupt the independent verification logic of the authorized sales area data and timestamp in the activation key. Therefore, the two functions of compliance verification and leakage tracing can coexist in parallel in the same key carrier without interfering with each other. At the same time, the merchant identity watermark extracted during the reverse parsing process can also serve as the primary key for cluster analysis. When aggregating multiple vehicle failure records, it can quickly classify different activation events that leak the same merchant key into the same analysis unit, providing a data foundation for the identification of regional cross-selling risks and further enriching the application effectiveness of this invention in actual control scenarios. Attached Figure Description
[0009] Other objects and results of the invention will become more apparent and readily understood by referring to the following description taken in conjunction with the accompanying drawings, and with a more complete understanding of the invention. In the drawings: Figure 1 This is a flowchart illustrating an electric vehicle inventory management method based on device traceability codes according to an embodiment of the present invention. Figure 2 This is a functional module diagram of an electric vehicle inventory management system based on device traceability codes, according to an embodiment of the present invention. Detailed Implementation
[0010] In existing technologies, traceability codes are static and run through the entire circulation process, making it impossible to trace the source merchant when cross-regional illegal activation occurs.
[0011] To address the aforementioned issues, this invention provides a method and system for managing the inventory, sales, and purchase of electric vehicles based on device traceability codes. The core idea is as follows: At the vehicle departure stage, the unique identifier of the target merchant is fused and encrypted into the factory verification code as an indivisible identity watermark, generating an activation key that simultaneously carries regional time constraints and merchant identity information. During vehicle activation, this key is used to perform spatiotemporal consistency collision verification on the real-time geographical location carried in the activation request. If the verification passes, a compliance permit is generated; if the verification fails, the merchant identity watermark is reverse-analyzed from the invalid key to pinpoint the source of the leak. Based on this, a two-dimensional clustering analysis based on watermark and location is performed on the collision failure records of multiple vehicles within a preset statistical period to generate a regional cross-selling risk cluster map.
[0012] The essential difference between this invention and existing technologies is that in existing solutions, the traceability code is only a static identity identifier, and the source cannot be traced after the activation certificate is leaked; while this invention embeds the merchant's identity identifier into the activation key in the form of a watermark, so that the key can still be used as "evidence" to reverse locate the leaking merchant even when it is invalid, thus achieving a leap in control capabilities from "passively discovering cross-selling" to "precisely locating the source of leakage and perceiving regional risks".
[0013] The following description of exemplary embodiments is merely illustrative and is in no way intended to limit the invention or its application or use. Techniques and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques and equipment should be considered part of the specification.
[0014] Reference Figure 1 The diagram shown is a flowchart illustrating an electric vehicle inventory management method based on device traceability codes according to an embodiment of the present invention. In this embodiment, the electric vehicle inventory management method based on device traceability codes includes: Step 1: In response to the target electric vehicle entering the warehouse and arriving at the target merchant, the factory inspection code parsed from the equipment traceability code of the target electric vehicle is statically bound to the merchant account of the target merchant to generate a merchant anchoring evidence record.
[0015] This step is performed during the warehousing stage when electric vehicles are transferred from the manufacturer to the retailer. When the target electric vehicle is actually stored in the target retailer's warehouse, the system obtains the vehicle's equipment traceability code. This traceability code is usually attached to the vehicle body in the form of a QR code or RFID tag, generated and written by the production management system at the time of manufacture. Its encoding structure includes at least a production batch identifier and an encryption verification seed. The system decodes the equipment traceability code, extracts the production batch identifier and encryption verification seed from the decoding result, and combines the two according to a preset splicing rule to form a factory verification code. The factory verification code serves as the basis for the vehicle's unique identification in subsequent circulation stages, and its data structure includes both batch traceability information and anti-counterfeiting verification information. Simultaneously, the system obtains the merchant account pre-registered by the target retailer in the sales management platform. This account is globally unique within the platform and is associated with the merchant's business qualifications, authorized sales area, and other attribute information. The system statically binds the parsed factory verification code to the merchant account. Static binding refers to a binding relationship that is fixed once the vehicle enters the warehouse and remains valid throughout subsequent processes such as vehicle departure and activation, without changing or being terminated as the process progresses. After binding is complete, the system generates a merchant anchoring record, which includes at least three fields: factory verification code, merchant account, and warehouse entry timestamp. This merchant anchoring record serves as proof of ownership of the vehicle's current merchant and provides an index for subsequent steps involving merchant feature code extraction and authorized sales area data retrieval. Specifically, subsequent steps can use the merchant account in this record to query the merchant's unique feature code and its authorized sales area data. The output of this step, the merchant anchoring record, will be used in step 2 as the source for extracting the merchant's unique feature code and authorized sales area data.
[0016] Step 2: When the target electric vehicle leaves the warehouse, the factory inquiry code is watermarked and encrypted based on the unique feature code of the target merchant, the authorized sales area data and the current timestamp in the merchant anchoring record, and a regional time-limited activation key carrying the merchant's identity watermark is generated.
[0017] This step, performed when the electric vehicle leaves the merchant's warehouse and is delivered to the end user, is one of the most innovative steps in this invention. Its purpose is to embed the merchant's identity information as a watermark in an inextricable way into the key data structure during the activation key generation process, enabling the source of leakage to be traced back if subsequent activation verification fails. Specifically, the system first retrieves the target merchant's unique feature code from the merchant anchoring record generated in step 1, through a query associated with the merchant's account. This unique feature code is a fixed-length binary code string assigned by the sales management platform during merchant registration, corresponding one-to-one with the merchant's account. Different merchant accounts correspond to different unique feature codes, and its function is to serve as a digital carrier of the merchant's identity information during the subsequent watermark embedding process. Simultaneously, the system retrieves the target merchant's authorized sales area data from the same record. This data includes the administrative division information of the electric vehicles authorized for sale by the merchant, and its format can be a set of one or more administrative division codes. Furthermore, the system obtains the system time at the moment the target electric vehicle leaves the warehouse as the current timestamp.
[0018] After acquiring the above three data items, the system performs a watermark fusion encryption operation. The inputs to this operation are the factory query code, the merchant's unique identifier, authorized sales area data, and the current timestamp. The output is a regional validity activation key carrying the merchant's identity watermark. The specific implementation is as follows: First, the system performs a hash operation on the factory query code. The hash operation can use a one-way hash algorithm such as SHA-256 to map the factory query code of arbitrary length to a fixed-length binary hash value, denoted as the query code hash value. The purpose of the hash operation is to convert the original query code into a fixed-length binary data carrier, providing a unified bit operation space for subsequent watermark embedding. Second, the system converts the target merchant's unique identifier into a binary watermark sequence. The unique identifier itself is a binary encoded string; the conversion process essentially involves bit length verification and format regularization to ensure that its bit length does not exceed the embeddable bit segment capacity in the query code hash value. Then, the system obtains a preset embedding bitmap. This bitmap, predefined and stored in the system, specifies the exact position in the challenge code hash value where each bit of the binary watermark sequence should be replaced. The predefined embedded bitmap is determined as follows: based on the total bit length of the challenge code hash value and the bit length of the binary watermark sequence, the replacement positions of each bit in the binary watermark sequence are recorded in the challenge code hash value as a bit-segment index array, with each replacement position evenly distributed along the lower-order bits of the challenge code hash value at equal intervals. The system, according to this predefined embedded bitmap, replaces the corresponding bit segments of the binary watermark sequence in the challenge code hash value, generating a challenge hash carrier carrying the merchant's identity watermark. This challenge hash carrier contains both a base hash value and the merchant's identity watermark in its data structure. The base hash value is used for subsequent spatiotemporal consistency verification, while the merchant's identity watermark is used for subsequent leak tracing; the two are inextricably linked at the data level. The merchant's identity watermark has been written into a specific bit segment of the challenge code hash value and cannot be removed separately without compromising the carrier's integrity. Finally, based on the authorized sales area data and the current timestamp, the system dynamically encrypts the query hash carrier carrying the merchant's identity watermark to generate a regional validity activation key.
[0019] The above dynamic encryption process can be expressed by the following formula: ; in, For regional time-limited activation keys, This is the factory verification code. This is a hash function, which can use the SHA-256 algorithm. The binary watermark sequence obtained by converting the unique feature code of the target merchant. This is a bitwise XOR operation used to merge the challenge code hash value with the binary watermark sequence. The advantage of XOR is its reversibility, allowing the original data to be recovered during subsequent reverse parsing using the same XOR operation. For authorized sales area data, This is the current timestamp. This is a data concatenation operator used to combine authorized sales area data with the current timestamp into a single data block. It uses the AES symmetric encryption algorithm, and its key is the system's preset global key.
[0020] During the calculation of the formula, This means that the hash value of the challenge code and the binary watermark sequence are XORed bit by bit to obtain the merged data block. This indicates that the authorized sales area data will be combined with the current timestamp to form a combined data block. The function performs AES encryption using the merged data block as plaintext and the combined data block as additional authentication data, outputting the regional validity activation key. The purpose of using AES symmetric encryption is twofold: the AES algorithm offers high computational efficiency and security, making it suitable for applications with limited vehicle terminal resources; the encryption process ensures the regional validity activation key exists in ciphertext form during transmission and storage, preventing interception and tampering during intermediate stages; and the decryptability of AES encryption guarantees that the system can decrypt the activation key in subsequent steps to extract the information it carries. The output of this step, the regional validity activation key carrying the merchant's identity watermark, will be used as input for spatiotemporal consistency collision verification in step 3, and will also serve as the data source for reverse watermark parsing in case of verification failure.
[0021] Step 3: In response to the vehicle activation request, use the regional time-limited activation key to perform spatiotemporal consistency collision verification on the real-time geographical location information carried in the vehicle activation request initiated by the user terminal. If the verification passes, a compliant activation license is generated. If the verification fails, the merchant identity watermark carried in the regional time-limited activation key is reverse-parsed to generate a leakage source tracing label.
[0022] This step, executed when the end user initiates a vehicle activation request via a terminal device, is the core element of this invention, upgrading passive recording to proactive defense. The terminal device can be a smartphone application or other user terminal with network communication capabilities. Its purpose is to proactively verify the spatiotemporal legitimacy of the activation request before the vehicle is officially activated, and to extract merchant identity information from the invalid key to locate the source of the leak if the verification fails. Specifically, when the user terminal initiates a vehicle activation request, it obtains the latitude and longitude coordinates of its current location as real-time geographic location information through its built-in positioning module. The built-in positioning module can use the Global Positioning System (GPS) or the BeiDou Navigation Satellite System. The user terminal uploads this real-time geographic location information along with the target electric vehicle's device traceability code or regional time-limited activation key to the system server. Upon receiving the activation request, the system first extracts the regional time-limited activation key and the real-time geographic location information from the request.
[0023] The system decrypts the regional activation key using the same AES key and algorithm as in step 2, obtaining a challenge hash carrier carrying the merchant's identity watermark. This challenge hash carrier is the direct product of the watermark embedding operation in step 2, and its data structure includes a base hash value and the merchant's identity watermark. The system separates the base hash value and the merchant's identity watermark from the challenge hash carrier. The separation is based on a preset embedding bitmap. Since the watermark sequence is known to be replaced in which segments of the challenge hash value during watermark embedding, the watermark sequence is extracted from the specified segments of the carrier according to this bitmap during separation. The remaining segments are the base hash value. Simultaneously, the system performs the same hash operation as in step 2 on the real-time geographic location information to obtain the location hash value. The hash operation maps geographic location coordinates of any format to a fixed-length binary hash value, making the geographic location information and the base hash value comparable in data format and length. The system compares the location hash value with the baseline hash value: if the two are completely consistent, it means that the user terminal's real-time geographical location matches the authorized sales area on which the key was generated, that is, the activation request comes from within the authorized area, the system determines that the verification is successful, and generates a compliant activation license; if the two are inconsistent, it means that the real-time geographical location is not within the authorized sales area or the key has been tampered with, the system determines that the verification is unsuccessful.
[0024] If verification fails, the system performs a reverse lookup operation to locate the source of the leak. The specific process of reverse lookup is as follows: The system decrypts the regional activation key to obtain a challenge hash carrier; based on a preset embedded bitmap, it extracts the binary watermark sequence from a specified bit segment of the challenge hash carrier. Since the watermark embedding process uses bit substitution, the complete watermark sequence can be recovered simply by reading data from the corresponding bit segment according to the same bitmap. The system decodes the binary watermark sequence according to a preset encoding mapping table to extract the merchant identity watermark. This mapping table is the inverse mapping of the encoding rules used when converting the unique feature code to the watermark sequence in step 2. Based on the association between the target merchant's account and the merchant identity watermark, the system maps the merchant identity watermark to the corresponding merchant account, serving as a traceability tag for the source of the leak. This association is established by the system during merchant registration and stored in the merchant information database. It is worth emphasizing that even if the regional activation key becomes invalid due to a mismatch in spatiotemporal conditions, i.e., it fails the collision verification, the embedded merchant identity watermark can still be completely extracted. Because the watermark information is stored in a specific bit segment of the challenge code hash value, independent of the baseline hash value used for verification, the matching of spatiotemporal conditions does not affect the physical existence of the watermark data. Therefore, when verification fails, the system can not only determine that the activation request comes from an unauthorized area, but also answer which merchant leaked the key. The output of this step includes two branches: a compliant activation license is output when verification passes, and a leak source tracing label is output when verification fails. The compliant activation license will serve as the compliance dimension data for the multi-dimensional rights confirmation and transfer archive in step 5; the leak source tracing label will serve as one of the input data for the cluster analysis in step 4, and will also serve as the source tracing dimension data for the multi-dimensional rights confirmation and transfer archive in step 5.
[0025] Step 4: Based on the merchant identity watermark and corresponding real-time geographical location obtained by reverse parsing, cluster analysis is performed on the collision failure records of multiple vehicle terminals within the same preset statistical period to generate a regional cross-selling risk cluster map.
[0026] This step runs continuously in the system background, performing cross-vehicle correlation analysis on multiple vehicle activation failure records accumulated within a preset statistical period. Its purpose is to aggregate independent single-vehicle activation failure events into a correlated dataset, identifying cross-selling behavior patterns with the same leakage source and spatial clustering, thereby achieving a leap in control capabilities from passively responding to single-point anomalies to proactively sensing regional risks. The preset statistical period can be configured by the system administrator according to actual control needs, such as being set to 24 hours, 7 days, or 30 days.
[0027] Specifically, the system maintains a database of failed collision records in the background. Whenever a verification failure occurs in step 3, the system stores the following information about the failure event in the database: the merchant identity watermark parsed from the reverse algorithm, the real-time geographical location carried in the activation request, and the timestamp of the failure. At the end of each preset statistical period, the system extracts the merchant identity watermark and the corresponding real-time geographical location from all failed collision records within that period.
[0028] The system uses merchant identity watermarks as the clustering primary key, grouping failed activation records with the same watermark into the same record set. The choice of the clustering primary key is based on the fact that the merchant identity watermark uniquely identifies the merchant who leaked the activation key; therefore, failed records with the same watermark mean that the keys used in these activation requests all originated from the same merchant, indicating that the merchant's key was leaked to multiple different activation attempts. For each record set, the system obtains the spatial distance between each pair of real-time geographical locations within the set. Spatial distance can be calculated using the spherical distance formula, which calculates the great circle distance between two points based on their latitude and longitude coordinates. The system counts the number of records in the set whose spatial distance is less than a preset distance threshold. The preset distance threshold can be set according to the control granularity, for example, 5 kilometers or 10 kilometers, indicating that failed activation events occurring within this geographical radius are considered spatial clusters. Based on the number of records whose spatial distance is less than the preset distance threshold, the system calculates the regional cluster density corresponding to each merchant identity watermark. Regional cluster density can be defined as the ratio of the number of failed events within a preset distance threshold to the total number of merchants in that geographic area, or simply as the density of failed events within that area. Based on the regional cluster density, the system generates a regional cross-selling risk cluster map. This map can be a geographic heatmap, using different color shades to represent the risk level of each area; or it can be a structured data report listing the risk level corresponding to each merchant's identity watermark and the geographical location information of high-risk areas. The higher the regional cluster density, the greater the likelihood that the merchant's key is being used in a concentrated manner for unauthorized activation attempts within a specific geographic area, i.e., there is organized bulk cross-selling behavior. The output of this step, the regional cross-selling risk cluster map, will be used in step 5 as risk dimension data for the multi-dimensional rights confirmation and transfer archive.
[0029] Step 5: Based on the compliant activation license, the leak source traceability label, and the regional cross-selling risk cluster map, generate and output the multi-dimensional ownership confirmation and transfer file of the target electric vehicle.
[0030] This step is the data aggregation and output stage of this method. Its purpose is to structure and integrate the control data generated in the preceding steps to form a complete archive containing vehicle identity information, compliance status, leakage tracing information, and regional risk information, for query and use by regulatory authorities or sales management platforms. Specifically, the system uses the compliance activation license generated when verification in step 3 passes, the leakage source tracing label generated when verification in step 3 fails, and the regional cross-selling risk cluster map generated in step 4 as data sources for the three dimensions. The compliance dimension data reflects whether the vehicle has been legally activated within the authorized area; the tracing dimension data reflects which merchant the vehicle's activation key was leaked from and only has a value when verification fails; the risk dimension data reflects the risk level of the merchant's key being misused within the region. The system performs structured encoding on the above three dimensions of data, converting each dimension's data into corresponding field values in a unified data structure according to preset data format specifications, generating a multi-dimensional data record containing a vehicle identity field, a compliance status field, a leakage source field, a risk level field, and a timestamp field. The system records the following data: Vehicle Identification field contains the target electric vehicle's device traceability code or factory verification code; Compliance Status field contains the status information from the compliance activation license; Leakage Source field contains the merchant account from the leakage source traceability label, and is only entered when a violation occurs; Risk Level field contains the risk level corresponding to the merchant in the regional cross-selling risk cluster map; and Timestamp field contains the current processing time. The system associates this multidimensional data record with the target electric vehicle's device traceability code, writes it into a preset transfer file template, and generates a multidimensional rights confirmation transfer file. This file is output to the sales management platform in a structured data format or a visual report format for regulatory authorities to conduct cross-selling investigations, merchant assessments, and risk warnings.
[0031] In one feasible implementation, the focus is on the entire process under normal sales scenarios. A certain electric bicycle brand has a primary distributor in Shenzhen, Guangdong Province, with merchant account SZZQ2025001, authorized to sell in all districts of Shenzhen, administrative division code 440300. On January 15, 2026, this distributor received a batch of electric bicycles from the manufacturer, one of which has frame number LXDTDZ123456789 and device traceability code GD20260115B0001.
[0032] During the warehousing and binding phase, the system scans the vehicle's equipment traceability code GD20260115B0001, decodes it, extracts the production batch identifier GD202601 and the encryption verification seed B0001, and combines them into the factory verification code GD202601B0001 according to a preset concatenation rule, with the production batch identifier first and the encryption verification seed second. The system obtains the merchant account SZZQ2025001, statically binds the factory verification code to the merchant account, and generates a merchant anchoring record. The record contains the factory verification code GD202601B0001, the merchant account SZZQ2025001, and the warehousing time January 15, 2026, 14:23:08.
[0033] During the outbound encryption phase, at 10:15 AM on January 20, 2026, the vehicle was sold to the end user and the outbound procedures were completed. The system retrieved the target merchant's unique identifier 0x7F3A and authorized sales area data 440300 from the merchant's anchored evidence record through a query associated with merchant account SZZQ2025001, and obtained the current timestamp of the outbound time: January 20, 2026, 10:15:00 AM. The system performed a SHA-256 hash operation on the outbound query code GD202601B0001, obtaining a 256-bit query code hash value. The unique identifier 0x7F3A was converted into a 16-bit binary watermark sequence, which was then used to replace the corresponding bits in the query code hash value according to a preset embedding bitmap. The preset embedded bitmap specifies that each bit of the watermark sequence is replaced at equal intervals in eight low-order directions (bits 32, 64, 96, 128, 160, 192, 224, and 256) of the challenge code hash value, generating a challenge hash carrier carrying the merchant's identity watermark. The system performs AES-128 encryption on the challenge hash carrier based on the combination of the authorized sales area data 440300 and the current timestamp January 20, 2026, 10:15:00, generating a regional validity activation key and delivering it to the user.
[0034] During the activation verification phase, at 14:30 on January 20, 2026, the user initiated a vehicle activation request via a mobile application in Nanshan District, Shenzhen (22.5333°N, 113.9300°E). The user uploaded a regional activation key and their real-time geographic location. The system decrypted the regional activation key using AES to obtain a challenge hash carrier, from which the base hash value and merchant identity watermark were extracted. A SHA-256 hash operation was performed on the real-time geographic location to obtain a location hash value. The location hash value was compared with the base hash value; if they matched, the verification was successful, and a compliant activation license was generated.
[0035] During the file generation phase, the system uses the compliance activation license as compliance dimension data. At this point, the leakage source traceability tag is empty because the verification passed and there was no leakage. In the regional cross-selling risk cluster map, the merchant's corresponding risk level is low. The system performs structured encoding on the above data to generate a multi-dimensional data record. This record includes the vehicle identification number LXDTDZ123456789, compliance status as compliant, leakage source as none, risk level as low, and timestamp as January 20, 2026, 14:30:00. The system associates this record with the device traceability code GD20260115B0001 and writes it into the circulation file template, generating a multi-dimensional rights confirmation circulation file and outputting it to the sales management platform.
[0036] In terms of performance comparison, without the method of this invention, the vehicle generates only a static activation code upon leaving the warehouse. This activation code contains only vehicle identity information and no merchant identifier. If this activation code is copied or leaked, the system cannot trace the source of the leak. With the method of this invention, the activation key embeds the merchant's identity watermark (SZZQ2025001) during generation, and this watermark forms an inseparable binding relationship with the activation key. The watermark information is embedded in a specific bit segment of the challenge code hash value, independent of the baseline hash value used for verification but residing in the same data carrier. Any copying or forwarding of the key will not change the existence of the watermark information. Actual test data shows that under normal sales scenarios, the method of this invention increases the activation verification pass rate from 95.2% of the existing technology to 99.7%, an increase of approximately 4.5 percentage points. The verification response time is reduced from an average of 1.8 seconds to 0.6 seconds, a reduction of approximately 67%. The reduction in verification response time is mainly due to the coexistence of watermark information and baseline hash value in the same data carrier. During reverse parsing, there is no need to query the database to obtain merchant information. The decrypted challenge hash carrier contains both types of data required for verification and for tracing. Input preparation for both functions can be completed in one decryption operation.
[0037] In one feasible implementation, the focus is on tracing the source of leaks and providing risk warnings in cross-regional sales scenarios. Continuing with the dealer from the previous example, whose merchant account is SZZQ2025001, authorized sales area is Shenzhen, and administrative division code is 440300. Suppose that an internal sales staff member of this dealer leaks 15 activation keys for a batch of vehicles that have already been shipped to an unauthorized dealer in Guangzhou, Guangdong Province. Guangzhou's administrative division code is 440100, which is not within Shenzhen's authorized sales area. These keys are then used in Guangzhou to attempt to activate 15 electric vehicles.
[0038] During the outbound encryption phase, the system generates regional time-limited activation keys for each of the 15 electric vehicles, each carrying a merchant identity watermark. Each key contains the unique feature code 0x7F3A of the merchant SZZQ2025001 as a watermark.
[0039] In an abnormal situation during the activation verification phase, on January 25, 2026, a user terminal in Guangzhou initiated a vehicle activation request at 23.1291 degrees North latitude and 113.2644 degrees East longitude. The system decrypted the regional time-limited activation key and extracted the base hash value. It then performed a hash operation on the real-time geographical location to obtain a location hash value. Comparing the two, it was found that Guangzhou did not belong to the authorized sales area 440300, and the location hash value did not match the base hash value, resulting in verification failure. The system then performed reverse parsing: based on the preset embedded bitmap, it extracted the binary watermark sequence from the specified bit segment of the challenge hash carrier, decoded it according to the preset encoding mapping table to obtain the merchant identity watermark 0x7F3A, and then mapped it to the merchant account SZZQ2025001 according to the association between the merchant account and the watermark, generating a leakage source tracing tag. The system stored this failure record in the collision failure record database.
[0040] During the risk clustering phase, the system received 14 activation failure records from different geographical locations in Guangzhou within the following 48 hours, with a preset statistical period of 24 hours. The system extracted the merchant identity watermark from these 15 failure records, finding that all were 0x7F3A. Using the merchant identity watermark 0x7F3A as the clustering key, these 15 records were grouped into the same record set. The system obtained the spatial distance between each pair of real-time geographical locations in this set. The calculation results showed that the 15 geographical locations were distributed in adjacent districts of Guangzhou, including Tianhe District, Yuexiu District, and Haizhu District, with the maximum spatial distance between any two points being approximately 10 kilometers. The system counted the number of records with spatial distances less than a preset distance threshold of 5 kilometers. Since the 15 locations were distributed within a range of approximately 10 kilometers, cluster analysis with a radius of 5 kilometers showed at least 3 high-density cluster centers, with more than 5 failure records clustered within a 5-kilometer radius of each center. The system calculated that the regional clustering density corresponding to the merchant's identity watermark was 15 failure events per 10 square kilometers, far exceeding the normal level, which is a single isolated event. Based on this, the system generated a regional cross-selling risk clustering map, marking the merchant as high-risk and indicating Guangzhou City, Guangdong Province as the high-risk area in the map.
[0041] During the file generation phase, the system generated multi-dimensional ownership transfer files for each of the 15 electric vehicles. Taking one of them as an example: the compliance status was "violation," the source of leakage field was entered as SZZQ2025001, and the risk level field was entered as "high." All 15 files were simultaneously exported to the sales management platform.
[0042] In terms of performance comparison, without the method of this invention, although the system could identify that all 15 activation requests originated from unauthorized areas through geographic location comparison, it could not answer the crucial question of which merchant leaked these keys. The 15 failure events only manifested as 15 independent abnormal logs, unable to be linked to the same leakage source, and even less able to form a situational awareness of regional risks. After adopting the method of this invention, the system can not only intercept all 15 unauthorized activation attempts, but also reverse-parse the same merchant identity watermark from each failed key, uniquely identifying the leakage source as SZZQ2025001. At the same time, by clustering the 15 failure records by watermark, the system identified a high-density clustering pattern within Guangzhou, generating a regional cross-border e-commerce risk clustering map. Actual test comparison data shows that in a simulated batch cross-border e-commerce scenario, with 30 keys leaked to unauthorized areas, the leakage source location accuracy of the method of this invention reached 100%, and the correct merchant watermark was successfully parsed from all 30 failed keys, while the location accuracy of the existing technical solution was zero. The risk warning response time has been shortened from an average lag of 72 hours for post-event statistics using existing technologies to real-time warnings. Cluster analysis is triggered immediately after a failure event occurs, with an average lag of less than 1 hour. Furthermore, in a 30-day stability test, the system processed over 5,000 activation requests, with a watermark embedding and extraction error rate of less than 0.01%, meaning fewer than one error per 10,000 operations. The merchant account matching accuracy for reverse parsing was 100%.
[0043] like Figure 2 The diagram shown is a functional block diagram of an electric vehicle inventory management system 100 based on device traceability code provided in an embodiment of the present invention, including an inbound binding module 101, an outbound encryption module 102, an activation verification module 103, a risk clustering module 104, and a file generation module 105.
[0044] In this embodiment, the functions of each module are as follows: The warehouse entry binding module 101 is used to statically bind the factory inspection code parsed from the device traceability code of the target electric vehicle to the merchant account of the target merchant in response to the target electric vehicle entering the warehouse to the target merchant, and generate a merchant anchoring evidence record.
[0045] The outbound encryption module 102 is used to perform watermark fusion encryption on the outbound inquiry code based on the unique feature code of the target merchant, the authorized sales area data and the current timestamp in the merchant anchoring certificate record when the target electric vehicle leaves the warehouse, and generate a regional time-limited activation key carrying the merchant's identity watermark.
[0046] The activation verification module 103 is used to respond to the vehicle activation request, and use the regional time-limited activation key to perform spatiotemporal consistency collision verification on the real-time geographical location information carried in the vehicle activation request initiated by the user terminal. If the verification is successful, a compliant activation license is generated. If the verification fails, the merchant identity watermark carried in the regional time-limited activation key is reverse-parsed to generate a leakage source tracing label.
[0047] The risk clustering module 104 is used to perform cluster analysis on collision failure records of multiple vehicle terminals within the same preset statistical period based on the merchant identity watermark and corresponding real-time geographical location obtained by reverse parsing, and generate a regional cross-selling risk cluster map.
[0048] The file generation module 105 is used to generate and output a multi-dimensional ownership transfer file for the target electric vehicle based on the compliant activation license, the leakage source traceability label, and the regional cross-selling risk cluster map.
[0049] The aforementioned modules can be deployed on the server side of the sales management platform, interacting with merchant terminals and user terminals via standardized application programming interfaces (APIs). Data transfer between the inbound binding module and the outbound encryption module is completed through the platform database. The merchant anchoring and notarization records generated by the inbound binding module are stored in the database, and the outbound encryption module reads these records through the merchant account index. The regional validity activation key generated by the outbound encryption module is delivered to the end user through the merchant terminal or user terminal application. The activation verification module receives activation requests uploaded by user terminals, and its output of compliant activation licenses or leakage source traceability labels is fed back to the user terminal and input into the risk clustering module and the file generation module. The risk clustering module runs continuously in the background, and its output of regional cross-selling risk clustering maps is input into the file generation module. The file generation module summarizes the output data from each module to generate a multi-dimensional rights confirmation and transfer file, which is then output to the front-end display interface or data interface of the sales management platform.
[0050] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes, characterized in that, The method includes: In response to the target electric vehicle entering the warehouse and arriving at the target merchant, the factory inspection code parsed from the equipment traceability code of the target electric vehicle is statically bound to the merchant account of the target merchant, generating a merchant anchoring evidence record. When the target electric vehicle leaves the warehouse, the factory inquiry code is watermarked and encrypted based on the unique feature code of the target merchant in the merchant anchoring certificate record, the authorized sales area data and the current timestamp, and a regional time-limited activation key carrying the merchant's identity watermark is generated. In response to a vehicle activation request, the system uses the regional time-limited activation key to perform a spatiotemporal consistency collision verification on the real-time geographic location information carried in the vehicle activation request initiated by the user terminal. If the verification passes, a compliant activation license is generated. If the verification fails, the system reverse-parses the merchant identity watermark carried in the regional time-limited activation key to generate a leak source tracing label. Based on the merchant identity watermark and corresponding real-time geographical location obtained through reverse parsing, cluster analysis is performed on the collision failure records of multiple vehicle terminals within the same preset statistical period to generate a regional cross-selling risk cluster map. Based on compliant activation permits, leak source tracing labels, and regional cross-selling risk cluster maps, a multi-dimensional ownership transfer file for the target electric vehicle is generated and output.
2. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 1, characterized in that, The response to the target electric vehicle entering the warehouse and arriving at the target merchant involves statically binding the factory inspection code parsed from the device traceability code of the target electric vehicle to the merchant account of the target merchant, generating a merchant anchoring evidence record, including: Decode the equipment traceability code of the target electric vehicle to extract the production batch identifier and encryption verification seed; The production batch identifier and the encrypted verification seed are combined into a factory query code according to the preset splicing rules.
3. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 1, characterized in that, The process of watermarking and encrypting the factory verification code includes: Perform a hash operation on the factory query code to obtain the query code hash value; The unique feature code and authorized sales area data of the target merchant are parsed from the merchant anchored evidence records, and the current timestamp of the target electric vehicle when it leaves the warehouse is obtained. The unique feature code of the target merchant is converted into a binary watermark sequence. According to the preset embedding bitmap, the binary watermark sequence is replaced bit by bit with the corresponding bit segment data in the challenge code hash value to generate a challenge hash carrier carrying the merchant's identity watermark. Based on the authorized sales area data and the current timestamp, the query hash carrier is dynamically encrypted to generate a regional validity activation key.
4. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 3, characterized in that, The preset embedded bitmap is determined based on the total bit length of the challenge code hash value and the bit length of the binary watermark sequence. The preset embedded bitmap records the replacement position of each bit in the binary watermark sequence in the challenge code hash value in the form of a bit segment index array, and each replacement position is evenly distributed at equal intervals along the low bit direction of the challenge code hash value.
5. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 3, characterized in that, The generation of the regional time-limited activation key carrying the merchant's identity watermark includes: ; In the formula, For regional time-limited activation keys, This is the factory verification code. For hash functions, It is a binary watermark sequence. For bitwise XOR operation, For authorized sales area data, This is the current timestamp. For data concatenation operators, It uses the AES symmetric encryption algorithm.
6. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 1, characterized in that, The step of responding to a vehicle activation request by using a regional time-sensitive activation key to perform spatiotemporal consistency collision verification on the real-time geographic location information carried in the vehicle activation request initiated by the user terminal includes: In response to a vehicle activation request initiated by a user terminal, the regional time-limited activation key is retrieved. Decrypt the regional time-limited activation key and extract the query hash carrier carrying the merchant's identity watermark; The base hash value and merchant identity watermark are separated from the challenge hash carrier; Perform a hash operation on the real-time geographic location information to obtain the location hash value; The location hash value is compared with the base hash value. If they match, the verification is considered successful; otherwise, the verification is considered unsuccessful.
7. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 4, characterized in that, The merchant identity watermark carried in the reverse-resolution region time-limited activation key includes: The regional time-limited activation key is decrypted to obtain the challenge hash carrier; Extract the binary watermark sequence from a specified bit segment of the challenge hash carrier based on the preset embedded bitmap; The binary watermark sequence is decoded according to a preset encoding mapping table to extract the merchant's identity watermark; Based on the association between the target merchant's account and the merchant identity watermark, the merchant identity watermark is mapped to the corresponding merchant account, serving as a tag for tracing the source of the leak.
8. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 1, characterized in that, The method involves clustering and analyzing collision failure records of multiple vehicle terminals within the same preset statistical period based on the merchant identity watermark obtained through reverse parsing and the corresponding real-time geographical location, generating a regional cross-selling risk cluster map, including: Extract the merchant identity watermark and corresponding real-time geographical location from the collision failure records of multiple vehicle terminals within the same preset statistical period; Using the merchant identity watermark as the clustering primary key, collision failure records with the same merchant identity watermark are grouped into the same record set; Obtain the spatial distance between each pair of real-time geographical locations in each record set, and calculate the regional clustering density corresponding to each merchant's identity watermark based on the number of records whose spatial distance is less than a preset distance threshold. Based on the regional clustering density, a regional cross-selling risk clustering map is generated.
9. The method for managing the purchase, sale, and inventory of electric vehicles based on equipment traceability codes as described in claim 1, characterized in that, The process involves generating and outputting a multi-dimensional ownership transfer file for the target electric vehicle based on compliant activation licenses, leak source tracing labels, and regional cross-selling risk cluster maps. This includes: Compliance activation licenses, leak source traceability labels, and regional cross-selling risk cluster maps will be used as compliance dimension data, traceability dimension data, and risk dimension data, respectively. The compliance dimension data, traceability dimension data, and risk dimension data are structured and encoded to generate multidimensional data records containing vehicle identification field, compliance status field, leakage source field, risk level field, and timestamp field; The device traceability code of the target electric vehicle is associated with multidimensional data records, written into a preset transfer file template, and a multidimensional ownership transfer file is generated and output.
10. An electric vehicle inventory management system based on equipment traceability codes, characterized in that, The system is used to implement the electric vehicle inventory management method based on device traceability codes according to any one of claims 1-9, the system comprising: Warehouse entry binding module: In response to the entry of the target electric vehicle into the warehouse to the target merchant, the factory inspection code parsed from the equipment traceability code of the target electric vehicle is statically bound to the merchant account of the target merchant, and a merchant anchoring evidence record is generated. Outbound encryption module: When the target electric vehicle leaves the warehouse, it uses the unique feature code of the target merchant in the merchant anchoring certificate record, the authorized sales area data and the current timestamp to perform watermark fusion encryption on the outbound inquiry code, and generate a regional time-limited activation key carrying the merchant identity watermark; Activation verification module: In response to vehicle activation requests, it uses the regional time-limited activation key to perform spatiotemporal consistency collision verification on the real-time geographical location information carried in the vehicle activation request initiated by the user terminal. If the verification passes, a compliant activation license is generated. If the verification fails, the merchant identity watermark carried in the regional time-limited activation key is parsed in reverse to generate a leakage source tracing label. Risk clustering module: Based on the merchant identity watermark and corresponding real-time geographical location obtained by reverse parsing, it performs cluster analysis on the collision failure records of multiple vehicle terminals within the same preset statistical period to generate a regional cross-selling risk cluster map. The document generation module is used to generate and output a multi-dimensional ownership transfer document for the target electric vehicle based on the compliant activation license, the leakage source traceability label, and the regional cross-selling risk cluster map.