Scene classification model training method and device, computer equipment and storage medium

By extracting frames and sliding windows on historical video data, training the target scene classification model, solving the problem that the existing technology cannot identify the video wind direction scene in real time, and improving the user's viewing experience.

CN119399532APending Publication Date: 2025-02-07CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411492842.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The prior art cannot recognize the video wind direction scene in real time and provide the corresponding cockpit environment according to the scene, resulting in users not being able to obtain an immersive viewing experience when watching movies and TV shows in the car.

Method used

By extracting frames and sliding window operations on historical video data, multiple frame groups are extracted, and model training is performed based on these frame groups to obtain the target scene classification model. The model can identify the video wind direction and control the air supply direction of the air conditioner, providing an immersive movie viewing experience.

Benefits of technology

It realizes that when users watch videos, they accurately identify the video wind direction and control the air supply of air conditioners according to the scene, thereby improving the user's viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399532A_ABST
    Figure CN119399532A_ABST
Patent Text Reader

Abstract

The invention discloses a scene classification model training method and device, computer equipment and a storage medium, and relates to the technical field of intelligent cabin interaction, and the method comprises the steps: carrying out the frame extraction processing of historical video data, obtaining a continuous frame image, and carrying out the sliding window operation of the continuous frame image, and obtaining a plurality of frame groups; preprocessing each frame group to obtain each sample frame group; obtaining a wind direction scene label corresponding to each sample frame group; and performing model training based on each sample frame group and the wind direction scene label corresponding to each sample frame group to obtain a target scene classification model. Through the method, the target scene classification model is obtained through training, so that the video wind direction scene can be accurately recognized through the target scene classification model when the user watches the video, air supply of the air conditioner is controlled according to the video wind direction scene, and more immersive film watching experience is provided for the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent cockpit interaction technology, and in particular to a scene classification model training method, device, computer equipment and storage medium. Background Art

[0002] With the development of vehicle technology, in-car movie watching has become increasingly popular, and users can watch movies and TV shows in the car. At present, the main way for users to watch movies and TV shows is to project the screen. When users watch movies and TV shows, they usually control the air conditioner to blow air at a fixed angle, but cannot recognize the wind direction scene of the video in real time, and provide a corresponding cabin environment according to the wind direction scene of the video, which cannot provide users with a more immersive viewing experience. Summary of the invention

[0003] Based on this, a scene classification model training method, device, computer equipment and storage medium are provided to solve the problem that the prior art usually controls the air conditioner to supply air at a fixed angle, but cannot recognize the video wind direction scene in real time and provide a corresponding cabin environment according to the video wind direction scene, thereby failing to provide users with a more immersive viewing experience.

[0004] In a first aspect, the present application provides a scene classification model training method, the method comprising:

[0005] Performing frame extraction processing on historical video data to obtain continuous frame images, and performing sliding window operation on the continuous frame images to obtain multiple frame groups;

[0006] Preprocessing each of the frame groups respectively to obtain each sample frame group;

[0007] Obtaining a wind direction scene label corresponding to each of the sample frame groups; wherein the wind direction scene label is associated with an air supply instruction of an air conditioner;

[0008] Model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model.

[0009] Through the above method, frame extraction and sliding window operations are performed on historical video data to obtain multiple frame groups, and model training is performed based on the multiple frame groups to obtain a target scene classification model. Therefore, the target scene classification model can be used to accurately identify the video wind direction scene when the user watches the video, and the air supply of the air conditioner can be controlled according to the video wind direction scene, providing the user with a more immersive viewing experience.

[0010] In one embodiment, the model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model, including:

[0011] Performing convolution processing on each of the sample frame groups respectively to obtain a multi-scale local feature map corresponding to each of the sample frame groups, and performing feature extraction on each of the sample frame groups based on a self-attention mechanism to obtain a global feature map corresponding to each of the sample frame groups;

[0012] Fusing the multi-scale local feature map corresponding to each of the sample frame groups with the global feature map corresponding to each of the sample frame groups to obtain a first feature map corresponding to each of the sample frame groups;

[0013] Perform upsampling processing on each of the first feature maps respectively to obtain each second feature map, and input each of the second feature maps into a bidirectional recurrent neural network to output each target feature map;

[0014] Each of the target feature maps is input into a fully connected layer, and a historical classification feature vector corresponding to each of the sample frame groups is output.

[0015] Through the above method, the local features and global features of the images in the sample frame group learned by CNN and Transformer are integrated to improve the effectiveness and accuracy of the feature information. The introduction of a bidirectional recurrent neural network can enhance the semantic relevance of the feature information in the time dimension, thereby effectively improving the accuracy and generalization ability of the target scene classification model.

[0016] In one embodiment, the model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model, including:

[0017] Based on the historical classification feature vectors corresponding to each of the sample frame groups, the wind direction scene labels corresponding to each of the sample frame groups, and the cross entropy loss function with label smoothing, a first loss corresponding to each of the sample frame groups is determined; wherein the first loss includes losses corresponding to different wind direction scenes;

[0018] Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss;

[0019] Model training is performed based on the target loss to obtain the target scene classification model.

[0020] Through the above method, the first loss corresponding to each sample frame group is determined based on the cross-entropy loss function with label smoothing, which can alleviate model overfitting, and the loss is adjusted according to the preset adjustment method, which can improve the discrimination ability and accuracy of the model.

