A communication connection method for an off-board controller
By using modular edge recognition nodes and a lightweight neural network model, the proprietary protocols of different manufacturers in the charging station system are dynamically identified and converted, solving the problem of inconsistent communication standards in the charging station system and achieving stable, low-latency communication and flexible system updates.
Patent Information
- Application Number
- CN202511076303.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-08-01
AI Technical Summary
The use of proprietary communication protocols by controllers from different manufacturers in charging station systems leads to inconsistent communication standards, resulting in difficulties in data interoperability, high system integration difficulty, high maintenance costs, and communication instability affecting the reliability of charging services.
Modular edge recognition nodes are adopted, and a lightweight neural network model is used to identify protocol feature vectors, dynamically load protocol conversion modules, establish a two-way communication channel, and collaboratively update unknown protocol modules in the cloud to achieve real-time conversion between private protocols and standardized data structures.
It enables automatic identification and real-time protocol conversion of controllers from different manufacturers, establishes a stable and low-latency communication channel, reduces system integration difficulty and maintenance costs, and improves the reliability and flexibility of charging services.
Smart Images

Figure CN120856801B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of communication technology, in particular to a communication connection method of an off-vehicle controller. BACKGROUND
[0002] With the rapid popularization of new energy vehicles, charging stations as core infrastructure, system integration and equipment compatibility face severe challenges. The current charging station system needs to integrate vehicle BMS, intelligent charging piles, energy storage controllers and other types of equipment, while different manufacturers generally use private communication protocols (such as CAN bus variants, TCP / IP custom messages, etc.), forming a serious protocol heterogeneity problem. Under this background, the research and development of a communication connection method of an off-vehicle controller has become a key technology direction to solve the problem of interconnection of charging station equipment.
[0003] In the prior art, the controllers in the charging station system are usually from different manufacturers, and each manufacturer uses a private communication protocol, resulting in inconsistent communication standards between devices in the charging station. Therefore, when integrating controllers using different communication protocols into the system, direct data interconnection cannot be achieved, and additional research and development resources must be invested to perform tedious protocol adaptation, significantly increasing the difficulty and construction cost of system integration.
[0004] Currently, data exchange between controllers in the charging station relies on temporary protocol conversion, which can easily cause delays or loss of data transmission. The instability of communication directly leads to interruption of charging services or billing information errors, significantly reducing the reliability of charging services and greatly damaging the charging experience of users.
[0005] In the existing charging station system, the protocol connection method uses hard coding, making the system lack flexibility and scalability. If the charging station is upgraded, the controller is replaced, or new equipment is added, the existing communication link must be complexly redeveloped and debugged. This approach results in high maintenance and upgrade costs, severely limiting the technical update and long-term development of the charging station network.
[0006] Therefore, the present application proposes a communication connection method of an off-vehicle controller to solve the above problems. SUMMARY
[0007] To overcome the deficiencies of the prior art, the present application provides a communication connection method of an off-vehicle controller to solve the problems raised in the background art.
[0008] To achieve the above purpose, the present application is implemented by the following technical solution: a communication connection method of an off-vehicle controller, comprising:
[0009] Step 1, integrating a modular edge recognition node in the off-board infrastructure, the modular edge recognition node loads a preset lightweight neural network model and a protocol conversion module library to complete initialization when the off-board infrastructure starts, the modular edge recognition node is composed of a network interface unit, an edge inference chip and a cache unit;
[0010] Step 2, capturing an initial data packet generated when the off-board controller accesses by the modular edge recognition node which has completed initialization, and generating a protocol feature vector from multi-dimensional features extracted from the initial data packet, the multi-dimensional features include structural features, statistical features and content features extracted from the initial data packet;
[0011] Step 3, inputting the protocol feature vector into the lightweight neural network model to obtain a protocol recognition result and a confidence score, when the confidence score is higher than a preset threshold, loading a corresponding protocol conversion module from the protocol conversion module library according to the protocol recognition result;
[0012] Step 4, using the loaded protocol conversion module to establish a bidirectional communication channel between the off-board controller and the charging pile master control system, the bidirectional communication channel is used for converting and transmitting between the private protocol data of the off-board controller and the standardized data structure of the charging pile master control system;
[0013] Step 5, when the confidence score is not higher than the preset threshold or the communication abnormality rate of the bidirectional communication channel exceeds the fault tolerance upper limit, uploading unknown protocol samples containing the initial data packet to the cloud server by the modular edge recognition node, the cloud server generates or updates the protocol conversion module after receiving the unknown protocol samples and issues it to the modular edge recognition node, the unknown protocol samples contain the protocol feature vector and related diagnostic logs.
[0014] Preferably, the lightweight neural network model is used for classification calculation on the protocol feature vector to output the protocol recognition result;
[0015] The protocol recognition result loads the protocol conversion module, including loading an adaptive configuration file matched with the protocol conversion module, the adaptive configuration file is used to define the field mapping relationship between the private protocol data and the standardized data structure.
[0016] Preferably, the standardized data structure is a kind of pre-defined data object irrelevant to specific private protocol, the data object contains uniform command identifier, data source, timestamp and data payload field;
[0017] The real-time conversion and transmission includes uplink conversion of parsing and packaging the private protocol data into the standardized data structure, and downlink conversion of parsing and packaging the standardized data structure into the private protocol data.
[0018] Preferably, the cloud server is specifically configured to receive the unknown protocol sample, analyze the unknown protocol sample to generate a new protocol conversion module, and remotely deploy the new protocol conversion module to the modular edge recognition node.
[0019] Preferably, the communication exception rate exceeds the fault tolerance upper limit, indicating that the number of consecutive parsing errors of the protocol conversion module in parsing the private protocol data reaches a preset error count value.
[0020] Preferably, the step 1 further comprises the following sub-steps:
[0021] Sub-step 1.1: Hardware self-checking and resource allocation
[0022] When the off-board infrastructure is started, the modular edge recognition node performs a hardware self-checking program, which determines the hardware unit state by the following formula:
[0023]
[0024] wherein S i is the self-checking state of the i-th hardware unit, T max is a preset maximum response time threshold;
[0025] If all S i = 1, the node enters the resource allocation phase, and allocates memory address space to each unit according to the following rules:
[0026] A net = M base , A 推理 = A net + Δ net , A 缓存 = A 推理 + Δ 推理 ,
[0027] wherein A net , A 推理 , A 缓存 are the starting memory addresses of the network interface unit, the edge inference chip, and the cache unit, respectively, M base is the base address, and Δ net , Δ 推理 are preset address offsets;
[0028] Sub-step 1.2: Lightweight neural network model loading and integrity verification
[0029] After resource allocation is completed, the node reads the preloaded lightweight neural network model file from the cache unit, and the model file is stored in binary format, wherein the integrity is verified by a hash check formula:
[0030] H 实际 = SHA-256(F 模型 ), H 预期 = pre-stored hash value,
[0031] If H 实际 = H 预期 , load the model parameters to the designated memory area of the edge inference chip according to the following mapping rules:
[0032] θ k → A 推理 +k·δ, k = 0, 1, …, N param -1,
[0033] where θ k is the k-th parameter of the model, δ is the number of bytes occupied by a single parameter, N param is the total number of parameters, and k is the sequential index;
[0034] If the hash check fails, trigger an alarm and terminate the initialization;
[0035] Sub-step 1.3: Protocol conversion module library loading and index construction
[0036] After the model is loaded, the node reads the protocol conversion module library from the cache unit, which contains protocol conversion modules {M p | p e P}, P is a set of protocol identifiers, and each module is associated with an adaptation configuration file C p .
[0037] The node constructs a hash index table based on protocol identifiers for fast retrieval:
[0038] Index(p) = Hash(p) mod B size ,
[0039] where Index(p) is the storage location index of the protocol identifier p in the hash table, B size is the number of hash table buckets, and Hash(p) is the hash value of the protocol identifier p.
[0040] Each bucket stores the storage address L p of the corresponding module M p in the cache and the metadata of the configuration file C p .
[0041] Preferably, the step 2 further comprises the following sub-steps:
[0042] Sub-step 2.1: Data packet capture and time window triggering
[0043] The network interface unit monitors the communication port in real time, and when detecting a data packet sent by the off-board controller, starts a dynamic time window T win , and continuously captures subsequent N win bit data packets to form an initial data packet set pkt
[0044] The trigger condition of the time window is:
[0045] T win = max(t first + Δ base , t last + Δ extend ),
[0046] wherein t first is the arrival time of the first bit data packet, t last is the arrival time of the last bit data packet, Δ base is the reference window length, and Δ extend is the window expansion increment;
[0047] If the number of data packets captured within T win is N pkt <N min , N min is the minimum valid packet number, it is determined that the connection is invalid and the data is discarded;
[0048] Sub-step 2.2: Multi-dimensional feature extraction and quantization
[0049] For each data packet d i in the set D, three types of features are extracted according to the following rules:
[0050] Structural feature extraction:
[0051] Match the frame header and frame tail pattern of the data packet d i , and calculate the structural feature vector
[0052]
[0053] wherein P h and P f are predefined frame header and frame tail pattern libraries, Match(·) is a function that returns the matching degree, ||d i || is the data packet length, and L max is the maximum allowed packet length;
[0054] Statistical feature extraction:
[0055] Calculate the mean and variance of the arrival time interval of adjacent data packets to form the statistical feature vector F stat :
[0056]
[0057] Where, μ t t is the average time interval between the arrival of adjacent data packets. k For the k-th data d k Arrival timestamp, t k-1 For the (k-1)th data packet d k-1 The arrival timestamp, where k is the sequential index. N is the variance of the arrival time interval between adjacent data packets. pkt For dynamic time window T win The initial total number of packets captured, N cmd The number of data packets containing the preset command word in set D;
[0058] Content feature extraction:
[0059] Scan the data packet payload, identify the frequency of occurrence in a predefined keyword set K, and generate a content feature vector F. cont :
[0060] F cont =[∑ d∈D I(k1∈d),…,∑ d∈D I(k m ∈d)],
[0061] Where I(·) is the indicator function, k1, k m d represents an element in the font library, and d represents a data packet instance in the data packet set D.
[0062] Sub-step 2.3: Feature fusion and normalization to generate protocol feature vectors
[0063] The three types of features mentioned above are concatenated and normalized according to the following rules to generate the final protocol feature vector V:
[0064]
[0065] V = [v′1, v′2, ..., v′] n ],
[0066] Among them, V raw v′ is the original multidimensional feature vector. j The original feature vector V raw The result after standardization of the j-th eigenvalue, v j The original feature vector V raw The original eigenvalue of the j-th dimension, μ j and σ j The mean and standard deviation of the j-th feature are pre-computed, where j is the dimension index of the feature vector;
[0067] If the feature does not appear in the training data, then v' = 0. j
[0068] Preferably, the step 3 further comprises the following sub-steps:
[0069] Sub-step 3.1: Model forward propagation and protocol probability distribution calculation
[0070] The protocol feature vector V generated in step 2 is input into the lightweight neural network model, and forward propagation calculation is performed to output the probability distribution vector P = [p1, p2,..., pn] of the protocol category, where n is the total number of known protocol categories; n
[0071] The forward propagation formula is:
[0072] Z (1) = W (1) V + b (1) , A (1) = ReLU(Z (1) ),
[0073] Z (2) = W (2) A (1) + b (2) , P = Softmax(Z (2) ),
[0074] where W (1) , b (1) are the first layer weight matrix and bias vector, W (2) , b (2) are the output layer parameters, ReLU is the activation function, and Softmax is;
[0075] Sub-step 3.2: Confidence score calculation and threshold determination
[0076] The maximum probability value p max = max(P) and the corresponding protocol identifier c id = argmax(P) are extracted from the probability distribution P, and the confidence score s is calculated:
[0077]
[0078] where μ p and σ p are the mean and standard deviation of the maximum probability of all samples in the model training set, and τ is the temperature coefficient;
[0079] If s ≥ θ, θ is a preset threshold, it is determined that the protocol recognition is valid, otherwise it is considered as low confidence or unknown protocol;
[0080] Sub-step 3.3: The protocol conversion module is retrieved and dynamically loaded
[0081] When s ≥ θ, according to the protocol identifier c id , the protocol conversion module is quickly located through a pre-constructed hash index table and the adaptation configuration file in the storage address in the cache
[0082] The loading process follows the following rules:
[0083]
[0084] where Load is the loading operation, Memcpy is the memory copy function, A runtime is the runtime memory address allocated for the edge inference chip;
[0085] After loading is completed, the module and the configuration file enter the ready state and wait for step 4 to be called.
[0086] Preferably, the step 4 further includes the following sub-steps:
[0087] Sub-step 4.1: Communication channel initialization and resource binding
[0088] Based on the loaded protocol conversion module , a bidirectional communication channel is established between the off-vehicle controller and the charging pile master control system, and the initialization of the channel needs to complete the following resource allocation:
[0089] Channel up = CreateSocket(IP ctrl , Port ctrl ),
[0090] Channel down = CreateSocket(IP main , Port main ),
[0091] where Channel up is a one-way communication link from the off-vehicle controller to the charging pile master control system, Channel down is a one-way communication link from the charging pile master control system to the off-vehicle controller, CreateSocket(·) is, IP ctrl , Port ctrl is the network address and port of the off-vehicle controller, IP main , Port main is the address and port of the charging pile master control system;
[0092] The bandwidth allocation of the channel follows:
[0093] B alloc = min(B max , α·B req ),
[0094] where B alloc is the dynamically allocated communication bandwidth, B max is the maximum allowed bandwidth of the system, B req is the demand bandwidth declared by the off-board controller, and α is a dynamic adjustment coefficient;
[0095] Sub-step 4.2: Parsing and standardized packaging of uplink data
[0096] The private protocol data D up sent by the off-board controller through the Channel priv is parsed according to the rules defined in the adaptation configuration file C cid :
[0097] Field extraction:
[0098] According to the offset definition in C cid , the field values are extracted from D priv :
[0099] v k = D priv [o k :o k +l k ], k = 1, 2,..., K,
[0100] where v k is the original byte value of the kth field extracted from the private protocol data, o k is the starting offset of the kth field, l k is the field length, and K is the total number of fields;
[0101] Type conversion:
[0102] According to the type mapping table of , the original byte data is converted to the value v k ' of the standardized data type:
[0103]
[0104] Standardized packaging:
[0105] The converted field values are packaged into a standardized data structure S std :
[0106] S std=
[0107] {command id :c id ,source:IP ctrl ,timestamp:t now payload:{v1′,...,v K ′}},
[0108] Among them, command id For the command identifier field in the standardized data structure, source is the data source field in the standardized data structure, timestamp is the timestamp field in the standardized data structure, payload is the data payload field in the standardized data structure, and t is the data payload field in the standardized data structure. now This is the current timestamp;
[0109] Sub-step 4.3: Downlink Data Parsing and Private Protocol Reconstruction
[0110] Channel for charging pile main control system down Standardized instruction S issued std Reconstructed into private protocol data D′ according to the reverse rules priv :
[0111] Field reverse mapping:
[0112] By S std Extracting the field value v′ from the payload k ,according to Convert the rules to raw bytes:
[0113]
[0114] Data frame reconstruction:
[0115] according to Define the frame structure, concatenate the bytes of each field, and add a checksum:
[0116]
[0117] Among them, D′ priv For the reconstructed private protocol data frame, P h For frame header, P f The frame end is indicated by ⊕, which represents byte concatenation. CRC32 is the cyclic redundancy check function. v″ K This is the byte encoding result for the Kth bit field.
[0118] Preferably, step 5 further includes the following sub-steps:
[0119] Sub-step 5.1: Exception triggering condition determination and sample encapsulation
[0120] The sample upload process is triggered when any of the following conditions are met:
[0121] Low confidence trigger: The confidence score s output in step 3 is less than θ, where θ is a preset threshold;
[0122] Communication anomaly triggered: within time window T monitor Within, the number of parsing errors E in the protocol conversion module err ≥E max E max Preset error count value;
[0123] Upon triggering, the modular edge recognition node encapsulates the following data into an unknown protocol sample packet S. sample :
[0124] S sample ={D raw ,V,log diag},
[0125] Among them, D raw Let V be the initial set of data packets, and V be the protocol feature vector, log diag Includes trigger type, timestamp, device ID, and error details;
[0126] Sub-step 5.2: Secure transmission and cloud task queue management
[0127] S sample After encryption and compression, the samples are uploaded to the cloud server via HTTPS. Upon receiving the samples, the cloud server adds them to the analysis queue according to the following priority formula:
[0128] Q priority =w1·T 紧急度 +w2·N 同类样本数 ,
[0129] Among them, T 紧急度 Determined by the trigger type, N 同类样本数 For the same type of c within 24 hours id Or the number of samples similar to V, where w1 and w2 are weighting coefficients;
[0130] Q in the queue priority ≥Q threshold Samples that are processed first are given priority.
[0131] Sub-step 5.3: Protocol Module Generation and Remote Deployment
[0132] Cloud server to S sample Perform the following processing flow:
[0133] Protocol Reverse Engineering:
[0134] Using dynamic taint analysis technology, D raw extracting protocol syntax and semantic rules, generating protocol description file F proto ;
[0135] Conversion module development:
[0136] According to F proto Automatic generation of protocol conversion module M new and adaptation configuration file C new , verify the correctness through simulation test:
[0137]
[0138] Remote deployment:
[0139] M new and C new are packaged into an update package U pkg , and are issued to all online modular edge recognition nodes through incremental update protocol;
[0140] After the node receives, update the local library according to the following rules:
[0141] Update(M new )=HashInsert(c new ,L new ),
[0142] Wherein, c new is a new protocol identifier, and L new is a module storage address.
[0143] The application provides a communication connection method of an off-vehicle controller. The method has the following beneficial effects:
[0144] 1. The application adopts a modular edge recognition node and a dynamic protocol adaptation technical solution, achieves the technical effect of automatically identifying the private protocol of different manufacturers' controllers and loading the corresponding conversion module in real time, and solves the problems of high system integration difficulty and high construction cost caused by non-uniform protocols compared with the technical solution of relying on manual development of protocol adapters in the prior art.
[0145] 2. The application adopts a standardized data structure and a bidirectional real-time conversion technical solution, achieves the technical effect of establishing a stable and low-delay communication channel between the off-vehicle controller and the charging pile main control system, and solves the problems of poor charging service reliability and damaged user experience caused by data transmission delay or loss compared with the technical solution of temporary protocol conversion in the prior art.
[0146] 3. The cloud collaborative dynamic updating and self-learning technical solution of the present application achieves the technical effect of automatically identifying unknown protocols and remotely updating the local protocol library, compared with the technical solution of the prior art that adopts hard-coded protocol connection, solving the problems of high maintenance cost and difficult technical update caused by the lack of flexibility and scalability of the system. BRIEF DESCRIPTION OF DRAWINGS
[0147] Figure 1 The flowchart of the present application. DETAILED DESCRIPTION
[0148] In order for those skilled in the art to understand the present application, the technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0149] The present application will be described in detail below with reference to the accompanying drawings:
[0150] Embodiment:
[0151] Please refer to the accompanying drawings Figure 1 The embodiment of the present application provides a vehicle external controller communication connection method, which comprises:
[0152] Step 1, integrate a modular edge recognition node in the vehicle external infrastructure, the modular edge recognition node loads a preset lightweight neural network model and a protocol conversion module library to complete initialization when the vehicle external infrastructure starts, the modular edge recognition node is composed of a network interface unit, an edge inference chip and a cache unit;
[0153] Step 1 further comprises the following sub-steps:
[0154] Sub-step 1.1: hardware self-checking and resource allocation
[0155] When the vehicle external infrastructure starts, the modular edge recognition node executes a hardware self-checking program, and the self-checking program determines the hardware unit state through the following formula:
[0156]
[0157] Wherein, S i The self-checking state of the i-th hardware unit, T max is the preset maximum response time threshold;
[0158] If all S i = 1, the node enters the resource allocation stage, and allocates memory address space to each unit according to the following rules:
[0159] A net =M base A 推理 =A net +Δ net A 缓存 =A 推理 +Δ 推理 ,
[0160] Among them, A net A 推理 A 缓存 The starting memory addresses for the network interface unit, edge inference chip, and cache unit are listed in order, M. base As the base address, Δ net Δ 推理 This is the preset address offset;
[0161] Sub-step 1.2: Loading and Integrity Verification of Lightweight Neural Network Model
[0162] After resource allocation is complete, the node reads the pre-configured lightweight neural network model file from the cache unit. The model file is stored in binary format, and its integrity is verified using a hash check formula:
[0163] H 实际 =SHA-256(F 模型 ), H 预期 =Pre-stored hash value,
[0164] If H 实际 =H 预期 The model parameters are loaded into the specified memory region of the edge inference chip according to the following mapping rules:
[0165] θ k →A 推理 +k·δ, k=0,1,…,N param -1,
[0166] Where, θ k Let N be the k-th parameter of the model, δ be the number of bytes occupied by a single parameter, and N be the number of bytes occupied by a single parameter. param Where k is the total number of parameters and k is the sequential index;
[0167] If the hash verification fails, an alarm will be triggered and initialization will be terminated.
[0168] Sub-step 1.3: Loading and indexing the protocol conversion module library
[0169] After the model is loaded, the node reads the protocol conversion module library from the cache unit. The library contains the protocol conversion module {M}. p |p∈P}, where P is the set of protocol identifiers, and each module is associated with an adaptation configuration file C. p ;
[0170] The node is a fast retrieval module, and a hash index table based on a protocol identifier is constructed:
[0171] Index(p) = Hash(p) mod B size ,
[0172] wherein Index(p) is a storage location index of the protocol identifier p in the hash table, B size is a number of hash table buckets, and Hash(p) is a hash value of the protocol identifier p;
[0173] Each bucket stores metadata of a corresponding module M p , a storage address L p in the cache, and a configuration file C p ;
[0174] Step 2, the initial data packet generated when the vehicle external controller accesses is captured by the modular edge recognition node that has completed initialization, and a multi-dimensional feature is extracted from the initial data packet to generate a protocol feature vector, the multi-dimensional feature including a structural feature, a statistical feature, and a content feature extracted from the initial data packet;
[0175] Step 2 further includes the following sub-steps:
[0176] Sub-step 2.1: data packet capture and time window triggering
[0177] The network interface unit listens to the communication port in real time, and when detecting the data packet sent by the vehicle external controller, a dynamic time window T win is started, and N win subsequent data packets are continuously captured within T pkt to form an initial data packet set
[0178] The triggering condition of the time window is:
[0179] T win = max(t first + Δ base , t last + Δ extend ),
[0180] wherein t first is the arrival time of the first data packet, t last is the arrival time of the last data packet, Δ base is a reference window length, and Δ extend is a window expansion increment;
[0181] If the number N win of data packets captured within T pkt is less than N min , Nmin Minimum number of packets, invalid connection is determined and data is discarded;
[0182] Sub-step 2.2: Multi-dimensional feature extraction and quantization
[0183] For each data packet d in the set D i , three types of features are extracted according to the following rules:
[0184] Structural feature extraction:
[0185] Match the header and trailer patterns of the data packet d i , and calculate the structural feature vector
[0186]
[0187] Where P h and P f are predefined header and trailer pattern libraries, Match(·) is a function that returns the matching degree, ||d i || is the data packet length, L max is the maximum allowed packet length;
[0188] Statistical feature extraction:
[0189] Calculate the mean and variance of the arrival time interval of adjacent data packets to form the statistical feature vector F stat :
[0190]
[0191] Where μ t is the mean of the arrival time interval of adjacent data packets, t k is the arrival timestamp of the kth data packet d k , t k-1 is the arrival timestamp of the k-1th data packet d k-1 , k is the sequential index, is the variance of the arrival time interval of adjacent data packets, N pkt is the total number of initial data packets captured within the dynamic time window T win , N cmd is the number of data packets containing the preset command word in the set D;
[0192] Content feature extraction:
[0193] Scan the data packet payload and identify the frequency of occurrence in the predefined keyword set K to generate the content feature vector F cont :
[0194] F cont = [∑ d∈D I(k1∈d), …, ∑d∈D I(k m ∈d)],
[0195] Where I(·) is the indicator function, k1, k m d represents an element in the font library, and d represents a data packet instance in the data packet set D.
[0196] Sub-step 2.3: Feature fusion and normalization to generate protocol feature vectors
[0197] The three types of features mentioned above are concatenated and normalized according to the following rules to generate the final protocol feature vector V:
[0198]
[0199] V = [v′1, v′2, ..., v′] n ],
[0200] Among them, V raw v′ is the original multidimensional feature vector. j The original feature vector V raw The result after standardization of the j-th eigenvalue, v j The original feature vector V raw The original eigenvalue of the j-th dimension, μ j and σ j The mean and standard deviation of the j-th feature are pre-computed, where j is the dimension index of the feature vector;
[0201] If the feature does not appear in the training data, then v′ j =0;
[0202] Step 3: Input the protocol feature vector into the lightweight neural network model to calculate the protocol recognition result and confidence score. When the confidence score is higher than the preset threshold, load the corresponding protocol conversion module from the protocol conversion module library according to the protocol recognition result.
[0203] Step 3 further includes the following sub-steps:
[0204] Sub-step 3.1: Model forward propagation and protocol probability distribution calculation
[0205] Input the protocol feature vector V generated in step 2 into the lightweight neural network model, perform forward propagation calculation, and output the probability distribution vector P = [p1, p2, ..., p...] for the protocol category. n ], where n is the total number of known protocol categories;
[0206] The forward propagation formula is:
[0207] Z (1) =W (1) V+b(1) , A (1) (1) ),
[0208] Z (2) (2) A (1) (2) , P = Softmax(Z (2) ),
[0209] where W (1) , b (1) are the first layer weight matrix and bias vector, W (2) , b (2) are the output layer parameters, ReLU is the activation function, and Softmax is;
[0210] Sub-step 3.2: Confidence score calculation and threshold determination
[0211] The maximum probability value p max = max(P) and the corresponding protocol identifier c id = argmax(P) are extracted from the probability distribution P, and the confidence score s is calculated:
[0212]
[0213] where μ p and σ p are the mean and standard deviation of the maximum probability of all samples in the model training set, and τ is the temperature coefficient;
[0214] If s ≥ θ, θ is a preset threshold, it is determined that the protocol recognition is valid, otherwise it is considered as low confidence or unknown protocol;
[0215] Sub-step 3.3: Protocol conversion module retrieval and dynamic loading
[0216] When s ≥ θ, according to the protocol identifier c id , the protocol conversion module and the adaptive configuration file are quickly located in the storage address in the cache according to the pre-constructed hash index table
[0217] The loading process follows the following rules:
[0218]
[0219] where Load is the loading operation, Memcpy is the memory copy function, A runtime is the runtime memory address allocated by the edge inference chip;
[0220] After loading is completed, the module with the configuration file Enter the ready state, wait for step 4 to call;
[0221] Step 4, using the loaded protocol conversion module to establish a bidirectional communication channel between the off-vehicle controller and the charging pile master control system, the bidirectional communication channel is used for conversion and transmission between the private protocol data of the off-vehicle controller and the standardized data structure of the charging pile master control system;
[0222] Step 4 further comprises the following sub-steps:
[0223] Sub-step 4.1: Communication channel initialization and resource binding
[0224] Based on the loaded protocol conversion module A bidirectional communication channel is established between the off-vehicle controller and the charging pile master control system, and the initialization of the channel needs to complete the following resource allocation:
[0225] Channel up =CreateSocket(IP ctrl ,Port ctrl ),
[0226] Channel down =CreateSocket(IP main ,Port main ),
[0227] Wherein, Channel up is a one-way communication link from the off-vehicle controller to the charging pile master control system, Channel down is a one-way communication link from the charging pile master control system to the off-vehicle controller, CreateSocket(·) is, IP ctrl , Port ctrl is the network address and port of the off-vehicle controller, IP main , Port main is the address and port of the charging pile master control system;
[0228] The bandwidth allocation of the channel follows:
[0229] B alloc =min(B max ,α·B req ),
[0230] Wherein, B alloc is the dynamically allocated communication bandwidth, B max is the maximum allowed bandwidth of the system, B req is the demand bandwidth declared by the off-vehicle controller, and α is the dynamic adjustment coefficient;
[0231] Sub-step 4.2: Uplink data parsing and standardized encapsulation
[0232] The external controller is controlled via Channel up Private protocol data D sent priv According to the adaptation configuration file C cid The defined rules are parsed:
[0233] Field extraction:
[0234] According to C cid The offset is defined in D. priv Extract the values of each field:
[0235] v k =D priv [o k :o k +l k ], k = 1, 2, ..., K,
[0236] Among them, v k For the raw byte value of the k-th bit field extracted from the private protocol data, o k l is the starting offset of the k-th bit field. k K is the field length, and K is the total number of fields;
[0237] Type conversion:
[0238] according to A type mapping table converts raw byte data into values of standardized data types. k ′:
[0239]
[0240] Standardized packaging:
[0241] The converted field values are encapsulated into a standardized data structure S. std :
[0242] S std =
[0243] {command id :c id ,source:IP ctrl ,timestamp:t now payload:{v1′,...,v K ′}},
[0244] Among them, command idThe source is a data source field in the standardized data structure, the timestamp is a timestamp field in the standardized data structure, the payload is a data payload field in the standardized data structure, and the t now is a current timestamp;
[0245] Substep 4.3: Downlink data parsing and private protocol reconstruction
[0246] Channel down The downlink standardized instruction S std is reconstructed into private protocol data D′ priv according to the reverse rule:
[0247] Field reverse mapping:
[0248] The field value v′ std in S k .payload is extracted and converted into original bytes according to the rule of:
[0249]
[0250] Data frame reconstruction:
[0251] According to the frame structure defined by: , the field bytes are spliced and a check code is added:
[0252]
[0253] where D′ priv is the reconstructed private protocol data frame, P h is the frame header, P f is the frame tail, is byte splicing, CRC32 is a cyclic redundancy check code calculation function, and v″ K is the byte encoding result of the Kth field;
[0254] Step 5, when the confidence score is not higher than the preset threshold or the communication abnormality rate of the bidirectional communication channel exceeds the fault tolerance upper limit, the modular edge recognition node uploads the unknown protocol sample containing the initial data packet to the cloud server, the cloud server generates or updates the protocol conversion module after receiving the unknown protocol sample and issues it to the modular edge recognition node, the unknown protocol sample contains the protocol feature vector and related diagnostic logs;
[0255] Step 5 further includes the following substeps:
[0256] Substep 5.1: Abnormal triggering condition judgment and sample packaging
[0257] The sample upload process is triggered when any of the following conditions are met:
[0258] Low confidence trigger: The confidence score s output in step 3 is less than θ, where θ is a preset threshold;
[0259] Communication anomaly triggered: within time window T monitor Within, the number of parsing errors E in the protocol conversion module err ≥E max E max Preset error count value;
[0260] Upon triggering, the modular edge recognition node encapsulates the following data into an unknown protocol sample packet S. sample :
[0261] S sample ={D raw ,V,log diag},
[0262] Among them, D raw Let V be the initial set of data packets, and V be the protocol feature vector, log diag Includes trigger type, timestamp, device ID, and error details;
[0263] Sub-step 5.2: Secure transmission and cloud task queue management
[0264] S sample After encryption and compression, the samples are uploaded to the cloud server via HTTPS. Upon receiving the samples, the cloud server adds them to the analysis queue according to the following priority formula:
[0265] Q priority =w1·T 紧急度 +w2·N 同类样本数 ,
[0266] Among them, T 紧急度 Determined by the trigger type, N 同类样本数 For the same type of c within 24 hours id Or the number of samples similar to V, where w1 and w2 are weighting coefficients;
[0267] Q in the queue priority ≥Q threshold Samples that are processed first are given priority.
[0268] Sub-step 5.3: Protocol Module Generation and Remote Deployment
[0269] Cloud server to S sample Perform the following processing flow:
[0270] Protocol Reverse Engineering:
[0271] Using dynamic taint analysis technology, by Draw The protocol syntax and semantic rules are extracted to generate a protocol description file F proto ;
[0272] Conversion module development:
[0273] According to F proto Automatic generation of protocol conversion module M new and adaptation configuration file C new , verify the correctness through simulation test:
[0274]
[0275] Remote deployment:
[0276] M new and C new are packaged into an update package U pkg , which is issued to all online modular edge recognition nodes under the incremental update protocol;
[0277] After the node receives, update the local library according to the following rules:
[0278] Update(M new )=HashInsert(c new ,L new ),
[0279] Where c new is the new protocol identifier, and L new is the module storage address.
[0280] Step 1 ensures that the modular edge recognition node quickly completes the hardware state verification and memory space planning in the startup phase through the hardware self-checking program and dynamic resource allocation mechanism. The decision logic of the hardware self-checking formula can identify faulty units to avoid system crashes caused by single-point hardware failure. The linear mapping strategy of the memory address allocation rule effectively isolates the data access conflict of different functional units, improving the computing efficiency of the edge inference chip. The hash verification mechanism and parameter loading rule of the lightweight neural network model guarantee the integrity and memory alignment of the model file, avoiding inference errors caused by model damage or loading offset. The hash index construction of the protocol conversion module library significantly improves the module retrieval speed, and the measured protocol matching delay is reduced to milliseconds, laying a foundation for subsequent real-time communication.
[0281] The trigger mechanism of the step 2 dynamic time window can flexibly cope with the difference in data packet sending frequency of different protocols, avoiding incomplete feature sampling or resource waste caused by fixed window length. The frame header / frame tail matching degree calculation of the structural feature vector combined with packet length normalization describes the protocol frame structure characteristics, effectively classifying similar protocol variants. The mean and variance calculation of the statistical feature vector and the command word frequency statistics quantify the protocol interaction mode characteristics, enhancing the recognition robustness of periodic or bursty protocols.
[0282] The double-layer forward propagation design of the lightweight neural network model in step 3 ensures computational efficiency while effectively mapping high-dimensional feature space to protocol categories through nonlinear activation functions and Softmax output. The calculation formula of the confidence score s introduces training set statistical priori and temperature coefficient to dynamically adjust the scoring scale, avoiding misjudgment caused by model overfitting. The dynamic loading mechanism of the protocol conversion module realizes zero-delay switching of the module through memory direct copy and runtime address binding. The actual protocol switching time is less than 50ms, meeting the real-time requirements of vehicle-level.
[0283] The bandwidth dynamic allocation rule of the communication channel in step 4 adaptively improves the communication resource proportion of high-priority controllers by adjusting the coefficient under the premise of ensuring system stability, and the actual bandwidth utilization is improved by more than 30%. The field extraction rule and type conversion logic of uplink data analysis, combined with the pre-defined structure of standardized packaging, realize one-to-one mapping of private protocols to standardized data, avoiding data semantic distortion caused by field misplacement.
[0284] The abnormal trigger condition judgment formula in step 5 distinguishes between incidental noise and real unknown protocols through a double threshold mechanism, reducing the upload of invalid samples. The cloud task queue priority calculation, combined with the weight coefficient, prioritizes high-frequency or high-risk protocol samples, shortening the unknown protocol response period to within 24 hours. The dynamic taint tracking technology of protocol reverse analysis automatically generates protocol description files through data flow tracking and grammar rule extraction, with an efficiency improvement of more than 10 times compared to traditional manual reverse. Incremental update protocols need to transmit differential data packets, reducing the edge node protocol library update time from minutes to seconds, supporting seamless upgrade of charging station networks.
[0285] Although embodiments of the present application have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made therein without departing from the principles and spirit of the application, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method of communication connection of an off-board controller, characterized in that, Comprise: Step Integrating a modular edge recognition node in the off-board infrastructure, the modular edge recognition node loads a preset lightweight neural network model and a protocol conversion module library to complete initialization when the off-board infrastructure is started, and the modular edge recognition node is composed of a network interface unit, an edge inference chip and a cache unit. Step The initial data packet generated when the off-board controller accesses is captured by the modular edge recognition node which has completed initialization, and a protocol feature vector is generated by extracting multi-dimensional features from the initial data packet, wherein the multi-dimensional features include structural features, statistical features and content features extracted from the initial data packet. Step The protocol feature vector is input into a lightweight neural network model for calculation to obtain a protocol recognition result and a confidence score. When the confidence score is higher than a preset threshold, a corresponding protocol conversion module is loaded from a protocol conversion module library according to the protocol recognition result. Step , establishing a bidirectional communication channel between the off-vehicle controller and the charging pile master control system by using the loaded protocol conversion module, the bidirectional communication channel being used for conversion and transmission between private protocol data of the off-vehicle controller and standardized data structure of the charging pile master control system; Step When the confidence score is not higher than a preset threshold or the communication abnormality rate of the bidirectional communication channel exceeds an error tolerance upper limit, the unknown protocol sample containing the initial data packet is uploaded to the cloud server by the modular edge recognition node, the cloud server generates or updates the protocol conversion module after receiving the unknown protocol sample and issues it to the modular edge recognition node, and the unknown protocol sample contains the protocol feature vector and related diagnostic logs.
2. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The lightweight neural network model is used for protocol feature vector classification calculation to output the protocol identification result; The protocol identification result loads the protocol conversion module, including loading the adaptive configuration file matched with the protocol conversion module, and the adaptive configuration file is used to define the field mapping relationship between the private protocol data and the standardized data structure.
3. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The standardized data structure is a pre-defined data object irrelevant to specific private protocols, which contains uniform command identification, data source, timestamp and data payload fields; Real-time conversion and transmission, including uplink conversion of parsing and packaging the private protocol data into the standardized data structure, and downlink conversion of parsing and packaging the standardized data structure into the private protocol data.
4. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The cloud server is specifically used for receiving the unknown protocol sample, analyzing the unknown protocol sample to generate a new protocol conversion module, and remotely deploying the new protocol conversion module to the modular edge recognition node.
5. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The communication exception rate exceeds the fault tolerance upper limit, which means that the number of continuous parsing errors of the protocol conversion module in parsing the private protocol data reaches the preset error count value.
6. The method of claim 1, wherein the at least one of the plurality of control signals is a control signal for controlling a function of the vehicle. The method of claim 1, wherein the at least one of the plurality of control signals is a control signal for controlling a function of the vehicle. The steps Further comprising the substep of: Sub-step : Hardware self-test and resource allocation When the off-board infrastructure is started, the modular edge recognition node performs a hardware self-checking program, and the self-checking program determines the hardware unit state by the following formula: , wherein, is the first self-checking state of the hardware unit, is a preset maximum response time threshold; If all The node enters the resource allocation phase and allocates memory address space to each unit according to the following rules: , Wherein, , , The start memory address of the network interface unit, the edge inference chip and the cache unit are sequentially, The base address, , The preset address offset. Sub-step : Lightweight neural network model loading and integrity verification After completing resource allocation, the node reads the preset lightweight neural network model file from the cache unit, and the model file is stored in binary format, wherein the integrity is verified by a hash check formula: , If The model parameters are loaded into the specified memory area of the edge inference chip according to the following mapping rules: , wherein, is the number of parameters in the model, is the number of bits for the parameter, is the number of bytes occupied by the single parameter, is the total number of parameters, is the sequential index; If the hash check fails, trigger an alarm and terminate the initialization; Sub-step : Protocol conversion module library loading and index construction After the model is loaded, the node reads a library of protocol conversion modules from the cache unit, the library containing protocol conversion modules , is a set of protocol identifiers, each module being associated with an adaptation configuration file ; The node is a fast retrieval module, which constructs a hash index table based on the protocol identifier: , wherein, is a protocol identifier is a storage location index in a hash table, is a number of hash table buckets, is a protocol identifier is a hash value; Each bucket stores corresponding modules Storage address in cache And configuration file Metadata.
7. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The steps Further comprising the substep of: Sub-step : Data packet capture and time window triggering The network interface unit monitors a communication port in real time, and when detecting a data packet sent by the off-vehicle controller, starts a dynamic time window , and continuously captures subsequent data packets to form an initial data packet set ; The trigger condition of the time window is: , wherein, is the arrival time of the first data packet, is the arrival time of the last data packet, is the reference window length, is the window expansion increment; If the number of data packets captured in is greater than the minimum number of valid packets , the connection is determined to be invalid and the data is discarded. Sub-step : Multi-dimensional feature extraction and quantization For each data packet in the set , three types of features are extracted according to the following rules: , three types of features are extracted according to the following rules: Structure feature extraction: Matching data packets with header and trailer patterns, computing structure feature vectors : , wherein, and is a predefined header, trailer pattern library, is a function returning a match degree, is a data packet length, is a maximum allowed packet length; Statistical feature extraction: Calculate the mean and variance of the time interval between the arrival of adjacent data packets to form a statistical feature vector : , , , in, This is the average time interval between the arrival of adjacent data packets. For the first Bit data Arrival timestamp, For the first For data packets Arrival timestamp, For sequential indexing, The variance of the time interval between the arrival of adjacent data packets. In dynamic time window The initial total number of packets captured internally. For set The number of data packets containing preset command words; Content feature extraction: Scanning data packet payloads, identifying occurrences of a predefined set of keywords, generating a content feature vector : , wherein, is an indicator function, , is an element in the font library, is a data packet instance in the data packet set . Sub-step : Feature fusion and normalization generate protocol feature vector The three types of features above are concatenated and normalized according to the following rules to generate the final protocol feature vector : , , , , , wherein, is the original multi-dimensional feature vector, is the original feature vector the dimensional feature value after standardization, is the original feature vector the dimensional original feature value, and is the pre-computed mean and standard deviation of the dimensional feature, is the dimension index of the feature vector; If the feature does not occur in the training data, then, .
8. The method of claim 1, wherein the at least one of the plurality of devices is a vehicle off-board controller. The method of claim 1, wherein the at least one of the plurality of devices is a vehicle off-board controller. The steps Further comprising the substep of: Sub-step : Model forward propagation and protocol probability distribution computation The step The generated protocol feature vector The input lightweight neural network model, perform forward propagation calculation, output the probability distribution vector of the protocol category Wherein, The total number of known protocol categories; The forward propagation formula is: , , wherein, , is a first layer weight matrix and bias vector, , is an output layer parameter, is an activation function; Sub-step : Confidence score calculation and thresholding from the probability distribution extracting a maximum probability value and a corresponding protocol identifier computing a confidence score : , wherein, and is the mean and standard deviation of the maximum probability of all samples in the model training set, is the temperature coefficient; If ≥ , is a preset threshold value, it is determined that the protocol is identified effectively, otherwise it is considered as low confidence or unknown protocol; Sub-step : protocol conversion module retrieves and dynamically loads When ≥ , the protocol conversion module and the adaptation configuration file are quickly located in the cache according to the protocol identifier , and the storage address in the cache. The loading process follows the following rules: , wherein, is a load operation, is a memory copy function, is a runtime memory address allocated for the edge inference chip; After loading is complete, the module with the configuration file Enter ready state, waiting for step 4 call.
9. According to the claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The steps Further comprising the substep of: Sub-step : Communication channel initialization binds with resources Load-based protocol conversion module A two-way communication channel is established between the off-board controller and the charging pile master control system, and initialization of the channel needs to complete the following resource allocation: , , wherein, is a one-way communication link from the off-board controller to the charging station master control system, is a one-way communication link from the charging station master control system to the off-board controller, , is a network address and port of the off-board controller, , is an address and port of the charging station master control system; The bandwidth allocation of the channel follows: , wherein, is a dynamically allocated communication bandwidth, is a maximum allowed bandwidth for the system, is a required bandwidth declared by the off-board controller, is a dynamic adjustment factor; Sub-step : uplink data analysis and standardized packaging To the out-of-vehicle controller through the private protocol data sent are parsed according to the rules defined in the adaptation profile Field extraction: According to the offset definition in , the field values are extracted from : , wherein, the original byte value of the i-th bit field extracted from the private protocol data, the starting offset of the i-th bit field, the field length, the total number of fields; Type conversion: according to A type mapping table converts raw byte data into values of standardized data types. : , Standardized packaging: Packaging the converted field values into a standardized data structure : , wherein, is a command identification field in the standardized data structure, is a data source field in the standardized data structure, is a timestamp field in the standardized data structure, is a data payload field in the standardized data structure, is a current timestamp; Sub-step : Downlink data parsing and private protocol reconstruction For the main control system of the charging pile Standardized instructions issued Reconstructed into private protocol data according to the reverse rules : Field reverse mapping: From . extract field values , convert to raw bytes according to the rules of : , Data frame reconstruction: According to The frame structure is defined, the field bytes are spliced, and a check code is added: , wherein, is the reconstituted private protocol data frame, is the frame header, is the frame trailer, is the byte concatenation, is the cyclic redundancy check code computation function, is the first is the byte encoding result of the bit field.
10. According to claims The aforementioned method for communication connection of an external vehicle controller is characterized in that, The steps Further comprising the substep of: Sub-step : Abnormal trigger condition determination and sample encapsulation When any of the following conditions is met, the sample upload process is triggered: Low confidence trigger: confidence score output by step 3 < , is a preset threshold value; Communication exception trigger: number of parsing errors of protocol conversion module in time window is greater than or equal to preset error count value Upon triggering, the modular edge recognition node encapsulates the following data as an unknown protocol sample packet : , wherein, is a set of initial data packets, is a protocol feature vector, contains a trigger type, a timestamp, a device and error details; Sub-step : Secure transmission and cloud task queue management Will be encrypted and compressed, uploaded to the cloud server through protocol; after receiving the cloud, the sample is added to the analysis queue according to the following priority formula: , wherein, is determined by the trigger type, is intra-class or similar number of samples, , is a weight coefficient; in the queue ≥ samples of the queue are processed first; Sub-step : The protocol module generates a message to the remote deployment cloud server Perform the following processing flow: Protocol reverse analysis: Using dynamic taint analysis techniques, by extracting protocol syntax and semantic rules from the protocol description file ; Conversion module development: According to Automatically generating protocol conversion modules and adaptation profiles , correctness is verified by simulation testing: ≥ , Remote deployment: will be packaged as an update package with packaged as an update package and distributed to all online modular edge recognition nodes through an incremental update protocol; After the node receives, update the local library according to the following rules: , wherein, is a new protocol identifier, is a module storage address.
Citation Information
Patent Citations
Terminal adaptive access method and device, equipment and storage medium
CN117792885A
Protocol conversion method based on Internet of Things data universal protocol conversion collector
CN118714203A