Vehicle control method, model training method, electronic device, and storage medium

By acquiring the driver's physiological state and commands, and using the command adjustment model to generate precise command adjustment parameters, the problem of low safety in existing vehicle control is solved, and the safety and consistency of the driving process are improved.

CN122126291APending Publication Date: 2026-06-02CHERY AUTOMOBILE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHERY AUTOMOBILE CO LTD
Filing Date
2026-03-30
Publication Date
2026-06-02

Smart Images

  • Figure CN122126291A_ABST
    Figure CN122126291A_ABST
Patent Text Reader

Abstract

This application provides a vehicle control method, a model training method, an electronic device, and a storage medium. The method includes: in response to receiving a first driving instruction input by a driver, acquiring the driver's first physiological state during the driving process; inputting the first driving instruction and the first physiological state into an instruction adjustment model, and using the instruction adjustment model to determine instruction adjustment parameters; adjusting the first driving instruction based on the instruction adjustment parameters to obtain a target driving instruction; and controlling the vehicle's movement based on the target driving instruction. This application solves the technical problem of low safety in vehicle control in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to vehicle engineering and computer technology, and more specifically, to a vehicle control method, a model training method, an electronic device, and a storage medium. Background Technology

[0002] Current vehicle control strategies are generally based on explicit driver input, such as steering, accelerator and braking commands, and execute linear or feedback responses. The core logic of this control method remains at the surface level of human-machine interaction, while ignoring the behavioral deviations that drivers may have in complex driving environments, which leads to lower vehicle control safety.

[0003] There is currently no good solution to the above problems. Summary of the Invention

[0004] This application provides a vehicle control method, a model training method, an electronic device, and a storage medium to at least address the technical problem of low safety in vehicle control in related technologies.

[0005] According to one aspect of the embodiments of this application, a vehicle control method is provided, comprising: in response to receiving a first driving instruction input by a driver, acquiring a first physiological state of the driver during the driving process; inputting the first driving instruction and the first physiological state into an instruction adjustment model, and using the instruction adjustment model to determine instruction adjustment parameters, wherein the adjustment weights of multiple adjustment layers in the instruction adjustment model during the training process are determined based on the degree of influence of the multiple adjustment layers on the output error of the instruction adjustment model during the training process; adjusting the first driving instruction based on the instruction adjustment parameters to obtain a target driving instruction; and controlling the vehicle to drive based on the target driving instruction.

[0006] In the above embodiments of this application, the method further includes: obtaining a training dataset, wherein the training dataset includes multiple second driving commands and multiple second physiological states, the types of the multiple second driving commands are the same as the types of the first driving commands, and the command values ​​of the multiple second driving commands include the command values ​​of the first driving commands, and the types of the multiple second physiological states are the same as the first physiological states; based on the training dataset, determining the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model; and adjusting the multiple initial adjustment layers respectively based on the degree of influence corresponding to the multiple initial adjustment layers to obtain a command adjustment model.

[0007] In the above embodiments of this application, determining the degree of influence of multiple initial adjustment layers on the output error of the initial adjustment model based on the training dataset includes: constructing multiple candidate rank sets corresponding to multiple initial adjustment layers, wherein any candidate rank set contains at least one candidate rank; determining at least one initial gating parameter corresponding to any initial adjustment layer based on the candidate rank set corresponding to any initial adjustment layer, wherein different initial gating parameters correspond to different candidate ranks in the candidate rank set; and determining the degree of influence corresponding to multiple initial adjustment layers based on the training dataset, the multiple candidate rank sets corresponding to multiple initial adjustment layers, and the multiple initial gating parameters.

[0008] In the above embodiments of this application, determining the degree of influence corresponding to multiple initial adjustment layers based on the training dataset, multiple candidate rank sets corresponding to multiple initial adjustment layers, and multiple initial gating parameters includes: inputting any training data from the training dataset into the initial adjustment model to obtain multiple input tensors corresponding to multiple initial adjustment layers, wherein the training data consists of any second driving command and any second physiological state; determining the target weight of the initial adjustment layer based on the input tensor corresponding to any initial adjustment layer, the candidate rank set, and at least one initial gating parameter; and adjusting the multiple initial adjustment layers based on the target weights corresponding to the multiple initial adjustment layers to obtain the command adjustment model.

[0009] In the above embodiments of this application, determining the target weight of the initial adjustment layer based on the input tensor, candidate rank set, and at least one initial gating parameter corresponding to any initial adjustment layer includes: constructing at least one low-rank matrix pair of the initial adjustment layer based on the candidate rank set, wherein different low-rank matrix pairs correspond to different candidate ranks in the candidate rank set; determining the initial low-rank increment of the initial adjustment layer based on the input tensor, at least one low-rank matrix pair, and at least one initial gating parameter; and determining the target weight of the initial adjustment layer based on the initial low-rank increment and at least one initial gating parameter.

[0010] Preferably, constructing at least one low-rank matrix pair for the initial adjustment layer based on the candidate rank set includes: obtaining any candidate rank from the candidate rank set, and the input feature dimension and output feature dimension of the initial adjustment layer; constructing a first matrix based on the candidate rank and the input feature dimension, wherein the first matrix is ​​used to reduce the dimension of the input features from the input feature dimension to the dimension corresponding to the candidate rank; constructing a second matrix based on the candidate rank and the output feature dimension, wherein the second matrix is ​​used to map the dimension-reduced input features from the dimension corresponding to the candidate rank to the output feature dimension; and constructing a low-rank matrix pair corresponding to the candidate rank based on the first matrix and the second matrix.

[0011] Preferably, the method further includes: when the candidate rank set contains multiple candidate ranks, obtaining any new candidate rank other than the candidate rank in the candidate rank set, and repeatedly performing the steps of constructing a first matrix based on the new candidate rank and the input feature dimension of the adjustment layer; constructing a second matrix based on the new candidate rank and the output feature dimension of the adjustment layer; and constructing a low-rank matrix pair corresponding to the new candidate rank based on the first matrix and the second matrix, until the construction of low-rank matrix pairs for multiple candidate ranks is completed.

[0012] In the above embodiments of this application, determining the initial low-rank increment of the initial adjustment layer based on the input tensor, at least one low-rank matrix pair, and at least one initial gating parameter includes: normalizing any initial gating parameter based on a preset function to obtain the initial rank weights of the candidate ranks corresponding to the initial gating parameters; constructing the initial sub-increment corresponding to the candidate ranks based on the low-rank matrix pair corresponding to the candidate ranks and the input tensor; and performing a weighted summation on the initial sub-increment corresponding to at least one candidate rank based on the initial rank weights of at least one candidate rank to obtain the initial low-rank increment of the initial adjustment layer.

[0013] Preferably, based on the low-rank matrix pair corresponding to the candidate rank and the input tensor, an initial sub-increment corresponding to the candidate rank is constructed, including: constructing a scaling factor based on the initial gating parameter and the candidate rank; constructing a dimension-reduced input feature based on the first matrix in the input tensor and the low-rank matrix pair; constructing a dimension-increasing output feature based on the dimension-reduced input feature and the second matrix in the low-rank matrix pair; and constructing the initial sub-increment based on the scaling factor and the dimension-increasing output feature.

[0014] In the above embodiments of this application, determining the target weights of the initial adjustment layer based on the initial low-rank increment and at least one initial gating parameter includes: summing the original weights of the initial adjustment layer and the initial low-rank increment to obtain the comprehensive weights of the initial adjustment layer, wherein the original weights are fixed values; constructing the output tensor of the initial adjustment layer based on the input tensor and the comprehensive weights; calculating the gradient norm of the initial adjustment layer based on the target loss function and the output tensor of the initial adjustment model, wherein the gradient norm is used to characterize the degree of influence corresponding to the initial adjustment layer; and determining the target weights based on the gradient norm and at least one initial gating parameter.

[0015] Preferably, before calculating the gradient norm of the initial adjustment layer based on the target loss function and output tensor of the initial adjustment model, the method further includes: obtaining the initial loss function of the initial adjustment model; summing the absolute values ​​of at least one initial gating parameter to obtain the gating norm of the initial adjustment layer; summing the gating norms corresponding to multiple initial adjustment layers to obtain the global norm sum, and multiplying the regularized sparse coefficients and the global norm sum to obtain the gated sparse regularization term; and summing the gated sparse regularization term and the initial loss function to obtain the target loss function.

[0016] Preferably, the gradient norm of the initial adjustment layer is calculated based on the target loss function and output tensor of the initial adjustment model, including: obtaining the parameter list corresponding to the initial adjustment layer; calculating the gradient values ​​corresponding to multiple parameters in the parameter list based on the target loss function; calculating the sum of squares of the gradient values ​​corresponding to multiple parameters to obtain the gradient intensity of the initial adjustment layer; and performing a square root calculation on the gradient intensity to obtain the gradient norm.

[0017] Preferably, determining the target weight based on the gradient norm and at least one initial gating parameter includes: adjusting the initial gating parameter corresponding to any candidate rank based on the gradient norm to obtain the target gating parameter corresponding to the candidate rank; calculating the target sub-increment corresponding to the candidate rank based on the target gating parameter and the low-rank matrix pair corresponding to the candidate rank; performing a weighted summation of the target sub-increments corresponding to at least one candidate rank based on the target gating parameter corresponding to at least one candidate rank to obtain the target low-rank increment; and summing the target low-rank increment with the original weight to obtain the target weight.

[0018] According to another aspect of the embodiments of this application, a model training method is also provided, comprising: acquiring a training dataset, wherein the training dataset includes a plurality of second driving commands and a plurality of second physiological states, the types of the plurality of second driving commands are the same as the types of first driving commands input by the driver, and the command values ​​of the plurality of second driving commands include the command values ​​of the first driving commands, and the types of the plurality of second physiological states are the same as the types of the first physiological states of the driver during the driving process; based on the training dataset, determining the degree of influence of a plurality of initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model during the training process; adjusting the plurality of initial adjustment layers respectively based on the degree of influence corresponding to the plurality of initial adjustment layers to obtain a command adjustment model; and deploying the command adjustment model to an electronic device, wherein the command adjustment model is invoked by the electronic device to execute the method in the above embodiments.

[0019] According to another aspect of the embodiments of this application, a vehicle control device is also provided, comprising: a first acquisition module, configured to acquire a first physiological state of the driver during the driving process in response to receiving a first driving instruction input by the driver; a parameter determination module, configured to input the first driving instruction and the first physiological state into an instruction adjustment model, and determine instruction adjustment parameters using the instruction adjustment model, wherein the adjustment weights of multiple adjustment layers in the instruction adjustment model during the training process are determined based on the degree of influence of the multiple adjustment layers on the output error of the instruction adjustment model during the training process; an instruction adjustment module, configured to adjust the first driving instruction based on the instruction adjustment parameters to obtain a target driving instruction; and a vehicle control module, configured to control the vehicle to drive based on the target driving instruction.