[0021] In one embodiment, adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss includes:

[0022] Based on the first loss corresponding to each of the sample frame groups, generating a loss vector corresponding to each of the sample frame groups;

[0023] According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each of the sample frame groups; wherein K is an integer greater than 0;

[0024] According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes;

[0025] Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated;

[0026] Loss balancing is performed on the second losses corresponding to the different wind direction scenes to obtain the target loss.

[0027] Through the above method, K loss components corresponding to different wind direction scenes are selected as the difficult samples corresponding to different wind direction scenes, so as to adaptively adjust the weights of these difficult samples, which can improve the model's ability to distinguish difficult samples, and introduce a loss balance strategy to improve the problem of unbalanced loss calculation for each wind direction scene.

[0028] In one embodiment, performing loss balancing processing on the second losses corresponding to different wind direction scenarios to obtain the target loss includes:

[0029] According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes;

[0030] The target loss is obtained by calculating the average value of the third losses corresponding to the different wind direction scenes.

[0031] Through the above method, based on the preset balancing weights corresponding to different wind direction scenarios, the second losses corresponding to different wind direction scenarios are balanced, thereby reducing the impact of loss calculation caused by sample imbalance, which can help the model better learn the true distribution of data and improve the generalization ability of the model.

[0032] In a second aspect, the present application provides a cabin air conditioning control method, which adopts the target scene classification model in the first aspect, and the method includes:

[0033] Performing frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and performing a sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0034] Preprocessing each of the to-be-identified frame groups respectively to obtain each target frame group;

[0035] Inputting each of the target frame groups into the target scene classification model to obtain a target classification feature vector corresponding to each of the target frame groups;

[0036] A target instruction corresponding to each of the target classification feature vectors is determined, and the cabin air conditioning is controlled based on the target instruction corresponding to each of the target classification feature vectors.

[0037] Through the above method, the wind direction scene of the video data to be identified is accurately identified based on the target scene classification model, and the corresponding target instruction is determined according to the identification result, so as to control the cabin air conditioning according to the target instruction, providing users with a more immersive viewing experience.

[0038] In one embodiment, determining the target instruction corresponding to each of the target classification feature vectors includes:

[0039] When the target classification feature vector corresponds to a left wind direction scene, determining that the target instruction is a left air supply instruction;

[0040] When the target classification feature vector corresponds to a right wind direction scene, determining that the target instruction is a right air supply instruction;

[0041] When the target classification feature vector corresponds to a left-right wind direction scene, the target instruction is determined to be a left-right alternating air supply instruction.

[0042] Through the above method, the air supply direction of the cabin air conditioner is controlled based on the target command, providing users with a more immersive viewing experience.

[0043] In a third aspect, the present application provides a scene classification model training device, the device comprising:

[0044] A first sliding window module is used to perform frame extraction processing on historical video data to obtain continuous frame images, and perform sliding window operation on the continuous frame images to obtain multiple frame groups;

[0045] A first preprocessing module, used for preprocessing each of the frame groups respectively to obtain each sample frame group;

[0046] An acquisition module, used to acquire the wind direction scene label corresponding to each of the sample frame groups; wherein the wind direction scene label is associated with the air supply instruction of the air conditioner;

[0047] The training module is used to perform model training based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model.

[0048] In one embodiment, the training module is specifically used for:

[0049] Performing convolution processing on each of the sample frame groups respectively to obtain a multi-scale local feature map corresponding to each of the sample frame groups, and performing feature extraction on each of the sample frame groups based on a self-attention mechanism to obtain a global feature map corresponding to each of the sample frame groups;

[0050] Fusing the multi-scale local feature map corresponding to each of the sample frame groups with the global feature map corresponding to each of the sample frame groups to obtain a first feature map corresponding to each of the sample frame groups;

[0051] Perform upsampling processing on each of the first feature maps respectively to obtain each second feature map, and input each of the second feature maps into a bidirectional recurrent neural network to output each target feature map;

[0052] Each of the target feature maps is input into a fully connected layer, and a historical classification feature vector corresponding to each of the sample frame groups is output.

[0053] In one embodiment, the training module is further used to:

[0054] Based on the historical classification feature vectors corresponding to each of the sample frame groups, the wind direction scene labels corresponding to each of the sample frame groups, and the cross entropy loss function with label smoothing, a first loss corresponding to each of the sample frame groups is determined; wherein the first loss includes losses corresponding to different wind direction scenes;

[0055] Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss;

[0056] Model training is performed based on the target loss to obtain the target scene classification model.

[0057] In one embodiment, the training module is further used to:

[0058] Based on the first loss corresponding to each of the sample frame groups, generating a loss vector corresponding to each of the sample frame groups;

[0059] According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each of the sample frame groups; wherein K is an integer greater than 0;

[0060] According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes;

[0061] Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated;

[0062] Loss balancing is performed on the second losses corresponding to the different wind direction scenes to obtain the target loss.

[0063] In one embodiment, the training module is further used to:

[0064] According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes;

[0065] The target loss is obtained by calculating the average value of the third losses corresponding to the different wind direction scenes.

