Charging method and system based on multi-rule adapter and buckle assembly
Patent Information
- Application Number
- CN202611218518.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]常规做法所存在的缺陷之一在于,电气握手与协议协商过程完全依赖触点之间的接触质量,当转接头与设备之间的机械连接处于半插入或未完全锁止状态时,触点可能仍能形成微弱导通,此时系统无法区分该状态与可靠连接状态之间的差异,导致协议协商在接触不良的背景下启动,容易引发误匹配或协商失败,充电过程可能以错误的电压或电流参数启动,对设备电池或充电电路造成潜在损害
[0016]本发明卡扣锁定状态与组装完成信号的联动,确保充电流程仅在物理连接确认后启动,从源头避免接触不良和电弧风险。脉冲探测信号结合阻抗指纹库匹配,能够准确输出转接头规格类型标识,为后续协议选择提供可靠的决策依据,使充电设备自适应适配不同规格的转接头,显著提升充电兼容性与连接可靠性。候选充电协议集合构建的决策树,将多协议协商过程转化为有序的树形搜索。沿树发送协议探测帧并依据响应帧剪除不支持分支,最短路径收敛至唯一目标协议,大幅减少协议探测帧的发送次数与等待时间,有效降低协议协商过程中的无效交互,提升充电启动速度和系统响应效率。充电参数加载期间同步监测端口电压与端口电流,当变化率超过预设安全阈值时立即停止加载并恢复至加载前状态,重新执行协议探测帧发送步骤,形成闭环保护机制。该机制能够及时响应异常波动,防止过压过流对设备造成损伤,并在异常消除后自动重试,避免一次扰动导致充电流程完全终止,兼顾充电过程的安全性与容错能力。上述机制在物理层、协议层与参数加载层形成完整联动,仅需插入转接头并完成卡扣锁定,即可自动完成规格识别、协议协商和安全加载,无需用户手动设置。充电过程全程动态监测,异常时自动恢复,既缩短了充电准备时间,又增强了系统在不同充电场景下的适应能力。
Smart Images