[0020] According to another aspect of the embodiments of this application, a model training apparatus is also provided, comprising: a second acquisition module, configured to acquire a training dataset, wherein the training dataset includes a plurality of second driving instructions and a plurality of second physiological states, the types of the plurality of second driving instructions are the same as the types of first driving instructions input by the driver, and the instruction values ​​of the plurality of second driving instructions include the instruction values ​​of the first driving instructions, and the types of the plurality of second physiological states are the same as the types of the first physiological states of the driver during the driving process; a second determination module, configured to determine, based on the training dataset, the degree of influence of a plurality of initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model during the training process; a second adjustment module, configured to adjust the plurality of initial adjustment layers respectively based on the degree of influence corresponding to the plurality of initial adjustment layers to obtain an instruction adjustment model; and a model deployment module, configured to deploy the instruction adjustment model to an electronic device, wherein the instruction adjustment model is invoked by the electronic device to execute the method in the above embodiments.

[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0022] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0023] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0024] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0025] According to another aspect of the embodiments of this application, a computer program is also provided, which, when executed by a processor, implements the methods of the various embodiments of this application.

[0026] In this embodiment, in response to receiving a first driving instruction input by the driver, the system acquires the driver's first physiological state during the driving process. The first driving instruction and the first physiological state are input into an instruction adjustment model, which is used to determine instruction adjustment parameters. Based on these parameters, the first driving instruction is adjusted to obtain a target driving instruction. Based on the target driving instruction, the system controls the vehicle's movement by inputting both the first physiological state and the first driving instruction into a pre-trained instruction adjustment model. This automatically identifies potential conflicts between the driver's physiological state and the instruction's intent and automatically generates precise instruction adjustment parameters. Subsequently, the control system can perform safety corrections on the first driving instruction based on these adjustment parameters, generating a target driving instruction that meets current driving safety requirements. This effectively improves driving safety without depriving the driver of control, thus solving the technical problem of low vehicle control safety in related technologies. Attached Figure Description

[0027] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0028] Figure 1 This is a flowchart of a vehicle control method according to an embodiment of this application;

[0029] Figure 2 This is a schematic diagram illustrating the generation process of an optional instruction adjustment parameter according to an embodiment of this application;

[0030] Figure 3 This is a schematic diagram of an optional low-rank matrix pair generation process according to an embodiment of this application;

[0031] Figure 4 This is a schematic diagram illustrating an optional operation process for a low-rank matrix pair according to an embodiment of this application;

[0032] Figure 5 This is a schematic diagram of the adjustment process of an optional initial adjustment model according to an embodiment of this application;

[0033] Figure 6 This is a flowchart of a model training method according to an embodiment of this application;

[0034] Figure 7 This is a schematic diagram of a vehicle control device according to an embodiment of this application;

[0035] Figure 8 This is a schematic diagram of a model training device according to an embodiment of this application. Detailed Implementation

[0036] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0037] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0038] According to an embodiment of this application, an embodiment of a vehicle control method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0039] This embodiment provides a vehicle control method. Figure 1 This is a flowchart of a vehicle control method according to an embodiment of this application, such as... Figure 1 As shown, the process includes the following steps:

[0040] Step S102: In response to receiving the first driving instruction input by the driver, the driver's first physiological state during the driving process is obtained.

[0041] The aforementioned first driving command can be an instruction applied by the driver through the vehicle's human-machine interaction device (such as steering wheel buttons, pedals, central control touch screen, voice control system or gear shift lever) to control the vehicle's motion state or functional mode. This instruction can be collected by sensors and converted into digital control quantities to trigger the response actions of the vehicle's power system, steering system, braking system or driver assistance system.

[0042] The aforementioned first physiological state can be a set of biophysiological parameters collected by the driver during the execution of the first driving command through on-board non-contact or contact physiological sensors (such as steering wheel electrodes, seat pressure sensors, camera infrared imaging systems, or wearable devices) to reflect the state of the driver's autonomic nervous system and muscle activity. These parameters may include, but are not limited to, heart rate, heart rate variability, skin conductivity, eye movement characteristics (pupil diameter, blink frequency, fixation point position), head posture angle, facial electromyographic activity, respiratory rate, or brain wave power spectrum. These parameters can characterize the driver's current level of attention, fatigue, emotional stress, or cognitive load in the form of time-series digital signals.

[0043] In one optional embodiment, considering that the driver's physiological state may affect the accuracy of the driver's issuance of driving instructions, the vehicle control system (hereinafter referred to as the control system) can acquire the driver's first physiological state when issuing the first driving instruction to the vehicle, in order to establish a correlation between driving behavior and physiological signals, and provide quantifiable input basis for subsequent driving assistance or risk warning.

[0044] For example, the driver can input a first driving command through the vehicle's driving equipment or human-machine interface, and the control system can receive and parse this first driving command through a CAN (Controller Area Network) bus or a voice recognition module. Simultaneously, the control system can utilize a pre-installed array of non-contact physiological sensors to obtain the driver's initial physiological state.

[0045] For example, these sensors may include a facial camera for eyelid closure frequency, pupil diameter, and head posture analysis; a steering wheel-integrated capacitive heart rate sensor for detecting heart rate variability during hand contact; seat pressure and skin conductivity sensors for assessing stress levels or sweating responses; and an ambient infrared temperature sensor to assist in determining body temperature changes. The control system can continuously collect the driver's physiological parameters using these sensors within a preset time after receiving the first driving command, and then synthesize these physiological parameters to construct a first physiological state.

[0046] Step S104: Input the first driving command and the first physiological state into the command adjustment model, and use the command adjustment model to determine the command adjustment parameters. The adjustment weights of multiple adjustment layers in the command adjustment model during the training process are determined based on the degree of influence of multiple adjustment layers on the output error of the command adjustment model during the training process.

[0047] The aforementioned instruction adjustment model can be a parameterized mapping function based on a neural network structure. The input of the model is the first driving instruction and the first physiological state, and the output is the instruction adjustment parameters of the first physiological state on the first driving instruction. The model is composed of multiple trainable adjustment layers connected in series or in parallel.

[0048] The aforementioned instruction adjustment parameters can be parameters output by the instruction adjustment model and can be used to perform linear or nonlinear corrections on the first driving instruction.

[0049] The aforementioned adjustment layers can be continuous trainable neural network layers in the instruction adjustment model used to learn the relationship between physiological state and driving instruction correction. Each layer can contain linear transformation, activation function and optional normalization operation. Signals can be passed between layers through tensors. The input of each layer is the concatenation of the output of the previous layer or the original features. The parameters within the layer are learnable weight matrix and bias vector. The number and structure of the layers are determined by the design of the instruction adjustment model and are used to progressively extract the high-order nonlinear influence features of physiological state on driving instructions.

[0050] The aforementioned adjustment weights can be real scalars or vectors assigned to each adjustment layer during the training of the instruction adjustment model. They are used to characterize the sensitivity or contribution of the layer to the overall output error of the instruction adjustment model. They can be dynamically generated by calculating statistical measures such as the norm of the gradient of the layer's parameters, the variance of the activation values, or the magnitude of the input and output Jacobian matrix. They can be used to guide the priority of parameter updates or learning rate scaling of each layer during training. The larger the weight value, the stronger the layer's ability to control the error.

[0051] The aforementioned output error can be the difference between the predicted adjustment parameters of the instruction adjustment model and the actual expected adjustment parameters. It can be quantified by a predefined loss function and can be used to drive the update of all adjustment layer parameters. The smaller the output error, the more accurate the instruction adjustment model is in modeling the influence of physiological state on driving instructions.

[0052] In one optional embodiment, considering that the driver's physiological state can cause deviations in the driver's driving commands, the control system can adjust the model based on the first driving command and the first physiological state input command, and use this model to determine the command adjustment parameters. To improve the output accuracy of the model, during the model's training phase, multiple adjustment layers in the model can be adjusted according to their adjustment weights during training. These adjustment weights can be automatically learned through backpropagation based on the gradient contribution of each adjustment layer to the model's output error. This adjustment method allows the model to output command adjustment parameters for correcting the first driving command based on real-time changes in the first physiological state. This allows the first driving command to be adjusted according to these parameters, reducing command deviations caused by driver physiological fluctuations and improving the consistency between control commands and actual driving intentions.

[0053] For example, the control system can input the driver's first driving command and the real-time collected first physiological state into a pre-trained command adjustment model. This model consists of multiple adjustment layers. During the training phase, each adjustment layer can continuously adjust its corresponding weights through the backpropagation algorithm. The updates of these weights are not uniformly distributed, but dynamically adjusted according to the contribution of each adjustment layer to the final output error.

[0054] For example, if an intermediate layer responsible for processing the nonlinear mapping of physiological signals significantly reduces the deviation of the first driving command in a large number of training samples, the weight of that layer will be given higher priority, while the weight of a layer that only plays a simple transmission role will be updated slowly.

[0055] After receiving input from the control system, the command adjustment model can integrate the weighted responses of each adjustment layer and output a set of better command adjustment parameters, such as steering angle correction, throttle response sensitivity, or brake delay time. This enables adaptive matching between driving behavior and the driver's physiological state, making the final driving command more in line with the driver's current physical and mental state, thereby improving driving safety and comfort.

[0056] For ease of understanding, Figure 2 This is a schematic diagram illustrating an optional instruction adjustment parameter generation process according to an embodiment of this application, such as... Figure 2 As shown, in a specific exemplary scenario, when the system detects that the driver issues an acceleration command and simultaneously collects typical fatigue physiological characteristics such as increased eyelid closure frequency, increased head tilt, and slow pupil response through a facial camera and biosensors, the control system can detect driver fatigue. At this time, the control system can immediately use this set of first driving commands and first physiological states as inputs and send them to the pre-trained command adjustment model.

[0057] This command adjustment model, upon receiving input from the control system, comprehensively assesses the conflict between acceleration intent and driver fatigue, automatically calculating a set of command adjustment parameters. These parameters do not simply override the acceleration command; instead, they generate a coordinated control signal that, while maintaining the vehicle's original acceleration trend, automatically activates the air conditioning system and switches the air vents to a face-oriented airflow mode. The fan speed can be adjusted to a gentle, low setting to create a light but continuous airflow that gently caresses the driver's face, stimulating nerve endings and enhancing alertness. Ultimately, the command adjustment model outputs command adjustment parameters that, in addition to the first driving parameters, add the command to turn on the air conditioning and gently blow air onto the driver's face. The entire generation process is completed within milliseconds, requiring no additional driver input. Furthermore, the generation logic of the command adjustment parameters is entirely driven by the command adjustment model's self-learned weight system, ensuring that the intervention is both precise and does not interfere with the driver's intentions.