[0066] In a fourth aspect, the present application provides a cabin air conditioning control device, the device comprising:

[0067] The second sliding window module is used to perform frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and perform sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0068] A second preprocessing module is used to preprocess each of the to-be-identified frame groups to obtain each target frame group;

[0069] A classification module, used for inputting each of the target frame groups into the target scene classification model to obtain a target classification feature vector corresponding to each of the target frame groups;

[0070] The control module is used to determine the target instruction corresponding to each of the target classification feature vectors, and control the cabin air conditioning based on the target instruction corresponding to each of the target classification feature vectors.

[0071] In one embodiment, the control module is specifically used for:

[0072] When the target classification feature vector corresponds to a left wind direction scene, determining that the target instruction is a left air supply instruction;

[0073] When the target classification feature vector corresponds to a right wind direction scene, determining that the target instruction is a right air supply instruction;

[0074] When the target classification feature vector corresponds to a left-right wind direction scene, the target instruction is determined to be a left-right alternating air supply instruction.

[0075] In a fifth aspect, the present application provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the scene classification model training method of the first aspect and the cabin air conditioning control method of the second aspect when executing the computer program.

[0076] In a sixth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the scene classification model training method of the first aspect and the cabin air conditioning control method of the second aspect are implemented.

[0077] The above-mentioned scene classification model training method, device, computer equipment and storage medium perform frame extraction and sliding window operations on historical video data to obtain multiple frame groups, and perform model training based on multiple frame groups to obtain a target scene classification model. Therefore, the target scene classification model can be used to accurately identify the video wind direction scene when the user watches the video, and the air supply of the air conditioner can be controlled according to the video wind direction scene, providing the user with a more immersive viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0078] Figure 1 A schematic diagram of a flow chart of a scene classification model training method in one embodiment;

[0079] Figure 2 A schematic diagram of a flow chart of a model training method in one embodiment;

[0080] Figure 3 A structural block diagram of a model in an embodiment;

[0081] Figure 4 A schematic diagram of a flow chart of a loss adjustment method in one embodiment;

[0082] Figure 5 is a flowchart of a cabin air conditioning control method in another embodiment;

[0083] Figure 6 is a structural block diagram of a scene classification model training device in one embodiment;

[0084] Figure 7 is a structural block diagram of a cabin air conditioning control device in another embodiment;

[0085] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0086] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The specific operating methods in the method embodiments can also be applied to device embodiments or system embodiments. It should be noted that in the description of the present application, "multiple" is understood as "at least two". "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, and A and B exist, and B exists alone. A is connected to B, which can represent: A is directly connected to B and A is connected to B through C. In addition, in the description of the present application, words such as "first" and "second" are only used to distinguish the purpose of description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.

[0087] The method and device described in the embodiment of the present application are based on the same technical concept. Since the principles of the method and device to solve the problem are similar, the embodiments of the device and method can refer to each other, and the repeated parts will not be repeated.

[0088] Embodiment 1

[0089] Figure 1 FIG. 1 is a flow chart of a scene classification model training method in an embodiment. The flow chart can be executed by a scene classification model training device. The device can be implemented by software, hardware, or a combination of software and hardware. Figure 1 As shown, the process includes the following steps:

[0090] S101, performing frame extraction processing on historical video data to obtain continuous frame images, and performing sliding window operation on the continuous frame images to obtain multiple frame groups;

[0091] In one embodiment, the specific operation steps of the sliding window operation may include:

[0092] Initialize the window: First determine the window size and step size. The window size determines the amount of data processed each time, while the step size determines the speed at which the window moves. For example, a window size of 5 frames means that 5 frames are processed as a group each time, and a step size of 2 frames means that in every 5-frame window, grouping is performed every 2 frames. Therefore, 3 frames out of every 5 frames will be used as the beginning of the next group to form a new frame group. The specific values ​​of the window size and step size depend on the situation and are not limited here;

[0093] Sliding window: Slide this window on the time series to cover all continuous frame images. Each sliding step extracts the frame image in the window. For example, if there are 10 continuous frame images, the window size is 5 frames, and the step size is 2 frames, then 3 frame groups will be obtained in the end.

[0094] S102, preprocessing each frame group respectively to obtain each sample frame group;

[0095] Specifically, the images in each frame group are scaled and adjusted proportionally, and random noise, mosaic data enhancement, color jitter ColorJitter operation and normalization are added to obtain each sample frame group. Among them, proportional scaling can avoid image distortion or distortion, which is particularly important for tasks such as object detection and image classification, because distorted images may cause the model to misunderstand the image content and affect the training effect. Adding random noise can improve the robustness of the algorithm. Mosaic data enhancement can increase the diversity of pictures, enrich background information, and avoid overfitting. The ColorJitter operation can randomly change the brightness, contrast, saturation and hue of the image, increase the diversity of the data set, and thus improve the robustness and generalization ability of the deep learning model. The normalization operation can improve the stability and convergence speed of model training, and prevent some eigenvalues ​​from being too large or too small to dominate or ignore the learning process of the model.

[0096] S103, obtaining the wind direction scene label corresponding to each sample frame group;

[0097] The wind direction scene label is associated with the air supply instruction of the air conditioner. The wind direction scene label can be obtained based on expert experience. The specific acquisition method depends on the situation and is not limited here.