Figure CN123019146A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of charging technology, and in particular to a charging method and system based on multi-gauge adapters and snap-fit assembly. Background Technology
[0002] In the field of charging technology, multi-specification adapters are widely used to adapt to electronic devices of different brands and specifications, integrating support for multiple charging protocols. Current conventional practices generally fall into two categories: one relies on an electrical handshake signal between the charging device and the adapter, where charging parameters are automatically negotiated and determined through a communication protocol after the connection is established; the other involves setting physical identification elements on the adapter or cable, such as resistors with specific resistance values or coded pins, and inferring the supported charging specifications by reading the state of these elements. Both methods use electrical signals as the sole basis for protocol matching; the mechanical connection status between the adapter and the charging cable or the device to be charged is not considered in protocol identification. Whether the mechanical connection is secure and whether the locking structure is in place are usually only used as simple on / off judgment conditions, without participating in the triggering and decision-making of protocol selection logic.
[0003] One of the drawbacks of conventional practices is that the electrical handshake and protocol negotiation process depends entirely on the contact quality between the contacts. When the mechanical connection between the adapter and the device is in a semi-inserted or not fully locked state, the contacts may still form a weak continuity. At this time, the system cannot distinguish the difference between this state and a reliable connection state, causing the protocol negotiation to start in the context of poor contact, which can easily lead to mismatch or negotiation failure. The charging process may start with incorrect voltage or current parameters, which may cause potential damage to the device battery or charging circuit.
[0004] Another drawback is that the existing protocol identification mechanism needs to re-execute the complete electrical detection and negotiation process every time a connection is established. Even if the adapter type has not changed, as long as the electrical connection has been interrupted or reconnected, the system will repeatedly perform protocol detection and matching calculations. This not only increases the waiting time for charging to start, but also limits the charging response speed in scenarios where multiple adapter types are frequently changed due to the time consumed by signal processing and protocol enumeration. It cannot simplify the identification process based on the deterministic changes in mechanical state, which affects the user's actual charging experience and the system's intelligent response level. Summary of the Invention
[0005] The present invention provides a charging method and system based on multi-gauge adapters and snap-fit assembly, which can solve the problems in the prior art.
[0006] A first aspect of the present invention provides a charging method based on a multi-gauge adapter and a snap-fit assembly, comprising: The detection latch changes from an unlocked state to a locked state, generating an assembly completion signal; In response to the assembly completion signal, a pulse detection signal is applied to the contacts of the multi-gauge adapter, and the amplitude and phase characteristics of the reflected waveform are collected. The amplitude and phase characteristics are matched with the pre-stored impedance fingerprint database, and the adapter specification type identifier is output. Based on the adapter specification type identifier, query the corresponding set of candidate charging protocols, and construct a charging protocol decision tree based on the set of candidate charging protocols; Send a protocol probe frame to the device to be charged along the charging protocol decision tree, receive the response frame and parse the protocol support identifier, prune the unsupported branch according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. Read the charging parameters corresponding to the target charging protocol and load them into the charging output port. Simultaneously monitor the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, stop loading and restore to the state before loading, and return to the execution protocol probe frame sending step. When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameters are loaded and charging is started.
[0007] In response to the assembly completion signal, a pulse detection signal is applied to the multi-gauge adapter contacts to collect the amplitude and phase characteristics of the reflected waveform. These characteristics are then matched against a pre-stored impedance fingerprint database, and the adapter specification type identifier is output, including: In response to the assembly completion signal, a pulse detection signal with a pulse width decreasing over time is generated and applied sequentially to the multi-gauge adapter contacts; The reflected waveform returned from the contacts of the multi-gauge adapter is collected. The amplitude attenuation coefficient of the reflected waveform is extracted as the amplitude feature, and the phase offset of the reflected waveform is extracted as the phase feature. An amplitude attenuation curve is constructed based on the amplitude feature, and a phase offset curve is constructed based on the phase feature. The curvature of the amplitude attenuation curve is calculated as the amplitude curvature feature, and the curvature of the phase offset curve is calculated as the phase curvature feature. The amplitude curvature feature and the phase curvature feature are combined to form the current impedance fingerprint. The amplitude curvature feature in the current impedance fingerprint is matched with the standard amplitude curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The phase curvature feature in the current impedance fingerprint is matched with the standard phase curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The shape similarity is calculated, and the adapter specification type with the highest shape similarity is selected and the adapter specification type identifier is output.
[0008] Based on the adapter specification type identifier, the corresponding set of candidate charging protocols is queried. A charging protocol decision tree is then constructed based on this set of candidate charging protocols, including: The initial charging protocol set is retrieved from the specification protocol mapping table based on the adapter specification type identifier; Get the battery temperature and battery state of charge, extract the set of safe charging protocols from the battery safety protocol library based on the battery temperature and battery state of charge, and obtain the set of candidate charging protocols by intersecting the initial charging protocol set and the set of safe charging protocols. Extract the voltage modulation waveform characteristics and communication timing characteristics of each charging protocol in the candidate charging protocol set. When the waveform interference degree between any two charging protocols in the candidate charging protocol set exceeds the preset waveform interference threshold or the timing conflict degree exceeds the preset timing conflict threshold, mark the two charging protocols as a mutually exclusive protocol pair and construct a protocol mutual exclusion matrix based on the mutually exclusive protocol pair. Based on the protocol mutual exclusion matrix, the charging protocols in the candidate charging protocol set are divided into multiple protocol branch groups. The charging protocols in each protocol branch group are sorted according to their historical handshake success rates to form a protocol test chain. The protocol test chains are used as parallel branches to construct a charging protocol decision tree.
[0009] The process involves sending protocol probe frames to the device to be charged along the charging protocol decision tree, receiving response frames and parsing the protocol support flag, pruning unsupported branches based on the protocol support flag, and repeating this process until only a single leaf node remains in the decision tree. The output of the corresponding target charging protocol includes: Multiple parallel branches are obtained from the root node of the charging protocol decision tree. The first charging protocol of the protocol test chain in each parallel branch is extracted to construct a parallel detection sequence. The sending time offset is set according to the communication timing characteristics of each charging protocol. The protocol detection frames corresponding to each charging protocol in the parallel detection sequence are sent to the device to be charged in staggered time according to the sending time offset. Receive the response frame returned by the device to be charged, parse the protocol support flag and handshake delay in the response frame, when the protocol support flag indicates that the device to be charged supports the charging protocol, record the handshake delay of the charging protocol and retain the branch where the charging protocol is located, when the protocol support flag indicates that the device to be charged does not support the charging protocol, remove the unsupported branch where the charging protocol is located. Determine the number of remaining branches in the charging protocol decision tree. If there are multiple remaining branches, construct a new parallel probe sequence from the next charging protocol in the protocol test chain of each remaining branch, and repeat the process of sending protocol probe frames and pruning unsupported branches. When the decision tree has only a single leaf node left, the charging protocol with the shortest handshake delay is selected from the charging protocols whose handshake delay has been recorded in the single leaf node as the target charging protocol.
[0010] The steps of reading the charging parameters corresponding to the target charging protocol and loading them into the charging output port, synchronously monitoring the port voltage and port current of the device to be charged, and stopping loading and restoring to the state before loading when the rate of change of port voltage or port current exceeds a preset safety threshold, and returning to the protocol probe frame sending step include: Read the charging voltage and charging current parameters corresponding to the target charging protocol, load the charging voltage and charging current parameters to the charging output port, synchronously monitor the port voltage and port current of the charging output port, calculate the voltage change rate of the port voltage and the current change rate of the port current, and extract the time-series fluctuation characteristics of the voltage change rate and the current change rate. When the rate of change of voltage or current exceeds the preset safety threshold, the loading of charging voltage and charging current parameters is stopped. The timing fluctuation characteristics are matched with the pre-stored protocol conflict feature library to identify the conflict protocol type corresponding to the timing fluctuation characteristics and extract the protocol family identifier of the conflict protocol type. The charging output port is restored to its pre-loading state. Based on the protocol family identifier, all branches containing the protocol family identifier are removed from the charging protocol decision tree. The charging protocol with the shortest handshake delay is selected as the secondary charging protocol from the remaining branches. Send a protocol downgrade instruction corresponding to the secondary charging protocol to the device to be charged. The protocol downgrade instruction carries the protocol identifier of the secondary charging protocol and the downgrade charging parameters. Return to execute the steps of obtaining multiple parallel branches from the root node of the charging protocol decision tree and sending protocol probe frames.
[0011] The timing fluctuation characteristics are matched with a pre-stored protocol conflict characteristic library to identify the conflict protocol types corresponding to the timing fluctuation characteristics and extract the protocol family identifiers of the conflict protocol types, including: The fluctuation frequency and amplitude of voltage change rate and current change rate are extracted from the time-series fluctuation characteristics. The fluctuation frequency and amplitude of voltage change rate and current change rate are combined to construct a four-dimensional fluctuation feature vector. Multiple conflict protocol types and their corresponding standard fluctuation feature vectors are read from the pre-stored protocol conflict feature library. The Euclidean distance between the four-dimensional fluctuation feature vector and each standard fluctuation feature vector is calculated. The conflict protocol type corresponding to the standard fluctuation feature vector with the smallest Euclidean distance is selected as the conflict protocol type corresponding to the time series fluctuation feature. Extract the protocol communication mechanism label and protocol power level label from the conflict protocol type, combine the protocol communication mechanism label and protocol power level label to generate the protocol family identifier, and associate and store the four-dimensional fluctuation feature vector, conflict protocol type and protocol family identifier in the protocol conflict feature library to update the protocol conflict feature library.
[0012] When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameter loading and charging initiation are completed, including: When the rate of change of voltage and the rate of change of current do not exceed the preset safety threshold, it is determined that the charging voltage parameters and charging current parameters have been successfully loaded to the charging output port, a charging ready signal is sent to the device to be charged, and the battery state of charge and battery temperature are received from the device to be charged. A charging current increment sequence is generated based on the battery state of charge. The port current of the charging output port is gradually increased from the initial current value according to the charging current increment sequence. The voltage drop of the port voltage is monitored after each current increase. When the voltage drop exceeds the preset voltage drop threshold, the current port current is reduced to the previous level current value and constant current output is maintained. When the voltage drop does not exceed the preset voltage drop threshold, the port current continues to be increased according to the charging current increment sequence until the port current reaches the charging current parameter and charging is started.
[0013] A second aspect of the present invention provides a charging system based on a multi-gauge adapter and a snap-fit assembly, comprising: The buckle detection unit is used to detect when the buckle changes from an unlocked state to a locked state and generates an assembly completion signal. The adapter identification unit is used to apply a pulse detection signal to the multi-gauge adapter contacts in response to the assembly completion signal, collect the amplitude and phase characteristics of the reflected waveform, match the amplitude and phase characteristics with the pre-stored impedance fingerprint database, and output the adapter specification type identifier. The protocol tree construction unit is used to query the corresponding set of candidate charging protocols based on the adapter specification type identifier, and to construct a charging protocol decision tree based on the set of candidate charging protocols. The protocol detection unit is used to send protocol detection frames to the device to be charged along the charging protocol decision tree, receive response frames and parse the protocol support identifier, prune unsupported branches according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. The safety monitoring unit is used to read the charging parameters corresponding to the target charging protocol and load them into the charging output port. It also monitors the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, it stops loading and restores the state before loading, and returns to the execution protocol probe frame sending step. The charging start-up unit is used to load charging parameters and start charging when the rate of change of port voltage and port current does not exceed a preset safety threshold.
[0014] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0015] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0016] This invention links the latch locking state with the assembly completion signal, ensuring that the charging process only starts after physical connection confirmation, thus avoiding the risks of poor contact and arcing from the source. The pulse detection signal, combined with impedance fingerprint matching, accurately outputs the adapter specification type identifier, providing a reliable decision basis for subsequent protocol selection. This allows the charging device to adaptively adapt to different adapter specifications, significantly improving charging compatibility and connection reliability. The decision tree constructed from the candidate charging protocol set transforms the multi-protocol negotiation process into an ordered tree search. Protocol detection frames are sent along the tree, and unsupported branches are pruned based on response frames. The shortest path converges to the unique target protocol, significantly reducing the number of protocol detection frame transmissions and waiting time, effectively reducing invalid interactions during protocol negotiation, and improving charging start-up speed and system response efficiency. During charging parameter loading, port voltage and port current are monitored synchronously. When the rate of change exceeds a preset safety threshold, loading is immediately stopped and the system returns to the pre-loading state, re-executing the protocol detection frame transmission step, forming a closed-loop protection mechanism. This mechanism can respond promptly to abnormal fluctuations, preventing damage to the equipment from overvoltage and overcurrent, and automatically retrying after the anomaly is cleared. This avoids a single disturbance causing complete termination of the charging process, balancing safety and fault tolerance. The above mechanism forms a complete linkage between the physical layer, protocol layer, and parameter loading layer. Simply inserting the adapter and locking it in place automatically completes specification identification, protocol negotiation, and safe loading, eliminating the need for manual user settings. The entire charging process is dynamically monitored, and automatic recovery occurs in case of anomalies, shortening charging preparation time and enhancing the system's adaptability to different charging scenarios. Attached Figure Description
[0017] Figure 1 This is a flowchart illustrating a charging method based on a multi-gauge adapter and snap-fit assembly. Figure 2 Flowchart for charging protocol conflict identification and degradation control; Figure 3 This is a schematic diagram of voltage / current rate of change timing monitoring; Figure 4 This is a schematic diagram of stepped current loading and voltage drop monitoring. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The technical solution of the present invention will be described in detail below with reference to specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0020] Figure 1 This is a schematic flowchart of a charging method based on a multi-gauge adapter and snap-fit assembly according to an embodiment of the present invention.
[0021] Charging methods based on multi-gauge adapters and snap-fit assembly include: The detection latch changes from an unlocked state to a locked state, generating an assembly completion signal; In response to the assembly completion signal, a pulse detection signal is applied to the contacts of the multi-gauge adapter, and the amplitude and phase characteristics of the reflected waveform are collected. The amplitude and phase characteristics are matched with the pre-stored impedance fingerprint database, and the adapter specification type identifier is output. Based on the adapter specification type identifier, query the corresponding set of candidate charging protocols, and construct a charging protocol decision tree based on the set of candidate charging protocols; Send a protocol probe frame to the device to be charged along the charging protocol decision tree, receive the response frame and parse the protocol support identifier, prune the unsupported branch according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. Read the charging parameters corresponding to the target charging protocol and load them into the charging output port. Simultaneously monitor the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, stop loading and restore to the state before loading, and return to the execution protocol probe frame sending step. When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameters are loaded and charging is started.
[0022] In response to the assembly completion signal, a pulse detection signal is applied to the multi-gauge adapter contacts to collect the amplitude and phase characteristics of the reflected waveform. These characteristics are then matched against a pre-stored impedance fingerprint database, and the adapter specification type identifier is output, including: In response to the assembly completion signal, a pulse detection signal with a pulse width decreasing over time is generated and applied sequentially to the multi-gauge adapter contacts; The reflected waveform returned from the contacts of the multi-gauge adapter is collected. The amplitude attenuation coefficient of the reflected waveform is extracted as the amplitude feature, and the phase offset of the reflected waveform is extracted as the phase feature. An amplitude attenuation curve is constructed based on the amplitude feature, and a phase offset curve is constructed based on the phase feature. The curvature of the amplitude attenuation curve is calculated as the amplitude curvature feature, and the curvature of the phase offset curve is calculated as the phase curvature feature. The amplitude curvature feature and the phase curvature feature are combined to form the current impedance fingerprint. The amplitude curvature feature in the current impedance fingerprint is matched with the standard amplitude curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The phase curvature feature in the current impedance fingerprint is matched with the standard phase curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The shape similarity is calculated, and the adapter specification type with the highest shape similarity is selected and the adapter specification type identifier is output.
[0023] In response to the assembly completion signal, a sequence of pulse detection signals with decreasing pulse width over time is generated and applied sequentially to the multi-gauge adapter contacts. The purpose of the decreasing pulse width design is that a wide pulse signal can excite the low-frequency impedance response of the adapter contacts, while a narrow pulse signal has a wider spectral component and can excite the high-frequency impedance response, thus covering a wide range of impedance characteristics in a single detection process. Different adapter specifications (such as USB-A, USB-C, Lightning, etc.) differ in contact material, plating thickness, contact area, and internal connection topology. These differences cause the contact impedance to exhibit unique response patterns at different frequencies, and it is this physical characteristic that provides the basis for subsequent impedance fingerprint recognition.
[0024] During the sequential application of pulse detection signals to the contacts of the multi-gauge adapter, the reflected waveforms returned from each contact are acquired. The reflected waveforms are caused by contact impedance mismatch; the degree of amplitude attenuation is closely related to the real part of the contact impedance, while the degree of phase shift is closely related to the imaginary part (capacitive or inductive component) of the contact impedance. An amplitude attenuation coefficient is extracted from each reflected waveform as the amplitude characteristic corresponding to that pulse width, and a phase shift is extracted as the phase characteristic corresponding to that pulse width. Specifically, the amplitude attenuation coefficient is defined as the ratio of the peak amplitude of the reflected waveform to the peak amplitude of the incident pulse, and the phase shift is defined as the phase difference of the reflected waveform relative to the incident pulse in the time domain, in radians or angles. As the pulse width changes sequentially from wide to narrow, the corresponding sequence of amplitude attenuation coefficients forms an amplitude attenuation curve, and the sequence of phase shifts forms a phase shift curve. Both curves are plotted with the pulse width (or equivalent frequency) on the x-axis and the amplitude attenuation coefficient and phase shift on the y-axis, respectively.
[0025] The overall trends of the amplitude attenuation curve and phase shift curve can reflect the impedance characteristics of the adapter. However, adapters of the same specification from different batches or with different usage levels may cause deviations in the absolute values of the curves, and directly comparing the absolute values will introduce a large error. Therefore, the curvature of the amplitude attenuation curve is further calculated as the amplitude curvature feature, and the curvature of the phase shift curve is calculated as the phase curvature feature. Curvature describes the change in the degree of curve bending and has a certain robustness to the overall translation and scaling of the curve, and can more stably characterize the essential differences between adapters of different specifications. curvature at each sampling point It can be represented as: ; in, The amplitude decay curve at the 1st The first derivative at each sampling point For the corresponding second derivative, For the sampling point index. Curvature of the phase offset curve. Using the same calculation method, and The first and second derivatives corresponding to the phase offset curves can be replaced. In actual calculations, due to the limited number of sampling points, the first and second derivatives are calculated using the finite difference approximation method to ensure computational efficiency. The amplitude curvature feature sequence and the phase curvature feature sequence of each sampling point are concatenated to form the current impedance fingerprint, which serves as the input feature vector for subsequent matching.
[0026] The pre-stored impedance fingerprint database contains standard amplitude curvature characteristic curves and standard phase curvature characteristic curves acquired and processed under the same pulse detection signal conditions for various known adapter specifications (such as different interface standards, different material grades, etc.). During the matching phase, the amplitude curvature characteristic curve in the current impedance fingerprint is matched with the standard amplitude curvature characteristic curve corresponding to each adapter specification in the fingerprint database. Simultaneously, the phase curvature characteristic curve is matched with the corresponding standard phase curvature characteristic curve. Curve shape matching employs either Dynamic Time Warping (DTW) or Normalized Cross-Correlation (NCC) methods, both of which effectively handle slight stretching and contraction of the curve in the horizontal direction, thereby improving the robustness of the matching.
[0027] For the fingerprint database For each adapter specification type, calculate the shape similarity of amplitude curvature features. Shape similarity to phase curvature features The two are then weighted and fused to obtain a comprehensive shape similarity. : ; in, The weighting coefficient for the amplitude curvature feature, with a value range of [value range missing]. It can be adjusted according to the ability to distinguish between amplitude and phase features in different application scenarios, with the default value being... That is, equal-rights integration. This is the index number for the adapter specification type. Traverse all adapter specification types in the fingerprint database and select based on comprehensive shape similarity. The highest type is used as the identification result, and the corresponding adapter specification type identifier is output.
[0028] When the highest value of the overall shape similarity is lower than a preset confidence threshold, it is considered that the current impedance fingerprint has failed to reliably match any known specification type in the fingerprint database. At this time, an unknown specification alarm is triggered, and the current impedance fingerprint is temporarily stored for subsequent manual review or automatic expansion of the fingerprint database. This mechanism ensures that the system will not make incorrect specification judgments when faced with new or non-standard adapters, thereby avoiding charging failures or equipment damage due to specification identification errors during the subsequent charging protocol negotiation stage. Through the complete process of pulse width decreasing excitation, curvature feature extraction, and curve shape matching described above, the adapter specification type can be accurately identified based solely on the impedance response characteristics of the contacts without disassembling the adapter, providing a reliable input basis for the construction of the subsequent charging protocol decision tree.
[0029] Based on the adapter specification type identifier, the corresponding set of candidate charging protocols is queried. A charging protocol decision tree is then constructed based on this set of candidate charging protocols, including: The initial charging protocol set is retrieved from the specification protocol mapping table based on the adapter specification type identifier; Get the battery temperature and battery state of charge, extract the set of safe charging protocols from the battery safety protocol library based on the battery temperature and battery state of charge, and obtain the set of candidate charging protocols by intersecting the initial charging protocol set and the set of safe charging protocols. Extract the voltage modulation waveform characteristics and communication timing characteristics of each charging protocol in the candidate charging protocol set. When the waveform interference degree between any two charging protocols in the candidate charging protocol set exceeds the preset waveform interference threshold or the timing conflict degree exceeds the preset timing conflict threshold, mark the two charging protocols as a mutually exclusive protocol pair and construct a protocol mutual exclusion matrix based on the mutually exclusive protocol pair. Based on the protocol mutual exclusion matrix, the charging protocols in the candidate charging protocol set are divided into multiple protocol branch groups. The charging protocols in each protocol branch group are sorted according to their historical handshake success rates to form a protocol test chain. The protocol test chains are used as parallel branches to construct a charging protocol decision tree.
[0030] After obtaining the adapter specification type identifier, the initial charging protocol set is retrieved from the specification protocol mapping table. The specification protocol mapping table is a pre-established static mapping structure where each adapter specification type identifier corresponds to a list of charging protocols that are compatible at the physical interface level. For example, the initial charging protocol set corresponding to a certain specification type identifier may include multiple fast charging protocols and standard charging protocols, all of which are within the electrical parameter range of the interface specification and are physically feasible. The specification protocol mapping table is pre-configured according to the interface standard document and protocol specifications before leaving the factory and can be expanded through firmware updates to accommodate the addition of new charging protocols.
[0031] While obtaining the initial set of charging protocols, the current battery temperature and state of charge (SOC) are read. Battery temperature is acquired via a built-in thermistor, and SOC is obtained using a coulomb counter or voltage estimation algorithm. Based on these two parameters, a set of safe charging protocols is extracted from the battery safety protocol library. The battery safety protocol library is indexed in two dimensions according to temperature and SOC ranges. For example, when the battery temperature is in a lower range or the SOC is close to full charge, high-power fast charging protocols are excluded from the safe charging protocol set, retaining only low-power or trickle charging protocols to prevent safety risks caused by overcharging or low-temperature lithium plating. The initial charging protocol set and the safe charging protocol set are intersected to obtain a candidate charging protocol set. The intersection operation ensures that the charging protocols ultimately participating in the decision tree construction satisfy both interface physical compatibility and the safety boundaries of the current battery state. If the intersection result is empty, an alarm is triggered and the charging process is stopped, waiting for the battery temperature or SOC to recover to a safe range before re-executing the query.
[0032] The voltage modulation waveform characteristics and communication timing characteristics of each charging protocol in the candidate charging protocol set are extracted. The voltage modulation waveform characteristics describe the voltage change pattern applied to the charging line during the handshake phase, including parameters such as pulse width, modulation frequency, and amplitude step. The communication timing characteristics describe the transmission interval of protocol frames, the response window width, and the temporal arrangement of the frame sequence. Any two charging protocols in the candidate charging protocol set are compared pairwise to calculate their waveform interference and timing conflict. Waveform interference measures the degree of superposition of the voltage modulation waveforms of two protocols in the time domain when they are executed concurrently on the same line; timing conflict measures the proportion of overlap of the communication frame transmission windows of two protocols on the time axis. When the waveform interference between any two charging protocols exceeds a preset waveform interference threshold, or the timing conflict exceeds a preset timing conflict threshold, these two charging protocols are marked as a mutually exclusive protocol pair.
[0033] Based on all identified mutually exclusive protocol pairs, a protocol mutual exclusion matrix is constructed. The protocol mutual exclusion matrix is a symmetric matrix with row and column indices representing the protocols in the candidate charging protocol set. Let the candidate charging protocol set contain a total of... If there are multiple charging protocols, then the protocol mutual exclusion matrix is: A binary matrix, where the first... Line number Column elements A value of 1 indicates the first The agreement and the first Each protocol constitutes a mutually exclusive protocol pair, with a value of 0 indicating that the two protocols are not mutually exclusive. The main diagonal elements of the matrix are defined as 0. The protocol mutual exclusion matrix fully records the compatibility constraints within the candidate charging protocol set, providing a basis for subsequent protocol branch group division.
[0034] Based on the protocol mutual exclusion matrix, the charging protocols in the candidate charging protocol set are divided into multiple protocol branch groups. The division principle is as follows: any two charging protocols within the same protocol branch group have corresponding elements of 0 in the protocol mutual exclusion matrix, meaning that protocols within the group are not mutually exclusive and can be sequentially probed within the same time window without interference; protocols between different protocol branch groups are mutually exclusive and need to be isolated and executed in different parallel branches. This division process is equivalent to performing independent set decomposition on the undirected graph corresponding to the protocol mutual exclusion matrix, dividing the node set into several independent sets, each corresponding to a protocol branch group. In practical implementation, a greedy coloring algorithm can be used to color the protocol mutual exclusion graph, with protocols of the same color grouped into the same protocol branch group, thus quickly completing the grouping.
[0035] Within each protocol branch group, the charging protocols within the group are sorted in descending order based on their historical handshake success rate, forming a protocol test chain. The historical handshake success rate is recorded in a protocol history statistics table. This table stores the number of successful handshakes and the total number of attempts for each protocol in historical charging tasks, categorized by adapter specification type and device type. Defined as the first The historical number of successful handshakes for each charging protocol Total number of attempts The ratio, that is When a charging protocol has no record in the historical statistics table, a default initial success rate is assigned to ensure that new protocols can also participate in the sorting. After sorting, protocols within the group are arranged in descending order of success rate, forming a protocol test chain for that branch group. Protocols ranked higher in the test chain will be probed first during subsequent charging protocol decision tree traversals, thereby increasing the probability of successful handshakes and shortening protocol negotiation time.
[0036] A charging protocol decision tree is constructed by treating the protocol test chains corresponding to each protocol branch group as parallel branches. The root node of the decision tree corresponds to the entire set of candidate charging protocols. Below the root node, multiple parallel branches are formed according to the number of protocol branch groups, and each parallel branch corresponds to the protocol test chain of one protocol branch group. Within each parallel branch, a linear sequence of leaf nodes is formed according to the order of the protocol test chains, and each leaf node corresponds to a specific charging protocol. The parallel branches are independent of each other and can perform protocol probing separately in different time slots, or they can choose to traverse sequentially depending on hardware resources. After the decision tree structure is established, subsequent protocol probing frame sending steps will sequentially initiate protocol handshakes to the device to be charged along this decision tree structure, and dynamically prune according to the response results until a unique target charging protocol is determined.
[0037] The process involves sending protocol probe frames to the device to be charged along the charging protocol decision tree, receiving response frames and parsing the protocol support flag, pruning unsupported branches based on the protocol support flag, and repeating this process until only a single leaf node remains in the decision tree. The output of the corresponding target charging protocol includes: Multiple parallel branches are obtained from the root node of the charging protocol decision tree. The first charging protocol of the protocol test chain in each parallel branch is extracted to construct a parallel detection sequence. The sending time offset is set according to the communication timing characteristics of each charging protocol. The protocol detection frames corresponding to each charging protocol in the parallel detection sequence are sent to the device to be charged in staggered time according to the sending time offset. Receive the response frame returned by the device to be charged, parse the protocol support flag and handshake delay in the response frame, when the protocol support flag indicates that the device to be charged supports the charging protocol, record the handshake delay of the charging protocol and retain the branch where the charging protocol is located, when the protocol support flag indicates that the device to be charged does not support the charging protocol, remove the unsupported branch where the charging protocol is located. Determine the number of remaining branches in the charging protocol decision tree. If there are multiple remaining branches, construct a new parallel probe sequence from the next charging protocol in the protocol test chain of each remaining branch, and repeat the process of sending protocol probe frames and pruning unsupported branches. When the decision tree has only a single leaf node left, the charging protocol with the shortest handshake delay is selected from the charging protocols whose handshake delay has been recorded in the single leaf node as the target charging protocol.
[0038] After the charging protocol decision tree is constructed, multiple parallel branches are expanded from the root node. Each branch corresponds to a protocol test chain, and the charging protocols in the test chains are arranged according to priority or compatibility. When initiating a protocol probe, the first charging protocol of each parallel branch's test chain is extracted, and these first charging protocols are aggregated into a parallel probe sequence. The purpose of constructing the parallel probe sequence is to minimize the total protocol negotiation time and avoid the cumulative waiting delay caused by sequential probes.
[0039] After the parallel probe sequence is constructed, not all protocol probe frames are sent simultaneously. Instead, a separate transmission time offset is set according to the communication timing characteristics of each charging protocol. Different charging protocols have different signal setup times, frame synchronization windows, and carrier frequencies at the physical or link layers. If multiple probe frames are sent completely simultaneously, signal superposition interference may occur at the receiver, causing the device to be charged to fail to demodulate correctly. By assigning an independent transmission time offset to each protocol probe frame, the frames are staggered in timing, thus forming a staggered parallel probe mode on the physical channel. The magnitude of the transmission time offset is determined based on timing parameters such as the frame preamble length and signal settling time of each protocol, ensuring that the difference in the transmission start time of two adjacent frames is not less than the signal settling time of the previous frame, preventing inter-frame interference.
[0040] After receiving a protocol probe frame, the device to be charged parses it according to the charging protocols it supports and returns a response frame. The response frame carries two key pieces of information: a protocol support identifier and a handshake delay. The protocol support identifier is a binary flag indicating the device's support for the charging protocol; the handshake delay records the time interval between sending the protocol probe frame and receiving a valid response frame, reflecting the actual response speed of the protocol in the current communication environment. When parsing each received response frame, if the protocol support identifier indicates that the device supports the charging protocol, the corresponding handshake delay is recorded in the protocol node, and the branch containing that protocol is retained. This branch will continue to participate in the next round of protocol probes. If the protocol support identifier indicates that the device does not support the charging protocol, the entire branch containing that protocol is pruned from the decision tree, releasing the corresponding probe resources and avoiding repeated probes of protocols that have already been confirmed as unsupported.
[0041] After completing one round of response frame parsing and branch pruning, the number of remaining branches in the charging protocol decision tree is counted. If there are still multiple remaining branches, it means that the current round of probing has not narrowed the candidate protocol range to a unique result, and the next round of probing needs to be initiated. At this time, the next charging protocol is taken from the protocol test chain of each remaining branch, a new parallel probing sequence is reconstructed, and a new round of protocol probing frames is sent to the device to be charged according to the same staggered sending mechanism. This process is executed cyclically, and at least one unsupported branch is pruned in each round, gradually shrinking the size of the decision tree until the termination condition is met.
[0042] In certain special cases, the device to be charged may fail to return any response frame within the specified time window for a round of probe frames. In this case, the branch corresponding to that protocol is marked as timed out. Branches in the timed-out state are considered as not supporting branch processing and are also pruned from the decision tree to prevent abnormal responses from a single branch from blocking the overall protocol negotiation process. The time window for timeout determination is determined based on the maximum response waiting time defined in the specifications of each charging protocol standard. The timeout window may differ between different protocols and is uniformly managed by the protocol timing characteristic parameter table.
[0043] After several rounds of probing and pruning, when only a single leaf node remains in the charging protocol decision tree, the protocol negotiation process enters the final selection phase. The branch corresponding to this single leaf node may contain multiple charging protocols marked as supported and with their respective handshake delays recorded. This means the device to be charged has declared support for all these protocols. In this case, instead of simply selecting the protocol ranked highest in the protocol test chain, the charging protocol with the shortest handshake delay is chosen from those with recorded handshake delays. The shortest handshake delay means that, under the current physical connection conditions and communication channel state, this protocol has the highest frame interaction efficiency, and the protocol communication overhead during subsequent charging is also relatively minimal, which helps improve charging startup speed and overall charging stability.
[0044] The handshake delay comparison is based on the actual measured values recorded by each protocol node during the response frame reception phase, rather than the theoretical delay specified in the protocol specification. This design makes the selection of the target charging protocol adaptive, reflecting the impact of actual physical factors such as the quality of the charging cable, contact resistance, and signal attenuation on the protocol communication efficiency. If multiple charging protocols have the same handshake delay, the one with the highest priority in the candidate charging protocol set is selected as the target charging protocol according to the preset priority order, ensuring the determinism of the selection result.
[0045] Once the target charging protocol is determined, its identifier is output to the subsequent charging parameter loading process. This process reads the corresponding charging parameters, such as voltage, current, and power, based on the target charging protocol and loads them to the charging output port, completing a full closed loop from protocol negotiation to charging execution. The entire parallel detection and decision tree pruning process is executed automatically during the protocol negotiation phase, requiring no manual intervention. It can quickly and accurately determine the optimal charging protocol in scenarios involving multiple adapter specifications and various types of devices to be charged, effectively improving the compatibility and response efficiency of the charging system.
[0046] The steps of reading the charging parameters corresponding to the target charging protocol and loading them into the charging output port, synchronously monitoring the port voltage and port current of the device to be charged, and stopping loading and restoring to the state before loading when the rate of change of port voltage or port current exceeds a preset safety threshold, and returning to the protocol probe frame sending step include: Read the charging voltage and charging current parameters corresponding to the target charging protocol, load the charging voltage and charging current parameters to the charging output port, synchronously monitor the port voltage and port current of the charging output port, calculate the voltage change rate of the port voltage and the current change rate of the port current, and extract the time-series fluctuation characteristics of the voltage change rate and the current change rate. When the rate of change of voltage or current exceeds the preset safety threshold, the loading of charging voltage and charging current parameters is stopped. The timing fluctuation characteristics are matched with the pre-stored protocol conflict feature library to identify the conflict protocol type corresponding to the timing fluctuation characteristics and extract the protocol family identifier of the conflict protocol type. The charging output port is restored to its pre-loading state. Based on the protocol family identifier, all branches containing the protocol family identifier are removed from the charging protocol decision tree. The charging protocol with the shortest handshake delay is selected as the secondary charging protocol from the remaining branches. Send a protocol downgrade instruction corresponding to the secondary charging protocol to the device to be charged. The protocol downgrade instruction carries the protocol identifier of the secondary charging protocol and the downgrade charging parameters. Return to execute the steps of obtaining multiple parallel branches from the root node of the charging protocol decision tree and sending protocol probe frames.
[0047] After reading the charging voltage and charging current parameters corresponding to the target charging protocol, both are synchronously applied to the charging output port. The application process is not completed all at once, but rather in a step-by-step, incremental manner. The charging voltage and charging current parameters are applied in stages according to predetermined step sizes to avoid transient impacts on the port side. During the application process, the port voltage and port current of the charging output port are continuously sampled in real time at a sampling frequency of no less than 1 kHz to ensure the ability to capture rapid transients.
[0048] For the acquired port voltage time-series data and port current time-series data, calculate their rates of change within the continuous sampling window. Let the port voltage at time... The sample value is The interval between adjacent sampling times is Then the rate of change of voltage Defined as Similarly, suppose the port current is at time... The sample value is Then the rate of change of current Defined as Within multiple consecutive sampling windows, and A sliding calculation is performed to save the rate of change sequence within each window as a time-series fluctuation feature vector for subsequent pattern matching analysis. The time-series fluctuation feature not only includes the amplitude information of the rate of change, but also the distribution pattern of the rate of change over time, such as whether it exhibits periodic oscillations, whether there is a single peak, or whether it shows a step increase. This pattern information is of great significance for distinguishing different conflict types.
[0049] when Exceeding the preset voltage safety threshold ,or Exceeding the preset current safety threshold Immediately stop loading charging voltage and current parameters to prevent damage to the device being charged due to overvoltage or overcurrent caused by protocol incompatibility. After loading stops, perform pattern matching between the extracted timing fluctuation feature vector and a pre-stored protocol conflict feature library. The protocol conflict feature library pre-stores typical timing fluctuation feature templates corresponding to various known conflicting protocol types. These templates cover the typical electrical characteristics of conflicts between common fast charging protocols. For example, some protocols inject probe pulses of a specific frequency into the port during the handshake phase, causing the port voltage to exhibit regular small oscillations; other protocol conflicts are characterized by a waveform where the current rises sharply in a short period of time and then falls back quickly. Pattern matching uses a nearest neighbor matching method based on Euclidean distance. The distance between the current timing fluctuation feature vector and each template in the library is calculated one by one. The conflicting protocol type corresponding to the template with the smallest distance is selected as the identification result, and the protocol family identifier of that conflicting protocol type is extracted. Protocol family identifiers are a unified label for a group of protocols that have the same underlying handshake mechanism or the same communication logic. They can group protocols with similar or mutually exclusive functions into the same family, which facilitates batch pruning operations in the decision tree.
[0050] After identifying the conflicting protocol type and its protocol family identifier, the charging output port is restored to its initial state before loading, including resetting the port voltage and current to safe no-load levels and clearing any residual handshake states on the port side. Subsequently, a pruning operation is performed on the charging protocol decision tree based on the protocol family identifier: all branches in the decision tree that have not yet been pruned are traversed, and the protocol family identifier associated with the leaf node or intermediate node is compared with the current conflicting protocol family identifier; any matching branches are pruned. The advantage of this pruning strategy is that it not only prunes the currently confirmed conflicting protocol but also simultaneously prunes other protocols belonging to the same protocol family, thereby avoiding repeated triggering of similar conflicts during subsequent detection processes and significantly improving protocol selection efficiency.
[0051] After pruning at the protocol family level, secondary charging protocols are selected from the remaining branches of the decision tree. The selection criterion is handshake latency, which is the time interval required from sending a protocol probe frame to receiving a valid response frame. Among the remaining branches, the charging protocol with the shortest handshake latency is selected as the secondary charging protocol. The handshake latency data comes from the response times of each protocol recorded during the protocol probe phase. If a protocol has not completed the handshake in previous parallel probes, the nominal handshake latency defined in the protocol specification is used as an estimate for sorting. Selecting the protocol with the shortest handshake latency as the secondary option aims to minimize the waiting time before charging starts, thereby improving the user experience, while ensuring protocol compatibility.
[0052] Once the secondary charging protocol is determined, a protocol downgrade command is sent to the device to be charged. The protocol downgrade command is a special control frame whose payload carries the protocol identifier of the secondary charging protocol and the downgraded charging parameters. The protocol identifier informs the device to which it intends to switch, while the downgraded charging parameters include the voltage level and current limit matching the secondary charging protocol, ensuring that the device can configure its internal charging management unit according to the new parameters. The setting of the downgraded charging parameters follows a conservative principle: within the parameter range allowed by the secondary charging protocol, a combination of lower voltage and lower current is prioritized to further reduce the probability of triggering the safety threshold again. After receiving the protocol downgrade command, if the device to be charged returns an acknowledgment frame, it indicates that the downgrade intention has been accepted; if no acknowledgment frame is received within the specified timeout period, the secondary charging protocol is marked as unresponsive and removed from the decision tree, and the process continues to select the protocol with the shortest handshake delay from the remaining branches and repeat the above process.
[0053] After sending a protocol downgrade command and receiving confirmation, the process returns to the step of obtaining multiple parallel branches from the root node of the charging protocol decision tree and sending protocol probe frames. The protocol probe and parameter loading process is restarted, starting with the second-best charging protocol. The entire rollback and re-probe process forms a closed loop until a target charging protocol that is fully compatible with the device to be charged and whose rate of change of port voltage and port current during parameter loading does not exceed the preset safety threshold is found. Only then can the charging parameters be loaded and charging be started.
[0054] The timing fluctuation characteristics are matched with a pre-stored protocol conflict characteristic library to identify the conflict protocol types corresponding to the timing fluctuation characteristics and extract the protocol family identifiers of the conflict protocol types, including: The fluctuation frequency and amplitude of voltage change rate and current change rate are extracted from the time-series fluctuation characteristics. The fluctuation frequency and amplitude of voltage change rate and current change rate are combined to construct a four-dimensional fluctuation feature vector. Multiple conflict protocol types and their corresponding standard fluctuation feature vectors are read from the pre-stored protocol conflict feature library. The Euclidean distance between the four-dimensional fluctuation feature vector and each standard fluctuation feature vector is calculated. The conflict protocol type corresponding to the standard fluctuation feature vector with the smallest Euclidean distance is selected as the conflict protocol type corresponding to the time series fluctuation feature. Extract the protocol communication mechanism label and protocol power level label from the conflict protocol type, combine the protocol communication mechanism label and protocol power level label to generate the protocol family identifier, and associate and store the four-dimensional fluctuation feature vector, conflict protocol type and protocol family identifier in the protocol conflict feature library to update the protocol conflict feature library.
[0055] If, during the process of loading charging parameters and initiating charging, the rate of change of port voltage or port current exhibits continuous fluctuations rather than a single threshold jump, it indicates a potential protocol conflict in the current charging process. In-depth analysis of the timing fluctuation characteristics is needed to identify the specific conflicting protocol type. Timing fluctuation characteristics refer to a set of statistical features showing periodic or quasi-periodic fluctuations in the rate of change of port voltage and port current within a continuous sampling window. These features carry frequency and amplitude domain information unique to mutual interference between charging protocols.
[0056] The fluctuation frequency of voltage change rate is extracted from the time-series fluctuation characteristics. With fluctuation range Fluctuation frequency of current change rate With fluctuation range The fluctuation frequency is obtained by performing a Fast Fourier Transform on the rate of change time series and taking the dominant frequency component, while the fluctuation amplitude is taken as the peak-to-peak value of the corresponding dominant frequency component. These four scalars are combined in a fixed order to construct a four-dimensional fluctuation feature vector. The selection of dimensions for the four-dimensional fluctuation feature vector balances computational complexity and feature discrimination capability: the fluctuation frequency on the voltage side and the current side can reflect the difference in protocol handshake clock cycle, while the fluctuation amplitude can reflect the degree of amplitude conflict of power regulation commands. The two types of information complement each other and jointly describe the essential characteristics of the conflict mode.
[0057] The pre-stored protocol conflict feature library maintains multiple records, each containing a conflict protocol type identifier and its corresponding standard fluctuation feature vector. ,in This refers to the index number of the conflict protocol type in the feature library. , This represents the total number of conflict protocol types stored in the feature library. Calculate the current four-dimensional fluctuation feature vector. With the Standard fluctuation eigenvector Euclidean distance between The calculation method is as follows: ; Traverse all features in the feature library 1 record, find the Index that yields the minimum value , will the The conflict protocol type corresponding to each record is output as the conflict protocol type corresponding to the current time-series fluctuation feature. The Euclidean distance metric has an intuitive geometric meaning in the four-dimensional feature space, and can comprehensively measure the contribution of frequency deviation and amplitude deviation to the matching result, avoiding the problem of a single dimension dominating the matching conclusion. When there are multiple candidate records with similar Euclidean distances in the feature library, a distance difference threshold can be further introduced. Perform confidence filtering: if the minimum Euclidean distance is... The difference between the distance to the second smallest Euclidean is less than If the current fluctuation feature is ambiguous, a second sampling is triggered to re-extract the time-series fluctuation features within a longer time window, and the matching process is executed again until the matching confidence meets the requirements.
[0058] After identifying the conflict protocol type, two types of semantic tags are extracted from it: protocol communication mechanism tags and protocol power level tags. The protocol communication mechanism tag describes the physical layer and data link layer communication methods used by the conflict protocol, such as single-wire communication, differential signal communication, or resistor identification. Different communication mechanisms exhibit different frequency characteristics in timing fluctuations; therefore, this tag is strongly correlated with the fluctuation frequency dimension. The protocol power level tag describes the rated power range supported by the conflict protocol, such as low-power standard charging, medium-power fast charging, or high-power ultra-fast charging. Different power levels correspond to different current adjustment amplitudes; therefore, this tag is strongly correlated with the fluctuation amplitude dimension. The protocol communication mechanism tag and the protocol power level tag are concatenated according to a predetermined format to generate a protocol family identifier. The purpose of the protocol family identifier is to group multiple specific charging protocols with the same communication mechanism and within the same power level range into the same family. When re-executing the protocol probe frame transmission step, protocol branches corresponding to this protocol family identifier can be preferentially excluded, thereby shortening the protocol negotiation convergence time.
[0059] After completing the identification of conflicting protocol types and the generation of protocol family identifiers, the four-dimensional fluctuation feature vector generated during this matching process will be used. The identified conflict protocol type and the generated protocol family identifier are associated and packaged together, and written into the protocol conflict feature library to enable online updates of the feature library. If a record with the same conflict protocol type already exists in the feature library, a weighted average update is performed on the standard fluctuation feature vector corresponding to that record: based on the cumulative number of samples in the historical records. The ratio of the current sample count to the historical standard fluctuation feature vector is used as a weight to fuse the current four-dimensional fluctuation feature vector. This allows the standard fluctuation feature vector to gradually approach the true distribution center as real-world usage scenarios accumulate, improving the accuracy of subsequent matching. If no record with the same conflict protocol type exists in the feature library, the current four-dimensional fluctuation feature vector is directly inserted into the feature library as the initial standard fluctuation feature vector for the new conflict protocol type, and the cumulative sample count of this new record is used. Initialized to 1. Through this adaptive update mechanism, the protocol conflict feature library can continuously cover newly emerging conflict scenarios, maintaining the timeliness and completeness of the feature library without manual intervention.
[0060] At the engineering implementation level, the extraction window length for the four-dimensional fluctuation feature vector needs to be configured based on the typical duration of the charging protocol handshake cycle. A window that is too short will result in insufficient accuracy in fluctuation frequency estimation, while a window that is too long will introduce aliasing of multiple segments with different conflict states. Typically, the window length is set to an integer multiple of the shortest handshake cycle to ensure that the frequency estimation resolution meets the requirement of distinguishing adjacent protocol families. The storage structure of the protocol conflict feature library uses a hash index, with the conflict protocol type identifier as the key, supporting... Complex lookup and update operations ensure that real-time requirements are met during the charging process.
[0061] like Figure 3 As shown, Figure 3 This is a schematic diagram of the voltage / current change rate timing monitoring of the present invention, showing that when charging parameters are applied, the port voltage (U) and current (I) are monitored simultaneously at a frequency of not less than 1kHz. When the change rate exceeds a preset safety threshold, the loading is stopped immediately. The system extracts a four-dimensional fluctuation feature vector v=(fU, AU, fI, AI), performs Euclidean distance matching with a pre-stored protocol conflict feature library, identifies conflicting protocol families, and performs a downgraded retry.
[0062] When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameter loading and charging initiation are completed, including: When the rate of change of voltage and the rate of change of current do not exceed the preset safety threshold, it is determined that the charging voltage parameters and charging current parameters have been successfully loaded to the charging output port, a charging ready signal is sent to the device to be charged, and the battery state of charge and battery temperature are received from the device to be charged. A charging current increment sequence is generated based on the battery state of charge. The port current of the charging output port is gradually increased from the initial current value according to the charging current increment sequence. The voltage drop of the port voltage is monitored after each current increase. When the voltage drop exceeds the preset voltage drop threshold, the current port current is reduced to the previous level current value and constant current output is maintained. When the voltage drop does not exceed the preset voltage drop threshold, the port current continues to be increased according to the charging current increment sequence until the port current reaches the charging current parameter and charging is started.
[0063] When both the port voltage change rate and the port current change rate do not exceed the preset safety threshold, it is determined that the charging voltage and charging current parameters have been successfully loaded into the charging output port. At this time, a charging ready signal is sent to the device to be charged. This signal is encapsulated in the handshake confirmation frame format specified by the target charging protocol, notifying the device to be charged to enter the charging ready state. After receiving the charging ready signal, the device to be charged returns a status data frame containing the battery state of charge and battery temperature. The battery state of charge is expressed as a percentage, indicating the current percentage of the battery's full capacity, and the battery temperature is expressed in degrees Celsius, reflecting the current internal thermal state of the battery. These two parameters together serve as the input basis for subsequent charging strategy formulation, ensuring that the charging process matches the current state of the battery and avoiding the risk of overheating or overcharging due to blindly applying large currents.
[0064] A charging current increment sequence is generated based on the received battery state of charge (SOC). A lower SOC indicates a larger current capacity margin, allowing the battery to withstand a relatively large initial current increase. Conversely, a higher SOC results in increased internal resistance, necessitating a finer current increment to prevent sudden voltage spikes. Let the battery SOC be... (Value range is 0 to 1), the target value of the charging current parameter is The initial current value is The series of the increasing gradient sequence of charging current is The current increment of each stage satisfy: ; in according to Dynamically determined: when When it is below 0.3, Choose a smaller value (e.g., level 4 to 6) to allow the current to quickly rise to the target value; when When it is between 0.3 and 0.8, Take a moderate value (e.g., level 8 to 12); when When it is above 0.8, Using larger values (e.g., 15 to 20 levels), the current is gradually increased in finer steps to protect the battery's safety under high charge conditions. Furthermore, battery temperature also participates in the correction of the gradient sequence: when the battery temperature exceeds 45 degrees Celsius, the gradient sequence is adjusted accordingly. Apply a derating factor to compress each increment to 60% to 80% of the normal value to suppress further rise in battery temperature during charging.
[0065] According to the increasing gradient sequence of charging current from the initial current value The port current at the charging output port is gradually increased. After each current increase, a preset stabilization observation window is waited for (typically 50 to 200 milliseconds, the specific duration is specified by the target charging protocol). During the observation window, the port voltage is continuously sampled, and the voltage drop before and after the current increase is calculated. The voltage sag is defined as the difference between the stable port voltage before the current boost and the lowest sampled port voltage after the current boost.
[0066] in The stable sampling average of the port voltage before the current boost in this stage. This is the lowest sampled value of the port voltage within the observation time window after the current is increased. The physical essence of the voltage drop phenomenon is that as the charging current increases, the voltage drop across the battery's internal resistance and the cable impedance increases accordingly, causing a temporary drop in the port voltage. If the voltage drop is too large, it indicates that the current has exceeded the carrying capacity of the battery or the connection path.
[0067] when Exceeding the preset voltage drop threshold This indicates that the current port current has caused an unacceptable voltage drop in the charging path, posing a risk of affecting charging stability or damaging the battery. In this case, the port current should be reduced to the previous level's current value, i.e., rolled back one level. The system maintains a constant current output at this current value and does not continue to increase it according to the incremental gradient sequence. During the constant current output phase, the port voltage is continuously monitored. Once the port voltage is confirmed to remain stable under constant current conditions, the charging timer is officially started, using this constant current value as the operating current for the charging phase. This backoff mechanism effectively avoids continuous voltage drops or charging interruptions caused by forcibly applying excessive current, ensuring the continuity and safety of the charging process.
[0068] when The voltage drop threshold was not exceeded. If the current level is within the carrying capacity of the charging path, the port current continues to increase according to the charging current increment sequence, moving to the next current level and repeating the monitoring and judgment of voltage drop amplitude. This process is repeated until the port current reaches the target value specified by the charging current parameters. After confirming the final stage current increase Similarly, not exceeding Under the premise of The charging process officially begins with the operating current. The entire current ramp-up process forms a controlled, stepped upward curve. The dwell time of each stage, together with drop detection, constitutes an adaptive current regulation closed loop, ensuring that the charging output is always close to the battery's current maximum acceptable safe current, thus balancing the needs of both charging speed and charging safety.
[0069] After charging is initiated, the charging output port continuously supplies power to the device being charged in constant current mode, while simultaneously monitoring the slow upward trend of the port voltage. As the battery charge gradually increases, the port voltage slowly climbs to the cutoff voltage specified by the charging voltage parameters. At this point, the system switches to constant voltage mode, and the charging current gradually decreases until it drops below the cutoff current, completing the charging process. Throughout the entire charging process, the initial readings of the battery's state of charge and battery temperature ensure the rationality of the current increment sequence, while the step-by-step voltage drop detection mechanism provides dynamic overload protection for the charging path during the charging startup phase. The two mechanisms work together to achieve safe and efficient charging startup control in scenarios based on multi-gauge adapters and snap-fit assembly.
[0070] like Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the stepped current loading and voltage drop monitoring of the present invention. In this embodiment, after confirming there are no conflicts, a charging current increasing gradient sequence is generated based on the battery SOC. The current is increased step by step, and the voltage drop amplitude ΔUdrop after each increase is monitored. If the drop exceeds the limit, the current is reverted to the previous step and a constant current output is maintained to ensure that the charging path is not overloaded.
[0071] A second aspect of the present invention provides a charging system based on a multi-gauge adapter and a snap-fit assembly, comprising: The buckle detection unit is used to detect when the buckle changes from an unlocked state to a locked state and generates an assembly completion signal. The adapter identification unit is used to apply a pulse detection signal to the multi-gauge adapter contacts in response to the assembly completion signal, collect the amplitude and phase characteristics of the reflected waveform, match the amplitude and phase characteristics with the pre-stored impedance fingerprint database, and output the adapter specification type identifier. The protocol tree construction unit is used to query the corresponding set of candidate charging protocols based on the adapter specification type identifier, and to construct a charging protocol decision tree based on the set of candidate charging protocols. The protocol detection unit is used to send protocol detection frames to the device to be charged along the charging protocol decision tree, receive response frames and parse the protocol support identifier, prune unsupported branches according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. The safety monitoring unit is used to read the charging parameters corresponding to the target charging protocol and load them into the charging output port. It also monitors the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, it stops loading and restores the state before loading, and returns to the execution protocol probe frame sending step. The charging start-up unit is used to load charging parameters and start charging when the rate of change of port voltage and port current does not exceed a preset safety threshold.
[0072] A third aspect of the present invention provides an electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the aforementioned method.
[0073] A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the aforementioned method.
[0074] This invention can be a method, apparatus, system, and / or computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of the invention.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A charging method based on multi-gauge adapters and snap-fit assembly, characterized in that, include: The detection latch changes from an unlocked state to a locked state, generating an assembly completion signal; In response to the assembly completion signal, a pulse detection signal is applied to the contacts of the multi-gauge adapter, and the amplitude and phase characteristics of the reflected waveform are collected. The amplitude and phase characteristics are matched with the pre-stored impedance fingerprint database, and the adapter specification type identifier is output. Based on the adapter specification type identifier, query the corresponding set of candidate charging protocols, and construct a charging protocol decision tree based on the set of candidate charging protocols; Send a protocol probe frame to the device to be charged along the charging protocol decision tree, receive the response frame and parse the protocol support identifier, prune the unsupported branch according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. Read the charging parameters corresponding to the target charging protocol and load them into the charging output port. Simultaneously monitor the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, stop loading and restore to the state before loading, and return to the execution protocol probe frame sending step. When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameters are loaded and charging is started.
2. The method according to claim 1, characterized in that, In response to the assembly completion signal, a pulse detection signal is applied to the multi-gauge adapter contacts to collect the amplitude and phase characteristics of the reflected waveform. These characteristics are then matched against a pre-stored impedance fingerprint database, and the adapter specification type identifier is output, including: In response to the assembly completion signal, a pulse detection signal with a pulse width decreasing over time is generated and applied sequentially to the multi-gauge adapter contacts; The reflected waveform returned from the contacts of the multi-gauge adapter is collected. The amplitude attenuation coefficient of the reflected waveform is extracted as the amplitude feature, and the phase offset of the reflected waveform is extracted as the phase feature. An amplitude attenuation curve is constructed based on the amplitude feature, and a phase offset curve is constructed based on the phase feature. The curvature of the amplitude attenuation curve is calculated as the amplitude curvature feature, and the curvature of the phase offset curve is calculated as the phase curvature feature. The amplitude curvature feature and the phase curvature feature are combined to form the current impedance fingerprint. The amplitude curvature feature in the current impedance fingerprint is matched with the standard amplitude curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The phase curvature feature in the current impedance fingerprint is matched with the standard phase curvature feature of each adapter specification type in the pre-stored impedance fingerprint library. The shape similarity is calculated, and the adapter specification type with the highest shape similarity is selected and the adapter specification type identifier is output.
3. The method according to claim 1, characterized in that, Based on the adapter specification type identifier, the corresponding set of candidate charging protocols is queried. A charging protocol decision tree is then constructed based on this set of candidate charging protocols, including: The initial charging protocol set is retrieved from the specification protocol mapping table based on the adapter specification type identifier; Get the battery temperature and battery state of charge, extract the set of safe charging protocols from the battery safety protocol library based on the battery temperature and battery state of charge, and obtain the set of candidate charging protocols by intersecting the initial charging protocol set and the set of safe charging protocols. Extract the voltage modulation waveform characteristics and communication timing characteristics of each charging protocol in the candidate charging protocol set. When the waveform interference degree between any two charging protocols in the candidate charging protocol set exceeds the preset waveform interference threshold or the timing conflict degree exceeds the preset timing conflict threshold, mark the two charging protocols as a mutually exclusive protocol pair and construct a protocol mutual exclusion matrix based on the mutually exclusive protocol pair. Based on the protocol mutual exclusion matrix, the charging protocols in the candidate charging protocol set are divided into multiple protocol branch groups. The charging protocols in each protocol branch group are sorted according to their historical handshake success rates to form a protocol test chain. The protocol test chains are used as parallel branches to construct a charging protocol decision tree.
4. The method according to claim 1, characterized in that, The process involves sending protocol probe frames to the device to be charged along the charging protocol decision tree, receiving response frames and parsing the protocol support flag, pruning unsupported branches based on the protocol support flag, and repeating this process until only a single leaf node remains in the decision tree. The output of the corresponding target charging protocol includes: Multiple parallel branches are obtained from the root node of the charging protocol decision tree. The first charging protocol of the protocol test chain in each parallel branch is extracted to construct a parallel detection sequence. The sending time offset is set according to the communication timing characteristics of each charging protocol. The protocol detection frames corresponding to each charging protocol in the parallel detection sequence are sent to the device to be charged in staggered time according to the sending time offset. Receive the response frame returned by the device to be charged, parse the protocol support flag and handshake delay in the response frame, when the protocol support flag indicates that the device to be charged supports the charging protocol, record the handshake delay of the charging protocol and retain the branch where the charging protocol is located, when the protocol support flag indicates that the device to be charged does not support the charging protocol, remove the unsupported branch where the charging protocol is located. Determine the number of remaining branches in the charging protocol decision tree. If there are multiple remaining branches, construct a new parallel probe sequence from the next charging protocol in the protocol test chain of each remaining branch, and repeat the process of sending protocol probe frames and pruning unsupported branches. When the decision tree has only a single leaf node left, the charging protocol with the shortest handshake delay is selected from the charging protocols whose handshake delay has been recorded in the single leaf node as the target charging protocol.
5. The method according to claim 1, characterized in that, The steps of reading the charging parameters corresponding to the target charging protocol and loading them into the charging output port, synchronously monitoring the port voltage and port current of the device to be charged, and stopping loading and restoring to the state before loading when the rate of change of port voltage or port current exceeds a preset safety threshold, and returning to the protocol probe frame sending step include: Read the charging voltage and charging current parameters corresponding to the target charging protocol, load the charging voltage and charging current parameters to the charging output port, synchronously monitor the port voltage and port current of the charging output port, calculate the voltage change rate of the port voltage and the current change rate of the port current, and extract the time-series fluctuation characteristics of the voltage change rate and the current change rate. When the rate of change of voltage or current exceeds the preset safety threshold, the loading of charging voltage and charging current parameters is stopped. The timing fluctuation characteristics are matched with the pre-stored protocol conflict feature library to identify the conflict protocol type corresponding to the timing fluctuation characteristics and extract the protocol family identifier of the conflict protocol type. The charging output port is restored to its pre-loading state. Based on the protocol family identifier, all branches containing the protocol family identifier are removed from the charging protocol decision tree. The charging protocol with the shortest handshake delay is selected as the secondary charging protocol from the remaining branches. Send a protocol downgrade instruction corresponding to the secondary charging protocol to the device to be charged. The protocol downgrade instruction carries the protocol identifier of the secondary charging protocol and the downgrade charging parameters. Return to execute the steps of obtaining multiple parallel branches from the root node of the charging protocol decision tree and sending protocol probe frames.
6. The method according to claim 1, characterized in that, The timing fluctuation characteristics are matched with a pre-stored protocol conflict characteristic library to identify the conflict protocol types corresponding to the timing fluctuation characteristics and extract the protocol family identifiers of the conflict protocol types, including: The fluctuation frequency and amplitude of voltage change rate and current change rate are extracted from the time-series fluctuation characteristics. The fluctuation frequency and amplitude of voltage change rate and current change rate are combined to construct a four-dimensional fluctuation feature vector. Multiple conflict protocol types and their corresponding standard fluctuation feature vectors are read from the pre-stored protocol conflict feature library. The Euclidean distance between the four-dimensional fluctuation feature vector and each standard fluctuation feature vector is calculated. The conflict protocol type corresponding to the standard fluctuation feature vector with the smallest Euclidean distance is selected as the conflict protocol type corresponding to the time series fluctuation feature. Extract the protocol communication mechanism label and protocol power level label from the conflict protocol type, combine the protocol communication mechanism label and protocol power level label to generate the protocol family identifier, and associate and store the four-dimensional fluctuation feature vector, conflict protocol type and protocol family identifier in the protocol conflict feature library to update the protocol conflict feature library.
7. The method according to claim 1, characterized in that, When the rate of change of both port voltage and port current does not exceed the preset safety threshold, the charging parameter loading and charging initiation are completed, including: When the rate of change of voltage and the rate of change of current do not exceed the preset safety threshold, it is determined that the charging voltage parameters and charging current parameters have been successfully loaded to the charging output port, a charging ready signal is sent to the device to be charged, and the battery state of charge and battery temperature are received from the device to be charged. A charging current increment sequence is generated based on the battery state of charge. The port current of the charging output port is gradually increased from the initial current value according to the charging current increment sequence. The voltage drop of the port voltage is monitored after each current increase. When the voltage drop exceeds the preset voltage drop threshold, the current port current is reduced to the previous level current value and constant current output is maintained. When the voltage drop does not exceed the preset voltage drop threshold, the port current continues to be increased according to the charging current increment sequence until the port current reaches the charging current parameter and charging is started.
8. A charging system based on a multi-gauge adapter and snap-fit assembly, used to implement the method as described in any one of claims 1-7, characterized in that, include: The buckle detection unit is used to detect when the buckle changes from an unlocked state to a locked state and generates an assembly completion signal. The adapter identification unit is used to apply a pulse detection signal to the multi-gauge adapter contacts in response to the assembly completion signal, collect the amplitude and phase characteristics of the reflected waveform, match the amplitude and phase characteristics with the pre-stored impedance fingerprint database, and output the adapter specification type identifier. The protocol tree construction unit is used to query the corresponding set of candidate charging protocols based on the adapter specification type identifier, and to construct a charging protocol decision tree based on the set of candidate charging protocols. The protocol detection unit is used to send protocol detection frames to the device to be charged along the charging protocol decision tree, receive response frames and parse the protocol support identifier, prune unsupported branches according to the protocol support identifier, repeat the process until the decision tree has only a single leaf node left, and output the corresponding target charging protocol. The safety monitoring unit is used to read the charging parameters corresponding to the target charging protocol and load them into the charging output port. It also monitors the port voltage and port current of the device to be charged. When the rate of change of the port voltage or port current exceeds the preset safety threshold, it stops loading and restores the state before loading, and returns to the execution protocol probe frame sending step. The charging start-up unit is used to load charging parameters and start charging when the rate of change of port voltage and port current does not exceed a preset safety threshold.
9. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to invoke instructions stored in the memory to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.