[0058] For example, in another specific exemplary scenario, the control system receives the first driving instruction as "turn on the internal circulation and force the air conditioning to cool down," but the first physiological state monitoring shows that the driver's blood sugar level has dropped sharply (as reported by a wearable device), sweating has increased, and the hands are trembling slightly. At this time, the control system can adjust the model based on the first driving instruction and the first physiological state input instruction. This model can output the instruction adjustment parameters to immediately turn off the air conditioning that blows directly onto the face, display "You may have low blood sugar, please replenish your sugar immediately" on the central control screen and recommend the nearest store, while lowering the audio volume to reduce auditory interference and allow the driver to focus on their physical sensations.

[0059] Step S106: Adjust the first driving instruction based on the instruction adjustment parameters to obtain the target driving instruction.

[0060] The aforementioned target driving instruction can be a driving instruction adjusted based on instruction adjustment parameters. While maintaining the original driving intention, the instruction adjusts the action sequence, speed constraint, trajectory offset, or control signal strength in the first driving instruction through nonlinear transformation using instruction adjustment parameters, so that the transformed instruction is more suitable for the current physiological state of the driver.

[0061] In one optional embodiment, considering that changes in the driver's physiological state can affect the stability and accuracy of the driver's driving commands, the control system dynamically corrects the first driving command by adjusting parameters based on the first driving command and the first physiological state. This allows the generation of a target driving command to compensate for amplitude deviations or ambiguities in intent caused by changes in the driver's physiological state, thereby improving the consistency of the control system's response and driving safety.

[0062] For example, in the aforementioned exemplary scenario, the control system can map and match the multi-dimensional control factors in the instruction adjustment parameters with the control logic of the first driving instruction, identifying the instruction attributes that need to be corrected and the vehicle execution units that can be intervened. Then, based on the driver's driving intentions and the weight distribution and constraints defined in the instruction adjustment parameters, the control system dynamically integrates auxiliary intervention signals such as air conditioning control, fan speed adjustment, and airflow direction to the output of the first driving instruction, forming a composite control sequence. After the safety verification module verifies the feasibility of this sequence in coordination with the vehicle powertrain system, environmental perception system, and driver state monitoring system, it can automatically cover the execution path of the first driving instruction, ultimately generating a target driving instruction that balances driving objectives and physiological state intervention. This target instruction is then scheduled and executed by the control system according to priority, ensuring that the auxiliary intervention takes effect smoothly without affecting driving safety.

[0063] Step S108: Control the vehicle to drive based on the target driving command.

[0064] In one alternative embodiment, after the target driving instruction is constructed, the control system can control the vehicle to drive according to the target driving instruction to compensate for instruction deviations caused by driver fatigue, decreased attention or physiological stress, thereby improving safety during driving.

[0065] In this embodiment, in response to receiving a first driving instruction input by the driver, the system acquires the driver's first physiological state during the driving process. The first driving instruction and the first physiological state are input into an instruction adjustment model, which is used to determine instruction adjustment parameters. Based on these parameters, the first driving instruction is adjusted to obtain a target driving instruction. Based on the target driving instruction, the system controls the vehicle's movement by inputting both the first physiological state and the first driving instruction into a pre-trained instruction adjustment model. This automatically identifies potential conflicts between the driver's physiological state and the instruction's intent and automatically generates precise instruction adjustment parameters. Subsequently, the control system can perform safety corrections on the first driving instruction based on these adjustment parameters, generating a target driving instruction that meets current driving safety requirements. This effectively improves driving safety without depriving the driver of control, thus solving the technical problem of low vehicle control safety in related technologies.

[0066] In the above embodiments of this application, the method further includes: obtaining a training dataset, wherein the training dataset includes multiple second driving commands and multiple second physiological states, the types of the multiple second driving commands are the same as the types of the first driving commands, and the command values ​​of the multiple second driving commands include the command values ​​of the first driving commands, and the types of the multiple second physiological states are the same as the first physiological states; based on the training dataset, determining the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model; and adjusting the multiple initial adjustment layers respectively based on the degree of influence corresponding to the multiple initial adjustment layers to obtain a command adjustment model.

[0067] The training dataset described above can be a collection of samples, each containing a second driving command and a corresponding second physiological state, used to train the initial adjustment model. The data in this dataset can be driver behavior and physiological signal pairs collected from actual driving scenarios or simulation environments.

[0068] The aforementioned second driving instruction can be a driver operation instruction recorded in the training dataset. This instruction is of the same type as the first driving instruction and can include, but is not limited to, discrete or continuous control quantities such as acceleration, braking, steering angle, and gear shifting. The instruction value of the second driving instruction can encompass the value range of the first driving instruction and can include additional samples to cover a wider input distribution, used to train the initial adjustment model's ability to generalize its mapping of driving intentions.

[0069] The aforementioned second physiological state can be the physiological signal features of the driver recorded in the training dataset. The type of this state is the same as that of the first physiological state, and may include, but is not limited to, bioelectrical signals or physiological indicators such as heart rate, skin conductance, eye movement frequency, and EEG spectral power, which are used to characterize the driver's cognitive load, attention level, or fatigue state. The value of the second physiological state can be collected by sensors and preprocessed into a normalized vector as input to the initial adjustment model.

[0070] The initial adjustment model described above can be a neural network structure composed of multiple trainable layers. The input to this model is a concatenated vector of the second driving command and the second physiological state, and the output is the command adjustment parameters. After training, this model can serve as the aforementioned command adjustment model.

[0071] The aforementioned initial adjustment layers can be continuous neural network layers that constitute the initial adjustment model. Each layer can be a fully connected layer, a low-rank adaptation layer, or a normalization module. Layers can be connected by non-linear activation functions, and each layer can have an independent weight matrix and bias vector.

[0072] In one alternative embodiment, considering that the influence of different levels on the model output error varies significantly in the initial adjustment model, and that the traditional LoRA (Low-Rank Adaptation) model adjustment strategy uses a fixed low-rank value for all layers, resulting in uneven resource allocation, some key layers have limited expressive power due to insufficient rank values, while non-key layers waste computation and memory due to redundant rank values.

[0073] Based on this, the control system can use the second driving command and the second physiological state in the training dataset as adjustment driving signals to quantify the influence of each initial adjustment layer on the final output error during forward propagation. Specifically, the second driving command is of the same type as the first driving command and covers the command value of the first driving command to ensure that the training signal covers the real task scenario, while the second physiological state is of the same type as the first physiological state to ensure that the mapping relationship between physiological feedback and driving behavior can be learned by the initial adjustment model.

[0074] During the process of adjusting the initial adjustment model based on the training dataset, the control system can quantify the adaptability requirement of each initial adjustment layer under the current task by calculating the degree of influence of each initial adjustment layer on the output error. This allows the control system to dynamically assign a more suitable rank value to each initial adjustment layer based on the degree of influence.

[0075] Specifically, the initial adjustment layer that has a high impact on the output error of the initial adjustment model can be given a high rank to enhance its expressive power, while the initial adjustment layer that has a high impact on the output error of the initial adjustment model can be compressed to a low rank or close to zero activation, thereby achieving a better allocation of computing resources. This allows the instruction-adjusted model obtained after adjusting the initial adjustment model to significantly reduce the total number of trainable parameters and memory overhead while maintaining the original task performance, and at the same time improve convergence efficiency and the lightweight nature of the model in the inference stage.

[0076] For example, the control system can input the training dataset into the initial adjustment model to calculate the output error of the initial adjustment model on the training dataset through forward propagation. Subsequently, the control system can use layer-by-layer backpropagation gradients to calculate the norm of the gradient of each initial adjustment layer's parameters, and can use the average of the gradient norms of each layer as the degree of influence of that initial adjustment layer on the output error. Finally, the control system can, based on the ranking of the influence of each initial adjustment layer, perform parameter freezing operations on initial adjustment layers with influence below a set threshold, while maintaining or increasing the parameter capacity of layers with influence above the threshold. After completing the adjustment of all initial adjustment layers, a command-based adjustment model can be obtained.

[0077] For example, the control system can insert learnable gating units after each initial adjustment layer. The input of the gating unit is the mean of the activation values ​​and the gradient variance of the initial adjustment layer, and the output of the gating unit is the weight scaling factor of the initial adjustment layer. Subsequently, the control system can adjust the parameters of the gating units during the training process so that the output of the gating units is positively correlated with the degree of influence corresponding to the initial adjustment layer. Finally, the control system can perform a weighted summation of each initial adjustment layer based on the output value corresponding to the gating unit to obtain the overall degree of influence of each initial adjustment layer, and can dynamically scale or prune the parameters of each initial adjustment layer according to this degree of influence to construct the command adjustment model.

[0078] In the above embodiments of this application, determining the degree of influence of multiple initial adjustment layers on the output error of the initial adjustment model based on the training dataset includes: constructing multiple candidate rank sets corresponding to multiple initial adjustment layers, wherein any candidate rank set contains at least one candidate rank; determining at least one initial gating parameter corresponding to any initial adjustment layer based on the candidate rank set corresponding to any initial adjustment layer, wherein different initial gating parameters correspond to different candidate ranks in the candidate rank set; and determining the degree of influence corresponding to multiple initial adjustment layers based on the training dataset, the multiple candidate rank sets corresponding to multiple initial adjustment layers, and the multiple initial gating parameters.

[0079] The aforementioned candidate rank set can refer to a set of integer values ​​preset for the initial adjustment layer during the low-rank matrix fine-tuning process. Each integer value represents a possible value of the low-rank decomposition rank that the initial adjustment layer can choose, used to define the potential low-dimensional subspace dimension of the weight increment matrix of that layer. Each element in this set can correspond to an activatable low-rank expressive capability configuration, which can be dynamically selected or weighted by subsequent gating mechanisms. For example, the aforementioned candidate rank set can typically be set as a discrete integer set such as {2, 4, 8, 16} based on experience or search space settings.

[0080] The aforementioned candidate rank can refer to a specific integer in the candidate rank set, representing the common rank dimension when the weight increment matrix of the initial adjustment layer is approximated as the product of two low-dimensional matrices under the low-rank update framework. This value can determine the number of learnable parameters and the strength of expressive power of the initial adjustment layer. A lower candidate rank corresponds to fewer parameters and weaker fitting ability, while a higher candidate rank corresponds to more parameters and stronger fitting ability.

[0081] The initial gating parameters mentioned above can refer to a learnable scalar parameter assigned to each candidate rank at the start of model training. This parameter characterizes the relative contribution of that candidate rank to the weight increment of the current initial adjustment layer. All initial gating parameters can form a vector of the same length as the candidate rank set, and can be converted into a probability distribution using a normalization function to weightedly combine the low-rank matrices corresponding to different candidate ranks. The initial values ​​of the initial gating parameters can be set to uniformly distributed values ​​and can be automatically adjusted through backpropagation during the training of the initial adjustment model to respond to the differences in the contribution of different candidate ranks to the output error.

