Vehicle diagnosis reversible data desensitization and controlled restoration method based on AI processing
The AI-processed method for desensitizing and controlling the restoration of reversible vehicle diagnostic data solves the problem of protecting sensitive information and preserving semantics during the interaction of vehicle diagnostic data, achieving secure and reversible data restoration and ensuring the security and availability of diagnostic data in artificial intelligence processing.
Patent Information
- Application Number
- CN202611447141.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-17
- Publication Date
- 2026-11-06
AI Technical Summary
Existing technologies struggle to effectively identify and protect sensitive information during vehicle diagnostic data interaction, and existing desensitization methods may disrupt diagnostic semantics or lose entity relationships, leading to the leakage of sensitive information or irreversible data recovery.
A vehicle diagnostic reversible data desensitization and controlled restoration method based on AI processing is adopted. Through task context acquisition, structured parsing, sensitive information identification, processing action determination and structured replacement, reversible desensitized data is generated and verified and restored in the local environment to ensure that sensitive information is not leaked during the data interaction process.
By maintaining the semantic and entity relationships of diagnostic data without disclosing sensitive information, and ensuring that the data can be reversibly restored in artificial intelligence processing, the security and usability of vehicle diagnostic data are improved.
Smart Images

Figure CN123049652A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of vehicle diagnostic data security and artificial intelligence data processing technology, specifically to a method for local sensitive information identification, reversible data desensitization, and controlled restoration of vehicle diagnostic data based on messages or service interfaces, particularly to a method and system, electronic device, and computer-readable storage medium for reversible data desensitization and controlled restoration of vehicle diagnostic data based on AI processing. Background Technology
[0002] As artificial intelligence (AI) is used for vehicle fault analysis, diagnostic result summarization, and report generation, diagnostic systems need to provide AI with diagnostic requests and responses, service interface data, XML or JSON diagnostic reports, logs, and free text descriptions. This diagnostic interaction data can be diagnostic protocol data in message units, requests and responses generated by accessing vehicle entities, components, applications, faults, measurements, or operational resources through service interfaces, or structured diagnostic reports, logs, and free text. This data may include vehicle identifiers, component identifiers, application identifiers, customer or organization names, project names, hostnames, IP addresses, resource addresses, file paths, passwords, authentication headers, access tokens, API keys, certificate materials, time, location, and diagnostic content. If raw data is sent directly to external AI, sensitive information may leave the controlled environment, and authentication information may be replayed. Using uniform asterisks, complete deletion, or indiscriminate placeholders will result in the loss of request-response relationships, resource levels, the correspondence between fault entries and their respective entities, and duplicate relationships of the same entity in resource paths and message bodies.
[0003] Existing anonymization methods based on regular expressions or field names can identify information with explicit formats, but they struggle to identify customer names, organization names, locations, aliases, abbreviations, and context-dependent secrets in free text. Fixed dictionaries also cannot dynamically determine sensitive information based on task purpose, field role, and diagnostic interaction type. For message-based diagnostic data, retaining it entirely may expose the data payload, while deleting it entirely will result in the loss of service identifiers, data identifiers, negative response codes, and result statuses. For service interface-based diagnostic data, directly deleting URLs, resource paths, or message bodies will disrupt resource semantics and entity relationships.
[0004] Therefore, there is a need for a method that treats diagnostic interaction data as a unified processing object, can separately parse message-based diagnostic protocol data and service interface-based diagnostic data, protects sensitive information by field function, maintains diagnostic semantics and entity relationships, and verifies and restores references in artificial intelligence responses. Summary of the Invention
[0005] To address the technical problems existing in the prior art, the present invention provides the following technical solution: On the one hand, a method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing is provided, including the following steps: Task context acquisition: Receive diagnostic interaction data to be processed and generate task purpose and policy context; Structured parsing: Select the corresponding parsing rule according to the diagnostic interaction type, and perform structured parsing on the diagnostic interaction data; Sensitive information identification: The diagnostic interaction data is subjected to deterministic identification through preset rules and conditions to generate a set of deterministic identification candidates; Based on the task strategy, the deterministic identification results and the diagnostic interaction data parsing results, it is determined whether to call the local semantic detection model for supplementary identification; The supplementary identification candidates that pass the verification are merged with the deterministic identification candidates to form the final sensitive candidate set. Action determination: Based on the interactive control information, entity identifiers, and diagnostic content, determine the corresponding action for the field or sensitive entity; Scope-stable reference generation: Within the same scope, multiple references that are identified as the same sensitive entity after original value normalization, field context comparison and entity merging are identified by the same reference identifier, forming an external reference visible to the target AI, a task semantic list without original values, and an original value mapping visible only locally; Structured replacement and pre-send checks: Based on the structural location provided by the structure parser, locate the content to be processed, perform corresponding processing actions on non-overlapping candidates, and re-serialize according to the original data format; perform deterministic residual checks on the data to be sent based on the original value mapping, sensitive type policy, and prohibited sending field list for this task; if the original value or its variant is found to be a residual, re-execute the structured replacement; if suspected sensitive content is found, call the local semantic detection model to supplement the identification and re-execute the replacement and checks; if the sending policy is not met, perform a safe rollback; Artificial intelligence processing: Only send the de-identified diagnostic interaction data representation, task semantic list, and legal citation list summary that have passed the inspection to the target artificial intelligence, and receive the processing results returned by the target artificial intelligence; Response reference validation: Validate the scope, valid set, and output location of the response references returned by the target AI in the processing results. Controlled restoration: Based on the task purpose and the output receiver's permissions, the validated reference is bound to the corresponding value in a structured location.
[0006] On the other hand, an AI-based system for reversible desensitization and controlled restoration of vehicle diagnostic data is provided, including: The task strategy module is used to receive diagnostic interaction data, generate task identifiers and scope identifiers, and manage task purpose, target AI endpoint, allowed fields to be sent, prohibited types to be sent, diagnostic interaction parsing rules, mapping validity period, and allowed restoration range. The diagnostic interaction type determination module is used to determine the type of diagnostic interaction data and select the corresponding parsing rule; The message-based diagnostic data parsing module is used to parse message-based diagnostic protocol data and identify interactive control information, diagnostic object identification information, and diagnostic content data boundaries. The diagnostic data parsing module based on the service interface is used to parse diagnostic data based on the service interface, and identify request methods, resource paths, entity and resource hierarchy relationships, and structured message body fields; the rule recognition module is used to identify deterministic sensitive information through field rules, regular expressions, dictionaries and validation algorithms. The local semantic detection model and its call judgment module are used to determine whether to call the local semantic detection model to supplement the identification of dynamic sensitive information based on the task strategy, deterministic recognition results and diagnostic interaction data parsing results. The sensitive candidate fusion module is used to fuse deterministic identification candidates with verified supplementary identification candidates to form the final sensitive candidate set; The scope-stable reference generation module is used to generate the same reference identifier for multiple references identified as the same sensitive entity within the same scope, forming external references, task semantic lists, and original value mappings; the local mapping module is used to store and manage original value mappings that are only visible locally; The processing action determination and structured replacement module is used to determine the processing action of fields or sensitive entities according to the task strategy, and perform structured replacement based on the structural location and entity reference to form desensitized data; The pre-send check module is used to perform deterministic residual checks on the data to be sent and to perform a safe rollback if the sending strategy is not met. The AI adaptation module is used to send de-identified data that has passed inspection to the target AI and receive the processing results. The response reference verification module is used to verify the legality, reference type, allowed output location, and number of times the entity references in the target AI response are used. The controlled restore module is used to bind the validated references to the corresponding values in a structured location according to the purpose of the task and the permissions of the output receiver; Each module is deployed in the same vehicle diagnostic device or in a mutually certified local trusted node.
[0007] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the method described above.
[0008] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the above method.
[0009] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: Without providing the target AI with original sensitive values or usable, replayable authentication information, the diagnostic interaction data is structured and semantically preserved to retain the interactive control information, diagnostic object identification relationships, resource semantics, request-response relationships, fault status and field structure required for diagnostic analysis. Ensure that the same vehicle, component, application, diagnostic resource, or network endpoint is referenced consistently within the same task; By dynamically supplementing identification locally, validating scope, and validating allowed output locations, we avoid omissions in desensitization and erroneous restoration caused by artificial intelligence rewriting, fabrication, or misuse of entity references. When parsing, identification, or response verification fails, the system can maintain the desensitized state, expand the desensitization scope, switch to local processing, or block transmission, thereby improving the security and availability of vehicle diagnostic data when processed using artificial intelligence. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A complete flowchart of a method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing; Figure 2 Flowchart for diagnostic interaction type determination and dual-branch parsing; Figure 3 Flowchart for sensitive information identification, local model call judgment, and three-layer mapping; Figure 4 Flowchart for AI response reference verification and controlled restoration. Detailed Implementation
[0012] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0013] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.
[0014] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.
[0015] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.
[0016] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0017] This invention aims to address the issues that when vehicle diagnostic data is processed by artificial intelligence models, sensitive information may leave the local controlled environment, and existing desensitization methods struggle to simultaneously protect sensitive information, preserve diagnostic semantics, and ensure reversible result restoration. Existing processing methods based on fixed fields, regular expressions, or preset dictionaries struggle to fully identify customer names, organization names, project codes, device aliases, location information, and context-related secrets in diagnostic logs and free text. Using uniform overwriting, overall deletion, or ordinary placeholder replacement may disrupt the consistency of the same vehicle, electronic control unit, project, or other entity across different fields and data blocks, and lose the correspondence between diagnostic requests and responses. For diagnostic protocol data units, overall retention may expose sensitive payloads, while overall desensitization may simultaneously lose information required for fault analysis, such as service identifiers, data identifiers, routine identifiers, negative response codes, diagnostic result status, and payload length.
[0018] The method steps of this application are described in detail below with reference to the accompanying drawings and embodiments.
[0019] This application proposes a method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing. Please refer to [link to relevant documentation]. Figure 1 ,include: Steps S1 to S6 complete the following in a local trusted environment: task context acquisition, diagnostic interaction data parsing, sensitive information identification, processing action determination, entity reference generation, structured replacement, and pre-send check. Step S7 sends the de-identified data through inspection to the target AI and receives the processing result returned by the target AI; Steps S8 and S9 complete the response reference verification and controlled restoration in a local trusted environment.
[0020] The specific steps are as follows: Step S1, Task Context Acquisition The system receives diagnostic interaction data to be processed, generates a task identifier (taskId) and a scope identifier (scopeId), and reads the task purpose, target AI endpoint, allowed fields, prohibited types, diagnostic interaction parsing rules, mapping validity period, and allowed restoration range. The diagnostic interaction parsing rules are configuration mappings from input types to structure parsers and field roles, including at least the diagnostic interaction type, protocol type and version, data organization format, interaction direction, service type or request method, resource type, field path, length constraint, encoding method, control information location, identifier information location, diagnostic content boundaries, and parsing failure actions. After the mapping validity period expires, the system prohibits further restoration and destroys or freezes the original value mapping; the allowed restoration range can be limited to specified sensitive types, specified XML nodes, JSON fields, resource path slots, report sections, or output receivers. The diagnostic interaction data includes at least message-based diagnostic protocol data, service interface-based diagnostic data, structured diagnostic reports, logs, and free text. The original data and original value mappings are only allowed to be used in a local trusted environment.
[0021] Step S2, Analysis of structural and diagnostic interactive data The diagnostic interaction data to be processed is parsed using a general structure parsing method to identify nodes, attributes, field paths, log fields, text blocks, contextual relationships, and identifiable correspondences between diagnostic requests and responses. For message-based diagnostic protocol data or service interface-based diagnostic data, the diagnostic interaction type is further determined based on the protocol type, data organization form, and interaction direction, and the corresponding parsing rules are selected.
[0022] Please see Figure 2 For structured diagnostic reports, logs, and free texts that do not belong to the aforementioned two categories, the general structure parsing results are provided to step S3 for sensitive information identification; when the diagnostic report, log, or free text contains diagnostic protocol data or service interface data, the corresponding parts are further parsed using the corresponding parsing rules.
[0023] In the first implementation, the diagnostic interaction data is message-based diagnostic protocol data, specifically including: Step S21, reading diagnostic request protocol data units or diagnostic response protocol data units, and determining parsing rules according to the configured protocol type and message direction; Step S22, parsing interactive control information such as service identifiers, positive response service identifiers, negative response service identifiers, original request service identifiers, and negative response codes; Step S23, parsing data identifiers, routine identifiers, sub-function parameters, logical addresses, storage addresses, or other diagnostic object identification information; Step S24, determining the starting position and length of diagnostic content data according to service type, message length, and protocol rules; Step S25, retaining necessary interactive control information according to the task strategy, performing retention, generalization, or tokenization on sensitive identification information, replacing sensitive diagnostic content with content references, and outputting a desensitized representation that maintains protocol semantics. For diagnostic data based on service interfaces, the system parses according to request method, resource path, response status, and structured message body, instead of using the field division method of protocol data units.
[0024] In an implementation based on the Unified Diagnostic Services (UDS) protocol, the Diagnostic Request Protocol Data Unit and the Diagnostic Response Protocol Data Unit can be simply referred to as the Request PDU and Response PDU. Here, PDU stands for Protocol Data Unit. Values in the message are represented in hexadecimal bytes, with the prefix 0x indicating hexadecimal. The request "22F1 90" consists of three bytes: 0x22 is the service identifier for the read data identifier service, and 0xF190 is the data identifier composed of 0xF1 and 0x90, representing the Vehicle Identification Number (VIN) data item in this embodiment. In the positive response "62 F1 90 ...", 0x62 is the positive response service identifier corresponding to the 0x22 service, and 0xF190 repeatedly identifies the data item being read; the ellipsis indicates that the content bytes following this data item are retained. The system retains 0x62 and 0xF190, replacing subsequent sensitive content bytes with the complete PDU_DATA token. For example, when the original data payload length is 17 bytes, the protocol semantic preservation anonymization representation for AI processing can be "62 F1 90 [PDU_DATA|ID=001|LENGTH=17]". This representation is used to preserve the positive response service identifier, data identifier, and original payload length, without requiring it to constitute a valid UDS message that can be directly sent to the electronic control unit. In the negative response "7F 22 31", 0x7F is the negative response service identifier, 0x22 is the original request service identifier, and 0x31 is the negative response code, which in this embodiment indicates that the request exceeds the allowed range; the system can retain these three control bytes for fault cause analysis. When the protocol is unknown, the length is invalid, or the data boundary cannot be determined, the entire PDU is tokenized or transmission is blocked.
[0025] In the second embodiment, the diagnostic interaction data is diagnostic data based on the service interface, specifically including: Step S26, a service interface request and response parsing step, parsing the request method, resource path, query parameters, request headers, response headers, HTTP response status, and JSON, XML, or other structured message bodies; Step S27, an entity and resource relationship parsing step, identifying entity type, entity identifier, resource type, resource identifier, entity hierarchy relationship, containment relationship, and the association relationship between the diagnostic object and the resource; Step S28, a service interface field classification step, dividing the service interface data into interaction control information, resource and entity identifier information, diagnostic status information, content data, and authentication and security data. Information; Step S29, perform desensitization steps according to field function, retain the request method, resource type, response status, field structure, entity relationship, fault status or operation status required for artificial intelligence analysis, and perform generalization, tokenization, synthesis replacement or blocking on sensitive fields in base address, hostname, IP address, vehicle entity identifier, component entity identifier, application entity identifier, VIN, device serial number, authentication header, access token, customer, project, organization information and message body; Step S210, service interface semantic preservation desensitization representation generation step, combine the processed request method, desensitized resource path, response status, structured message body and non-identifiable entity relationship into a data representation for target artificial intelligence processing.
[0026] In one implementation of an SOVD-like service interface, the original request can be "GET {base_uri} / components / {component-id} / faults" and includes "Authorization: Bearer {access-token}". GET indicates the HTTP request method for reading resources; base_uri indicates the base address of the service interface; components indicates the collection of vehicle component resources; component-id indicates the identifier of a specific vehicle component; faults indicates fault resources; {} indicates placeholders for variables to be replaced. Authorization indicates the HTTP authorization request header, Bearer indicates the holder token authentication method, and access-token indicates the original value of the token that can be used to access the service. After de-identification, the GET request method and faults resource type are retained, the base address is replaced with a BASE_URI reference, the component-id is replaced with a stable COMPONENT reference within the current scopeId, and the entire Authorization field is replaced with an AUTH_SECRET reference, thus not providing the target AI with authentication content that can be used or replayed. The original JSON response may include fields such as vehicleId, componentId, faults, status, severity, networkAddress, and environment. After anonymization, the fault status, severity, fault field structure, and non-identifiable environmental semantics are retained. Tokenization, generalization, or synthetic replacement are performed on sensitive values in vehicle identifiers, component identifiers, network addresses, time, location, and environmental data, respectively. The correspondence between fault entries and their respective vehicle components is maintained through references to the same COMPONENT. The implementation method is not limited to specific SOVD versions, resource paths, or field names.
[0027] Step S3, Sensitive Information Identification and Mapping Preparation Please see Figure 3 Specifically, it includes: Step S31 involves identifying VIN, IP address, MAC address, email, phone number, account, serial number, project name, device name, resource address, file path, password, authentication header, access token, API key, and certificate materials using field rules, regular expressions, dictionaries, and validation algorithms. First, based on the structure parsing results, it traverses XML nodes and attributes, JSON fields, request headers, response headers, resource path segments, query parameters, protocol fields, and free text blocks, recording the blockId data block identifier, fieldPath field path, fieldRole field role, original text start and end positions, and the corresponding diagnostic interaction type for each candidate data unit. Then, it sequentially executes field rules, regular expressions, dictionary matching, and validation algorithms. Field rules generate corresponding sensitive type candidates based on the normalized field name and field path. For example, when the field name is VIN, a vehicle identification number candidate is generated; when the field name is vehicleId, a vehicle identifier candidate is generated, and further determined whether it belongs to a vehicle identification number, universally unique identifier, database primary key, or other vehicle identifier by combining the candidate value length, character set, field path, and context; the Authorization field generates an authentication secret candidate. Regular expressions are used to discover candidate values with well-defined formats and boundaries. For example, a vehicle identification number (VIN) can be represented as "\b[A-HJ-NPR-Z0-9]{17}\b", an IPv4 address as a four-segment checksum expression from 0 to 255, a MAC address as a six-group hexadecimal byte expression, and an email address as a local part, @ symbol, and domain name structure expression. A non-empty token following "Authorization: Bearer" is identified as the authentication secret. Segments beginning with "-----BEGINCERTIFICATE-----" or "-----BEGIN PRIVATE KEY-----" and ending with the corresponding end marker are identified as certificate or private key material. Passwords, API keys, and client secrets are primarily identified based on field names, request header types, and key-value delimiters, relying not only on general high-entropy string regular expressions to reduce false positives for fault codes and diagnostic identifiers. Dictionary matching is used to identify customer, organization, project, component aliases, and internal resource names, employing longest match, case normalization, and exclusion vocabularies. The verification algorithm performs checks on candidate results, including vehicle identification number character set and checksum checks, IPv4 segmentation range checks, MAC byte count checks, URL protocol and host structure checks, allowed field types checks, and context exclusion checks. Only candidate values that simultaneously meet the boundary, type, and context constraints are included in the candidate set. The above expression is a configurable implementation and can be extended by region, protocol version, and business field. For example, in an implementation corresponding to program rule configuration, the IPv4 address expression can be represented as: "\b(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)\b", The MAC address expression is “\b(?:[0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}\b”. The email expression is "\b[\w.%+-]+@[\w.-]+\.[A-Za-z]{2,}\b". The holder token authentication header expression is: "(?i)\bAuthorization\s*:\s*Bearer\s+([A-Za-z0-9._~+ / \-=]+)".
[0028] The regular expression matcher also returns the start and end positions of the match; VIN candidates also exclude the letters I, O, and Q and perform checksum checks as configured; IPv4 candidates are converted segment by segment to integer verification within the range of 0 to 255; the authentication header is processed as the entire field value rather than just replacing a portion of the characters.
[0029] Step S32: Obtain the diagnostic interaction data parsing result formed in step S2, and use the interaction control information, resource control information, entity identification information, diagnostic content data boundary and structured message body field as inputs for sensitive information identification and processing action determination; In step S33, based on the deterministic identification result formed in step S31, the system generates a temporary protected data copy for processing by the local semantic detection model, and retains the structural and textual positional correspondence between the data copy and the original local data. Sensitive information already confirmed in the data copy is protected using a temporary token that does not contain the original sensitive values but can represent the corresponding information type or business role, so as to prevent the local model from accessing the confirmed original values while preserving the field structure, entity relationships, and contextual semantics of the vehicle diagnostic data. The system determines whether supplementary local semantic identification is needed based on the task strategy, the deterministic identification result of step S31, and the parsing result of step S2. When the task strategy requires supplementary identification, or when there is content to be judged not covered by the rules, low-confidence candidates, or semantic ambiguity, the local semantic detection model is invoked on the local machine or a local trusted node for supplementary identification; when supplementary identification is not needed, the existing identification result is used, and model inference is not performed. The preferred local semantic detection model employs a pre-trained large language model loaded through a local model inference runtime environment. Its configuration and adaptation process includes selecting a base model capable of running in a trusted local environment; establishing a semantically sensitive type system based on context-sensitive information from vehicle diagnostic logs, fault descriptions, maintenance records, test records, diagnostic reports, and free text; establishing model input templates, system prompt word templates, user prompt word templates, structured output formats, and output validation rules; and configuring model context length, data partitioning methods, and inference parameters to reduce output randomness. The semantically sensitive types primarily include customer or organization names, project codes, vehicle platform names, test vehicle or test environment names, electronic control unit names, vehicle component names, application names, diagnostic resource names, equipment aliases, internal system or internal resource names, location descriptions, internal abbreviations, and other context-sensitive secrets that require judgment within the vehicle diagnostic context. The local semantic detection model is preferably implemented by combining a pre-trained model with prompt word constraints, without requiring special training or fine-tuning for vehicle diagnostic data; in another implementation, manually labeled and de-identified vehicle diagnostic data can be used to train or fine-tune the basic model, or the trained or fine-tuned model can be combined with task prompt words.The system prompts are used to define the vehicle diagnostic sensitive information supplementation and recognition task, semantic sensitivity types, recognition principles, prohibited behaviors, and output format of the model. At a minimum, the model must combine field paths, field roles, diagnostic interaction types, protocol roles, resource types, entity hierarchy relationships, request-response relationships, and adjacent text to determine sensitive attributes. Existing temporary tokens are treated as protected content; they are not interpreted, rewritten, or restored. The model only recognizes content actually present in the input data, without supplementing entities not present in the input, rewriting or summarizing the original text, performing fault analysis, or directly generating final replacement tokens, entity references, or original value mappings. The recognition results are returned according to a preset structured format. The user prompts are dynamically generated based on the current task and include at least the task purpose, data to be recognized, field paths, field roles, diagnostic interaction types, resource types, entity relationships, adjacent nodes or adjacent text, and allowed semantic sensitivity types, but do not include local original value mappings. The system uses a local model interface that supports role-based message input, treating system prompts as system role message inputs and user prompts as user role message inputs. The local semantic detection model utilizes vehicle diagnostic semantics expressed by field structure, diagnostic object type, resource level, request-response relationship, fault description, and adjacent logs to perform sensitive entity extraction, sensitive type judgment, and sensitive content location on the content still retained in the temporary protection data copy, and returns supplementary identification candidates according to a preset structured format. Each supplementary identification candidate includes at least sensitive type and candidate location information; for JSON, XML, HTTP request headers, or other structured data, the candidate location information may include a field path (fieldPath), which is used to locate structured fields that need to be processed in whole or in part; for logs, fault descriptions, or free text, the candidate location information may include a data block identifier (blockId), the original text start position (start), and the original text end position (end), where the data block identifier is used to determine the log record, text paragraph, or data unit to which the candidate belongs, and the original text start and end positions are used to determine the text range of the sensitive content in the corresponding data block. Supplementary identification candidates may also include a business role and a confidence level, where the business role represents the function of the identified entity in the vehicle diagnostic scenario. The local semantic detection model scores the confidence level of sensitive type judgments based on candidate content, field roles, and context, returning a range of values through the `confidence` field. A higher value indicates greater confidence in the judgment. This score serves as a reference for determining processing actions and does not represent a statistically calibrated accuracy rate. The system configures confidence thresholds according to the task strategy; missing scores, incorrect formatting, or scores exceeding the range are treated as insufficient confidence. Candidates with scores higher than the threshold still need to pass location validity checks, sensitive type legality checks, and content conflict checks; anonymized data still needs to undergo pre-send checks.For candidates requiring processing of the entire field, only the field path and sensitive type need to be returned, without requiring the return of the original text's start and end positions. For candidates requiring processing only a portion of the text within a field, location data uniquely locating the text fragment should be returned. The local semantic detection model is only used to identify the type and location of sensitive information; it does not directly modify diagnostic interaction data, nor does it directly generate the final replacement token or the original value to be replaced. After receiving the model output, the system checks whether the candidate's location information points to valid data in the current task, whether the sensitive type belongs to the preset semantic sensitive type set, whether the field path or text position is within the valid range of the corresponding field or data block, and whether the candidate conflicts with protected temporary tokens, necessary interaction control fields, or unmodifiable structural fields. Candidates whose structured output cannot be parsed, whose location information is invalid, whose sensitive type is unknown, or who conflict with unmodifiable content will not proceed to subsequent processing. For fields or data blocks whose security cannot be determined due to candidate verification failure, the protection scope is expanded or transmission is blocked according to the task strategy; the rejection of a candidate does not determine that the corresponding content can be sent. The semantic supplementation candidates that pass the verification are submitted to step S34 and fused with the deterministic candidates formed in step S31. The final processing action determination, entity reference generation, and structured replacement are executed by the deterministic procedures in steps S4 to S6.
[0030] Step S34 involves performing deduplication, boundary alignment, alias merging, and type conflict resolution on the deterministic identification candidates formed in step S31 and the supplementary identification candidates that passed verification in step S33, combined with the parsing results from step S2, to form a non-overlapping sensitive candidate set for subsequent processing. If semantic supplementary identification is not performed, the above processing is applied to existing deterministic identification candidates.
[0031] Step S4, Determine the processing action. Based on the diagnostic interaction type, field name, field path, protocol role, message direction, request method, resource type, HTTP response status, entity hierarchy, request or response header type, structured message body field role, task purpose, target endpoint, detection confidence, and sensitivity level, select from KEEP, GENERALIZE, TOKENIZE, SYNTHESIZE, or BLOCK actions for fields or sensitive entities. Passwords, private keys, authentication headers, access tokens, client secrets, and API keys are prioritized for tokenization or blocking; prefixes and suffixes that can be used for authentication are not retained. Time can be represented using a uniform offset, time bucketing, or relative time. Location can be represented using administrative level, region category, or relative location. For candidates whose sensitive attributes cannot be determined after supplementary identification, the entire field or data block is tokenized according to the task strategy; if the protection scope cannot be determined, transmission is blocked.
[0032] Step S5, Generation of stable scope references Within the same scopeId, multiple references to the same sensitive entity, confirmed after value normalization, field context comparison, and entity merging, use the same refId. For references with the same original value but different business roles, field paths, or entity relationships, and which cannot be confirmed as belonging to the same entity, the use of the same refId is not mandatory. When the same vehicle, component, application, customer, project, device, diagnostic resource, network endpoint, or operation execution resource appears repeatedly in resource paths, query parameters, request headers, response headers, structured message bodies, diagnostic reports, logs, or free text, and is confirmed as belonging to the same entity, the same refId is used. The correspondence between fault entries and their respective entities is recorded in a task semantic list without original values and does not share refId with the entity. Different scopeIds use different task parameters to generate refIds that cannot be directly associated. The system forms external references visible to the target AI, a task semantic list without original values, and original value mappings visible only locally.
[0033] Step S6, structured replacement and pre-send checks, specifically includes: Step S61: Locate the content to be processed based on the structural location provided by the structure parser. Specifically, XML data is located using node paths and attribute names; JSON data is located using field paths or JSON Pointers; service interface data is located using request header names, query parameter names, or resource path segment numbers; message-based diagnostic protocol data is located using byte start positions and lengths; and free text is located using blockId and start / end ranges.
[0034] Step S62: Perform corresponding processing actions on the non-overlapping candidates determined after step S34. For multiple text intervals in the same data block, perform replacement from back to front according to the starting position to avoid the previous replacement changing the position of subsequent intervals; perform overall replacement on authentication headers, private key segments, or diagnostic content fields that need to be protected as a whole according to the policy; perform generalization or structure-preserving synthesis on time and position; write the corresponding refId for sensitive entities that need to maintain entity consistency. After replacement, reserialize according to the original data format, and retain field names, levels, necessary interaction control information, and entity relationships. The resulting data to be sent does not contain the original value mapping.
[0035] Step S63: Based on the original value mapping, sensitive type policy, and prohibited field list for this task, perform a deterministic residual check on the data to be sent. Check whether confirmed original values still exist in the URL, resource path, query parameters, request headers, response headers, structured message body, logs, free text, authentication fields, redirect addresses, and resource links, and whether they are in the normalized, delimited, case-sensitive, escaped, URL-encoded, or Base64-encoded form generated according to the configuration. Simultaneously, check whether necessary interaction control information, resource types, response statuses, entity relationships, field structures, and request-response relationships are preserved. Authentication information, access tokens, and client secrets must not be sent in a form that can be used for authentication or replay requests.
[0036] Step S64: When a confirmed original value or its configuration variant is found to remain, the structured replacement is re-executed according to the corresponding mapping. When suspected sensitive content not belonging to the existing mapping is found, the local semantic detection model is invoked to supplement the identification of the suspected content's location and its necessary context. The candidate fusion in step S34 and the processing action in step S4 are determined for the supplementary identification results that pass the verification. If necessary, step S5 is executed to generate or update entity references, task semantic lists, and local original value mappings. Then, steps S61 to S63 are re-executed. If the sending strategy is still not satisfied after reaching the configured maximum number of checks, the desensitization scope is expanded, the parent field containing suspected sensitive content is tokenized as a whole, the sending is not sent to the external target AI but is handled by the local target AI, or the sending is blocked.
[0037] Having completed the anonymization of local data in the previous steps, we can now begin sending data to the online AI. Specifically, this includes the following steps: Step S7, Artificial Intelligence Processing Only the de-identified diagnostic interaction data representation, necessary task semantic list, and summary of the list of legitimate references that have passed inspection are sent to the target AI. The representation can be a protocol semantics-preserving PDU representation, a service interface semantics-preserving representation, a JSON representation, an XML representation, a text representation, or a de-identified representation of a diagnostic report or log, used for AI analysis. It is not required to be a valid protocol message or executable service request that can be directly sent to the vehicle or diagnostic server. When the target AI supports structured output, it is preferred to reference entities through the entityRef field; when it does not support structured output, short references with clear boundaries are used, and the references must remain unchanged.
[0038] Step S8, Response Reference Verification Please see Figure 4Specifically, the process includes: Step S81, receiving the target AI response and extracting entity references; Step S82, checking if the refId belongs to the current scopeId and exists in the list of valid references sent this time; Step S83, checking the reference type, integrity information, allowed output position, and maximum number of uses; Step S84, only allowing normalization of delimiters, case sensitivity, escape sequences, and streaming block boundaries without changing the reference identity, not guessing missing numbers based on context, and not mapping unknown references to similar original values; Step S85, entering the structured binding process for references that pass the verification. Unknown references, cross-task references, misaligned references, or unrepairable references remain desensitized and trigger a security rollback.
[0039] Step S9, Controlled Restore and End Processing Based on the task's purpose and the output receiver's permissions, the validated reference is bound to the original value, generalized value, synthesized value, or a retained token. Binding is preferably performed on protocol fields, resource path slots, XML nodes, JSON fields, HTML nodes, or structured output slots to avoid substring collisions caused by full-text replacement. After restoration, the output structure is checked, interactive semantics and the scope of sensitive information usage are diagnosed, and events related to detection, sending, rejection, and restoration that do not contain the original value are recorded. The task mapping or key material is then destroyed according to the retention policy.
[0040] In addition, a system for implementing the above method is provided, including a task strategy module, a diagnostic interaction type judgment module, a message-based diagnostic data parsing module, a service interface-based diagnostic data parsing module, a rule recognition module, a local semantic detection model and its call judgment module, a sensitive candidate fusion module, a scope stable reference generation module, a local mapping module, a processing action determination and structured replacement module, a pre-send check module, an artificial intelligence adaptation module, a response reference verification module, and a controlled restoration module. Each module can be deployed in the same vehicle diagnostic device or in mutually authenticated local trusted nodes.
[0041] The above steps use diagnostic interaction data as a unified processing object. While hiding sensitive values of vehicles, components, applications, customers, projects, authentication secrets, network endpoints, and diagnostic content, they retain the protocol semantics, resource semantics, entity relationships, and state information required for artificial intelligence to complete vehicle fault analysis. Through scope, legal list, and output location verification, they prevent artificial intelligence from fabricating or misusing references, which could lead to the incorrect insertion of original values.
[0042] In addition to the above-mentioned technical implementation methods, this application can also be replaced by the following technical methods, for example: The local semantic detection model can employ a large language model, a named entity recognition model, a classification model, or a rule-enhancing model. The decision-making step is executed in each task, specifically step S33, which determines whether to invoke the local semantic detection model; if suspected sensitive remnants are found during pre-send checks, they are handled according to step S64. In addition to vehicle diagnostic XML and UDS protocol data units, diagnostic interaction data may also include diagnostic data transmitted via DoIP, SOVD service interface requests and responses, vehicle operation logs, diagnostic reports, and other vehicle diagnostic data with a clear diagnostic structure or resource semantics.
[0043] Entity references can take the form of readable tokens, short codes, UUIDs, XML nodes, JSON objects, or template slots; original value mappings can be stored in memory, encrypted files, system keystores, trusted execution environments, or databases.
[0044] The target AI can be a local model, an enterprise private model, an external API, or a multi-model system, and the response can be one-time text, streaming text, HTML, JSON, or XML.
[0045] The above steps can be merged, split, or rearranged according to the input structure, but the diagnostic interaction type judgment, structured parsing, scope stable reference, response reference verification, and local controlled restoration should be established around the same processing task.
[0046] The above embodiments can be implemented, in whole or in part, by software, hardware (such as circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless communication (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.
[0047] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. A and B can be singular or plural. Additionally, the character " / " in this article generally indicates an "or" relationship between the preceding and following related objects, but it can also represent an "and / or" relationship. Please refer to the context for a more accurate understanding.
[0048] In this invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of a single item or a plurality of items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be a single item or multiple items.
[0049] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0050] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0051] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0052] In the several embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0053] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0054] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0055] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing, characterized in that, Includes the following steps: Task context acquisition: Receive diagnostic interaction data to be processed and generate task purpose and policy context; Structured parsing: Select the corresponding parsing rule according to the diagnostic interaction type, and perform structured parsing on the diagnostic interaction data; Sensitive information identification: The diagnostic interaction data is subjected to deterministic identification through preset rules and conditions to generate a set of deterministic identification candidates; Based on the task strategy, the deterministic identification results and the diagnostic interaction data parsing results, it is determined whether to call the local semantic detection model for supplementary identification; The supplementary identification candidates that pass the verification are merged with the deterministic identification candidates to form the final sensitive candidate set. Action determination: Based on the interactive control information, entity identifiers, and diagnostic content, determine the corresponding action for the field or sensitive entity; Scope-stable reference generation: Within the same scope, multiple references that are identified as the same sensitive entity after original value normalization, field context comparison and entity merging are identified by the same reference identifier, forming an external reference visible to the target AI, a task semantic list without original values, and an original value mapping visible only locally; Structured replacement and pre-send checks: Based on the structural location provided by the structure parser, locate the content to be processed, perform corresponding processing actions on non-overlapping candidates, and re-serialize according to the original data format; perform deterministic residual checks on the data to be sent based on the original value mapping, sensitive type policy, and prohibited sending field list for this task; if the original value or its variant is found to be a residual, re-execute the structured replacement; if suspected sensitive content is found, call the local semantic detection model to supplement the identification and re-execute the replacement and checks; if the sending policy is not met, perform a safe rollback; Artificial intelligence processing: Only send the de-identified diagnostic interaction data representation, task semantic list, and legal citation list summary that have passed the inspection to the target artificial intelligence, and receive the processing results returned by the target artificial intelligence; Response reference validation: Validate the scope, valid set, and output location of the response references returned by the target AI in the processing results. Controlled restoration: Based on the task purpose and the output receiver's permissions, the validated reference is bound to the corresponding value in a structured location.
2. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, When the diagnostic interaction data is message-based diagnostic protocol data, the structured parsing includes: Read the diagnostic request protocol data unit or diagnostic response protocol data unit, and determine the parsing rules according to the configured protocol type and message direction; The service identifier, positive response service identifier, negative response service identifier, original request service identifier, and negative response code are parsed as interactive control information. Parse data identifiers, routine identifiers, sub-function parameters, logical addresses, or storage addresses as diagnostic object identification information; The starting position and length of the diagnostic content data are determined based on the service type, message length, and protocol rules. Retain necessary interactive control information, perform retention, generalization or tokenization on sensitive identification information, replace sensitive diagnostic content with content references containing content identifiers and original lengths, and output a desensitized representation that maintains the semantics of the protocol; when the protocol is unknown, the length is invalid or the data boundary cannot be determined, tokenize or block the transmission of the entire protocol data unit.
3. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, When the diagnostic interaction data is diagnostic data based on a service interface, the structured parsing includes: Parse the request method, resource path, query parameters, request headers, response headers, response status, and structured message body; Identify entity types, entity identifiers, resource types, resource identifiers, entity hierarchy relationships, containment relationships, and diagnostic relationships between objects and resources; The service interface data is divided into interactive control information, resource and entity identification information, diagnostic status information, content data, and authentication and security information; Preserve request methods, resource types, response status, field structures, entity relationships, and fault status; perform generalization, tokenization, synthetic replacement, or blocking on sensitive fields in the base address, hostname, IP address, vehicle entity identifier, component entity identifier, application entity identifier, authentication header, access token, customer, project, organization information, and message body. The processed request method, de-identified resource path, response status, structured message body, and non-identifiable entity relationships are combined into a semantically preserved de-identified representation of the service interface for the target artificial intelligence to process.
4. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, The step of calling the local semantic detection model for supplementary identification includes: Sensitive information confirmed in the deterministic identification results is protected with a temporary token that does not contain the original sensitive value but can represent the corresponding information type or business role, generating a temporary protected data copy, and retaining the structural and textual position correspondence between the data copy and the original data; In a local trusted environment, a local semantic detection model is invoked to supplement the identification of dynamic sensitive information not covered by fixed fields, regular expressions, preset dictionaries, and verification algorithms. The dynamic sensitive information includes customer or organization names, project codes, vehicle platform names, test vehicle or test environment names, electronic control unit names, vehicle component names, application names, diagnostic resource names, equipment aliases, internal system names, location descriptions, internal abbreviations, and other context-related secrets. The local semantic detection model combines field path, field role, diagnostic interaction type, protocol role, resource type, entity hierarchy relationship, request-response relationship and adjacent text to determine sensitive attributes, regards existing temporary tokens as protected content, and returns supplementary identification candidates containing sensitive types and candidate location information in a preset structured format; The supplementary identification candidates are subjected to location validity verification, sensitive type legality verification, and content conflict verification. The supplementary identification candidates that pass the verification are merged with the deterministic identification candidates. The final processing actions, reference generation, and structured replacement are performed by the deterministic program.
5. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, Determine the appropriate processing actions for fields or sensitive entities, including: Passwords, private keys, authentication headers, access tokens, client secrets, and API keys are prioritized for tokenization or blocking, and no prefixes or suffixes that can be used for authentication or replay are retained; Time information is represented using a uniform offset, time bucketing, or relative time. Location information is represented by administrative level, region category, or relative location; For candidates whose detection confidence is lower than a preset threshold and whose sensitive attributes cannot be determined even after supplementary identification, the field in question is tokenized or blocked from being sent according to the task strategy.
6. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, In the generation of stable references within a scope: When the same vehicle, component, application, customer, project, device, diagnostic resource, network endpoint, or operation execution resource appears repeatedly in resource paths, query parameters, request headers, response headers, structured message bodies, diagnostic reports, logs, or free text and is identified as the same entity, the same reference identifier shall be used. For values that are the same but have different business roles, field paths, or entity relationships, and cannot be confirmed to belong to the same entity, the use of the same reference identifier is not mandatory. The correspondence between fault entries and their respective entities is recorded in a task semantic list that does not contain original values, and does not share reference identifiers with the entities. Different scopes use different task parameters to generate reference identifiers that cannot be directly associated; The original value mapping is stored in memory, encrypted files, system keystores, trusted execution environments, or databases. After the mapping expires, it is prohibited to continue restoring and the original value mapping must be destroyed or frozen.
7. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, The deterministic residue check includes: Check whether the confirmed original values still exist in the URL, resource path, query parameters, request headers, response headers, structured message body, logs, free text, authentication fields, redirect addresses, and resource links, as well as the normalized form, delimiter-free form, case variant, escape form, URL-encoded form, or Base64-encoded form generated according to the configuration; At the same time, check whether the necessary interaction control information, resource type, response status, entity relationship, field structure and request-response relationship are preserved; When a confirmed original value or its configuration variant is found to remain, the structured replacement is re-executed according to the corresponding mapping; when suspected sensitive content that does not belong to the existing mapping is found, the local semantic detection model is invoked to supplement the identification of the location of the suspected content and its necessary context, and the structured replacement and residual check are re-executed. If the sending strategy is still not satisfied after reaching the maximum number of configured checks, the following options are available: expand the scope of desensitization, tokenize the entire parent field containing suspected sensitive content, do not send to the external target AI but instead have it processed by the local target AI, or block the current sending.
8. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, The processing result returned by the target artificial intelligence response verifies the scope, valid set, and output location of the response reference, including: Receive the target AI response and extract entity references from it; Check whether the reference identifier belongs to the current scope and exists in the list of valid references sent this time; Check the reference type, integrity information, allowed output locations, and maximum number of uses; Normalization is only allowed for delimiters, case sensitivity, escape sequences, and streaming block boundaries without changing the reference identity. Missing numbers are not guessed based on context, and unknown references are not mapped to similar primitive values. References that pass the verification process enter the structured binding process; unknown references, cross-task references, mismatched references, or irreparable references remain desensitized and trigger a security rollback.
9. The method for desensitizing and controlled restoration of reversible vehicle diagnostic data based on AI processing according to claim 1, characterized in that, The step of binding the validated reference to the corresponding value in a structured location according to the task purpose and the output receiver's permissions includes: The structured location binding is completed on protocol fields, resource path slots, XML nodes, JSON fields, HTML nodes, or structured output slots to avoid substring collisions caused by full-text replacement; The allowed restoration scope is limited to specified sensitive types, specified XML nodes, JSON fields, resource path slots, report sections, or output receivers; After restoration, check the output structure, diagnose the interaction semantics, and the scope of sensitive information usage. Records do not contain the original values of detection, transmission, rejection, and restoration events, and destroy task mappings or key materials according to the retention policy.
10. A vehicle diagnostic reversible data desensitization and controlled restoration system based on AI processing, characterized in that, include: The task strategy module is used to receive diagnostic interaction data, generate task identifiers and scope identifiers, and manage task purpose, target AI endpoint, allowed fields to be sent, prohibited types to be sent, diagnostic interaction parsing rules, mapping validity period, and allowed restoration range. The diagnostic interaction type determination module is used to determine the type of diagnostic interaction data and select the corresponding parsing rule; The message-based diagnostic data parsing module is used to parse message-based diagnostic protocol data and identify interactive control information, diagnostic object identification information, and diagnostic content data boundaries. The diagnostic data parsing module based on service interfaces is used to parse diagnostic data based on service interfaces and identify request methods, resource paths, entity and resource hierarchy relationships, and structured message body fields. The rule recognition module is used to identify deterministic sensitive information through field rules, regular expressions, dictionaries, and validation algorithms. The local semantic detection model and its call judgment module are used to determine whether to call the local semantic detection model to supplement the identification of dynamic sensitive information based on the task strategy, deterministic recognition results and diagnostic interaction data parsing results. The sensitive candidate fusion module is used to fuse deterministic identification candidates with verified supplementary identification candidates to form the final sensitive candidate set; The scope-stable reference generation module is used to generate the same reference identifier for multiple references identified as the same sensitive entity within the same scope, forming external references, task semantic lists, and original value mappings; The local mapping module is used to store and manage original value mappings that are only visible locally. The processing action determination and structured replacement module is used to determine the processing action of fields or sensitive entities according to the task strategy, and perform structured replacement based on the structural location and entity reference to form desensitized data; The pre-send check module is used to perform deterministic residual checks on the data to be sent and to perform a safe rollback if the sending strategy is not met. The AI adaptation module is used to send de-identified data that has passed inspection to the target AI and receive the processing results. The response reference verification module is used to verify the legality, reference type, allowed output location, and number of times the entity references in the target AI response are used. The controlled restore module is used to bind the validated references to the corresponding values in a structured location according to the purpose of the task and the permissions of the output receiver; Each module is deployed in the same vehicle diagnostic device or in a mutually certified local trusted node.