[0098] Exemplarily, the wind direction scene tag includes a left wind direction scene tag, a right wind direction scene tag, and a left-right alternating wind direction scene tag. The left wind direction scene tag is associated with a left air supply instruction, which instructs the cabin air conditioning device to blow left wind; the right wind direction scene tag is associated with a right air supply instruction, which instructs the cabin air conditioning device to blow right wind; the left wind direction scene tag is associated with a left-right alternating air supply instruction, which instructs the cabin air conditioning device to blow left-right alternating air according to a preset cycle, wherein the preset cycle depends on the situation and is not limited here.

[0099] It should be noted that in this embodiment, images in which hair, clothes or other items have a static tendency to be blown to the right in continuous frame images are regarded as left wind direction scenes, and images in which hair, clothes or other items have a static tendency to be blown to the left are regarded as right wind direction scenes. Other blowing scenes except these two can be defined as left-right alternating wind direction scenes.

[0100] S104, performing model training based on each sample frame group and the wind direction scene label corresponding to each sample frame group to obtain a target scene classification model.

[0101] In the embodiment of the present application, the model training method is described in detail with reference to the accompanying drawings:

[0102] Figure 2 FIG. 1 is a flow chart of a model training method in an embodiment. Figure 2 As shown, the process specifically includes the following steps:

[0103] S201, performing convolution processing on each sample frame group respectively to obtain a multi-scale local feature map corresponding to each sample frame group, and performing feature extraction on each sample frame group based on a self-attention mechanism to obtain a global feature map corresponding to each sample frame group;

[0104] S202, fusing the multi-scale local feature map corresponding to each sample frame group with the global feature map corresponding to each sample frame group to obtain a first feature map corresponding to each sample frame group;

[0105] S203, performing upsampling processing on each first feature map respectively to obtain each second feature map, and inputting each second feature map into a bidirectional recurrent neural network to output each target feature map;

[0106] S204, input each target feature map into the fully connected layer, and output the historical classification feature vector corresponding to each sample frame group.

[0107] For example, Figure 3 As shown, it is a structural block diagram of a model in an embodiment, including a CNN encoder 301 with Hierarchy-Aware Pixel-Excitation (HAPE), an efficient Transformer encoder 302, a fusion module 303, a decoder 304, a bidirectional recurrent neural network 305 and a fully connected layer 306. Among them, taking a sample frame group M consisting of K sample frame images: K*480*288*3 as an example, where K is an integer greater than 0, the model training process is specifically as follows:

[0108] First, M is input into the CNN encoder 301 with HAPE, and M is convolved through the CNN stem to generate a first local feature map (K*240*144*C1); the first local feature map is convolved through the downsampling DOWN module with HAPE to generate a second local feature map (K*120*72*C2); the second local feature map is convolved through the DOWN HAPE module to generate a third local feature map (K*60*36*C3); the third local feature map is convolved through the upsampling Upsample module with HAPE to generate a multi-scale local feature map F (K*120*72*C4), where C1, C2, C3, and C4 represent different numbers of channels.

[0109] At the same time, M is input into the Transformer encoder 302, and after feature extraction processing by Transformer stem and patch embedding PatchEmbedding, it enters the efficient Transformer to generate a global feature map T∈R^(N×D) corresponding to M, where N represents the number of tags, D represents the dimension of each tag, and P represents the tag size:

[0110]

[0111] D=C t ×P 2 (2)

[0112] In formula (1), H t =288 / 16,W t =480 / 16.

[0113] Further, based on the fusion module 303, F and T are subjected to correlation weighted fusion processing, and two different types of context features F and T are combined to obtain the first feature map corresponding to M. And based on the upsampling Upsample module with HAPE in the decoder 304, the first feature map is upsampled to obtain a second feature map (K*240*144*C5), where C5 represents the number of channels. The second feature map is input into the bidirectional recurrent neural network 305, which consists of two recurrent neural networks, one of which processes the input sequence in chronological order and the other processes the input sequence in reverse chronological order, and then their outputs are spliced ​​or merged to output the target feature map.

[0114] Finally, the target feature map is input into the fully connected layer 306, and the historical classification feature vector corresponding to M is output, wherein the historical classification feature vector corresponds to the recognition result of the model for M, including the recognized wind direction scenes, such as left wind direction scenes, right wind direction scenes, and left and right wind direction scenes.

[0115] Furthermore, in order to improve the accuracy of the model, the first loss corresponding to each sample frame group can be determined based on the historical classification feature vector corresponding to each sample frame group, the wind direction scene label corresponding to each sample frame group, and the cross entropy loss function with label smoothing; wherein the cross entropy loss function with label smoothing can make the model less overly dependent on the true value and alleviate the overfitting of the model, and the first loss includes the loss corresponding to different wind direction scenes. The first loss corresponding to each sample frame group is adjusted according to the preset adjustment method to obtain the target loss, thereby training the model based on the target loss to obtain the target scene classification model.

