Edge traffic object prediction method, device, equipment and storage medium
By training environment and traffic prediction models in cloud servers and performing environment detection and model updates on edge servers, the problem of traffic prediction accuracy under limited computing power of edge processors is solved, achieving efficient environment adaptation and accurate traffic prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2026-03-24
AI Technical Summary
Edge processors, with limited computing power, struggle to frequently and adaptively adjust prediction models to adapt to rapidly changing environments, resulting in insufficient accuracy in traffic predictions and impacting the rationality of insurance plans and claims costs.
The environment classification model and traffic prediction model are trained in the cloud server, and the environment classification and traffic prediction are performed using the data collected by the edge server. The model is updated by detecting environmental changes through a preset time interval, and the model trained in the cloud server is used for adaptive adjustment.
It improves the environmental adaptability and traffic prediction accuracy of edge servers, enhances computing efficiency, adapts to rapidly changing environments, and reduces claims costs.
Smart Images

Figure CN116680601B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and financial technology, and in particular to edge traffic object prediction methods, apparatus, devices, and storage media. Background Technology
[0002] With the development of autonomous driving technology, more and more vehicles will be upgraded. When an accident occurs, the attribution of responsibility for autonomous vehicles differs from that of traditional vehicles. In such cases, it may be necessary to understand the vehicle's current state and the dynamic information of surrounding road users. Accurately predicting the likelihood of potential collisions can help in providing insurance solutions and reducing claims costs.
[0003] In related technologies, intelligent traffic monitoring systems are used to predict traffic conditions. These systems typically include a control center and multiple edge processors. The control center obtains complete and real-time traffic-related information from the edge processors as training data. The edge processors then retrieve trained prediction models from the control center for computation. However, the different environments of the edge processors—such as changes in time, location, and weather—can lead to varying accuracy of the same prediction model on different edge processors. This necessitates adaptive adjustments to the prediction models by the edge processors based on environmental information. However, edge processors have limited computing power and cannot perform frequent adaptive training for rapidly changing environments. Therefore, improving the environmental adaptability of edge processors and the accuracy of traffic predictions under limited computing power, while simultaneously generating reasonable insurance plans based on traffic predictions to reduce claims costs, has become a pressing technical problem. Summary of the Invention
[0004] The main objective of this application is to propose a method, apparatus, device, and storage medium for predicting edge traffic objects, thereby improving the environmental adaptability of edge servers and increasing the accuracy of traffic prediction.
[0005] To achieve the above objectives, a first aspect of this application proposes a method for predicting edge traffic objects, comprising:
[0006] Acquire the first category data and image data collected by the acquisition device of the edge server;
[0007] Obtain the environment classification model from the cloud server;
[0008] The first classification data is input into the environmental classification model to classify the environment and obtain the first environmental category;
[0009] Based on the first environment category, a traffic prediction model is selected from the candidate model library of the cloud server as the target traffic prediction model.
[0010] The image data is input into the target traffic prediction model to predict traffic objects and obtain the target traffic objects.
[0011] Within a preset time interval, acquire the second category data collected by the acquisition device;
[0012] Based on the second category of data, environmental changes are detected to obtain the traffic environment status;
[0013] If the traffic environment status indicates a change in the environment, the target traffic prediction model is updated based on the second classification data to obtain an updated traffic prediction model.
[0014] Based on the updated traffic prediction model, traffic objects are predicted to obtain updated traffic objects.
[0015] In one embodiment, before selecting a traffic prediction model from the candidate model library of the cloud server as the target traffic prediction model based on the first environment category, the method further includes:
[0016] Build an initial traffic prediction model on a cloud server;
[0017] Obtain a road dataset for at least one environmental category;
[0018] Generate a road sample set for the environmental category based on the road dataset;
[0019] The initial traffic prediction model is trained using the road sample set to obtain a traffic prediction model corresponding to the environmental category. The traffic prediction model is used to classify traffic objects.
[0020] In one embodiment, obtaining the road dataset for at least one environmental category includes:
[0021] Obtain environmental training data collected by the acquisition device of each edge server;
[0022] All the environmental training data are classified according to preset environmental categories to obtain the road dataset for each environmental category.
[0023] In one embodiment, before inputting the first classification data into an environmental classification model to perform environmental classification and obtain a first environmental category, the method further includes:
[0024] Build an initial environmental classification model on a cloud server;
[0025] Extract a subset of road data from the road dataset of the environment category;
[0026] An environmental classification sample set is obtained based on the aforementioned road data subset;
[0027] The initial environmental classification model is trained using the environmental classification sample set to obtain the environmental classification model, which is used to identify the environmental category.
[0028] In one embodiment, the environmental classification sample set includes environmental images and environmental labels; training the initial environmental classification model using the environmental classification sample set to obtain the environmental classification model includes:
[0029] The environmental image is then transformed to obtain a transformed environmental image;
[0030] The environmental transformation image is input into the initial environmental classification model to obtain the environmental prediction value;
[0031] The loss value is calculated based on the predicted environmental value and the environmental label.
[0032] The model weights of the initial environmental classification model are adjusted based on the loss value until the loss value meets the iteration condition, thus obtaining the environmental classification model.
[0033] In one embodiment, the step of detecting environmental changes based on the second classification data to obtain the traffic environment status includes:
[0034] The second category of data is collected using the acquisition device within a preset time interval;
[0035] The second category data is divided into N data frames according to a preset sliding window, where N is an integer greater than 1;
[0036] Each data frame is input into the environment classification model to obtain the predicted environment category of the data frame;
[0037] Calculate the ratio of each predicted environment category to N to obtain the proportion of each predicted environment category;
[0038] If the proportion of the first environmental category is less than the preset environmental threshold, then the traffic environment status indicates that the environment has changed.
[0039] In one embodiment, if the traffic environment state indicates a change in the environment, updating the target traffic prediction model based on the second classification data to obtain an updated traffic prediction model includes:
[0040] Select the predicted environment category with the largest percentage from each predicted environment category as the target environment category;
[0041] Based on the target environment category, a trained traffic prediction model is selected from the candidate model library to update the target traffic prediction model, thus obtaining the updated traffic prediction model.
[0042] To achieve the above objectives, a second aspect of this application provides an edge traffic object prediction device, comprising:
[0043] The first acquisition unit is used to acquire the first classification data and image data collected by the acquisition device of the edge server;
[0044] The first acquisition unit is used to acquire the environment classification model from the cloud server;
[0045] The first environmental classification unit is used to input the first classification data into the environmental classification model to classify the environment and obtain the first environmental category.
[0046] The traffic prediction model selection unit is used to select a traffic prediction model as the target traffic prediction model from the candidate model library of the cloud server according to the first environment category.
[0047] The first traffic prediction unit is used to input the image data into the target traffic prediction model to predict traffic objects and obtain the target traffic objects;
[0048] The second acquisition unit is used to acquire second-class data collected by the acquisition device within a preset time interval;
[0049] An environmental change detection unit is used to detect environmental changes based on the second category data to obtain the traffic environment status.
[0050] The model update unit is used to update the target traffic prediction model based on the second classification data if the traffic environment state indicates a change in the environment, thereby obtaining an updated traffic prediction model.
[0051] The second traffic prediction unit is used to predict traffic objects based on the updated traffic prediction model to obtain updated traffic objects.
[0052] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.
[0053] To achieve the above objectives, a fourth aspect of the present application provides a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.
[0054] The edge traffic object prediction method, apparatus, device, and storage medium proposed in this application embodiment collect first-classification data using an acquisition device located on an edge server. This first-classification data is then input into an environment classification model for environment classification, resulting in a first environment category. Based on this first environment category, a trained traffic prediction model is selected from a candidate model library as the target traffic prediction model. Image data collected by the acquisition device is input into the target traffic prediction model for traffic prediction, yielding a traffic prediction result. Within a preset time interval, second-classification data is collected using the acquisition device to determine if environmental changes have occurred. If environmental changes have occurred, the target traffic prediction model is updated based on the second-classification data. In this application embodiment, the environment classification model and traffic prediction model are trained on a cloud server. This allows for model training using training data transmitted from numerous edge servers at different locations, resulting in higher accuracy and greater adaptability of the model's output. Simultaneously, the edge server only needs to use the model trained on the cloud server for environment classification or traffic prediction, improving the edge server's computational efficiency. Furthermore, within a preset time interval, environmental changes on the edge server are assessed. If environmental changes occur, the model is updated based on the pre-trained traffic prediction model on the cloud server, thus adapting to rapidly changing environments and improving the accuracy of traffic prediction on the edge server. Attached Figure Description
[0055] Figure 1 This is a schematic diagram of the traffic monitoring system provided in an embodiment of the present invention.
[0056] Figure 2 This is a flowchart of the edge traffic object prediction method provided in an embodiment of the present invention.
[0057] Figure 3 yes Figure 1 The flowchart for step S120.
[0058] Figure 4 This is a schematic diagram of a traffic prediction model for an edge traffic object prediction method provided in another embodiment of the present invention.
[0059] Figure 5 This is a flowchart of an edge traffic object prediction method provided in another embodiment of the present invention.
[0060] Figure 6 yes Figure 5 The flowchart for step S440.
[0061] Figure 7 This is a flowchart of an edge traffic object prediction method provided in another embodiment of the present invention.
[0062] Figure 8 yes Figure 7 The flowchart for step S750 in the process.
[0063] Figure 9 yes Figure 7 The flowchart for step S760 in the process.
[0064] Figure 10 This is a schematic diagram of an edge traffic object prediction method provided in another embodiment of the present invention.
[0065] Figure 11 This is a structural block diagram of an edge traffic object prediction device provided in another embodiment of the present invention.
[0066] Figure 12 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0067] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0068] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.
[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.
[0070] First, let's clarify some of the terms used in this invention:
[0071] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0072] Edge computing: An open platform that integrates core capabilities of networking, computing, storage, and applications at the network edge, close to the source of objects or data, to provide edge intelligence services nearby; edge computing devices refer to devices that can provide edge computing services at the network edge, close to the source of objects or data.
[0073] Convolutional Neural Networks (CNNs) are a class of feedforward neural networks that incorporate convolutional computations and have a deep structure. They are one of the representative algorithms in deep learning. CNNs possess representation learning capabilities, enabling translation-invariant classification of input information according to their hierarchical structure. CNNs are constructed by mimicking biological visual perception mechanisms and can perform both supervised and unsupervised learning. The shared parameters of convolutional kernels within their hidden layers and the sparsity of inter-layer connections allow CNNs to process gridded features with relatively low computational cost. A common CNN architecture is: Input Layer - Convolutional Layer - Pooling Layer - Fully Connected Layer - Output Layer.
[0074] Intelligent traffic monitoring systems typically include a control center and multiple edge processors. The control center uses complete and real-time traffic-related information provided by the edge processors as training data, such as vehicle information, pedestrian information, or non-motorized vehicle information in different regions. This data is then used to train traffic prediction models. The trained models are then distributed to the edge processors for data processing to obtain analysis results, which are then used by traffic managers, traffic participants, or road management implementers to make relevant decisions.
[0075] In related technologies, edge processors acquire trained prediction models from the control center for data processing. However, the environment in which edge processors operate varies; changes in time, location, and weather can lead to different computational accuracies of the same prediction model on different edge processors. For example, the accuracy of the prediction model in identifying vehicles and pedestrians differs significantly depending on the weather conditions—sunny, cloudy, rainy, foggy, or snowy. This necessitates adaptive adjustments to the prediction model by the edge processor based on environmental information. However, edge processors have limited computing power and cannot perform frequent adaptive training for rapidly changing environments. Therefore, improving the environmental adaptability of edge processors and enhancing the accuracy of traffic prediction under limited computing power has become a pressing technical problem.
[0076] Based on this, embodiments of the present invention provide a method, apparatus, device, and storage medium for predicting edge traffic objects. The environmental classification model and traffic prediction model are trained in a cloud server, utilizing training data transmitted from numerous edge servers at different locations. This results in higher accuracy and greater adaptability of the model's output. Simultaneously, the edge server only needs to use the model trained on the cloud server for environmental classification or traffic prediction, improving the edge server's computational efficiency. Furthermore, the system assesses environmental changes within a preset time interval. If the environment changes, the system updates the traffic prediction model based on the pre-trained model in the cloud server, thereby adapting to rapidly changing environments and improving the accuracy of traffic predictions on the edge server.
[0077] This invention provides a method, apparatus, device, and storage medium for predicting edge traffic objects, which are specifically described through the following embodiments. First, the edge traffic object prediction method in this invention is described.
[0078] This invention can acquire and process relevant data based on artificial intelligence (AI) technology. AI is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.
[0079] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0080] The edge traffic object prediction method provided in this invention relates to the field of artificial intelligence technology, and particularly to the field of data mining technology. This edge traffic object prediction method can be applied to a terminal, a server, or a computer program running on either a terminal or a server. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a client supporting edge traffic object prediction; it can also be a mini-program, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a mini-program that can be embedded into any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin. The terminal communicates with the server via a network. The edge traffic object prediction method can be executed by the terminal or the server, or by the terminal and the server working together.
[0081] In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc. Alternatively, the terminal can be a smart in-vehicle device. This smart in-vehicle device applies the edge traffic object prediction method of this embodiment to provide related services and improve the driving experience. The server can be a standalone server, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms; it can also be a service node in a blockchain system, where the service nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). The server can install the server-side application of the edge traffic object prediction system, through which it can interact with the terminal. For example, corresponding software can be installed on the server, which may be an application implementing the edge traffic object prediction method, but is not limited to the above forms. The terminal and the server can be connected via Bluetooth, USB (Universal Serial Bus), or network communication methods, and this embodiment does not impose any restrictions.
[0082] This invention can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This invention can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0083] To facilitate understanding of the embodiments of this application, the concept of a traffic monitoring system will first be briefly introduced below with examples of specific application scenarios.
[0084] Reference Figure 1 In this embodiment, the traffic monitoring system includes a cloud server 100 and at least one edge server 200. Each edge server 200 can also be connected to multiple acquisition devices 210. The acquisition devices can be sensors, cameras, or radar, etc. The data acquired by the acquisition devices can be image data, video data, or radar echo data, etc. This embodiment does not limit the acquisition devices or the acquired data.
[0085] In this embodiment, the edge server 200 aggregates data collected by multiple connected acquisition devices 210 and sends it to the cloud server 100. The cloud server 100 then uses this large amount of collected data to train the environment classification model and traffic prediction model, resulting in more accurate and adaptable outputs. The edge server 200 then simply stores the trained model from the cloud server 100 on its hard drive and selects the appropriate location (e.g., Jupiter) for environment classification or traffic prediction. Accurate analysis can be achieved without requiring significant transportation capacity from the edge server 200. Furthermore, the edge server 200 assesses environmental changes within a preset time interval. If the environment changes, the pre-trained traffic prediction model in the cloud server 100 is updated to adapt to the rapidly changing environment and improve the accuracy of traffic predictions.
[0086] The edge traffic object prediction method in the embodiments of the present invention will be described first below.
[0087] In the edge traffic object prediction method provided in this embodiment of the invention, the cloud server first trains the traffic prediction model. For example, the traffic prediction model is pre-trained on the cloud server. The cloud server uses image information obtained from multiple edge servers as training data for the traffic prediction model, constructs a traffic prediction sample set to train the traffic prediction model, so that the traffic prediction model can generate classification information of the target traffic object corresponding to the input image.
[0088] It is understood that the target traffic object of the traffic prediction model in this embodiment can be set according to actual needs. For example, the target traffic object can be pedestrian objects, vehicle objects, road objects, or road sign objects, etc. Road sign objects include road sign types, zebra crossings, stop lines, etc., while vehicle objects include motor vehicles or non-motor vehicles. In this embodiment, the traffic prediction sample set contains traffic prediction samples, which include road images and traffic object labels. Different road images and traffic object labels can be selected according to different prediction needs. This embodiment does not limit the target traffic object.
[0089] In one embodiment, the traffic prediction model is a convolutional neural network model, which includes convolutional layers, pooling layers, and fully connected layers. This embodiment does not limit the model structure of the traffic prediction model.
[0090] Reference Figure 2 This is a flowchart illustrating a specific implementation of a cloud server pre-training a traffic prediction model. In this embodiment, the steps for the cloud server to pre-train the traffic prediction model include, but are not limited to, steps S110 to S140.
[0091] Step S110: Build an initial traffic prediction model on the cloud server.
[0092] In one embodiment, a traffic prediction initial model of a convolutional neural network model is constructed in a cloud server. This traffic prediction initial model is a traffic prediction model with untrained initial weights.
[0093] Step S120: Obtain a road dataset for at least one environmental category.
[0094] In one embodiment, the cloud server obtains images from multiple edge servers under different regions, weather conditions, and road conditions to obtain a road dataset for at least one environmental category.
[0095] In one embodiment, reference is made to Figure 3 This is a flowchart illustrating a specific implementation of step S120 in one embodiment. In this embodiment, step S120, which involves obtaining a road dataset of at least one environmental category, includes:
[0096] Step S121: Obtain environmental training data collected by the acquisition device of each edge server.
[0097] In one embodiment, each edge server connects to multiple acquisition devices. The acquisition devices upload their collected data to the corresponding edge server. The edge server then uploads all the collected data as environmental training data to a cloud server. The cloud server aggregates the environmental training data collected by all edge servers. In one embodiment, the acquisition device is a camera, and the acquired data is image data.
[0098] Step S122: Classify all environmental training data according to preset environmental categories to obtain road datasets for each environmental category.
[0099] In one embodiment, the cloud server categorizes all aggregated environmental training data according to preset environmental categories. In this embodiment, there are six environmental categories: sunny, cloudy, rainy, snowy, foggy, or windy. Therefore, the environmental training data can include data from these six environmental categories or other environmental categories tailored to different needs. All environmental training data is divided into six road datasets, each corresponding to one environmental category. Examples include road datasets for sunny days and road datasets for cloudy days.
[0100] Step S130: Generate a road sample set for the environment category based on the road dataset.
[0101] In one embodiment, each of the aforementioned preset environment categories corresponds to a road dataset. Each road dataset is used to generate a road sample set according to the method used to generate training samples. The road sample set contains road samples, which are the aforementioned traffic prediction samples. The traffic prediction samples include road images and traffic object labels. Different road images and traffic object labels can be selected according to different prediction requirements. This embodiment does not limit the target traffic object.
[0102] Step S140: Train the initial traffic prediction model using the road sample set to obtain the traffic prediction model corresponding to the environment category.
[0103] In one embodiment, a road sample set for each environmental category is input into the initial traffic prediction model for training. After training, a traffic prediction model for that environmental category is obtained. (Refer to...) Figure 4Suppose there are N environment types, namely environment type S1, ..., environment type Sn, and corresponding road sample sets X1, ..., road sample sets Xn. Initial traffic prediction models are trained for each environment type, resulting in traffic prediction models M1, ..., Mn for each environment type. These models are used to classify traffic objects. Therefore, the cloud server trains a corresponding traffic prediction model for each environment type. Because the weight parameters of each traffic prediction model differ depending on the environment type, it can be applied to different types of environments.
[0104] In one embodiment, reference is made to Figure 5 This is a flowchart illustrating a specific implementation of a cloud server pre-training an environment classification model. In this embodiment, the steps for the cloud server to pre-train the environment classification model include, but are not limited to, steps S410 to S440.
[0105] Step S410: Build an initial environmental classification model on the cloud server.
[0106] In one embodiment, an initial environmental classification model is pre-trained on a cloud server. The cloud server uses image information obtained from multiple edge servers as training data to construct an environmental classification sample set for training the initial environmental classification model, resulting in an environmental classification model capable of generating weather information corresponding to an input image. The initial environmental classification model is an unadjusted environmental classification model that enables the environmental classification model to be optimized.
[0107] In one embodiment, the environment classification model is a ResNet18 convolutional neural network model. The basic architecture of the ResNet18 convolutional neural network model is a ResNet residual network model with a network depth of 18 layers, where network depth refers to the weight layers. For example, the size of the input environment image is 3*224*224, which includes 3 channels, and the size of each channel is 224*224.
[0108] In this embodiment, the structure of the ResNet18 convolutional neural network model is as follows:
[0109] First, there's the first convolutional layer with a 7x7 kernel, a stride of 2, and padding of 3. It outputs 64 channels, resulting in an output size of 64*112*112. Next is the max-pooling layer with a 3x3 kernel, a stride of 2, and padding of 1. Max-pooling doesn't change the number of channels but halves the data size, resulting in an output size of 64*56*56. Then comes the second convolutional layer with a 3x3 kernel, a stride of 1, and padding of 1. This layer doesn't change the data size or number of channels, so the output size is also 64*56*56. Finally, there's the third convolutional layer with a 1x1 kernel. It downsamples the output, doubling the number of channels and halving the output size, resulting in an output size of 128*28*28. Next is the fourth convolutional layer. The kernel size of the fourth convolutional layer is 1*1, and it undergoes downsampling, doubling the output channels and halving the output data size, resulting in an output data size of 256*14*14. Next is the fifth convolutional layer. The kernel size of the fifth convolutional layer is also 1*1, and it undergoes downsampling, doubling the output channels and halving the output data size, resulting in an output data size of 512*7*7. Next is the average pooling layer, with an output data size of 512*1*1. Finally, there is a fully connected layer, which provides the environment prediction based on the results. The fully connected layer has six neural network nodes, corresponding to the six environment categories mentioned above.
[0110] Step S420: Extract a subset of road data from the road dataset of the environment category.
[0111] In one embodiment, step S122 classifies all environmental training data according to preset environmental categories to obtain a road dataset for each environmental category. In this embodiment, step S420 extracts a subset of data from each road dataset to obtain a road data subset under that environmental category. Since the computational complexity of classifying environmental categories is less than that of identifying target traffic objects, obtaining a subset of road data can reduce the sample size and improve the training efficiency of the environmental classification model.
[0112] Step S430: Obtain the environmental classification sample set based on the road data subset.
[0113] In one embodiment, the constructed environmental classification sample set contains multiple environmental classification samples, each including an environmental image and an environmental label. In this embodiment, the environmental labels correspond to six environmental categories: sunny, cloudy, rainy, snowy, foggy, or windy. Environmental labels are defined based on factors such as the light intensity of the image information, the presence of reflections, the presence of occlusions, image clarity, and the offset of reference objects within the image. For example, strong light in an image indicates a sunny day; weak light indicates a cloudy day; reflections on the ground indicate a rainy day; small particles obstructing the image indicate a rainy day; low image clarity and high brightness indicate foggy; and offset trees indicate windy. It is understood that the weather labels in this embodiment can be manually labeled or automatically labeled after image feature extraction using the aforementioned method; this embodiment does not specifically limit this. It is also understood that this embodiment does not specifically limit the environmental categories; it is merely illustrative, and environmental categories can be set according to actual needs.
[0114] Step S440: Train the initial environmental classification model using the environmental classification sample set to obtain the environmental classification model.
[0115] In one embodiment, an environmental classification model is used to identify environmental categories. (See also...) Figure 6 This is a flowchart illustrating a specific implementation of step S440 in one embodiment. In this embodiment, step S440, which uses an environmental classification sample set to train an initial environmental classification model and obtain an environmental classification model, includes:
[0116] Step S441: Perform image transformation on the environment image to obtain an environment transformed image.
[0117] In one embodiment, since images acquired by different acquisition devices may be of different sizes, it is necessary to standardize the environmental images in the environmental samples to convert them into a standard size to obtain a converted environmental image. For example, the size of the converted environmental image is 3*224*224.
[0118] Step S442: Input the environment transformation image into the initial environment classification model to obtain the environment prediction value.
[0119] Step S443: Calculate the loss value based on the environmental prediction value and environmental label.
[0120] In one embodiment, the features of the input environment transformation image are forward-propagated to obtain an environment prediction value. In another embodiment, the loss function is the cross-entropy loss function, and the loss value can be calculated using the environment prediction value and the environment label.
[0121] Step S444: Adjust the model weights of the initial environmental classification model according to the loss value until the loss value meets the iteration condition to obtain the environmental classification model.
[0122] In one embodiment, the iteration condition refers to reaching a preset number of iterations or the loss value being less than a preset reference value. This embodiment does not specifically limit the iteration condition.
[0123] As can be seen from the above, in this embodiment of the application, the environmental classification model and traffic prediction model are trained in the cloud server. This allows the model to be trained using training data transmitted from a large number of edge servers in different locations, resulting in higher accuracy and stronger adaptability of the model's output results.
[0124] The following describes the application process of edge servers to environmental classification models and traffic prediction models.
[0125] Figure 7 This is an optional flowchart of the edge traffic object prediction method provided in this embodiment of the invention. Figure 7 The method may include, but is not limited to, steps S710 to S790. It is also understood that this embodiment... Figure 7 The order of steps S710 to S790 is not specifically limited, and the order of steps can be adjusted or some steps can be reduced or added according to actual needs.
[0126] Step S710: Acquire the first classification data and image data collected by the acquisition device of the edge server.
[0127] In one embodiment, the edge server's data acquisition device is a camera; therefore, the first category of data acquired is video or image information containing environmental information. For example, if the first category of data is image information, then the image information includes weather information about the location of the acquisition device. Additionally, the acquisition device also acquires image data for traffic prediction.
[0128] Step S720: Obtain the environment classification model from the cloud server.
[0129] Step S730: Input the first category data into the environment classification model to classify the environment and obtain the first environment category.
[0130] In one embodiment, a communication connection is established between the cloud server and the edge server. The edge server downloads the pre-trained environment classification model from the cloud server and performs environment classification using the first classification data collected by its own acquisition device. Specifically, the first classification data is input into the environment classification model to perform environment classification and obtain a first environment category, which may be a weather category.
[0131] Step S740: Select a traffic prediction model from the candidate model library of the cloud server as the target traffic prediction model according to the first environment category.
[0132] In one embodiment, since the traffic prediction model is pre-trained on the cloud server, the edge server can store the traffic prediction models corresponding to all environment types downloaded from the cloud server in a candidate model library, which includes at least one traffic prediction model. The trained traffic prediction model is selected from the candidate model library as the target traffic prediction model according to the first environment category.
[0133] In one embodiment, after the cloud server uses the trained traffic prediction model to form a candidate model library, it can store the candidate model library in the cloud and the edge server can request to obtain the corresponding traffic prediction model. Alternatively, the entire candidate model library can be sent to the edge server, and the edge server can select the required traffic prediction model from it according to its needs.
[0134] Step S750: Input the image data into the target traffic prediction model to predict traffic objects and obtain the target traffic objects.
[0135] In one embodiment, since a target traffic prediction model has been selected, the image data collected by the acquisition device is input into the target traffic prediction model to predict traffic objects and obtain the traffic prediction result of the target traffic objects.
[0136] In this embodiment, the target traffic object of the traffic prediction model can be set according to actual needs. For example, the target traffic object can be pedestrians, vehicles, roads, or road signs. Road signs include road sign types, zebra crossings, stop lines, etc., while vehicles include motor vehicles or non-motor vehicles. In this embodiment, the traffic prediction sample set contains traffic prediction samples, which include road images and traffic object labels. Different road images and traffic object labels can be selected according to different prediction needs. This embodiment does not limit the target traffic object.
[0137] Step S760: Within a preset time interval, acquire the second category data collected by the acquisition device.
[0138] Step S770: Detect environmental changes based on the second category data to obtain the traffic environment status.
[0139] In one embodiment, since the environment in which the data acquisition device operates may change drastically, the same traffic prediction model may exhibit different computational accuracy on different edge processors in order to adapt to different environmental changes, such as changes in time and weather. The accuracy of the traffic prediction model in identifying vehicles and pedestrians varies under different weather conditions. However, the computing power of edge processors is limited, and they cannot perform frequent adaptive training for rapidly changing environments. Therefore, in this embodiment, the edge processor adaptively updates the traffic prediction model based on environmental information.
[0140] In one embodiment, a preset time interval can be set, and an environmental detection is performed every preset time interval to determine whether the environment has changed. For example, if a detection is performed every 10 minutes, then the preset time interval is 10 minutes. This embodiment does not specifically limit the preset time interval.
[0141] In one embodiment, reference is made to Figure 8 This is a flowchart illustrating a specific implementation of step S770 in one embodiment. In this embodiment, step S770, which detects environmental changes based on the second classification data to obtain the traffic environment status, includes:
[0142] Step S771: Collect second-class data using the acquisition device within a preset time interval.
[0143] In one embodiment, if the current first environment category is Pi, then the acquisition device is used to acquire second category data within a preset time interval from the current time. The second category data may be video data.
[0144] Step S772: Divide the second category data into N data frames according to a preset sliding window.
[0145] In one embodiment, the second category data is divided using a preset sliding window to obtain N data frames, each with the same length, where N is an integer greater than 1.
[0146] Step S773: Input each data frame into the environment classification model to obtain the predicted environment category of the data frame.
[0147] In one embodiment, each data frame can contain multiple images. Each image is input into an environment classification model to obtain the corresponding environment category. All environment categories for the data frame are statistically analyzed, and the category with the highest number of occurrences is taken as the predicted environment category for that data frame. This approach can reduce the error in environment category detection from a single image and improve the accuracy of environment detection.
[0148] Step S774: Calculate the ratio of each predicted environment category to N to obtain the proportion of each predicted environment category.
[0149] In one embodiment, for each of the N video frames, a predicted environment category is obtained, represented as: Then, count the number of each predicted environment category, and calculate the ratio of the corresponding number to N to obtain the proportion of each predicted environment category.
[0150] Step S775: If the proportion of the first environmental category is less than the preset environmental threshold, then the traffic environment status indicates that the environment has changed.
[0151] In one embodiment, it is determined whether the proportion of the first environment category Pi is less than a preset environment threshold, for example, the preset environment threshold is 30%, wherein the proportion of the first environment category Pi is expressed as:
[0152]
[0153] If the proportion of the first environmental category Pi is less than 30%, it means that the number of times the first environmental category Pi is detected is relatively small within the preset time interval, indicating that environmental changes have occurred.
[0154] Step S780: If the traffic environment status indicates a change in the environment, then update the target traffic prediction model based on the second category data to obtain the updated traffic prediction model.
[0155] Step S790: Predict traffic objects based on the updated traffic prediction model to obtain updated traffic objects.
[0156] In one embodiment, if it is determined that an environmental change has occurred, the traffic prediction model corresponding to the first environmental category Pi is still used for traffic prediction. However, the accuracy of the prediction results will not be high. Therefore, it is necessary to update the target traffic prediction model, change the target traffic prediction model to the updated traffic prediction model, and use the updated traffic prediction model to predict traffic objects to obtain updated traffic objects.
[0157] In one embodiment, reference is made to Figure 9 This is a flowchart illustrating a specific implementation of step S780 in one embodiment. In this embodiment, if the traffic environment state indicates a change in the environment, the target traffic prediction model is updated based on the second classification data, resulting in step S780 of updating the traffic prediction model, which includes:
[0158] Step S781: Select the predicted environment category with the largest proportion from each predicted environment category as the target environment category.
[0159] In one embodiment, assuming the predicted environment category with the largest proportion is k, it is represented as:
[0160]
[0161] It is understandable that the environment category that is predicted the most times within a preset time interval is selected as the target environment category.
[0162] Step S782: Select a trained traffic prediction model from the candidate model library according to the target environment category to update the target traffic prediction model, thereby obtaining the updated traffic prediction model.
[0163] In one embodiment, since the edge server stores the traffic prediction models corresponding to all environment types downloaded from the cloud server in a candidate model library, the trained traffic prediction model is selected from the candidate model library according to the target environment category to update the target traffic prediction model, thus obtaining the updated traffic prediction model.
[0164] Reference Figure 10 The edge servers send road datasets to the cloud servers via communication connections. The cloud servers then retrieve road datasets from multiple edge servers, covering different regions, weather conditions, and road types. Based on these road datasets, they generate road sample sets for different environment categories. These road sample sets are then used to train an initial traffic prediction model, resulting in a traffic prediction model corresponding to each environment category. Finally, the road sample sets are used to train an initial environment classification model, resulting in an environment classification model.
[0165] The edge server downloads the pre-trained environment classification model and traffic prediction model from the cloud server, and stores the traffic prediction models corresponding to all environment types downloaded from the cloud server in a candidate model library. The candidate model library can be stored on the hard drive of the edge server to improve the acquisition speed.
[0166] Then, the edge server uses the first-class data collected by its own acquisition devices to classify the environment. Specifically, it inputs the first-class data into an environment classification model to obtain a first environment category, which can be a weather category. The edge server also inputs image data collected by the acquisition devices into the target traffic prediction model, performs calculations in memory to achieve traffic prediction, and obtains the traffic prediction result. Furthermore, to adapt to different environmental changes, the edge server uses the acquisition devices to collect second-class data within a preset time interval to determine whether environmental changes have occurred. If environmental changes have occurred, it selects a new traffic prediction model corresponding to the new environment category from the candidate model library based on the second-class data to update the target traffic prediction model.
[0167] As described above, the technical solution provided by the embodiments of the present invention collects first-classification data using an acquisition device located on an edge server, then inputs the first-classification data into an environment classification model to classify the environment and obtain a first environment category. Based on the first environment category, a trained traffic prediction model is selected from a candidate model library as the target traffic prediction model. Image data collected by the acquisition device is input into the target traffic prediction model to perform traffic prediction and obtain a traffic prediction result. Second-classification data is collected using the acquisition device within a preset time interval to determine whether an environmental change has occurred. If an environmental change has occurred, the target traffic prediction model is updated based on the second-classification data.
[0168] In one embodiment, the edge traffic object prediction method described in this application is used in insurance claims scenarios for autonomous vehicles. With the development of autonomous driving technology, more and more vehicles will be upgraded. When an accident occurs, the attribution of responsibility for autonomous vehicles differs from that for traditional vehicles. In this case, it may be necessary to understand the current state of the vehicle and the dynamic information of surrounding traffic participants. The edge traffic object prediction method described in this application accurately predicts various targets in the traffic environment, thereby determining the likelihood of potential collision events, helping to provide reasonable insurance solutions, and reducing claims costs.
[0169] In this embodiment, the environment classification model and traffic prediction model are trained on a cloud server. This allows for model training using training data transmitted from numerous edge servers in different locations, resulting in higher accuracy and greater adaptability of the model's output. Simultaneously, the edge server only needs to use the model trained on the cloud server for environment classification or traffic prediction, improving the edge server's computational efficiency. Furthermore, within a preset time interval, the system assesses environmental changes on the edge server. If the environment changes, the model is updated based on the pre-trained traffic prediction model on the cloud server, thus adapting to rapidly changing environments and improving the accuracy of traffic prediction on the edge server.
[0170] This invention also provides an edge traffic object prediction device, which can implement the above-described edge traffic object prediction method, referring to... Figure 11 The device includes:
[0171] The first acquisition unit 1110 is used to acquire first classification data and image data acquired by the acquisition device of the edge server;
[0172] The first acquisition unit 1120 is used to acquire the environment classification model from the cloud server;
[0173] The first environmental classification unit 1130 is used to input the first classification data into the environmental classification model to classify the environment and obtain the first environmental category.
[0174] The traffic prediction model selection unit 1140 is used to select a traffic prediction model as the target traffic prediction model from the candidate model library of the cloud server according to the first environment category.
[0175] The first traffic prediction unit 1150 is used to input image data into the target traffic prediction model to predict traffic objects and obtain the target traffic objects.
[0176] The second acquisition unit 1160 is used to acquire second-class data collected by the acquisition device within a preset time interval;
[0177] The environmental change detection unit 1170 is used to detect environmental changes based on the second category data to obtain the traffic environment status.
[0178] The model update unit 1180 is used to update the target traffic prediction model based on the second category data if the traffic environment status indicates a change in the environment, thereby obtaining an updated traffic prediction model.
[0179] The second traffic prediction unit 1190 is used to predict traffic objects based on the updated traffic prediction model to obtain updated traffic objects.
[0180] The specific implementation of the edge traffic object prediction device in this embodiment is basically the same as the specific implementation of the edge traffic object prediction method described above, and will not be repeated here.
[0181] This invention also provides an electronic device, comprising:
[0182] At least one memory;
[0183] At least one processor;
[0184] At least one program;
[0185] The program is stored in a memory, and the processor executes the at least one program to implement the edge traffic object prediction method described above in this invention. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), and in-vehicle computers.
[0186] Please see Figure 12 , Figure 12 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0187] The processor 1201 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0188] The memory 1202 can be implemented in the form of ROM (Read-Only Memory), static storage device, dynamic storage device, or RAM (Random Access Memory). The memory 1202 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1202 and called by the processor 1201 to execute the edge traffic object prediction method of the embodiments of this invention.
[0189] The input / output interface 1203 is used to implement information input and output;
[0190] The communication interface 1204 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.); and the bus 1205 is used to transmit information between the various components of the device (such as processor 1201, memory 1202, input / output interface 1203 and communication interface 1204).
[0191] The processor 1201, memory 1202, input / output interface 1203 and communication interface 1204 are connected to each other within the device via bus 1205.
[0192] This application embodiment also provides a storage medium, which is a computer-readable storage medium, storing a computer program that, when executed by a processor, implements the above-described edge traffic object prediction method.
[0193] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0194] The edge traffic object prediction method, device, electronic device, and storage medium proposed in this invention utilize an acquisition device located on an edge server to collect first-classification data. This first-classification data is then input into an environment classification model for environment classification, resulting in a first environment category. Based on this first environment category, a trained traffic prediction model is selected from a candidate model library as the target traffic prediction model. Image data collected by the acquisition device is input into the target traffic prediction model for traffic prediction, yielding a traffic prediction result. Within a preset time interval, second-classification data is collected using the acquisition device to determine if environmental changes have occurred. If environmental changes have occurred, the target traffic prediction model is updated based on the second-classification data. In this embodiment, the environment classification model and traffic prediction model are trained on a cloud server. This allows for model training using training data transmitted from numerous edge servers at different locations, resulting in higher accuracy and greater adaptability of the model's output. Simultaneously, the edge server only needs to use the model trained on the cloud server for environment classification or traffic prediction, improving the edge server's computational efficiency. Furthermore, within a preset time interval, environmental changes on the edge server are assessed. If the environment changes, the model is updated based on the pre-trained traffic prediction model on the cloud server, thus adapting to rapidly changing environments and improving the accuracy of traffic prediction on the edge server.
[0195] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0196] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0197] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0198] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0199] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0200] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0201] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0202] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0203] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0204] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0205] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A method for predicting edge traffic objects, characterized in that, include: Acquire the first category data and image data collected by the acquisition device of the edge server; Obtain the environment classification model from the cloud server; The first classification data is input into the environmental classification model to classify the environment and obtain the first environmental category. The first classification data is video information or image information containing environmental information. Based on the first environment category, a traffic prediction model is selected from the candidate model library of the cloud server as the target traffic prediction model. The image data is input into the target traffic prediction model to predict traffic objects and obtain the target traffic objects. Within a preset time interval, second-category data collected by the acquisition device is acquired, wherein the second-category data is video data; The second category data is divided into N data frames according to a preset sliding window, where N is an integer greater than 1; each data frame is input into the environment classification model to obtain the predicted environment category of the data frame; the ratio of each predicted environment category to N is calculated to obtain the proportion of each predicted environment category; if the proportion of the first environment category is less than a preset environment threshold, the traffic environment status indicates that the environment has changed. If the traffic environment state indicates a change in the environment, the predicted environment category with the largest proportion is selected as the target environment category from the proportion values of each predicted environment category; based on the target environment category, a trained traffic prediction model is selected from the candidate model library to update the target traffic prediction model, thus obtaining the updated traffic prediction model; Based on the updated traffic prediction model, traffic objects are predicted to obtain updated traffic objects.
2. The edge traffic object prediction method according to claim 1, characterized in that, Before selecting a traffic prediction model from the candidate model library of the cloud server as the target traffic prediction model according to the first environment category, the method further includes: Build an initial traffic prediction model on a cloud server; Obtain a road dataset for at least one environmental category; Generate a road sample set for the environmental category based on the road dataset; The initial traffic prediction model is trained using the road sample set to obtain a traffic prediction model corresponding to the environmental category. The traffic prediction model is used to classify traffic objects.
3. The edge traffic object prediction method according to claim 2, characterized in that, The method of obtaining a road dataset for at least one environmental category includes: Obtain environmental training data collected by the acquisition device of each edge server; All the environmental training data are classified according to preset environmental categories to obtain the road dataset for each environmental category.
4. The edge traffic object prediction method according to claim 2, characterized in that, Before inputting the first classification data into the environmental classification model to perform environmental classification and obtain the first environmental category, the method further includes: Build an initial environmental classification model on a cloud server; Extract a subset of road data from the road dataset of the environment category; An environmental classification sample set is obtained based on the aforementioned road data subset; The initial environmental classification model is trained using the environmental classification sample set to obtain the environmental classification model, which is used to identify the environmental category.
5. The edge traffic object prediction method according to claim 4, characterized in that, The environmental classification sample set includes environmental images and environmental labels; training the initial environmental classification model using the environmental classification sample set to obtain the environmental classification model includes: The environmental image is then transformed to obtain a transformed environmental image; The environmental transformation image is input into the initial environmental classification model to obtain the environmental prediction value; The loss value is calculated based on the predicted environmental value and the environmental label. The model weights of the initial environmental classification model are adjusted based on the loss value until the loss value meets the iteration condition, thus obtaining the environmental classification model.
6. A device for predicting edge traffic objects, characterized in that, include: The first acquisition unit is used to acquire first-classification data and image data acquired by the acquisition device of the edge server, wherein the first-classification data is video information or image information containing environmental information. The first acquisition unit is used to acquire the environment classification model from the cloud server; The first environmental classification unit is used to input the first classification data into the environmental classification model to classify the environment and obtain the first environmental category. The traffic prediction model selection unit is used to select a traffic prediction model as the target traffic prediction model from the candidate model library of the cloud server according to the first environment category. The first traffic prediction unit is used to input the image data into the target traffic prediction model to predict traffic objects and obtain the target traffic objects; The second acquisition unit is used to acquire second-class data collected by the acquisition device within a preset time interval, wherein the second-class data is video data; An environmental change detection unit is used to divide the second classification data into N data frames according to a preset sliding window, where N is an integer greater than 1; input each data frame into the environmental classification model to obtain the predicted environmental category of the data frame; calculate the ratio of each predicted environmental category to N to obtain the proportion of each predicted environmental category; if the proportion of the first environmental category is less than a preset environmental threshold, the traffic environment status indicates that the environment has changed. The model update unit is used to select the predicted environment category with the largest proportion from each predicted environment category as the target environment category if the traffic environment state indicates a change in the environment; and to select a trained traffic prediction model from the candidate model library according to the target environment category to update the target traffic prediction model, thereby obtaining an updated traffic prediction model. The second traffic prediction unit is used to predict traffic objects based on the updated traffic prediction model to obtain updated traffic objects.
7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the edge traffic object prediction method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the edge traffic object prediction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for generating combined scenarios
CA3169989A1
Image classification method and device, storage medium and electronic equipment
CN113095194A