[0082] In one optional embodiment, considering that the impact of different initial adjustment layers on the final output error varies significantly during the initial adjustment of the model, if a fixed-rank low-rank matrix is ​​used to update the parameters of all initial adjustment layers, some key layers will have insufficient expressive power due to their small rank values, while non-key layers will have redundant computation and wasted memory due to their large rank values.

[0083] Based on this, the control system can dynamically allocate the budget for adjustment resources by quantifying the actual contribution of each initial adjustment layer to the output error during training. Specifically, the control system can pre-define a candidate rank set for each layer to be adjusted. This set can contain multiple candidate ranks with different rank values, and each rank value can represent a parameter expression dimension, allowing the initial adjustment layer to try different parameter update intensities in parallel across multiple rank dimensions.

[0084] Next, the control system can assign an independent initial gating parameter to each candidate rank. This parameter is a learnable scalar with a uniform initial value, used to characterize the relative activation weight of the candidate rank in the current initial adjustment layer. After normalization by the softmax function, the initial gating parameter can form a probability distribution. That is, the contribution ratio of each candidate rank is determined by the corresponding initial gating parameter. Thus, without relying on manual settings, the system can automatically identify and respond to the differences in the degree of influence of each initial adjustment layer on the output error, thereby achieving adaptive allocation of adjustment resources for multiple initial adjustment layers.

[0085] For example, the control system can pre-define a set of candidate ranks for each initial adjustment layer in the initial adjustment model. Each candidate rank set contains at least one candidate rank, and each candidate rank can correspond to an independent low-rank matrix pair, used to simulate the incremental update of the weights of that initial adjustment layer. Subsequently, the control system can assign an independent initial gating parameter to each candidate rank of each initial adjustment layer. The value of this initial gating parameter can be uniformly set to the same constant, indicating that each candidate rank has an equal activation probability in the early stage of training.

[0086] During forward propagation, the control system calculates the low-rank increment for each initial adjustment layer using each candidate rank from its corresponding set of candidate ranks. It then weights and sums these low-rank increments using the corresponding initial gating parameters to obtain the comprehensive increment output for that layer. This comprehensive increment is then added to the original weights to generate the output of the initial adjustment model. Next, the control system calculates the error between the actual and expected outputs of the initial adjustment model and obtains the gradient of the low-rank matrix corresponding to each candidate rank in each initial adjustment layer through backpropagation. Finally, based on the gradient magnitudes of all candidate ranks within each initial adjustment layer, the control system calculates the overall gradient norm of that initial adjustment layer, serving as a quantitative indicator of its influence on the output error. This influence is used to update subsequent initial gating parameters, causing them to converge towards candidate ranks with higher gradient contributions, thereby achieving dynamic evaluation and allocation of the influence of each initial adjustment layer.

[0087] In the above embodiments of this application, determining the degree of influence corresponding to multiple initial adjustment layers based on the training dataset, multiple candidate rank sets corresponding to multiple initial adjustment layers, and multiple initial gating parameters includes: inputting any training data from the training dataset into the initial adjustment model to obtain multiple input tensors corresponding to multiple initial adjustment layers, wherein the training data consists of any second driving command and any second physiological state; determining the target weight of the initial adjustment layer based on the input tensor corresponding to any initial adjustment layer, the candidate rank set, and at least one initial gating parameter; and adjusting the multiple initial adjustment layers based on the target weights corresponding to the multiple initial adjustment layers to obtain the command adjustment model.

[0088] The aforementioned input tensor can refer to the numerical matrix that arrives at the input of any initial adjustment layer from the training data through forward propagation during the training process of the initial adjustment model. This matrix can be formed by linear transformation or nonlinear activation of the output of the previous initial adjustment layer, and can characterize the semantic or feature representation received by the current initial adjustment layer for subsequent calculations.

[0089] The aforementioned target weights can refer to the weights dynamically calculated through a gating mechanism and a combination of candidate ranks, used to characterize the superior low-rank increment expression of the initial adjustment layer. These weights can be formed by weighted summation of the low-rank matrices corresponding to the candidate ranks and fusion with the original weights of the initial adjustment layer, and can be used to achieve adaptive parameter adjustment of the initial adjustment layer.

[0090] In one alternative embodiment, considering that the gradient response intensity and activation distribution of different initial adjustment layers differ significantly when processing the combination data of the second driving command and the second physiological state, the fixed-rank configuration is difficult to accurately match the actual adjustment needs of each initial adjustment layer.

[0091] Based on this, the control system can input any training data into the initial adjustment model to obtain the input tensor corresponding to each initial adjustment layer, and then combine the preset candidate rank set and initial gating parameters of the initial adjustment layer to calculate the weighted contribution of each candidate rank component, thereby forming the target weight of the initial adjustment layer under the current input.

[0092] Subsequently, the control system can synchronously update the low-rank adaptation of each initial adjustment layer based on the target weights corresponding to all initial adjustment layers, so that the initial adjustment model as a whole gradually converges to a rank allocation structure with better task specificity. This allows the final instruction adjustment model to realize the centralized allocation of parameter resources to high contribution layers, avoiding inefficient and redundant calculations.

[0093] For example, the control system can input any training data from the training dataset into the initial adjustment model. This training data can consist of a second driving command and a second physiological state. Through the forward propagation of the initial adjustment model, the control system can sequentially obtain the input tensors of each initial adjustment layer.

[0094] For each initial adjustment layer, the control system can use each candidate rank in the candidate rank set corresponding to the initial adjustment layer to generate a corresponding low-rank matrix pair. Combined with the initial gating parameters of the initial adjustment layer, the weighted sum of each candidate rank component is calculated to form the incremental weight of the initial adjustment layer.

[0095] Subsequently, the control system can add this incremental weight to the original weights of the initial adjustment layer to obtain the temporary output of the initial adjustment layer. The control system can repeat this process to complete the forward calculation for all initial adjustment layers to obtain the overall output of the model.

[0096] Then, the control system can backpropagate to calculate the gradient corresponding to the input tensor of each initial adjustment layer based on the loss function between the actual output and the expected output of the initial adjustment model. For each initial adjustment layer, the control system can calculate the norm of the gradients of all trainable parameters in that initial adjustment layer, as the degree of influence of that initial feature layer on the output error.

[0097] Next, the control system can update the initial gating parameters of each initial adjustment layer according to the degree of influence of each initial adjustment layer, so that high-influence layers tend to be assigned high-rank components, and low-influence layers tend to be assigned low-rank components or have some rank components turned off. The control system can repeat the above forward, loss calculation, gradient backpropagation and gating update process until the initial gating parameters converge or the preset number of training rounds is reached.

[0098] Ultimately, the control system can dynamically determine the target weight of each initial adjustment layer based on the degree of influence corresponding to each initial adjustment layer, and adjust each initial adjustment layer according to the target weight of each initial adjustment layer to obtain the command adjustment model.

[0099] In the above embodiments of this application, determining the target weight of the initial adjustment layer based on the input tensor, candidate rank set, and at least one initial gating parameter corresponding to any initial adjustment layer includes: constructing at least one low-rank matrix pair of the initial adjustment layer based on the candidate rank set, wherein different low-rank matrix pairs correspond to different candidate ranks in the candidate rank set; determining the initial low-rank increment of the initial adjustment layer based on the input tensor, at least one low-rank matrix pair, and at least one initial gating parameter; and determining the target weight of the initial adjustment layer based on the initial low-rank increment and at least one initial gating parameter.

[0100] The aforementioned low-rank matrix pair can be a parameter pair consisting of two trainable matrices, one of which can be used to map input features to a low-dimensional subspace, and the other matrix can be used to reconstruct the low-dimensional features to the original output dimension.

[0101] The aforementioned initial low-rank increment can be the weight change calculated by weighting the outputs of each low-rank matrix pair based on the input tensor, any set of low-rank matrix pairs, and the corresponding initial gating parameters. This weight change can be used to dynamically compensate for the model's fine-tuning needs based on the original weights of the initial adjustment layer.

[0102] In an alternative embodiment, considering that the original weights of each initial adjustment layer need to be updated during the adjustment of the initial adjustment model, but directly updating all parameters of the original weights would result in high computational and storage overhead, a low-rank decomposition structure can be used to approximate the weight increment to achieve incremental updates of the original weights.

[0103] Based on this, the control system can construct multiple pairs of low-rank matrices corresponding to different candidate ranks for each initial adjustment layer. Each pair of low-rank matrices can accurately express the weight change subspace of the corresponding candidate rank, thereby covering the expressive range of the initial adjustment layer from low to high.

[0104] Subsequently, the control system can obtain the low-rank increment contribution under each candidate rank based on the input tensor and the operations between each matrix in the low-rank matrix pair. Then, combined with the initial gating parameter corresponding to the candidate rank, these increments are weighted and summed to form an initial low-rank increment dynamically combined by the gating mechanism.

[0105] Finally, the control system can superimpose this initial low-rank increment onto the original weights to obtain the target weights of the initial adjustment layer, thereby achieving accurate, flexible and efficient adjustment of the initial adjustment model without adding additional parameters.

[0106] For example, the control system can construct at least one low-rank matrix pair for any initial adjustment layer based on the candidate rank set. Each low-rank matrix pair consists of a matrix A with an input dimension multiplied by the candidate rank and a matrix B with the candidate rank multiplied by the output dimension. Each low-rank matrix pair is initialized independently, and the parameters of each low-rank matrix pair are sampled through a standard normal distribution and scaled to a specified magnitude.

[0107] Subsequently, the control system can multiply the input tensor sequentially with matrix A in each low-rank matrix pair to obtain the dimension reduction feature of the corresponding rank, and then multiply each dimension reduction feature with the corresponding matrix B to obtain the low-rank increment output corresponding to each rank.

[0108] Then, the control system multiplies each low-rank increment output by a normalized weight corresponding to the gating parameter, which is calculated from the initial gating parameter set using the Softmax function. The control system sums the low-rank increment outputs weighted by the normalized weights to obtain the initial low-rank increment. Finally, the control system adds the initial low-rank increment to the original weights of the initial adjustment layer to form the target weights, while the original weights remain frozen during training.

[0109] For ease of understanding, Figure 3 This is a schematic diagram illustrating an optional low-rank matrix pair generation process according to an embodiment of this application, such as... Figure 3 As shown, the control system first determines the initial adjustment layer and presets a candidate rank set. Then, the control system can determine a candidate rank from this set. Next, the control system can construct a first matrix based on the product of the candidate rank and the input dimension, and a second matrix based on the product of the candidate rank and the output dimension. Finally, the control system can use the first matrix and the second matrix as the low-rank matrix pair corresponding to the candidate rank.