[0116] The method of adjusting the first loss corresponding to each sample frame group according to the preset adjustment method to obtain the target loss is as follows: Figure 4 As shown, it is a flow chart of the loss adjustment method in an embodiment, which provides an online mining method for difficult samples: during the training process, an online mining method for difficult-to-distinguish wind direction scenes is established, and difficult-to-distinguish wind direction scenes are regarded as difficult samples. Thus, by presetting the adjustment matrix, the loss contribution weights of these difficult samples are adjusted, and the model's ability to distinguish difficult samples is indirectly improved, wherein the preset adjustment matrix dynamically adjusts the weight of each loss component according to the current model learning state and error situation to ensure that the model can learn and optimize better. For samples that are easy to distinguish, a regular penalty term is added to alleviate overfitting during the loss calculation process. Specifically comprising the following steps:

[0117] S401, generating a loss vector corresponding to each sample frame group based on a first loss corresponding to each sample frame group;

[0118] The dimension of the loss vector is the number of wind direction scenarios. For example, if there are three wind direction scenarios, namely, left wind direction scenario, right wind direction scenario, and left and right wind direction scenario, the dimension of the loss vector is 3.

[0119] S402, selecting K loss components corresponding to different wind direction scenes from the loss vectors corresponding to each sample frame group according to a preset selection method;

[0120] Wherein, K is an integer greater than 0, and the specific value depends on the situation and is not limited here.

[0121] Specifically, in the loss vector corresponding to each sample frame group, the loss components belonging to the same wind direction scene are sorted in descending order, and the K loss components with the largest values ​​are selected according to the sorting to obtain K loss components corresponding to different wind direction scenes.

[0122] S403, performing adaptive weight adjustment on K loss components corresponding to different wind direction scenes according to a preset adjustment matrix to obtain K target loss components corresponding to different wind direction scenes;

[0123] Specifically, according to the preset adjustment matrix, the loss contribution weights corresponding to the K loss components are generated, and the loss contribution weights corresponding to the K loss components are normalized through the softmax layer to obtain the target loss contribution weights corresponding to the K loss components, thereby realizing the normalization of the loss contribution weights. Furthermore, based on the target loss contribution weights of the K loss components, the K loss components are weighted to obtain the K target loss components.

[0124] S404, generating second losses corresponding to different wind direction scenarios based on K target loss components corresponding to different wind direction scenarios;

[0125] Specifically, the K loss components belonging to the same wind direction scene and the remaining loss components other than the K loss components in the loss vector corresponding to each sample frame group are averaged to obtain the average loss corresponding to different wind direction scenes. Then, based on the average loss and the regularization penalty term, the second loss corresponding to different wind direction scenes is generated. For example, the average loss is added to the regularization penalty term to obtain the second loss, thereby alleviating model overfitting by adding the regularization penalty term.

[0126] S405, performing loss balancing processing on the second losses corresponding to the different wind direction scenes to obtain a target loss.

[0127] This embodiment provides a loss balancing strategy: setting a corresponding preset balancing weight according to the recognition difficulty of each wind direction scene can help the model better learn the true distribution of the data, thereby improving the generalization ability of the model.

[0128] Specifically, according to the preset balance weights corresponding to different wind direction scenes, the second losses corresponding to different wind direction scenes are weighted to obtain the third losses corresponding to different wind direction scenes. Then, the average value of the third losses corresponding to different wind direction scenes is calculated to obtain the target loss.

[0129] It should be noted that the above preset balance weight is less than 1, and the sum of the preset balance weights corresponding to different wind direction scenes is equal to 1. The specific value depends on the situation and is not limited here.

[0130] In another embodiment, negative sample continuous frame images can also be collected, and the negative sample continuous frame images are subjected to sliding window operation (consistent with the aforementioned sliding window operation, and no repetitive description is made here) and preprocessing to obtain multiple negative sample frame groups. Among them, the negative sample continuous frame images refer to images other than the left wind direction scene, the right wind direction scene, and the left and right wind direction scenes. For the negative sample continuous frame images, this embodiment samples them according to a set probability (for example, 0.3) in the data loader dataloader. Thus, model training is performed based on each sample frame group, the wind direction scene label corresponding to each sample frame group, and each negative sample frame group to obtain a target scene classification model, which can help the model better identify the video wind direction scene, improve the generalization ability of the model, and reduce the false recognition rate. By training negative samples, the model can learn to distinguish between target wind direction scenes and non-target wind direction scenes, thereby improving the accuracy and robustness of the model.

[0131] In the above-mentioned scene classification model training method, multiple frame groups are obtained by performing frame extraction and sliding window operations on historical video data, and model training is performed based on multiple frame groups to obtain a target scene classification model. Therefore, the target scene classification model can be used to accurately identify the wind direction scene of the video when the user watches the video, and the air supply of the air conditioner can be controlled according to the wind direction scene of the video, providing users with a more immersive viewing experience.

[0132] Embodiment 2

[0133] Figure 5 FIG. 1 is a flow chart of a method for controlling cabin air conditioning in an embodiment. The method adopts the target scene classification model in the first embodiment. The process can be executed by a cabin air conditioning control device. Figure 5 As shown, the process includes the following steps:

[0134] S501, performing frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and performing a sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0135] The sliding window operation is consistent with the sliding window operation in the first embodiment, and will not be described repeatedly here.

[0136] S502, preprocessing each to-be-identified frame group to obtain each target frame group;

[0137] The preprocessing method is consistent with the preprocessing method in the first embodiment, and will not be described again here.

