Unlocking and locking model training method and device, electronic equipment, medium and vehicle
By data annotating and model training of Bluetooth key unlocking and locking events, the problem of Bluetooth key misoperation in different environments is solved, high accuracy and stability of vehicle unlocking is achieved, and user experience is improved.
Patent Information
- Application Number
- CN202410138516.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-31
- Publication Date
- 2025-08-01
AI Technical Summary
The existing Bluetooth key technology can easily lead to erroneous operation of the vehicle unlocking function under different environments and holding methods, and the accuracy and stability are not high.
By obtaining the original message data, selecting the sample signal strength of the unlocking and locking events that meet the preset conditions, performing behavioral annotation and model training, and adjusting the model parameters using the preset loss function to obtain a converged target unlocking model, improving the accuracy and stability of unlocking.
It improves the accuracy and stability of vehicle unlocking, reduces misoperation, adapts to various complex scenarios, reduces the probability of misoperation, and improves user experience.
Smart Images

Figure CN120409587A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of vehicle Bluetooth keys, and in particular to a training method, device, electronic device, medium, and vehicle for unlocking a model. Background Art
[0002] With the rapid development of connected car technology, many vehicles sold both domestically and internationally are now equipped with Bluetooth key technology. With Bluetooth keys, users can travel without traditional vehicle keys. Simply carrying a Bluetooth key-equipped device like a mobile phone or watch can unlock, lock, and start the vehicle.
[0003] Currently, Bluetooth keys typically unlock a vehicle based on a signal strength threshold, which is preset based on experience. In practice, if a user approaches the vehicle to unlock it and the Bluetooth key is in their bag, the transmitted Bluetooth signal will be blocked, causing the signal strength received by the vehicle's Bluetooth module to decrease and deviate from the calibration data. Consequently, the signal strength threshold cannot be met, affecting the vehicle's unlocking function.
[0004] Therefore, in the existing solution, different environments and holding methods of the Bluetooth key will lead to different results in the vehicle unlocking function, which is prone to mislocking or mislocking, and the accuracy and stability are not high. Summary of the Invention
[0005] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a training method, device, electronic device, storage medium and vehicle method, device and electronic device for an unlocking model, which can improve the accuracy and stability of the vehicle unlocking performance.
[0006] In order to achieve the above objectives, the technical solutions provided by the embodiments of the present disclosure are as follows:
[0007] In a first aspect, the present disclosure provides a method for training a deblocking model, comprising:
[0008] Get original message data;
[0009] Selecting sample message data from the original message data; the sample message data includes: sample signal strengths corresponding to unlocking events and locking events that meet preset conditions;
[0010] An unblocking behavior is marked for each moment in the waiting unblocking period corresponding to the sample message data to determine an unblocking behavior label corresponding to the sample message data; the waiting unblocking period is a preset time period before the unblocking moment corresponding to the sample message data;
[0011] Input the sample message data into the initial unlocking model to obtain the predicted confidence level output by the initial unlocking model. The predicted confidence level is used to indicate the unlocking probability corresponding to the sample signal strength.
[0012] Based on a preset loss function, calculate the loss value between the predicted confidence level and the unlocking behavior label corresponding to the sample message data.
[0013] When the loss value is greater than the loss threshold, adjust the model parameters of the initial unlocking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking model.
[0014] As an optional implementation manner of the embodiments of the present disclosure, selecting sample message data from the original message data includes: selecting the original message data that meets the preset conditions from the original message data as the intermediate message data. The preset conditions include: the Bluetooth is in a connected state, the gear position is the parking gear, and the vehicle speed is a preset vehicle speed; selecting the intermediate message data corresponding to the unlocking event and the intermediate message data corresponding to the locking event from the intermediate message data as the sample message data; wherein, the unlocking event is an event that the vehicle receives an external unlocking signal in the locked state and detects a door opening signal within a preset unlocking duration; the locking event is an event that the vehicle is in the unlocked state, and within a preset locking duration after detecting the driver's door closing signal, no opening / closing signal is detected and the Bluetooth is disconnected.
[0015] As an optional implementation manner of the embodiments of the present disclosure, the sample message data includes: unlocking sample data and locking sample data; the unlocking and locking behavior labels include: the unlocking behavior label corresponding to the unlocking sample data and the locking behavior label corresponding to the locking sample data; performing unlocking and locking behavior annotation on each moment in the period to be unlocked or locked corresponding to the sample message data to determine the unlocking and locking behavior label corresponding to the sample message data, including: for each unlocking sample in the unlocking sample data, performing unlocking behavior annotation on each moment in the period to be unlocked to obtain the unlocking behavior label of each unlocking sample; the period to be unlocked is the time period within the first preset duration before the door opening signal is detected; for each locking sample in the locking sample data, performing locking behavior annotation on each moment in the period to be locked to obtain the locking behavior label of each locking sample; the period to be locked is the time period within the second preset duration before the Bluetooth is disconnected when the driver's door closing signal is detected.
[0016] As an optional implementation manner of the embodiment of the present disclosure, the initial unlocking and locking model includes an initial unlocking sub-model and an initial locking sub-model; inputting the sample message data into the initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model, including: inputting the unlocking sample data into the initial unlocking sub-model to obtain the prediction unlocking confidence level output by the initial unlocking sub-model; inputting the locking sample data into the initial locking sub-model to obtain the prediction locking confidence level output by the initial locking sub-model.
[0017] As an optional implementation manner of the embodiment of the present disclosure, the loss value includes a first loss value and a second loss value; based on a preset loss function, calculating the loss value between the prediction confidence level and the unlocking and locking behavior label, including: calculating the pending loss value between the prediction unlocking confidence level and the unlocking behavior label by using the preset loss function; determining the penalty coefficient corresponding to the prediction unlocking confidence level, and the penalty coefficient is positively correlated with the unlocking moment corresponding to the prediction unlocking confidence level; multiplying the pending loss value by the penalty coefficient to obtain the first loss value corresponding to the prediction unlocking confidence level; calculating the second loss value between the prediction locking confidence level and the locking label by using the preset loss function.
[0018] In the case that the loss value is greater than the loss threshold, adjusting the model parameters of the initial unlocking and locking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model, including: in the case that the first loss value is greater than the loss threshold, adjusting the model parameters of the initial unlocking sub-model until the first loss value is less than or equal to the loss threshold to obtain a converged target unlocking sub-model; in the case that the second loss value is greater than the loss threshold, adjusting the model parameters of the initial locking sub-model until the second loss value is less than or equal to the loss threshold to obtain a converged target locking sub-model.
[0019] As an optional implementation manner of the embodiment of the present disclosure, after annotating the sample message data and before inputting the sample message data into the initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model, it further includes processing the sample signal strength to obtain the signal strength; inputting the sample message data and the signal strength into the initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model, including: inputting the sample message data and the signal strength into the initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model.
[0020] As an optional implementation manner of the embodiment of the present disclosure, the sample message data includes different scenario marking information, and the scenario marking information is used to indicate the scenario where the sample message data is generated;
[0021] Performing unlocking and locking behavior annotation on each moment in the unlocking and locking period corresponding to the sample message data to determine the unlocking and locking behavior label corresponding to the sample message data, including:
[0022] Obtain the to-be-unlocked and -blocked time periods corresponding to different scenario marking information, where different scenario marking information corresponds to different preset time durations;
[0023] According to the scenario marking information corresponding to each sample message data, determine the to-be-unlocked and -blocked time period corresponding to each sample message data from the to-be-unlocked and -blocked time periods corresponding to different scenario marking information;
[0024] Perform unlocking and blocking behavior annotation on each moment in the to-be-unlocked and -blocked time period corresponding to each sample message data to determine the unlocking and blocking behavior label corresponding to each sample message data until all sample message data are traversed.
[0025] In a second aspect, the present disclosure provides a training device for an unlocking and blocking model, and the device includes:
[0026] An acquisition module, configured to acquire original message data;
[0027] A selection module, configured to select sample message data from the original message data; the sample message data includes: sample signal strengths corresponding to unlocking events and blocking events that meet preset conditions;
[0028] A marking module, configured to perform unlocking and blocking behavior annotation on each moment in the to-be-unlocked and -blocked time period corresponding to the sample message data to determine the unlocking and blocking behavior label corresponding to the sample message data; the to-be-unlocked and -blocked time period is a time period of a preset duration before the unlocking and blocking moment corresponding to the sample message data;
[0029] A processing module, configured to input the sample message data into an initial unlocking and blocking model to obtain a predicted confidence level output by the initial unlocking and blocking model, and the predicted confidence level is used to indicate the unlocking and blocking probability corresponding to the sample signal strength;
[0030] A calculation module, configured to calculate a loss value between the predicted confidence level and the unlocking and blocking behavior label corresponding to the sample message data based on a preset loss function;
[0031] An adjustment module, configured to, when the loss value is greater than a loss threshold, adjust the model parameters of the initial unlocking and blocking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and blocking model.
[0032] As an optional implementation manner of the embodiment of the present disclosure, the selection module is specifically configured to: select, from the original message data, the original message data that meets the preset conditions as the intermediate message data, where the preset conditions include: the Bluetooth is in a connected state, the gear position is the parking gear, and the vehicle speed is the preset vehicle speed; select, from the intermediate message data, the intermediate message data corresponding to the unlocking event and the intermediate message data corresponding to the locking event as the sample message data; where the unlocking event is an event that the vehicle receives an external unlocking signal in the locked state and detects a door opening signal within a preset unlocking duration; the locking event is an event that the vehicle is in the unlocked state, does not detect an opening / closing signal within a preset locking duration after detecting the driver's door closing signal, and the Bluetooth is disconnected.
[0033] As an optional implementation manner of the embodiment of the present disclosure, the sample message data includes: unlocking sample data and locking sample data; the unlocking and locking behavior labels include: the unlocking behavior label corresponding to the unlocking sample data and the locking behavior label corresponding to the locking sample data; the annotation module is specifically configured to: for each unlocking sample in the unlocking sample data, perform unlocking behavior annotation on each moment in the period to be unlocked to obtain the unlocking behavior label of each unlocking sample; the period to be unlocked is the time period within the first preset duration before the door opening signal is detected; for each locking sample in the locking sample data, perform locking behavior annotation on each moment in the period to be locked to obtain the locking behavior label of each locking sample; the period to be locked is the time period within the second preset duration before the Bluetooth is disconnected when the driver's door closing signal is detected.
[0034] As an optional implementation manner of the embodiment of the present disclosure, the initial unlocking and locking model includes an initial unlocking sub-model and an initial locking sub-model; the processing module is specifically configured to: input the unlocking sample data into the initial unlocking sub-model to obtain the predicted unlocking confidence level output by the initial unlocking sub-model; input the locking sample data into the initial locking sub-model to obtain the predicted locking confidence level output by the initial locking sub-model.
[0035] As an optional implementation manner of the embodiment of the present disclosure, the loss value includes a first loss value and a second loss value; the calculation module is specifically configured to: calculate the undetermined loss value between the predicted unlocking confidence level and the unlocking behavior label by using a preset loss function; determine the penalty coefficient corresponding to the predicted unlocking confidence level, where the penalty coefficient is positively correlated with the unlocking moment corresponding to the predicted unlocking confidence level; multiply the undetermined loss value by the penalty coefficient to obtain the first loss value corresponding to the predicted unlocking confidence level; calculate the second loss value between the predicted locking confidence level and the locking label by using a preset loss function.
[0036] An adjustment module, specifically used for: when the first loss value is greater than the loss threshold, adjusting the model parameters of the initial unlocking sub-model until the first loss value is less than or equal to the loss threshold to obtain a converged target unlocking sub-model; when the second loss value is greater than the loss threshold, adjusting the model parameters of the initial locking sub-model until the second loss value is less than or equal to the loss threshold to obtain a converged target locking sub-model.
[0037] As an optional implementation manner of the embodiments of the present disclosure, the annotation module is further used for: performing differential processing on the sample signal strength to obtain a differential signal strength; the processing module is specifically used for: inputting the sample message data and the differential signal strength into the initial unlocking and locking model to obtain the predicted confidence level output by the initial unlocking and locking model.
[0038] As an optional implementation manner of the embodiments of the present disclosure, the sample message data includes different scenario marking information, and the scenario marking information is used to indicate the scenario where the sample message data is generated; the annotation module is specifically used for: obtaining the unlocking and locking time periods corresponding to different scenario marking information, where different scenario marking information corresponds to different preset time lengths; determining the unlocking and locking time periods corresponding to each sample message data from the unlocking and locking time periods corresponding to different scenario marking information according to the scenario marking information corresponding to each sample message data; performing unlocking and locking behavior annotation on each moment in the unlocking and locking time period corresponding to each sample message data to determine the unlocking and locking behavior label corresponding to each sample message data until all sample message data is traversed.
[0039] In a third aspect, the present disclosure provides an electronic device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, it implements the training method of the unlocking and locking model as described in the first aspect or any one of its optional implementation manners.
[0040] In a fourth aspect, the present disclosure provides a computer-readable storage medium, including: a computer program stored on the computer-readable storage medium, where when the computer program is executed by a processor, it implements the training method of the unlocking and locking model as described in the first aspect or any one of its optional implementation manners.
[0041] In a fifth aspect, the present disclosure provides a vehicle, including: the training device of the unlocking and locking model as described in the second aspect or any one of its optional implementation manners, or the electronic device as described in the third aspect.
[0042] In a sixth aspect, the present disclosure provides a computer program product, including: the computer program product includes a computer program, and when the computer program runs on a computer, it causes the computer to implement the training method of the unlocking and locking model as described in the first aspect or any one of its optional implementation manners.
[0043] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art:
[0044] The embodiments of the present disclosure provide a training method, device, electronic device, medium and vehicle for an unlocking and locking model. The method first obtains original message data, and then selects the sample signal strengths corresponding to unlocking events and locking events that meet preset conditions from the original message data as sample message data, and performs unlocking and locking behavior annotation on each moment in the unlocking and locking period corresponding to the sample message data to determine the corresponding unlocking and locking behavior labels. The unlocking and locking period is a time period of a preset duration before the unlocking and locking moment corresponding to the sample message data. Then, the sample message data is input into the initial unlocking and locking model to obtain the prediction confidence output by the initial unlocking and locking model. The prediction confidence is used to indicate the unlocking and locking probability corresponding to the sample signal strength. Then, based on a preset loss function, the loss value between the prediction confidence and the unlocking and locking behavior label corresponding to the sample message data is calculated. Thus, when the loss value is greater than the loss threshold, the model parameters of the initial unlocking and locking model are adjusted until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model. In this way, the present disclosure screens the sample message data corresponding to unlocking events and locking events that meet preset conditions from the original message data as training samples, and performs model iterative training to obtain a converged target unlocking and locking model, so that the target unlocking and locking model can be used to accurately control the unlocking and locking of the vehicle, and is no longer limited by the signal strength threshold set by manual experience, improving the accuracy and stability of the vehicle unlocking and locking performance. Description of the Drawings
[0045] The drawings here are incorporated into the description and form a part of this description, showing the embodiments consistent with the present disclosure and used together with the description to explain the principles of the present disclosure.
[0046] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 It is a schematic flowchart of a training method for an unlocking and locking model according to an embodiment of the present disclosure;
[0048] Figure 2A It is a schematic diagram of an unlocking event provided by an embodiment of the present disclosure Figure 1 ;
[0049] Figure 2B It is the second schematic diagram of an unlocking event provided by an embodiment of the present disclosure;
[0050] Figure 2CSchematic diagram three of the unlocking event provided by the embodiments of the present disclosure;
[0051] Figure 2D Schematic diagram of the latching event provided by the embodiments of the present disclosure Figure 1 ;
[0052] Figure 2E Schematic diagram two of the latching event provided by the embodiments of the present disclosure;
[0053] Figure 3A Schematic diagram of the period to be unlocked provided by the embodiments of the present disclosure;
[0054] Figure 3B Schematic diagram of the period to be latched provided by the embodiments of the present disclosure;
[0055] Figure 4 Schematic structural diagram of the initial unlocking and latching model provided by the embodiments of the present disclosure;
[0056] Figure 5 Schematic structural diagram of a training device for an unlocking and latching model provided by the embodiments of the present disclosure;
[0057] Figure 6 Schematic structural diagram of an electronic device provided by the embodiments of the present disclosure. Detailed implementation manners
[0058] In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments may be combined with each other.
[0059] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.
[0060] To solve some or all of the technical problems existing in the related art, embodiments of the present disclosure provide a method, apparatus, electronic device, medium, and vehicle for training an unlocking and locking model. The method first obtains original message data, and then selects the sample signal strengths corresponding to unlocking events and locking events that meet preset conditions from the original message data as sample message data. For each moment in the unlocking and locking period corresponding to the sample message data, an unlocking and locking behavior annotation is performed to determine its corresponding unlocking and locking behavior label. Here, the unlocking and locking period is a time period of a preset duration before the unlocking and locking moment corresponding to the sample message data. Then, the sample message data is input into an initial unlocking and locking model to obtain the prediction confidence output by the initial unlocking and locking model. The prediction confidence is used to indicate the unlocking and locking probability corresponding to the sample signal strength. Based on a preset loss function, the loss value between the prediction confidence and the unlocking and locking behavior label is calculated. Thus, when the loss value is greater than the loss threshold, the model parameters of the initial unlocking and locking model are adjusted until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model. In this way, the present disclosure screens the sample message data corresponding to unlocking events and locking events that meet preset conditions from the original message data as training samples, and performs model iterative training to obtain a converged target unlocking and locking model, so as to be able to accurately control the unlocking and locking of the vehicle by applying the target unlocking and locking model, without being limited by the signal strength threshold set by manual experience, and improving the accuracy and stability of the vehicle unlocking and locking performance.
[0061] A method for training an unlocking and locking model provided in the embodiments of the present disclosure can be implemented by an unlocking and locking model training apparatus or an electronic device. The electronic device includes, but is not limited to, a vehicle-mounted terminal, a server, a personal computer, a laptop computer, a tablet computer, a smart phone, etc. The operating system of the electronic device can include Android developed by Google, iOS developed by Apple Inc., Windows developed by Microsoft Corporation of the United States, etc. The embodiments of the present disclosure do not limit this. The electronic device can run alone to implement the present disclosure, or can be connected to the network and implement the present disclosure through interaction with other computer devices in the network. Among them, the network where the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a Virtual Private Network (VPN) network, etc.
[0062] It should be noted that the protection scope of the method for training an unlocking and locking model described in the embodiments of the present disclosure is not limited to the execution order of the steps listed in this embodiment. Any solution achieved by adding or reducing steps of the prior art and replacing steps according to the principle of the present disclosure is included in the protection scope of the present disclosure.
[0063] As Figure 1 shown, Figure 1The figure is a schematic flowchart of a method for training an unlocking and locking model according to an embodiment of the present disclosure. This method can be executed by a training device for the unlocking and locking model, where the device can be implemented by software and / or hardware and is generally integrated in an electronic device. As Figure 1 shown, the method mainly includes the following steps S101 to S103:
[0064] S101. Obtain original message data.
[0065] Among them, the original message data is the historical working data of the vehicle, which can be online CAN message data and has a large amount of data. The original message data includes message data in different scenarios, such as possible scenarios like the vehicle surrounding scenario, staying scenario, parking lot scenario, etc. The distinction between each scenario can be analyzed and marked according to information such as the generation time, location, and Bluetooth signal characteristics of the message data. For example, if the geographical location where the original message data A is generated is located in a certain underground parking lot, then the original message data A is marked with [Parking Lot Scenario]. The original message can also be manually marked for the scenario to distinguish message data in different scenarios. The original message data carries scenario marking information. For example, by manually analyzing the original message data A, it is determined that the original message A occurs in the vehicle surrounding scenario, then the original message data A is marked with [Vehicle Surrounding Scenario]. Correspondingly, the above two implementation methods can be combined. First, the possible scenario marking information is initially determined based on information such as the generation time, location, and Bluetooth signal characteristics of the message data, and then confirmed manually. Finally, the scenario marking information of the original message data is determined, so as to be able to distinguish some complex scenarios and potential scenarios, and further refine the model training according to different scenarios in the follow-up, thereby improving the scenario adaptability of the unlocking and locking model.
[0066] S102. Select sample message data from the original message data.
[0067] Among them, the sample message data includes: the sample signal strengths corresponding to unlocking events and locking events that meet the preset conditions. It can be understood that the sample message data includes two parts. One part is the sample signal strength corresponding to the unlocking events that meet the preset conditions, and the other part is the sample signal strength corresponding to the locking events that meet the preset conditions.
[0068] The preset conditions include: the Bluetooth is in a connected state, the gear is in the parking gear, and the vehicle speed is the preset vehicle speed. The preset vehicle speed can be 0 km / h. The above preset conditions indicate that within the historical time of the vehicle, when the Bluetooth is in a connected state (BKeyValidFlg = 1), the gear is in the parking gear (ActuGearShiftPos = 4), and the vehicle speed is the preset vehicle speed (VehSpd = 0.0), the vehicle may be about to unlock or is in the process of unlocking.
[0069] An unlocking event is an event in which the vehicle receives an external unlocking signal in the locked state and detects a door opening signal within a preset unlocking duration. The external unlocking signal is an unlocking signal from outside the vehicle, including but not limited to: a mechanical opening signal or a touch opening signal of the door, or a WalkUp Unlock signal, or an unlocking signal sent by a remote control key. Among them, for the WalkUp Unlock signal, an application needs to be downloaded on a mobile device (such as a mobile phone, etc.) and connected to the vehicle device via Bluetooth. When the WalkUp Unlock function is enabled on the mobile device, the vehicle device will automatically detect the Bluetooth signal of the mobile device, and when the vehicle owner approaches, the vehicle will be automatically unlocked.
[0070] The preset unlocking duration is a preset duration, which can be 1 minute. Timing starts from the receipt of the external unlocking signal, and the door opening signal is detected within the preset unlocking duration to identify whether the user has an opening action within the preset unlocking duration. If so, it means that the message data corresponding to this period has an unlocking event.
[0071] It can be understood that the unlocking event needs to meet the following conditions: (1) the vehicle is in the locked state, (2) an external unlocking signal is received, (3) an opening action is detected within the preset unlocking duration, (4) Bluetooth is in a connected state, (5) the gear is in the parking gear, and (6) the vehicle speed is 0.
[0072] Exemplarily, as Figure 2A shown, Figure 2A is a schematic diagram of the unlocking event provided by an embodiment of the present disclosure. Figure 1 Timing starts from the receipt of the external unlocking signal. A door opening signal is detected within the preset unlocking duration (such as 1 minute), and the door state changes from closed to open. Bluetooth is always connected throughout the process.
[0073] It should be noted that the above-mentioned Bluetooth being in a connected state includes: Bluetooth remaining in a connected state within the preset unlocking duration; or Bluetooth not being connected before the preset unlocking duration, but establishing a Bluetooth connection within the preset duration, and Bluetooth is in a connected state. During this process, Bluetooth may also be disconnected and reconnected; or the state where Bluetooth is disconnected and reconnected within the preset unlocking duration. It can be understood that Bluetooth being in a connected state means that it is in a connected state before the vehicle is unlocked, and does not limit the duration of the Bluetooth connection state within the preset unlocking duration.
[0074] Exemplarily, as Figure 2B shown, Figure 2B is the second schematic diagram of the unlocking event provided by an embodiment of the present disclosure. Timing starts from the receipt of the external unlocking signal. At this time, Bluetooth is in a disconnected state, and a Bluetooth connection is established within the preset unlocking duration (such as 1 minute), so Bluetooth remains in a connected state until a door opening signal is detected.
[0075] Another exemplarily, asFigure 2C As shown Figure 2C FIG. 3 is a schematic diagram of an unlocking event provided by an embodiment of the present disclosure. Starting from the time when an external unlocking signal is received, Bluetooth is in a connected state at this time. Bluetooth disconnects within a preset unlocking duration (such as 1 minute), and then reconnects. A door opening signal is detected when Bluetooth is in a connected state. During this period, the number of disconnections of Bluetooth is not limited. The figure is only for illustrative purposes, showing the situation where Bluetooth disconnects once and then reconnects.
[0076] A locking event is an event that when the vehicle is in an unlocked state, no door opening / closing signal is detected within a preset locking duration after a driver's seat door closing signal is detected, and Bluetooth disconnects. The preset locking duration is pre-set and can be 1 minute. Starting from the time when the driver's seat door closing signal is detected, the door opening / closing signal is detected within the preset locking duration to identify whether the user still has a door opening / closing action within the preset locking duration. If not, it means the user has an intention to lock the door.
[0077] It can be understood that the locking event needs to meet the following conditions: (1) the vehicle is in an unlocked state, (2) the gear is in the parking gear, (3) no door opens or closes within the preset locking duration after the driver's seat door is closed, or no door opens or closes during the period from when the driver's seat door is closed until Bluetooth disconnects, (4) the vehicle speed is 0 km / h.
[0078] As Figure 2D shown Figure 2D FIG. is a schematic diagram of a locking event provided by an embodiment of the present disclosure Figure 1 . Starting from the time when the driver's seat door closing signal is detected, no opening / closing signal of any door is detected within the preset locking duration (1 min), and Bluetooth is in a connected state throughout the process. It should be emphasized that the premise of the locking event is that the vehicle is in the parking gear.
[0079] As Figure 2E shown Figure 2E FIG. 2 is a schematic diagram of a locking event provided by an embodiment of the present disclosure. After the driver's seat door closing signal is detected, no opening / closing signal of any door is detected during the period until Bluetooth disconnects.
[0080] In some embodiments, in the process of selecting sample message data from the original message data, first, the original message data that meets the preset conditions is selected from the original message data as intermediate message data, and then the intermediate message data corresponding to the unlocking event or the locking event is selected from the intermediate sample message data as the sample message data.
[0081] Specifically, first, the original message data is roughly screened, and the intermediate message data in which the Bluetooth is in a connected state, the gear is in the parking gear, and the vehicle speed is the preset vehicle speed is screened out from it. These intermediate message data are the message data with a relatively high probability corresponding to the vehicle about to be unlocked or being unlocked in the historical period. Then, a fine screening is carried out to screen out the message data corresponding to the unlocking event or the locking event from the intermediate message data as the sample message data, so as to obtain the message data corresponding to the vehicle being unlocked in the historical period, and thus use the sample message data to train the model in the subsequent process to learn the accurate timing of unlocking and locking from the historical data.
[0082] Optionally, the sample message data is divided into unlocking sample data and locking sample data. The unlocking sample data includes the signal strength (Received Signal Strength Index, RSSI) corresponding to the unlocking event that meets the preset conditions. The locking sample data includes the signal strength corresponding to the locking event that meets the preset conditions.
[0083] In the above embodiments, through rule setting from a large amount of online data, including preset conditions and unlocking and locking events, the message data of vehicle unlocking and locking in different scenarios is screened out, so as to use these data to iteratively train the model in the subsequent steps.
[0084] S103. Perform unlocking and locking behavior annotation on each moment in the period to be unlocked corresponding to the sample message data, and determine the unlocking and locking behavior label corresponding to the sample message data.
[0085] In some embodiments, after performing step S102 and before performing step S103, it further includes: obtaining supplementary message data within a preset time length before and after the sample message data, using the supplementary message data to expand the sample message data, and obtaining new sample message data for annotating the new message data. Among them, the preset time length can be 5 minutes, and the present disclosure does not specifically limit this. The sample message data is the working data of the vehicle within a period of time, and the sample message data is expanded to cover more possible vehicle unlocking and locking data.
[0086] Among them, the period to be unlocked is a time period of a preset time length before the unlocking and locking moment corresponding to the sample message data. The unlocking and locking moment is the actual unlocking and locking moment of the vehicle recorded in the sample message data, and the preset time length is a preset time length, which can be preset with different time lengths according to different scenarios corresponding to the sample message data. It can be understood that the period to be unlocked occurs at a certain time before the actual unlocking and locking moment of the vehicle. To meet the user's needs, it is expected that the vehicle unlocking and locking moment occurs accurately according to the specific scenario. For example, the next unlocking moment can be advanced based on the previous one, so as to reduce the waiting time of the user outside the vehicle.
[0087] It should be noted that the sample message data is selected from the original message data. The original message data carries scene marking information, and the sample label marking information also carries scene marking information. Different scene marking information indicates different scenes when the sample message data is generated. Different preset time durations can be set for the sample message data according to different scene marking information. For example, the preset time duration in the staying scene is Δt1, and the preset time duration in the parking lot scene is Δt2, so as to analyze the scene of the sample message data and make it more in line with the actual driving environment of the user.
[0088] The unlocking and locking behavior label can indicate the unlocking and locking behavior in the sample message data, and correspondingly can indicate the unlocking and locking moment of the expected vehicle. It can be understood that the position or moment where unlocking and locking should occur in the sample message data is marked. Exemplarily, the sample message data includes: "2023-06-19 19:55:13, Open the door", indicating that the vehicle is actually unlocked at 19:55:13 on June 19, 2023. Then, the unlocking behavior label "[Unlocking]" can be marked for 20s before this moment, that is, at 19:54:53 on June 19, 2023. This is only an exemplary illustration, and the present disclosure does not specifically limit this.
[0089] In some embodiments, as described above, the sample message data includes different scene marking information, and the scene marking information is used to indicate the scene when the sample message data is generated; when performing step S103 (performing unlocking and locking behavior annotation for each moment in the unlocking and locking period corresponding to the sample message data to determine the unlocking and locking behavior label corresponding to the sample message data), first obtain the unlocking and locking periods corresponding to different scene marking information, and different scene information corresponds to different preset time durations; then, according to the scene marking information corresponding to each sample message data, determine the unlocking and locking period corresponding to each sample message data from the unlocking and locking periods corresponding to the above different scene marking information, and then perform unlocking and locking behavior annotation for each moment in the unlocking and locking period corresponding to each sample message data to determine the unlocking and locking behavior label corresponding to each sample message data until all sample message data is processed.
[0090] It can be understood that the number of sample message data is multiple, and the scenarios of each sample message data may be different. In the embodiments of the present disclosure, different preset time durations are set according to different scenarios to adapt to the actual application scenarios. It can be understood that in some scenarios, it is desired that the unlocking moment is as early as possible, so the corresponding preset time duration is shorter. In other scenarios, it is desired that the locking is performed after waiting for a certain time duration after all the vehicle doors are closed. Then, the locking moment is not the earlier the better. The setting of the preset time duration can be set according to user habits. For example, if a user spends about 10 seconds walking around the vehicle after all the vehicle doors are closed and then leaves the vehicle, the preset time duration can be set to 15 seconds to complete the vehicle locking within 5 seconds after the user leaves, and also reserve a sufficient time for the possible situation that the user still needs to open the door when walking around the vehicle.
[0091] Specifically, the preset time durations for different scenarios are pre-configured, and the scenario marking information and the to-be-unlocked / locked time periods can be stored correspondingly in the form of data such as a table. When performing the unlocking / locking behavior annotation, the table is queried to obtain different to-be-unlocked / locked time periods. Then, according to the scenario marking information corresponding to each sample message data, the sample message data is put into one-to-one correspondence with the to-be-unlocked / locked time periods to indicate the possible time periods when the unlocking / locking behavior is expected to occur for the sample message data. Thus, the unlocking / locking behavior annotation is performed for each moment in the to-be-unlocked / locked time periods to obtain the unlocking / locking behavior label corresponding to each sample message data.
[0092] In some embodiments, corresponding to the sample message data including unlocking sample data and locking sample data, the unlocking / locking behavior labels include unlocking labels and locking labels, which respectively indicate the unlocking behavior and the locking behavior. In the process of annotating the sample message data to determine the unlocking / locking behavior label corresponding to the sample message data, for each unlocking sample in the unlocking sample data, each moment in the to-be-unlocked time period is annotated to obtain the unlocking label corresponding to each unlocking sample. The to-be-unlocked time period is the time period of the first preset time duration before the door opening signal is detected; for each locking sample in the locking sample data, each moment in the to-be-locked time period is annotated to obtain the locking label corresponding to each locking sample. The to-be-locked time period is the time period of the second preset time duration before the Bluetooth connection is disconnected when the driver's seat door closed signal is detected.
[0093] Among them, the to-be-unlocked time period is the time period of the first preset time duration before the door opening signal is detected. The first preset time duration can be 20 seconds, and the present disclosure does not specifically limit this. Exemplarily, as Figure 3A shown, Figure 3A is a schematic diagram of the to-be-unlocked time period provided by the embodiments of the present disclosure. Given the moment when the door opening signal is detected (i.e., the unlocking moment), starting from this moment, the first preset time duration is deduced backward, and this time period is used as the to-be-unlocked time period, indicating that the vehicle should be unlocked within 20 seconds before the user opens the door.
[0094] The period to be locked is a period of the second preset duration after the driver's seat closing signal is detected and before the Bluetooth connection is disconnected. The second preset duration can be 10 seconds, and the present disclosure does not specifically limit this. Exemplarily, as Figure 3B shown, Figure 3B is a schematic diagram of the period to be locked provided by an embodiment of the present disclosure. In the case where the driver's seat door closing signal is detected, given the moment when the Bluetooth connection is disconnected (i.e., the locking moment), starting from this moment, the second preset duration (10 seconds) is counted backwards, and this period is used as the period to be locked, indicating that within 10 seconds before the Bluetooth connection is disconnected when the last door is closed, the vehicle should be locked. It should be emphasized that the locking event means that there is no opening or closing of any door after the driver's seat door is closed, indicating that the driver's seat door closing is the last door closing, which can be regarded as everyone getting out of the vehicle, and the vehicle needs to be controlled to lock.
[0095] It can be understood that for each unlocking sample in the unlocking sample data, each moment within the first preset duration before the opening signal is detected is marked to indicate the moment when the vehicle should be unlocked; for each locking sample in the locking sample data, each moment within the second preset duration after the last door closing signal is detected and before the Bluetooth connection is disconnected is marked to indicate the moment when the vehicle should be locked.
[0096] S104. Input the sample message data into the initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model.
[0097] Among them, the initial unlocking and locking model includes: a Convolutional Neural Networks (CNN) module and a Recurrent Neural Network (RNN) module. The CNN module is used to obtain the feature information of the sample message data; the RNN module is used to obtain the temporal dependence relationship of the sample message data, and then map the features into the confidence level of the unlocking and locking event to determine whether to output an unlocking and locking signal. The RNN module can be a Long Short-Term Memory (LSTM). The confidence level decision threshold can be 0.5, and being greater than or equal to this threshold indicates that the vehicle should be controlled to unlock and lock.
[0098] Exemplarily, as Figure 4 shown, Figure 4 is a schematic structural diagram of the initial unlocking and locking model provided by an embodiment of the present disclosure. The initial unlocking and locking model includes a CNN module and an LSTM, and the LSTM includes a fully connected layer for mapping the features into the confidence level of the unlocking and locking event.
[0099] In some embodiments, after performing step S103 (annotating the unlocking behavior for each moment in the unlocking period corresponding to the sample message data to determine the unlocking behavior label corresponding to the sample message data), and before performing step S104 (inputting the sample message data into the initial unlocking model to obtain the predicted unlocking moment output by the initial unlocking model), the following is further included: processing the sample signal strength to obtain the signal strength; thereby, during the execution of step S104, inputting the sample message data and the signal strength into the initial unlocking model to obtain the predicted confidence level output by the initial unlocking model.
[0100] Specifically, after annotating the unlocking behavior label corresponding to the sample message data, first process the sample signal strength corresponding to the sample message data to obtain the signal strength. Exemplarily, the sample signal strength is 5 channels, and after processing, 20 channel-to-channel signal strengths can be obtained; furthermore, during the model training process, input the sample signal strength and the signal strength into the initial unlocking model for iterative training. Using the signal strength as the input during the model training process is to learn the characteristics between Bluetooth data channels, thereby improving the anti-interference performance, and the trained target unlocking model can reduce the phenomenon of false unlocking.
[0101] Optionally, the initial unlocking model includes an initial unlocking sub-model and an initial locking sub-model. The initial unlocking sub-model and the initial locking sub-model are similar in structure to the above initial unlocking model, but the initial parameters of the models are different.
[0102] In some embodiments, during the execution of step S104, input the unlocking sample data into the initial unlocking sub-model respectively to obtain the predicted unlocking confidence level output by the initial unlocking sub-model, and input the locking sample data into the initial locking sub-model to obtain the predicted locking confidence level output by the initial locking sub-model.
[0103] S105. Calculate the loss value between the predicted confidence level and the unlocking behavior label corresponding to the sample message data based on a preset loss function.
[0104] Among them, the preset loss function can be the Binary Cross Entropy Loss (BCEloss) function.
[0105] Based on the above embodiments, calculate the first loss value between the predicted unlocking confidence level and the unlocking label, and calculate the second loss value between the predicted locking confidence level and the locking label based on the preset loss function.
[0106] Optionally, during the process of calculating the first loss function value between the predicted unlocking confidence and the unlocking label, first use a preset loss function to calculate the pending loss value between the predicted unlocking confidence and the unlocking label; determine the penalty coefficient corresponding to the predicted unlocking confidence, where the penalty coefficient is positively correlated with the unlocking moment corresponding to the predicted unlocking confidence. It can be understood that the smaller the unlocking moment corresponding to the predicted unlocking confidence, the smaller the penalty coefficient; then multiply the pending loss value by the penalty coefficient to obtain the first loss value.
[0107] When calculating the loss value between the predicted locking confidence and the locking label, substitute the predicted locking confidence and the locking label into the binary cross-entropy loss function to calculate the second loss value between the two.
[0108] S106. In the case where the loss value is greater than the loss threshold, adjust the model parameters of the initial unlocking and locking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model.
[0109] Among them, the input of the target unlocking and locking model is the signal strength, and the output is the confidence level to determine whether to unlock or lock according to the signal strength. The structure of the target unlocking and locking model is similar to that of the initial unlocking and locking model, but the model parameters are different.
[0110] Based on the above embodiments, in the case where the first loss value is greater than the loss threshold, adjust the model parameters of the initial unlocking sub-model until the first loss value is less than or equal to the loss threshold; in the case where the second loss value is greater than the loss threshold, adjust the model parameters of the initial locking sub-model until the second loss value is less than or equal to the loss threshold. Thus, iterative training and optimization are performed on the initial unlocking sub-model and the initial locking sub-model respectively.
[0111] In some embodiments, in the case where the first loss value, and / or, the second loss value is greater than the loss threshold, adjust the model parameters of the initial unlocking and locking model until both the first loss value and the second loss value are less than or equal to the loss threshold to obtain a converged target unlocking and locking model.
[0112] The above embodiments use a deep learning neural network to learn the original message data, learn the historical vehicle unlocking and locking habits, and optimize the unlocking and locking moments according to the preset loss function to train a converged target unlocking and locking model.
[0113] In some embodiments, when the target unlocking and locking model is trained based on the above embodiments, the target unlocking and locking model is applied, and the signal strength is input into the target unlocking and locking model to obtain the confidence level output by the model, which indicates the probability of unlocking and locking according to the signal strength, so as to determine the accurate timing of vehicle unlocking and locking, avoid delaying the user's waiting when unlocking should be performed, and avoid incorrect locking under unnecessary circumstances, improving the stability and robustness of the vehicle unlocking and locking performance, thereby enhancing the user experience.
[0114] In summary, the embodiments of the present disclosure provide a method for training an unlocking and locking model. The method first obtains the original message data, then selects the sample signal strengths corresponding to the unlocking events and locking events that meet the preset conditions from the original message data as the sample message data, and determines the unlocking and locking behavior labels corresponding to each moment in the unlocking and locking period corresponding to the sample message data. Then, the sample message data is input into the initial unlocking and locking model to obtain the predicted confidence level output by the initial unlocking and locking model. The predicted confidence level is used to indicate the unlocking and locking probability corresponding to the sample signal strength. Then, based on the preset loss function, the loss value between the predicted confidence level and the unlocking and locking behavior labels corresponding to the sample message data is calculated. Thus, when the loss value is greater than the loss threshold, the model parameters of the initial unlocking and locking model are adjusted until the loss value is less than or equal to the loss threshold to obtain the converged target unlocking and locking model. In this way, the present disclosure screens the sample message data corresponding to the unlocking events and locking events that meet the preset conditions from the original message data as the training samples, and performs model iterative training to obtain the converged target unlocking and locking model, so that the target unlocking and locking model can be applied to accurately control the vehicle unlocking and locking, no longer limited by the signal strength threshold set by manual experience, improving the accuracy and stability of the vehicle unlocking and locking performance.
[0115] In addition, the present disclosure is applicable to different scenarios such as signal occlusion, and can stably and accurately unlock and lock the vehicle; since the sample message data includes the message data of complex application scenarios such as walking around the vehicle and staying, the target unlocking and locking model obtained by learning and training the signal characteristics of these message data has strong stability, thereby reducing the probability of incorrect locking and being applicable to various complex scenarios; the present disclosure does not need to be re-adapted and calibrated following the replacement of the mobile phone model (the mobile phone configured with the Bluetooth key), and can automatically adapt to various mobile phone models without the user's awareness, with strong generalization; it can achieve a fast and stable unlocking and locking effect, avoid the phenomenon of the user "standing still" caused by the unlocking lag, and improve the user experience.
[0116] To further examine the technical effects of the present disclosure, tests found that the recall rate of using the target unlocking sub-model of the present disclosure to control vehicle unlocking is 98.8%, which is higher than the recall rate of 96.7% of the traditional method for controlling vehicle unlocking. It can be seen that the present disclosure improves the accuracy of unlocking. Compared with the traditional unlocking method, the unlocking time of the present disclosure is advanced by an average of 7.28 seconds, improving the vehicle unlocking rate and enhancing the user experience. The recall rate of using the target locking model of the present disclosure to control vehicle locking is 95.3%, which is higher than the recall rate of 93.1% of the traditional method for controlling vehicle locking. It can be seen that the present disclosure improves the accuracy of locking. Compared with the traditional locking method, the locking time of the present disclosure is advanced by an average of 4.02 seconds, improving the vehicle locking rate. In addition, the false alarm rate around the vehicle after locking with the traditional method is 52%, while the false alarm rate around the vehicle after using the target locking model of the present disclosure to control vehicle locking is 2.7%, greatly reducing the false alarm rate.
[0117] As Figure 5 shown, Figure 5 FIG. is a schematic structural diagram of a training device for an unlocking and locking model provided by an embodiment of the present disclosure. The device includes:
[0118] An acquisition module 501, configured to acquire original message data;
[0119] A selection module 502, configured to select sample message data from the original message data; the sample message data includes: sample signal strengths corresponding to unlocking events and locking events that meet preset conditions;
[0120] A labeling module 503, configured to perform unlocking and locking behavior labeling on each moment in the unlocking and locking period corresponding to the sample message data, and determine the unlocking and locking behavior label corresponding to the sample message data; the unlocking and locking period is a preset time period before the unlocking and locking moment corresponding to the sample message data;
[0121] A processing module 504, configured to input the sample message data into an initial unlocking and locking model to obtain the prediction confidence level output by the initial unlocking and locking model, where the prediction confidence level is used to indicate the unlocking and locking probability corresponding to the sample signal strength; the initial unlocking and locking model includes: a convolutional neural network module and a recurrent neural network module;
[0122] A calculation module 505, configured to calculate the loss value between the prediction confidence level and the unlocking and locking behavior label corresponding to the sample message data based on a preset loss function;
[0123] An adjustment module 506, configured to adjust the model parameters of the initial unlocking and locking model when the loss value is greater than the loss threshold until the loss value is less than or equal to the loss threshold, to obtain a converged target unlocking and locking model.
[0124] As an optional implementation manner of the embodiment of the present disclosure, the selection module 502 is specifically configured to: select, from the original message data, the original message data that meets the preset conditions as the intermediate message data, where the preset conditions include: the Bluetooth is in a connected state, the gear position is in the parking gear, and the vehicle speed is the preset vehicle speed; select, from the intermediate message data, the intermediate message data corresponding to the unlocking event and the intermediate message data corresponding to the locking event as the sample message data; where the unlocking event is an event that the vehicle receives an external unlocking signal in the locked state and detects an opening signal within a preset unlocking duration; the locking event is an event that the vehicle is in the unlocked state, does not detect an opening / closing signal within a preset locking duration after detecting the driver's door closing signal, and the Bluetooth is disconnected.
[0125] As an optional implementation manner of the embodiment of the present disclosure, the sample message data includes: unlocking sample data and locking sample data; the unlocking and locking behavior labels include: the unlocking behavior label corresponding to the unlocking sample data and the locking behavior label corresponding to the locking sample data; the annotation module 503 is specifically configured to: for each unlocking sample in the unlocking sample data, perform unlocking behavior annotation on each moment within the to-be-unlocked time period to obtain the unlocking behavior label of each unlocking sample; the to-be-unlocked time period is the time period within the first preset duration before the opening signal is detected; for each locking sample in the locking sample data, perform locking behavior annotation on each moment within the to-be-locked time period to obtain the locking behavior label of each locking sample; the to-be-locked time period is the time period within the second preset duration before the Bluetooth is disconnected when the driver's door closing signal is detected.
[0126] As an optional implementation manner of the embodiment of the present disclosure, the initial unlocking and locking model includes an initial unlocking sub-model and an initial locking sub-model; the processing module 504 is specifically configured to: input the unlocking sample data into the initial unlocking sub-model to obtain the predicted unlocking confidence level output by the initial unlocking sub-model; input the locking sample data into the initial locking sub-model to obtain the predicted locking confidence level output by the initial locking sub-model.
[0127] As an optional implementation manner of the embodiment of the present disclosure, the loss value includes a first loss value and a second loss value; the calculation module 505 is specifically configured to: calculate the undetermined loss value between the predicted unlocking confidence level and the unlocking behavior label by using a preset loss function; determine the penalty coefficient corresponding to the predicted unlocking confidence level, where the penalty coefficient is positively correlated with the unlocking moment corresponding to the predicted unlocking confidence level; multiply the undetermined loss value by the penalty coefficient to obtain the first loss value corresponding to the predicted unlocking confidence level; calculate the second loss value between the predicted locking confidence level and the locking label by using a preset loss function.
[0128] An adjustment module 506 is specifically configured to: when a first loss value is greater than a loss threshold, adjust model parameters of an initial unlocking sub-model until the first loss value is less than or equal to the loss threshold, so as to obtain a converged target unlocking sub-model; when a second loss value is greater than the loss threshold, adjust model parameters of an initial locking sub-model until the second loss value is less than or equal to the loss threshold, so as to obtain a converged target locking model.
[0129] As an optional implementation manner of an embodiment of the present disclosure, a labeling module 503 is further configured to: perform difference processing on sample signal strengths to obtain difference signal strengths; a processing module 504 is specifically configured to: input sample message data and difference signal strengths into an initial unlocking and locking model, so as to obtain a prediction confidence level output by the initial unlocking and locking model.
[0130] As an optional implementation manner of an embodiment of the present disclosure, the sample message data includes different scenario marking information, and the scenario marking information is used to indicate a scenario in which the sample message data is generated; the labeling module 503 is specifically configured to: obtain an unlocking and locking period corresponding to different scenario marking information, where different scenario marking information corresponds to different preset time lengths; determine an unlocking and locking period corresponding to each sample message data from the unlocking and locking periods corresponding to different scenario marking information according to the scenario marking information corresponding to each sample message data; perform unlocking and locking behavior labeling on each moment in the unlocking and locking period corresponding to each sample message data to determine an unlocking and locking behavior label corresponding to each sample message data until all sample message data is traversed.
[0131] As Figure 6 shown, Figure 6 FIG. is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. The electronic device includes: a processor 601, a memory 602, and a computer program stored on the memory 602 and executable on the processor 601. When the computer program is executed by the processor 601, each process of the training method of the unlocking and locking model in the above method embodiment is implemented. And the same technical effects can be achieved. To avoid repetition, details are not described here again.
[0132] An embodiment of the present disclosure provides a computer-readable storage medium. A computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the training method of the unlocking and locking model in the above method embodiment is implemented. And the same technical effects can be achieved. To avoid repetition, details are not described here again.
[0133] Wherein, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc.
[0134] An embodiment of the present disclosure provides a vehicle, which includes a Bluetooth module, and the unlocking and locking model training device in the above embodiment, or the electronic device in the above embodiment, which can implement each process of the unlocking and locking model training method in the above method embodiment and achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0135] An embodiment of the present disclosure provides a computer program product. The computer program product stores a computer program, and when the computer program is executed by a processor, it implements each process of the unlocking and locking model training method in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.
[0136] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, a system, or a computer program product. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0137] In several embodiments provided by the present disclosure, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0138] In the present disclosure, the processor may be a Central Processing Unit (CPU), or may also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0139] In the present disclosure, the memory may include non-permanent memory in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0140] In the present disclosure, the computer-readable medium includes permanent and non-permanent, removable and non-removable storage media. The storage media may implement information storage by any method or technology, and the information may be computer-readable instructions, data structures, program modules, or other data. Examples of the computer's storage media include, but are not limited to, Phase Change Memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. As defined herein, the computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0141] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0142] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
Claims
1. A training method for an unlocking and locking model, characterized in that Including: Obtain the original message data; Select sample message data from the original message data; The sample message data includes: sample signal strengths corresponding to unlocking events and locking events that meet preset conditions; Perform unlocking and locking behavior annotation for each moment in the unlocking and locking period corresponding to the sample message data, and determine the unlocking and locking behavior label corresponding to the sample message data; the unlocking and locking period is a time period of a preset duration before the unlocking and locking moment corresponding to the sample message data; Input the sample message data into the initial unlocking and locking model to obtain the predicted confidence level output by the initial unlocking and locking model, and the predicted confidence level is used to indicate the unlocking probability corresponding to the sample signal strength; Based on a preset loss function, calculate the loss value between the predicted confidence level and the unlocking and locking behavior label corresponding to the sample message data; In the case where the loss value is greater than the loss threshold, adjust the model parameters of the initial unlocking and locking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model.
2. The method according to claim 1, wherein The selecting sample message data from the original message data includes: Select the original message data that meets the preset conditions from the original message data as intermediate message data, and the preset conditions include: Bluetooth is in a connected state, the gear position is in the parking gear, and the vehicle speed is a preset vehicle speed; Select the intermediate message data corresponding to the unlocking event and the intermediate message data corresponding to the locking event from the intermediate message data as sample message data; Among them, the unlocking event is an event that the vehicle receives an external unlocking signal in the locked state and detects a door opening signal within a preset unlocking duration; the locking event is an event that the vehicle does not detect an opening / closing signal within a preset locking duration after detecting a driver's door closing signal in the unlocked state and the Bluetooth is disconnected.
3. The method according to claim 2, wherein The sample message data includes: unlocking sample data and locking sample data; the unlocking and locking behavior label includes: the unlocking behavior label corresponding to the unlocking sample data and the locking behavior label corresponding to the locking sample data; The performing unlocking and locking behavior annotation for each moment in the unlocking and locking period corresponding to the sample message data and determining the unlocking and locking label corresponding to the sample message data includes: For each unlocking sample in the unlocking sample data, perform unlocking behavior annotation for each moment in the period to be unlocked to obtain the unlocking behavior label of each unlocking sample; the period to be unlocked is a time period within the first preset duration before detecting the door opening signal; For each locking sample in the locking sample data, perform locking behavior annotation for each moment in the period to be locked to obtain the locking behavior label of each locking sample; the period to be locked is a time period within the second preset duration before the Bluetooth is disconnected in the case of detecting a driver's door closing signal.
4. The method according to claim 3, wherein The initial unlocking and locking model includes an initial unlocking sub-model and an initial locking sub-model; The inputting the sample message data into the initial unlocking and locking model to obtain the predicted confidence level output by the initial unlocking and locking model includes: Input the unlocking sample data into the initial unlocking sub-model to obtain the predicted unlocking confidence level output by the initial unlocking sub-model; Input the locking sample data into the initial locking sub-model to obtain the predicted locking confidence level output by the initial locking sub-model.
5. The method according to claim 4, characterized in that, The loss value includes a first loss value and a second loss value; Calculating the loss value between the predicted confidence level and the unlocking / locking behavior label based on a preset loss function includes: Calculating the pending loss value between the predicted unlocking confidence level and the unlocking behavior label using the preset loss function; Determine the penalty coefficient corresponding to the predicted unlocking confidence level, where the penalty coefficient is positively correlated with the unlocking moment corresponding to the predicted unlocking confidence level; Multiply the pending loss value by the penalty coefficient to obtain the first loss value corresponding to the predicted unlocking confidence level; Calculate the second loss value between the predicted locking confidence level and the locking label using the preset loss function; In the case where the loss value is greater than the loss threshold, adjusting the model parameters of the initial unlocking / locking model until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking / locking model includes: In the case where the first loss value is greater than the loss threshold, adjusting the model parameters of the initial unlocking sub-model until the first loss value is less than or equal to the loss threshold to obtain a converged target unlocking sub-model; In the case where the second loss value is greater than the loss threshold, adjusting the model parameters of the initial locking sub-model until the second loss value is less than or equal to the loss threshold to obtain a converged target locking sub-model.
6. The method according to claim 1, wherein Before inputting the sample message data into the initial unlocking / locking model to obtain the predicted confidence level output by the initial unlocking / locking model after annotating the sample message data, it further includes: Performing differential processing on the sample signal strength to obtain the differential signal strength; Inputting the sample message data into the initial unlocking / locking model to obtain the predicted confidence level output by the initial unlocking / locking model includes: Inputting the sample message data and the differential signal strength into the initial unlocking / locking model to obtain the predicted confidence level output by the initial unlocking / locking model.
7. The method according to claim 1, wherein The sample message data includes different scenario marking information, and the scenario marking information is used to indicate the scenario where the sample message data is generated; Annotating the unlocking / locking behavior for each moment of the unlocking / locking period corresponding to the sample message data to determine the unlocking / locking behavior label corresponding to the sample message data includes: Obtain the unlocking / locking periods corresponding to different scenario marking information, where different scenario marking information corresponds to different preset time durations; Determine the unlocking / locking period corresponding to each sample message data from the unlocking / locking periods corresponding to different scenario marking information according to the scenario marking information corresponding to each sample message data; Annotate the unlocking / locking behavior for each moment in the unlocking / locking period corresponding to each sample message data to determine the unlocking / locking behavior label corresponding to each sample message data until all sample message data is traversed.
8. A training device for an unlocking model, characterized in that, Includes: An acquisition module for acquiring original message data; A selection module for selecting sample message data from the original message data; The sample message data includes: sample signal strengths corresponding to unlocking events and locking events that meet preset conditions; A labeling module for labeling the sample message data to determine the unlocking and locking behavior labels corresponding to the sample message data; A processing module for inputting the sample message data into an initial unlocking and locking model to obtain a predicted confidence level output by the initial unlocking and locking model, where the predicted confidence level is used to indicate the unlocking and locking probability corresponding to the sample signal strength; A calculation module for calculating a loss value between the predicted confidence level and the unlocking and locking behavior label based on a preset loss function; An adjustment module for adjusting the model parameters of the initial unlocking and locking model when the loss value is greater than a loss threshold until the loss value is less than or equal to the loss threshold to obtain a converged target unlocking and locking model.
9. An electronic device, characterized in that, Comprising: A processor, a memory, and a computer program stored on the memory and executable on the processor, where when the computer program is executed by the processor, it implements the training method of the unlocking and locking model according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Comprising: A computer program stored on the computer-readable storage medium, where when the computer program is executed by a processor, it implements the training method of the unlocking and locking model according to any one of claims 1 to 7.
11. A vehicle, characterized in that, Comprising: The training device of the unlocking and locking model according to claim 8, or the electronic device according to claim 9.