[0110] Preferably, constructing at least one low-rank matrix pair for the initial adjustment layer based on the candidate rank set includes: obtaining any candidate rank from the candidate rank set, and the input feature dimension and output feature dimension of the initial adjustment layer; constructing a first matrix based on the candidate rank and the input feature dimension, wherein the first matrix is ​​used to reduce the dimension of the input features from the input feature dimension to the dimension corresponding to the candidate rank; constructing a second matrix based on the candidate rank and the output feature dimension, wherein the second matrix is ​​used to map the dimension-reduced input features from the dimension corresponding to the candidate rank to the output feature dimension; and constructing a low-rank matrix pair corresponding to the candidate rank based on the first matrix and the second matrix.

[0111] The aforementioned input feature dimension can refer to the number of features of the input tensor of the initial adjustment layer, that is, the dimension of the input data in the feature space.

[0112] The aforementioned output feature dimension can refer to the number of features of the output tensor of the initial adjustment layer, that is, the dimension of the output data in the feature space.

[0113] The first matrix mentioned above can be a low-rank matrix used to linearly map the input features from the original input feature dimension to the specified candidate rank dimension.

[0114] The second matrix mentioned above can be a low-rank matrix used to linearly map the features after dimensionality reduction by the first matrix from the candidate rank dimension to the output feature dimension.

[0115] In one alternative embodiment, considering that the core objective of low-rank matrix fine-tuning is to adapt to downstream tasks by introducing low-dimensional incremental transformations without fully updating the original weights, and that different candidate ranks represent different dimensional expressive capabilities, the control system can construct a pair of low-rank matrices, namely the first matrix and the second matrix, for each candidate rank to form an independent low-rank incremental path.

[0116] The dimension of the first matrix can be determined by the candidate rank and the dimension of the input features. It can be used to linearly project the input feature vector from the original high-dimensional space to a lower-dimensional intermediate subspace. The dimension of this subspace is exactly equal to the candidate rank, thereby compressing the information representation to reduce the computational burden.

[0117] The dimension of the second matrix can be determined by the candidate rank and the output feature dimension, and can be used to linearly restore the intermediate subspace to the original output dimension, so that the output space of the incremental transformation is aligned with the output space of the original weights.

[0118] The first and second matrices corresponding to each candidate rank can form an independent low-rank increment computation module, allowing the expressive power of different candidate ranks to exist in parallel and be dynamically combined, thereby providing a selectable parameter basis for subsequent gating mechanisms.

[0119] Preferably, the method further includes: when the candidate rank set contains multiple candidate ranks, obtaining any new candidate rank other than the candidate rank in the candidate rank set, and repeatedly performing the steps of constructing a first matrix based on the new candidate rank and the input feature dimension of the adjustment layer; constructing a second matrix based on the new candidate rank and the output feature dimension of the adjustment layer; and constructing a low-rank matrix pair corresponding to the new candidate rank based on the first matrix and the second matrix, until the construction of low-rank matrix pairs for multiple candidate ranks is completed.

[0120] In an optional embodiment, considering that the expressive power of a low-rank matrix is ​​directly determined by the corresponding candidate rank, and different candidate ranks correspond to different parameter capacities and feature mapping spaces, based on this, when the candidate rank set includes multiple candidate ranks, the control system can construct multiple pairs of low-rank matrices corresponding to the candidate ranks, thereby pre-covering the range of potentially better rank configurations before training, to ensure that the subsequent gating mechanism can adaptively select from sufficiently diverse low-rank incremental expressions, avoiding the omission of key parameter allocation schemes due to an overly narrow candidate set, and thus ensuring the integrity of the search space for dynamic rank adjustment.

[0121] Specifically, the control system can obtain any new candidate rank other than the candidate rank from the candidate rank set, and repeatedly construct a first matrix based on the new candidate rank and the input feature dimension of the adjustment layer. Subsequently, the control system can construct a second matrix based on the new candidate rank and the output feature dimension of the adjustment layer. Then, the control system can construct low-rank matrix pairs corresponding to the new candidate ranks based on the first and second matrices. The control system can repeat the above steps until low-rank matrix pairs have been constructed for multiple candidate ranks in the candidate rank set.

[0122] In the above embodiments of this application, determining the initial low-rank increment of the initial adjustment layer based on the input tensor, at least one low-rank matrix pair, and at least one initial gating parameter includes: normalizing any initial gating parameter based on a preset function to obtain the initial rank weights of the candidate ranks corresponding to the initial gating parameters; constructing the initial sub-increment corresponding to the candidate ranks based on the low-rank matrix pair corresponding to the candidate ranks and the input tensor; and performing a weighted summation on the initial sub-increment corresponding to at least one candidate rank based on the initial rank weights of at least one candidate rank to obtain the initial low-rank increment of the initial adjustment layer.

[0123] The aforementioned preset function can be a mathematical function used to map the initial gating parameters to a normalized weight distribution. For example, the preset function may include, but is not limited to: Softmax (Soft Maximum) function, Sigmoid (Hyperbolic Tangent Sigmoid Function) function, ReLU (Rectified Linear Unit), etc.

[0124] The aforementioned initial rank weight can be a scalar value obtained by normalizing the initial gating parameters using a preset function, representing the relative contribution ratio of the corresponding candidate rank to the low-rank increment under the current input.

[0125] The aforementioned initial sub-increment can be a local weight update amount generated by matrix multiplication of the low-rank matrix pair corresponding to any candidate rank and the input tensor. It can be used to characterize the linear compensation contribution of the candidate rank to the original weight.

[0126] In one optional embodiment, considering that the initial gating parameters are not normalized and are directly used for weighting, the contribution ratios of different candidate ranks will be inconsistent, thus affecting the stability of the initial adjustment model in the early stages of training. Therefore, the control system can apply a preset function to normalize any initial gating parameter to obtain the initial rank weights of the candidate ranks corresponding to that gating parameter, ensuring that the sum of the initial rank weights of all candidate ranks is a fixed value and that the initial rank weights of all candidate ranks are non-negative.

[0127] Furthermore, considering that each candidate rank corresponds to an independent pair of low-rank matrices, the expressive power of which is limited by the dimension of the corresponding candidate rank, the control system can use the input tensor to perform matrix multiplication operations with the first and second matrices corresponding to each candidate rank in sequence to construct the initial sub-increment generated independently for each candidate rank.

[0128] Furthermore, considering the contribution of the initial sub-increments of different candidate ranks to the final output, they need to be dynamically adjusted by the corresponding normalized weights. Based on this, the control system can sum the initial sub-increments of each candidate rank according to the corresponding initial rank weights to obtain the initial low-rank increment of the initial adjustment layer in the current adjustment stage, thereby realizing the soft combination and adaptive selection of multiple low-rank expression paths.

[0129] Preferably, based on the low-rank matrix pair corresponding to the candidate rank and the input tensor, an initial sub-increment corresponding to the candidate rank is constructed, including: constructing a scaling factor based on the initial gating parameter and the candidate rank; constructing a dimension-reduced input feature based on the first matrix in the input tensor and the low-rank matrix pair; constructing a dimension-increasing output feature based on the dimension-reduced input feature and the second matrix in the low-rank matrix pair; and constructing the initial sub-increment based on the scaling factor and the dimension-increasing output feature.

[0130] The scaling factor mentioned above can be a scalar coefficient used to adjust the magnitude of the low-rank increment update. The value of the scaling factor can be calculated by the gating parameter and the corresponding rank value. It can be used to balance the output magnitude of different rank branches and maintain the numerical stability of the initial adjustment model.

[0131] The aforementioned dimensionality-reduced input feature can be a low-dimensional representation obtained by linearly projecting the input tensor onto the first matrix in the low-rank matrix pair. This feature has a dimension lower than the original input space and is used to compress information to reduce computational cost.

[0132] The aforementioned upgraded output features can be the feature representations restored to the output space dimension by linearly mapping the reduced input features to the second matrix in the low-rank matrix pair. This can be used to reconstruct the incremental weight effect that is consistent with the output dimension of the original model.

[0133] In one alternative embodiment, considering that different candidate ranks have different effects on the increment magnitude of the original weights, the smaller the candidate rank, the weaker the expressive power in low-dimensional space, resulting in a smaller corresponding increment magnitude. Based on this, the control system can introduce a scaling factor inversely proportional to the candidate rank to compensate for the numerical scale differences between different candidate ranks, thereby ensuring that the outputs of each candidate rank are comparable and combinable on a uniform scale.

[0134] Furthermore, considering that the input tensor requires two linear transformations to complete the mapping from the original space to a lower dimension and back to the original space, the control system can first multiply the input tensor by the transpose of the first matrix to obtain the dimensionality-reduced features. Subsequently, the control system can multiply the dimensionality-reduced features by the transpose of the second matrix to obtain the dimensionality-upgraded output features, thus forming the low-rank incremental expression corresponding to the candidate rank.

[0135] Since the final initial sub-increment needs to be weighted by the scaling factor of the candidate rank on the output features after dimensionality increase, the control system can multiply the scaling factor element-wise with the output features after dimensionality increase to obtain the initial sub-increment corresponding to the candidate rank.

[0136] For example, the initial sub-increment can be independently calculated for each candidate rank corresponding to a low-rank matrix pair. The first gating parameter is the initial uniform distribution value, and the scaling factor is directly calculated by dividing a fixed constant by the value of the corresponding candidate rank. The input tensor is multiplied by the first matrix to obtain the dimensionality-reduced feature, the dimensionality-reduced feature is multiplied by the second matrix to obtain the dimensionality-incremented output feature, and the dimensionality-incremented output feature is multiplied by the scaling factor to obtain the initial sub-increment.

[0137] For ease of understanding, Figure 4 This is a schematic diagram illustrating an optional operation process for low-rank matrix pairs according to an embodiment of this application, such as... Figure 4 As shown, the control system can calculate the product of the input tensor and the transpose of the first matrix to construct the dimension-reduced input features, and can also calculate the product of the dimension-reduced input features and the transpose of the second matrix to construct the dimension-upgraded output matrix.

[0138] In the above embodiments of this application, determining the target weights of the initial adjustment layer based on the initial low-rank increment and at least one initial gating parameter includes: summing the original weights of the initial adjustment layer and the initial low-rank increment to obtain the comprehensive weights of the initial adjustment layer, wherein the original weights are fixed values; constructing the output tensor of the initial adjustment layer based on the input tensor and the comprehensive weights; calculating the gradient norm of the initial adjustment layer based on the target loss function and the output tensor of the initial adjustment model, wherein the gradient norm is used to characterize the degree of influence corresponding to the initial adjustment layer; and determining the target weights based on the gradient norm and at least one initial gating parameter.

[0139] The aforementioned original weights may refer to the initial weight parameters corresponding to each initial adjustment layer in the initial adjustment model. The values ​​of these weights are frozen during the fine-tuning process, do not participate in gradient updates, and only participate in forward calculations as basic weights.