[0138] S503, inputting each target frame group into a target scene classification model to obtain a target classification feature vector corresponding to each target frame group;

[0139] The target classification feature vector corresponds to the recognition result of the target scene classification model on the target frame group, including the recognition of wind direction scenes, such as left wind direction scenes, right wind direction scenes and left and right wind direction scenes.

[0140] S504, determining a target instruction corresponding to each target classification feature vector, and controlling the cabin air conditioning based on the target instruction corresponding to each target classification feature vector.

[0141] Specifically, when the target classification feature vector corresponds to a left wind direction scenario, the target instruction is determined to be a left air supply instruction, which instructs the cabin air-conditioning equipment to blow left wind; when the target classification feature vector corresponds to a right wind direction scenario, the target instruction is determined to be a right air supply instruction, which instructs the cabin air-conditioning equipment to blow right wind; when the target classification feature vector corresponds to a left and right wind direction scenario, the target instruction is determined to be a left and right alternating air supply instruction, which instructs the cabin air-conditioning equipment to blow left and right alternately according to a preset cycle, wherein the specific value of the preset cycle depends on the situation and is not limited here.

[0142] It should be understood that although Figure 1-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0143] In one embodiment, Figure 6 As shown, a scene classification model training device is provided, including: a first sliding window module 601, a first preprocessing module 602, an acquisition module 603 and a training module 604, wherein:

[0144] The first sliding window module 601 is used to perform frame extraction processing on the historical video data to obtain continuous frame images, and perform sliding window operation on the continuous frame images to obtain multiple frame groups;

[0145] A first preprocessing module 602, used to preprocess each frame group respectively to obtain each sample frame group;

[0146] The acquisition module 603 is used to acquire the wind direction scene label corresponding to each sample frame group; wherein the wind direction scene label is associated with the air supply instruction of the air conditioner;

[0147] The training module 604 is used to perform model training based on each sample frame group and the wind direction scene label corresponding to each sample frame group to obtain a target scene classification model.

[0148] In one embodiment, the training module 604 is specifically used to:

[0149] Convolution processing is performed on each sample frame group to obtain a multi-scale local feature map corresponding to each sample frame group, and feature extraction is performed on each sample frame group based on the self-attention mechanism to obtain a global feature map corresponding to each sample frame group;

[0150] Fusing the multi-scale local feature map corresponding to each sample frame group with the global feature map corresponding to each sample frame group to obtain a first feature map corresponding to each sample frame group;

[0151] Upsampling each first feature map respectively to obtain each second feature map, and inputting each second feature map into a bidirectional recurrent neural network to output each target feature map;

[0152] Each target feature map is input into the fully connected layer, and the historical classification feature vector corresponding to each sample frame group is output.

[0153] In one embodiment, the training module 604 is further configured to:

[0154] Based on the historical classification feature vector corresponding to each sample frame group, the wind direction scene label corresponding to each sample frame group, and the cross entropy loss function with label smoothing, the first loss corresponding to each sample frame group is determined; wherein the first loss includes the losses corresponding to different wind direction scenes;

[0155] Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss;

[0156] The model is trained based on the target loss to obtain the target scene classification model.

[0157] In one embodiment, the training module 604 is further configured to:

[0158] Based on the first loss corresponding to each sample frame group, a loss vector corresponding to each sample frame group is generated;

[0159] According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each sample frame group; wherein K is an integer greater than 0;

[0160] According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes;

[0161] Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated;

[0162] The second losses corresponding to different wind direction scenarios are subjected to loss balancing to obtain the target loss.

[0163] In one embodiment, the training module 604 is further configured to:

[0164] According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes;

[0165] The average value of the third losses corresponding to different wind direction scenarios is calculated to obtain the target loss.

[0166] For the specific limitations of the scene classification model training device, please refer to the limitations of the scene classification model training method above, which will not be repeated here. Each module in the above-mentioned scene classification model training device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0167] In one embodiment, Figure 7 As shown, a cabin air conditioning control device is provided, comprising: a first sliding window module 601, a first preprocessing module 602, an acquisition module 603, a training module 604, a second sliding window module 701, a second preprocessing module 702, a classification module 703 and a control module 704, wherein:

[0168] The second sliding window module 701 is used to perform frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and perform sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0169] The second preprocessing module 702 is used to preprocess each to-be-identified frame group to obtain each target frame group;

[0170] Classification module 703, used for inputting each target frame group into a target scene classification model to obtain a target classification feature vector corresponding to each target frame group;

[0171] The control module 704 is used to determine the target instruction corresponding to each target classification feature vector, and control the cabin air conditioning based on the target instruction corresponding to each target classification feature vector.

[0172] In one embodiment, the control module 704 is specifically configured to:

[0173] When the target classification feature vector corresponds to a left wind direction scene, the target instruction is determined to be a left air supply instruction;

[0174] When the target classification feature vector corresponds to a right wind direction scene, the target instruction is determined to be a right air supply instruction;

[0175] When the target classification feature vector corresponds to a left or right wind direction scene, the target instruction is determined to be a left or right alternating air supply instruction.

[0176] For the specific definition of the cabin air conditioning control device, please refer to the definition of the cabin air conditioning control method above, which will not be repeated here. Each module in the above-mentioned cabin air conditioning control device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0177] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store scene classification model training data and cabin air conditioning control data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a scene classification model training method and a cabin air conditioning control method are implemented.