[0140] The aforementioned comprehensive weights can refer to the joint weight matrix obtained by adding the original weights to the initial low-rank increments, which can be used to characterize the overall weight update status of the current initial adjustment layer during the fine-tuning process.

[0141] The aforementioned output tensor can refer to the output feature representation generated after the input tensor undergoes a linear transformation based on comprehensive weights, and can be used as the forward propagation result of the current initial adjustment layer.

[0142] The aforementioned target loss function can refer to a function used to measure the difference between the output of the initially tuned model and the desired label, and the value of this function can drive parameter updates during the fine-tuning process.

[0143] The gradient norm mentioned above refers to the norm of the gradient vector obtained by differentiating the target loss function with respect to the parameters of the initial adjustment layer. It can be used to quantify the sensitivity and contribution of the initial adjustment layer to changes in the overall loss during the current batch training.

[0144] In an alternative embodiment, considering that the original weights of the initial adjustment layer are frozen and fixed in value during training and cannot participate in gradient updates, the contribution of the original weights to the output of the initial adjustment model is only used as the baseline. The initial low-rank increment is a learnable adjustment term. Based on this, the control system can add the original weights to the initial low-rank increment to obtain a comprehensive weight containing variable adjustment components, so as to fully express the total weight update effect of the initial adjustment layer in the current adjustment state.

[0145] Furthermore, considering that the input tensor needs to be linearly transformed through the integrated weights to generate the actual output, the control system can use the integrated weights and the input tensor to perform linear operations to construct the output tensor of the initial adjustment layer, which serves as the basis for subsequent loss calculations.

[0146] Since the target loss function reflects the deviation between the actual output and the expected output of the initially adjusted model, its gradient can be backpropagated to the parameters of each initial adjustment layer. The gradient norm quantifies the overall response strength of all trainable parameters in that initial adjustment layer to changes in loss. Based on this, the control system can calculate the gradient of the output tensor with respect to the target loss function and obtain the gradient norm, thus numerically characterizing the influence of the initial adjustment layer on the output error.

[0147] Furthermore, the initial gating parameters are used to dynamically adjust the contribution weights of different candidate ranks, while the gradient norm reflects the importance of each initial adjustment layer. Based on this, the control system can combine the gradient norm and the initial gating parameters to determine the target weights corresponding to each initial adjustment layer. This allows high-importance initial adjustment layers to gain stronger adaptability, while low-importance initial adjustment layers are suppressed, achieving adaptive allocation of adjustment resources.

[0148] Preferably, before calculating the gradient norm of the initial adjustment layer based on the target loss function and output tensor of the initial adjustment model, the method further includes: obtaining the initial loss function of the initial adjustment model; summing the absolute values ​​of at least one initial gating parameter to obtain the gating norm of the initial adjustment layer; summing the gating norms corresponding to multiple initial adjustment layers to obtain the global norm sum, and multiplying the regularized sparse coefficients and the global norm sum to obtain the gated sparse regularization term; and summing the gated sparse regularization term and the initial loss function to obtain the target loss function.

[0149] The aforementioned initial loss function can be a scalar value that measures the difference between the output of the initially tuned model and the true label under the current parameter state, and is used to guide the direction of parameter adjustment of the model.

[0150] The aforementioned gating norm can be the sum of the absolute values ​​of all gating parameters in any initial adjustment layer, and can be used to characterize the sparsity or activation intensity of the gating mechanism of the initial adjustment layer.

[0151] The global norm sum mentioned above can be the sum of the gating norms corresponding to all initial adjustment layers, which can be used to reflect the overall sparsity or distribution concentration of the gating parameters in the entire initial adjustment model.

[0152] The aforementioned gated sparsity regularization term can be the product of the regularization sparsity coefficient and the sum of the global norms, used to constrain the gated parameters to tend towards a sparse distribution, prevent overfitting, and improve the efficiency of parameter utilization.

[0153] In one alternative embodiment, considering that the initial gating parameters control the adjustment intensity of different candidate ranks, without constraints, the initial gating parameters may tend towards a non-sparse distribution during the adjustment process, resulting in all candidate ranks being uniformly activated, failing to achieve the dynamic allocation goal of focusing adjustment resources on key layers. Based on this, the control system can obtain the initial loss function of the initial adjustment model to measure task performance deviation. Subsequently, the control system can sum the absolute values ​​of at least one initial gating parameter to obtain the gating norm of the initial adjustment layer, quantifying the activation sparsity of a single-layer gating. Then, the control system can sum the gating norms corresponding to multiple initial adjustment layers to obtain a gating sparsity index at the entire model level, i.e., the global norm sum. Next, the control system can multiply the regularized sparse coefficients and the global norm sum to generate a gating sparse regularization term proportional to the model size. Finally, the control system can sum the gating sparse regularization term and the initial loss function to construct a target loss function, which can then be used to automatically guide the gating parameters towards a sparse distribution during the adjustment process.

[0154] For example, before calculating the gradient norm of the initial adjustment layer based on the target loss function and output tensor of the initial adjustment model, the control system can obtain the forward propagation output of the initial adjustment model under the current batch of input data, and calculate the cross-entropy loss between this output and the expected output as the initial loss function. Subsequently, the control system can sum the absolute values ​​of all initial gating parameters in each initial adjustment layer element-wise to obtain the gating norm of that initial adjustment layer. Then, the control system can accumulate the gating norms of all initial adjustment layers to obtain the global gating norm sum. Finally, the control system can multiply the preset regularization sparse coefficients with the global gating norm sum to generate a gating sparse regularization term, and add the gating sparse regularization term to the initial loss function to form the final target loss function.

[0155] Preferably, the gradient norm of the initial adjustment layer is calculated based on the target loss function and output tensor of the initial adjustment model, including: obtaining the parameter list corresponding to the initial adjustment layer; calculating the gradient values ​​corresponding to multiple parameters in the parameter list based on the target loss function; calculating the sum of squares of the gradient values ​​corresponding to multiple parameters to obtain the gradient intensity of the initial adjustment layer; and performing a square root calculation on the gradient intensity to obtain the gradient norm.

[0156] The parameter list mentioned above can refer to the set of all trainable parameters in the initial adjustment layer, which is used to calculate the overall gradient information of the initial adjustment layer.

[0157] The gradient value mentioned above can refer to the partial derivative of the target loss function with respect to each parameter in the parameter list, reflecting the direction and magnitude of the influence of the parameter change on the loss.

[0158] The gradient strength mentioned above can refer to the sum of squares of all gradient values ​​in the parameter list, and can be used to characterize the overall activity of parameter updates in the initial adjustment layer.

[0159] In one optional embodiment, considering that the impact of the parameter updates of the initial adjustment layer on model performance depends on the overall intensity of the gradient changes of these parameters, the control system can obtain the parameter list corresponding to the initial adjustment layer and calculate the gradient values ​​corresponding to multiple parameters in the parameter list based on the target loss function. Subsequently, the control system can calculate the sum of squares of the gradient values ​​corresponding to multiple parameters to obtain the gradient intensity of the initial adjustment layer. Finally, the control system can perform a square root calculation on this gradient intensity to obtain the gradient norm, thereby quantifying the overall update trend of the initial adjustment layer under the current training samples and providing objective numerical evidence for subsequent judgments on whether the initial adjustment layer needs adaptation with a higher candidate rank.

[0160] For example, the control system can obtain a reference set of all trainable parameters of the initial adjustment layer, backpropagate the target loss function to the initial adjustment layer through an automatic differentiation engine, and collect gradient tensors for each parameter. The gradient tensor of each parameter is then squared element-wise and summed element-wise to form a scalar gradient sum of squares. Subsequently, the control system can perform a square root operation on the gradient sum of squares and output the gradient norm of the initial adjustment layer as a gradient strength index.

[0161] Preferably, determining the target weight based on the gradient norm and at least one initial gating parameter includes: adjusting the initial gating parameter corresponding to any candidate rank based on the gradient norm to obtain the target gating parameter corresponding to the candidate rank; calculating the target sub-increment corresponding to the candidate rank based on the target gating parameter and the low-rank matrix pair corresponding to the candidate rank; performing a weighted summation of the target sub-increments corresponding to at least one candidate rank based on the target gating parameter corresponding to at least one candidate rank to obtain the target low-rank increment; and summing the target low-rank increment with the original weight to obtain the target weight.

[0162] The aforementioned target gating parameter can be a learnable parameter used to dynamically adjust the contribution weights of each low-rank matrix. The value of this parameter can be updated by the gradient norm, reflecting the degree of influence of different candidate ranks on the output error of the initial adjustment model in the current initial adjustment layer.

[0163] The aforementioned target sub-increment can be a local weight update calculated by multiplying the low-rank matrix pair corresponding to any candidate rank with the corresponding target gating parameter. It can be used to characterize the effective increment contribution of the candidate rank in the current training state.

[0164] The aforementioned target low-rank increment can be the update amount of the original weight obtained by weighting and summing the target sub-increments corresponding to all candidate ranks according to the corresponding target gating parameters.

[0165] In one alternative embodiment, considering that different initial adjustment layers have different degrees of influence on the output error, and that the gradient norm can reflect the activity of parameter updates of the initial adjustment layer, the control system can use the gradient norm as an evaluation criterion to dynamically adjust the initial gating parameters corresponding to each candidate rank, so that the initial adjustment layer with a large gradient obtains a higher gating weight, thereby enhancing the contribution of the low-rank matrix pair corresponding to the initial adjustment.

[0166] Subsequently, the control system can multiply the adjusted target gating parameters by the low-rank matrix pairs of the candidate ranks corresponding to those parameters to calculate the target sub-increment for each candidate rank in the current adjustment state. Then, the control system can perform a weighted summation of the target sub-increments based on the target gating parameters corresponding to all candidate ranks to obtain a comprehensive target low-rank increment determined by the gating assignment.

[0167] Finally, the control system can add the target low-rank increment to the frozen original weights to obtain the final target weights used for forward propagation, thus achieving the technical effect of adaptively allocating adjustment resources according to the influence of different initial adjustment layers.

[0168] For example, after each adjustment batch, the control system can calculate the gradient norm of all trainable parameters in each initial adjustment layer and use this gradient norm as a layer importance score. Subsequently, the control system can normalize this gradient norm and use it as momentum input for updating the initial gating parameters, thereby performing an exponentially weighted moving average adjustment on the initial gating parameters corresponding to each candidate rank to obtain the target gating parameters. Then, the control system can use the target gating parameters to perform a weighted calculation on the low-rank matrix pairs corresponding to each candidate rank to generate the target sub-increment. The target sub-increments of all candidate ranks can be weighted and summed to obtain the target low-rank increment, which is finally added to the original weights to form the target weights.

[0169] For ease of understanding, Figure 5 This is a schematic diagram illustrating the adjustment process of an optional initial adjustment model according to an embodiment of this application, such as... Figure 5As shown, the control system can first establish a candidate rank and gating combination. Then, the control system can evaluate the importance of the initial adjustment layers, where importance reflects the degree of influence of each initial adjustment layer on the output error of the initial adjustment model. Subsequently, the control system can input the training dataset into the initial adjustment model for forward propagation. During this process, the control system can freeze the weight base of each initial adjustment layer. During the adjustment process, the control system can also introduce stability and regularization, that is, introduce a regularization term of the gating parameters into the total loss function to constrain the activation of non-critical ranks, while using exponential moving average to smooth gradient estimation to suppress noise fluctuations. Furthermore, the control system can monitor the distribution of gating weights during the adjustment process. Finally, the control system can perform threshold screening on the candidate ranks based on the gating weights, retaining the rank components with effective activation, synthesizing the corresponding candidate rank matrices into an incremental matrix according to a scaling factor, and accumulating it into the original weights, thereby completing the lightweight weight merging.

[0170] This embodiment provides a vehicle control method. Figure 6 This is a flowchart of a model training method according to an embodiment of this application, such as... Figure 6 As shown, the process includes the following steps:

[0171] Step S602: Obtain a training dataset, wherein the training dataset includes multiple second driving instructions and multiple second physiological states. The types of the multiple second driving instructions are the same as the types of the first driving instructions input by the driver, and the instruction values ​​of the multiple second driving instructions include the instruction values ​​of the first driving instructions. The types of the multiple second physiological states are the same as the types of the first physiological states of the driver during the driving process.

[0172] In one optional embodiment, considering the need to construct a training environment that matches the driver's actual operating behavior and physiological responses during the training of the initial adjustment model, the training dataset acquired by the model training system (hereinafter referred to as the training system) can contain multiple second driving commands and multiple second physiological states. This ensures that the types of these commands and physiological states are completely consistent with the first driving command input by the driver and the actual first physiological state, and that the command values ​​of the second driving commands cover the command values ​​of the first driving commands. This guarantees that the training data can accurately reflect the correspondence between commands and physiological responses in real driving scenarios, providing reliable and representative training data for subsequent model adjustments.

[0173] Step S604: Based on the training dataset, determine the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model during the training process.

[0174] In one alternative embodiment, considering that different initial adjustment layers of the initial adjustment model have varying degrees of influence on the output error, the control system can determine the amount of adjustment resources that should be allocated to each initial adjustment layer by calculating the degree of influence of each initial adjustment layer on the output error. This allows initial adjustment layers with higher influence to have more feature resources, while initial adjustment layers with lower influence to have fewer adjustment resources.

[0175] Step S606: Based on the degree of influence corresponding to the multiple initial adjustment layers, adjust the multiple initial adjustment layers respectively to obtain the instruction adjustment model.

[0176] In one optional embodiment, considering that different initial adjustment layers have different degrees of influence on the output error, the control system can dynamically allocate corresponding adjustment resources according to the degree of influence of each initial adjustment layer, so as to enhance the expressive power of the high-importance initial adjustment layer and suppress the expressive power of the low-importance initial adjustment layer, thereby reducing redundant calculations and realizing the non-uniform distribution of adjustment resources. In this way, a command adjustment model with more compact parameters and more efficient calculation can be obtained while maintaining model performance.

[0177] Step S608: Deploy the instruction adjustment model to the electronic device, wherein the instruction adjustment model is invoked by the electronic device to execute the method in the above embodiments.

[0178] The aforementioned electronic device can refer to a hardware device with data processing capabilities and the ability to run computer programs, which can support loading and running instruction adjustment models.

[0179] In an alternative embodiment, considering that the instruction adjustment model has completed parameter compression and weight merging through the adjustment process, the control system can deploy the model into electronic devices to achieve accurate output of instruction adjustment parameters.

[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0181] According to an embodiment of this application, a vehicle control device is provided. It should be noted that this device can be used to execute the aforementioned vehicle control method. The specific implementation process and application scenarios are the same as those in the above embodiment, and will not be repeated here. Figure 7 This is a schematic diagram of a vehicle control device according to an embodiment of this application, such as...Figure 7 As shown, the device includes:

[0182] The first acquisition module 702 is used to acquire the driver's first physiological state during the driving process in response to receiving the first driving command input by the driver.

[0183] The parameter determination module 704 is used to input the first driving command and the first physiological state into the command adjustment model, and use the command adjustment model to determine the command adjustment parameters. The adjustment weights of multiple adjustment layers in the command adjustment model during the training process are determined based on the degree of influence of multiple adjustment layers on the output error of the command adjustment model during the training process.

[0184] The instruction adjustment module 706 is used to adjust the first driving instruction based on the instruction adjustment parameters to obtain the target driving instruction.

[0185] The vehicle control module 708 is used to control the vehicle's movement based on the target driving command.

[0186] In the above embodiments of this application, the device further includes: a dataset acquisition module, used to acquire a training dataset, wherein the training dataset includes multiple second driving commands and multiple second physiological states, the types of the multiple second driving commands are the same as the types of the first driving commands, and the command values ​​of the multiple second driving commands include the command values ​​of the first driving commands, and the types of the multiple second physiological states are the same as the first physiological states; a first determination module, used to determine, based on the training dataset, the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model; and a first adjustment module, used to adjust the multiple initial adjustment layers respectively based on the degree of influence corresponding to the multiple initial adjustment layers to obtain a command adjustment model.

[0187] In the above embodiments of this application, the first determining module is further configured to: construct multiple candidate rank sets corresponding to multiple initial adjustment layers, wherein any candidate rank set contains at least one candidate rank; determine at least one initial gating parameter corresponding to any initial adjustment layer based on the candidate rank set corresponding to any initial adjustment layer, wherein different initial gating parameters correspond to different candidate ranks in the candidate rank set; and determine the degree of influence corresponding to multiple initial adjustment layers based on the training dataset, the multiple candidate rank sets corresponding to multiple initial adjustment layers, and the multiple initial gating parameters.

[0188] In the above embodiments of this application, the first determining module is further configured to: input any training data from the training dataset into the initial adjustment model to obtain multiple input tensors corresponding to multiple initial adjustment layers, wherein the training data consists of any second driving command and any second physiological state; determine the target weight of the initial adjustment layer based on the input tensor corresponding to any initial adjustment layer, the candidate rank set, and at least one initial gating parameter; and adjust the multiple initial adjustment layers based on the target weights corresponding to the multiple initial adjustment layers to obtain the command adjustment model.

[0189] In the above embodiments of this application, the first determining module is further configured to: construct at least one low-rank matrix pair of the initial adjustment layer based on the candidate rank set, wherein different low-rank matrix pairs correspond to different candidate ranks in the candidate rank set; determine the initial low-rank increment of the initial adjustment layer based on the input tensor, at least one low-rank matrix pair, and at least one initial gating parameter; and determine the target weight of the initial adjustment layer based on the initial low-rank increment and at least one initial gating parameter.

[0190] Preferably, the first determining module is further configured to: obtain any candidate rank from the candidate rank set, and the input feature dimension and output feature dimension of the initial adjustment layer; construct a first matrix based on the candidate rank and the input feature dimension, wherein the first matrix is ​​used to map the input features from the input feature dimension to the dimension corresponding to the candidate rank; construct a second matrix based on the candidate rank and the output feature dimension, wherein the second matrix is ​​used to map the dimension-reduced input features from the dimension corresponding to the candidate rank to the output feature dimension; and construct a low-rank matrix pair corresponding to the candidate rank based on the first matrix and the second matrix.

[0191] Preferably, the device further includes: a repetitive execution module, configured to, when the candidate rank set contains multiple candidate ranks, obtain any new candidate rank other than the candidate rank in the candidate rank set, and repeatedly execute the steps of constructing a first matrix based on the new candidate rank and the input feature dimension of the adjustment layer; constructing a second matrix based on the new candidate rank and the output feature dimension of the adjustment layer; and constructing a low-rank matrix pair corresponding to the new candidate rank based on the first matrix and the second matrix, until the construction of low-rank matrix pairs for multiple candidate ranks is completed.

[0192] In the above embodiments of this application, the first determining module is further configured to: normalize any initial gating parameter based on a preset function to obtain the initial rank weights of the candidate ranks corresponding to the initial gating parameter; construct the initial sub-increment corresponding to the candidate ranks based on the low-rank matrix pairs corresponding to the candidate ranks and the input tensor; and perform weighted summation on the initial sub-increments corresponding to at least one candidate rank based on the initial rank weights corresponding to at least one candidate rank to obtain the initial low-rank increment of the initial adjustment layer.

[0193] Preferably, the first determining module is further configured to: construct a scaling factor based on the initial gating parameter and candidate rank corresponding to the candidate rank; construct a dimension-reduced input feature based on the first matrix in the input tensor and low-rank matrix pair; construct an dimension-increasing output feature based on the second matrix in the dimension-reduced input feature and low-rank matrix pair; and construct an initial sub-increment based on the scaling factor and the dimension-increasing output feature.

[0194] In the above embodiments of this application, the first determining module is further configured to: sum the original weights and initial low-rank increments of the initial adjustment layer to obtain the comprehensive weights of the initial adjustment layer, wherein the original weights are fixed values; construct the output tensor of the initial adjustment layer based on the input tensor and the comprehensive weights; calculate the gradient norm of the initial adjustment layer based on the target loss function and the output tensor of the initial adjustment model, wherein the gradient norm is used to characterize the degree of influence corresponding to the initial adjustment layer; and determine the target weights based on the gradient norm and at least one initial gating parameter.

[0195] Preferably, before calculating the gradient norm of the initial adjustment layer based on the target loss function and output tensor of the initial adjustment model, the device further includes: a function acquisition module for acquiring the initial loss function of the initial adjustment model; a first calculation module for summing the absolute values ​​of at least one initial gating parameter to obtain the gating norm of the initial adjustment layer; a second calculation module for summing the gating norms corresponding to multiple initial adjustment layers to obtain the global norm sum, and multiplying the regularized sparse coefficients and the global norm sum to obtain the gated sparse regularization term; and a third calculation module for summing the gated sparse regularization term and the initial loss function to obtain the target loss function.

[0196] Preferably, the first determining module is further configured to: obtain a parameter list corresponding to the initial adjustment layer; calculate the gradient values ​​corresponding to multiple parameters in the parameter list based on the target loss function; calculate the sum of squares of the gradient values ​​corresponding to multiple parameters to obtain the gradient intensity of the initial adjustment layer; and perform square root calculation on the gradient intensity to obtain the gradient norm.

[0197] Preferably, the first determining module is further configured to: adjust the initial gating parameter corresponding to any candidate rank based on the gradient norm to obtain the target gating parameter corresponding to the candidate rank; calculate the target sub-increment corresponding to the candidate rank based on the target gating parameter and the low-rank matrix pair corresponding to the candidate rank; perform weighted summation on the target sub-increment corresponding to at least one candidate rank based on the target gating parameter corresponding to at least one candidate rank to obtain the target low-rank increment; and sum the target low-rank increment with the original weight to obtain the target weight.