[0178] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0179] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0180] Perform frame extraction processing on historical video data to obtain continuous frame images, and perform sliding window operation on the continuous frame images to obtain multiple frame groups;

[0181] Preprocess each frame group respectively to obtain each sample frame group;

[0182] Obtain the wind direction scene label corresponding to each sample frame group; wherein the wind direction scene label is associated with the air supply instruction of the air conditioner;

[0183] Model training is performed based on each sample frame group and the wind direction scene label corresponding to each sample frame group to obtain a target scene classification model.

[0184] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0185] Convolution processing is performed on each sample frame group to obtain a multi-scale local feature map corresponding to each sample frame group, and feature extraction is performed on each sample frame group based on the self-attention mechanism to obtain a global feature map corresponding to each sample frame group;

[0186] Fusing the multi-scale local feature map corresponding to each sample frame group with the global feature map corresponding to each sample frame group to obtain a first feature map corresponding to each sample frame group;

[0187] Upsampling each first feature map respectively to obtain each second feature map, and inputting each second feature map into a bidirectional recurrent neural network to output each target feature map;

[0188] Each target feature map is input into the fully connected layer, and the historical classification feature vector corresponding to each sample frame group is output.

[0189] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0190] Based on the historical classification feature vector corresponding to each sample frame group, the wind direction scene label corresponding to each sample frame group, and the cross entropy loss function with label smoothing, the first loss corresponding to each sample frame group is determined; wherein the first loss includes the losses corresponding to different wind direction scenes;

[0191] Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss;

[0192] The model is trained based on the target loss to obtain the target scene classification model.

[0193] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0194] Based on the first loss corresponding to each sample frame group, a loss vector corresponding to each sample frame group is generated;

[0195] According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each sample frame group; wherein K is an integer greater than 0;

[0196] According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes;

[0197] Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated;

[0198] The second losses corresponding to different wind direction scenarios are subjected to loss balancing to obtain the target loss.

[0199] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0200] According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes;

[0201] The average value of the third losses corresponding to different wind direction scenarios is calculated to obtain the target loss.

[0202] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0203] Performing frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and performing sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0204] Preprocess each to-be-identified frame group respectively to obtain each target frame group;

[0205] Input each target frame group into the target scene classification model to obtain the target classification feature vector corresponding to each target frame group;

[0206] A target instruction corresponding to each target classification feature vector is determined, and the cabin air conditioning is controlled based on the target instruction corresponding to each target classification feature vector.

[0207] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0208] When the target classification feature vector corresponds to a left wind direction scene, the target instruction is determined to be a left air supply instruction;

[0209] When the target classification feature vector corresponds to a right wind direction scene, the target instruction is determined to be a right air supply instruction;

[0210] When the target classification feature vector corresponds to a left or right wind direction scene, the target instruction is determined to be a left or right alternating air supply instruction.

[0211] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0212] Perform frame extraction processing on historical video data to obtain continuous frame images, and perform sliding window operation on the continuous frame images to obtain multiple frame groups;

[0213] Preprocess each frame group respectively to obtain each sample frame group;

[0214] Obtain the wind direction scene label corresponding to each sample frame group; wherein the wind direction scene label is associated with the air supply instruction of the air conditioner;

[0215] Model training is performed based on each sample frame group and the wind direction scene label corresponding to each sample frame group to obtain a target scene classification model.

[0216] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0217] Convolution processing is performed on each sample frame group to obtain a multi-scale local feature map corresponding to each sample frame group, and feature extraction is performed on each sample frame group based on the self-attention mechanism to obtain a global feature map corresponding to each sample frame group;

[0218] Fusing the multi-scale local feature map corresponding to each sample frame group with the global feature map corresponding to each sample frame group to obtain a first feature map corresponding to each sample frame group;

[0219] Upsampling each first feature map respectively to obtain each second feature map, and inputting each second feature map into a bidirectional recurrent neural network to output each target feature map;

[0220] Each target feature map is input into the fully connected layer, and the historical classification feature vector corresponding to each sample frame group is output.

[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0222] Based on the historical classification feature vector corresponding to each sample frame group, the wind direction scene label corresponding to each sample frame group, and the cross entropy loss function with label smoothing, the first loss corresponding to each sample frame group is determined; wherein the first loss includes the losses corresponding to different wind direction scenes;

[0223] Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss;

[0224] The model is trained based on the target loss to obtain the target scene classification model.

[0225] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0226] Based on the first loss corresponding to each sample frame group, a loss vector corresponding to each sample frame group is generated;

[0227] According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each sample frame group; wherein K is an integer greater than 0;

[0228] According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes;

[0229] Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated;

[0230] The second losses corresponding to different wind direction scenarios are subjected to loss balancing to obtain the target loss.

[0231] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0232] According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes;

[0233] The average value of the third losses corresponding to different wind direction scenarios is calculated to obtain the target loss.

[0234] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0235] Performing frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and performing sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified;

[0236] Preprocess each to-be-identified frame group respectively to obtain each target frame group;

[0237] Input each target frame group into the target scene classification model to obtain the target classification feature vector corresponding to each target frame group;

[0238] A target instruction corresponding to each target classification feature vector is determined, and the cabin air conditioning is controlled based on the target instruction corresponding to each target classification feature vector.

[0239] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0240] When the target classification feature vector corresponds to a left wind direction scene, the target instruction is determined to be a left air supply instruction;

[0241] When the target classification feature vector corresponds to a right wind direction scene, the target instruction is determined to be a right air supply instruction;

[0242] When the target classification feature vector corresponds to a left or right wind direction scene, the target instruction is determined to be a left or right alternating air supply instruction.

[0243] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0244] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0245] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A scene classification model training method, characterized in that: The method comprises: Performing frame extraction processing on historical video data to obtain continuous frame images, and performing sliding window operation on the continuous frame images to obtain multiple frame groups; Preprocessing each of the frame groups respectively to obtain each sample frame group; Obtaining a wind direction scene label corresponding to each of the sample frame groups; wherein the wind direction scene label is associated with an air supply instruction of an air conditioner; Model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model.

2. The method according to claim 1, characterized in that The model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model, including: Performing convolution processing on each of the sample frame groups respectively to obtain a multi-scale local feature map corresponding to each of the sample frame groups, and performing feature extraction on each of the sample frame groups based on a self-attention mechanism to obtain a global feature map corresponding to each of the sample frame groups; Fusing the multi-scale local feature map corresponding to each of the sample frame groups with the global feature map corresponding to each of the sample frame groups to obtain a first feature map corresponding to each of the sample frame groups; Perform upsampling processing on each of the first feature maps respectively to obtain each second feature map, and input each of the second feature maps into a bidirectional recurrent neural network to output each target feature map; Each of the target feature maps is input into a fully connected layer, and a historical classification feature vector corresponding to each of the sample frame groups is output.

3. The method according to claim 2, characterized in that The model training is performed based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model, including: Based on the historical classification feature vectors corresponding to each of the sample frame groups, the wind direction scene labels corresponding to each of the sample frame groups, and the cross entropy loss function with label smoothing, a first loss corresponding to each of the sample frame groups is determined; wherein the first loss includes losses corresponding to different wind direction scenes; Adjusting the first loss corresponding to each sample frame group according to a preset adjustment method to obtain a target loss; Model training is performed based on the target loss to obtain the target scene classification model.

4. The method according to claim 3, characterized in that: The first loss corresponding to each sample frame group is adjusted according to a preset adjustment method to obtain a target loss, including: Based on the first loss corresponding to each of the sample frame groups, generating a loss vector corresponding to each of the sample frame groups; According to a preset selection method, K loss components corresponding to different wind direction scenes are selected from the loss vectors corresponding to each of the sample frame groups; wherein K is an integer greater than 0; According to the preset adjustment matrix, adaptive weight adjustment is performed on the K loss components corresponding to different wind direction scenes to obtain the K target loss components corresponding to different wind direction scenes; Based on the K target loss components corresponding to the different wind direction scenes, the second losses corresponding to the different wind direction scenes are generated; Loss balancing is performed on the second losses corresponding to the different wind direction scenes to obtain the target loss.

5. The method according to claim 4, characterized in that The performing loss balancing processing on the second losses corresponding to the different wind direction scenes to obtain the target loss includes: According to the preset balance weights corresponding to the different wind direction scenes, weighted processing is performed on the second losses corresponding to the different wind direction scenes to obtain the third losses corresponding to the different wind direction scenes; The target loss is obtained by calculating the average value of the third losses corresponding to the different wind direction scenes.

6. A cabin air conditioning control method, using the target scene classification model according to any one of claims 1 to 5, characterized in that: The method comprises: Performing frame extraction processing on the video data to be identified to obtain continuous frame images to be identified, and performing a sliding window operation on the continuous frame images to be identified to obtain multiple frame groups to be identified; Preprocessing each of the to-be-identified frame groups respectively to obtain each target frame group; Inputting each of the target frame groups into the target scene classification model to obtain a target classification feature vector corresponding to each of the target frame groups; A target instruction corresponding to each of the target classification feature vectors is determined, and the cabin air conditioning is controlled based on the target instruction corresponding to each of the target classification feature vectors.

7. The method according to claim 6, characterized in that The step of determining the target instruction corresponding to each of the target classification feature vectors comprises: When the target classification feature vector corresponds to a left wind direction scene, determining that the target instruction is a left air supply instruction; When the target classification feature vector corresponds to a right wind direction scene, determining that the target instruction is a right air supply instruction; When the target classification feature vector corresponds to a left-right wind direction scene, the target instruction is determined to be a left-right alternating air supply instruction.

8. A scene classification model training device, characterized in that: The device comprises: A first sliding window module is used to perform frame extraction processing on historical video data to obtain continuous frame images, and perform sliding window operation on the continuous frame images to obtain multiple frame groups; A first preprocessing module, used for preprocessing each of the frame groups respectively to obtain each sample frame group; An acquisition module, used to acquire the wind direction scene label corresponding to each of the sample frame groups; wherein the wind direction scene label is associated with the air supply instruction of the air conditioner; The training module is used to perform model training based on each of the sample frame groups and the wind direction scene labels corresponding to each of the sample frame groups to obtain a target scene classification model.

9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.