[0198] According to an embodiment of this application, a model training apparatus is provided. It should be noted that this apparatus can be used to execute the model training method described above. The specific implementation process and application scenarios are the same as those in the above embodiment, and will not be repeated here.Figure 8 This is a schematic diagram of a model training device according to an embodiment of this application, such as... Figure 8 As shown, the device includes:

[0199] The second acquisition module 802 is used to acquire a training dataset, wherein the training dataset includes multiple second driving instructions and multiple second physiological states. The types of the multiple second driving instructions are the same as the types of the first driving instructions input by the driver, and the instruction values ​​of the multiple second driving instructions include the instruction values ​​of the first driving instructions. The types of the multiple second physiological states are the same as the types of the first physiological states of the driver during the driving process.

[0200] The second determining module 804 is used to determine, based on the training dataset, the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model during the training process.

[0201] The second adjustment module 806 is used to adjust the multiple initial adjustment layers based on the degree of influence corresponding to the multiple initial adjustment layers to obtain the instruction adjustment model.

[0202] The model deployment module 808 is used to deploy the instruction adjustment model to the electronic device, wherein the instruction adjustment model is invoked by the electronic device to execute the method in the above embodiments.

[0203] Embodiments of this application also provide an electronic device, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of this application when it runs.

[0204] Embodiments of this application also provide a computer-readable storage medium including a stored executable program, wherein, when the executable program is running, it controls the device where the computer-readable storage medium is located to perform the methods of various embodiments of this application.

[0205] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the methods of various embodiments of this application.

[0206] Embodiments of this application also provide a computer program product, including a non-volatile computer-readable storage medium for storing a computer program that, when executed by a processor, implements the methods in various embodiments of this application.

[0207] Embodiments of this application also provide a computer program that, when executed by a processor, implements the methods described in the various embodiments of this application.

[0208] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0209] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0210] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0211] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0212] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0213] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A vehicle control method, characterized in that, include: In response to receiving a first driving instruction input by the driver, the driver's first physiological state during the driving process is obtained; The first driving instruction and the first physiological state input instruction are used to adjust the model. The instruction adjustment model is used to determine the instruction adjustment parameters. The adjustment weights of multiple adjustment layers in the instruction adjustment model during the training process are determined based on the degree of influence of the multiple adjustment layers on the output error of the instruction adjustment model during the training process. Based on the instruction adjustment parameters, the first driving instruction is adjusted to obtain the target driving instruction; Based on the target driving command, control the vehicle to drive.

2. The method according to claim 1, characterized in that, The method further includes: Obtain a training dataset, wherein the training dataset includes multiple second driving commands and multiple second physiological states, the types of the multiple second driving commands are the same as the types of the first driving commands, and the command values ​​of the multiple second driving commands include the command values ​​of the first driving commands, and the types of the multiple second physiological states are the same as the types of the first physiological states; Based on the training dataset, determine the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model; Based on the degree of influence corresponding to the multiple initial adjustment layers, the multiple initial adjustment layers are adjusted respectively to obtain the instruction adjustment model.

3. The method according to claim 2, characterized in that, Based on the training dataset, determine the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model, including: Construct multiple candidate rank sets corresponding to the multiple initial adjustment layers, wherein any candidate rank set contains at least one candidate rank; Based on the candidate rank set corresponding to any initial adjustment layer, at least one initial gating parameter corresponding to the arbitrary initial adjustment layer is determined, wherein different initial gating parameters correspond to different candidate ranks in the candidate rank set; Based on the training dataset, the multiple candidate rank sets corresponding to the multiple initial adjustment layers, and the multiple initial gating parameters, the degree of influence corresponding to the multiple initial adjustment layers is determined.

4. The method according to claim 3, characterized in that, Based on the training dataset, the multiple candidate rank sets corresponding to the multiple initial adjustment layers, and the multiple initial gating parameters, the influence degree corresponding to the multiple initial adjustment layers is determined, including: Input any training data from the training dataset into the initial adjustment model to obtain multiple input tensors corresponding to the multiple initial adjustment layers, wherein the training data consists of any second driving command and any second physiological state; The target weights of the initial adjustment layer are determined based on the input tensor corresponding to any one of the initial adjustment layers, the candidate rank set, and the at least one initial gating parameter. Based on the target weights corresponding to the multiple initial adjustment layers, the multiple initial adjustment layers are adjusted respectively to obtain the instruction adjustment model.

5. The method according to claim 4, characterized in that, Based on the input tensor corresponding to any one of the initial adjustment layers, the candidate rank set, and the at least one initial gating parameter, the target weights of the initial adjustment layer are determined, including: Based on the candidate rank set, at least one low-rank matrix pair of the initial adjustment layer is constructed, wherein different low-rank matrix pairs correspond to different candidate ranks in the candidate rank set; Based on the input tensor, the at least one low-rank matrix pair, and the at least one initial gating parameter, the initial low-rank increment of the initial adjustment layer is determined; The target weights of the initial adjustment layer are determined based on the initial low-rank increment and the at least one initial gating parameter. Preferably, based on the candidate rank set, at least one low-rank matrix pair of the initial adjustment layer is constructed, including: Obtain any candidate rank from the candidate rank set, as well as the input feature dimension and output feature dimension of the initial adjustment layer; Based on the candidate rank and the input feature dimension, a first matrix is ​​constructed, wherein the first matrix is ​​used to reduce the dimension of the input features from the input feature dimension to the dimension corresponding to the candidate rank; Based on the candidate rank and the output feature dimension, a second matrix is ​​constructed, wherein the second matrix is ​​used to map the dimension-reduced input features from the dimension corresponding to the candidate rank to the output feature dimension; Based on the first matrix and the second matrix, construct the low-rank matrix pair corresponding to the candidate rank; Preferably, the method further includes: When the candidate rank set contains multiple candidate ranks, obtain any new candidate rank other than the candidate rank in the candidate rank set, and repeatedly execute the steps of constructing a first matrix based on the new candidate rank and the input feature dimension of the adjustment layer; constructing a second matrix based on the new candidate rank and the output feature dimension of the adjustment layer; and constructing a low-rank matrix pair corresponding to the new candidate rank based on the first matrix and the second matrix, until the low-rank matrix pairs corresponding to the multiple candidate ranks have been constructed.

6. The method according to claim 5, characterized in that, Based on the input tensor, the at least one low-rank matrix pair, and the at least one initial gating parameter, the initial low-rank increment of the initial adjustment layer is determined, including: Based on a preset function, any initial gate parameter is normalized to obtain the initial rank weight of the candidate rank corresponding to the initial gate parameter. Based on the low-rank matrix pair corresponding to the candidate rank and the input tensor, construct the initial sub-increment corresponding to the candidate rank; Based on the initial rank weights corresponding to the at least one candidate rank, the initial sub-increments corresponding to the at least one candidate rank are weighted and summed to obtain the initial low-rank increment of the initial adjustment layer. Preferably, based on the low-rank matrix pair corresponding to the candidate rank and the input tensor, an initial sub-increment corresponding to the candidate rank is constructed, including: Based on the initial gating parameter corresponding to the candidate rank and the candidate rank, a scaling factor is constructed; Based on the first matrix in the input tensor and the low-rank matrix pair, a dimension-reduced input feature is constructed. Based on the reduced-dimensional input features and the second matrix in the low-rank matrix pair, construct the increased-dimensional output features; The initial sub-increment is constructed based on the scaling factor and the upgraded output features.

7. The method according to claim 5, characterized in that, Based on the initial low-rank increment and the at least one initial gating parameter, the target weights of the initial adjustment layer are determined, including: The initial weights of the initial adjustment layer and the initial low-rank increment are summed to obtain the comprehensive weights of the initial adjustment layer, wherein the values ​​of the initial weights are fixed. Based on the input tensor and the comprehensive weights, the output tensor of the initial adjustment layer is constructed; Based on the target loss function of the initial adjustment model and the output tensor, the gradient norm of the initial adjustment layer is calculated, wherein the gradient norm is used to characterize the degree of influence corresponding to the initial adjustment layer; The target weights are determined based on the gradient norm and the at least one initial gating parameter; Preferably, before calculating the gradient norm of the initial adjustment layer based on the target loss function of the initial adjustment model and the output tensor, the method further includes: Obtain the initial loss function of the initially adjusted model; The gating norm of the initial adjustment layer is obtained by summing the absolute values ​​of the at least one initial gating parameter. The gating norms corresponding to the multiple initial adjustment layers are summed to obtain the global norm sum, and the regularized sparse coefficients are multiplied by the global norm sum to obtain the gating sparse regularization term; The target loss function is obtained by summing the gated sparse regularization term and the initial loss function. Preferably, the gradient norm of the initial adjustment layer is calculated based on the target loss function of the initial adjustment model and the output tensor, including: Obtain the parameter list corresponding to the initial adjustment layer; Based on the target loss function, calculate the gradient values ​​corresponding to the multiple parameters in the parameter list respectively; Calculate the sum of squares of the gradient values ​​corresponding to the multiple parameters to obtain the gradient intensity of the initial adjustment layer; The gradient norm is obtained by taking the square root of the gradient intensity. Preferably, determining the target weights based on the gradient norm and the at least one initial gating parameter includes: Based on the gradient norm, the initial gating parameter corresponding to any candidate rank is adjusted to obtain the target gating parameter corresponding to the candidate rank; Based on the target gating parameters and the low-rank matrix pairs corresponding to the candidate ranks, the target sub-increment corresponding to the candidate ranks is calculated; Based on the target gating parameters corresponding to the at least one candidate rank, the target sub-increments corresponding to the at least one candidate rank are weighted and summed to obtain the target low-rank increment; The target weight is obtained by summing the target low-rank increment with the original weight.

8. A model training method, characterized in that, include: Obtain a training dataset, wherein the training dataset includes multiple second driving instructions and multiple second physiological states, the types of the multiple second driving instructions are the same as the types of the first driving instructions input by the driver, and the instruction values ​​of the multiple second driving instructions include the instruction values ​​of the first driving instructions, and the types of the multiple second physiological states are the same as the types of the first physiological states of the driver during the driving process; Based on the training dataset, determine the degree of influence of multiple initial adjustment layers in the initial adjustment model on the output error of the initial adjustment model during the training process; Based on the degree of influence corresponding to the multiple initial adjustment layers, the multiple initial adjustment layers are adjusted respectively to obtain the instruction adjustment model; The instruction adjustment model is deployed to an electronic device, wherein the instruction adjustment model is invoked by the electronic device to perform the method of any one of claims 1 to 7.

9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the method according to any one of claims 1 to 8.