Model training method and device, prediction method and device, equipment and storage medium
By acquiring and optimizing traffic scene characteristics and feedback information, the accuracy of the traffic light duration prediction model is improved, the problem of low model accuracy in the existing technology is solved, and the accuracy of the traffic light duration prediction is enhanced.
Patent Information
- Application Number
- CN202310477909.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-26
- Publication Date
- 2024-10-29
AI Technical Summary
In the existing technology, training equipment trains reinforcement learning models based on traffic scene characteristics at each moment, resulting in low model accuracy.
By obtaining the traffic scene characteristics of the target intersection and inputting it into the signal light duration prediction model, the duration prediction value is obtained, and the model training is optimized based on the deduction results and feedback information to improve the model accuracy.
The signal light duration prediction model is optimized through feedback information, which improves the prediction accuracy of the model and reduces the probability of road congestion and traffic accidents.
Smart Images

Figure CN118865313A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to a model training method, prediction method, device, equipment and storage medium. Background Art
[0002] Flexible settings of traffic light duration can help urban traffic systems operate smoothly and orderly, avoiding adverse consequences such as traffic congestion and traffic accidents.
[0003] In the related art, for a certain intersection, the execution device can input the traffic scene characteristics of the intersection at the current moment into the reinforcement learning model, obtain the predicted value of the duration of the traffic light at the intersection, and set the duration of the traffic light based on the predicted value. It can be seen that the accuracy of the reinforcement learning model determines the accuracy of the duration prediction.
[0004] Currently, the training equipment can train the reinforcement learning model based on the traffic scene characteristics of the intersection at various times. However, the model trained by this training method has low accuracy. Summary of the invention
[0005] The embodiments of the present application provide a model training method, prediction method, apparatus, device and storage medium, thereby improving the accuracy of the model.
[0006] In a first aspect, an embodiment of the present application provides a model training method, including: obtaining a first traffic scene feature of a target intersection; inputting the first traffic scene feature into a traffic light duration prediction model to obtain a first duration prediction value of a traffic light located at the target intersection; deducing the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and sending the deduction result to a terminal device; receiving feedback information regarding the deduction result sent by the terminal device; and training the traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value, and the feedback information.
[0007] In a second aspect, an embodiment of the present application provides a prediction method, comprising: obtaining traffic scene characteristics of a target intersection; inputting the traffic scene characteristics into a traffic light duration prediction model trained according to the method in the first aspect or its various implementation methods, to obtain a predicted duration value of a traffic light at the target intersection.
[0008] In a third aspect, an embodiment of the present application provides a model training device, comprising: an acquisition module, an input module, a deduction module, a receiving module and a training module, wherein the acquisition module is used to acquire a first traffic scene feature of a target intersection; the input module is used to input the first traffic scene feature into a traffic light duration prediction model to obtain a first duration prediction value of a traffic light located at the target intersection; the deduction module is used to deduce the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and send the deduction result to a terminal device; the receiving module is used to receive feedback information on the deduction result sent by the terminal device; the training module is used to train the traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information.
[0009] In a fourth aspect, an embodiment of the present application provides a prediction device, comprising: an acquisition module and an input module, wherein the acquisition module is used to acquire traffic scene characteristics of a target intersection; the input module is used to input the traffic scene characteristics into a traffic light duration prediction model trained according to the method in the first aspect or its various implementation methods, to obtain a predicted duration value of the traffic light at the target intersection.
[0010] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the method in the first aspect, the second aspect or their respective implementations.
[0011] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program enables a computer to execute a method as in the first aspect, the second aspect, or each of their implementations.
[0012] In a seventh aspect, an embodiment of the present application provides a computer program product, comprising computer program instructions, which enable a computer to execute a method as in the first aspect, the second aspect, or each of their implementations.
[0013] In an eighth aspect, an embodiment of the present application provides a computer program, which enables a computer to execute the method in the first aspect, the second aspect, or each implementation thereof.
[0014] Through the technical solution provided in the embodiment of the present application, the training device can train the signal light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information. Since the signal light duration prediction model can be optimized by the feedback information of the deduction result, the model accuracy can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A schematic diagram of a reinforcement learning model is provided;
[0016] Figure 2 A schematic diagram of a system architecture involved in an embodiment of the present application;
[0017] Figure 3 A flowchart of a model training method provided in an embodiment of the present application;
[0018] Figure 4 A schematic diagram of model optimization provided in an embodiment of the present application;
[0019] Figure 5 A flowchart of a prediction method provided in an embodiment of the present application;
[0020] Figure 6 A schematic diagram of a model training device 600 provided in an embodiment of the present application;
[0021] Figure 7 A schematic diagram of a prediction device 700 provided in an embodiment of the present application;
[0022] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0025] The embodiments of the present application may involve machine learning (ML) technology in artificial intelligence.
[0026] Artificial intelligence 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 knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0027] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0028] Machine learning is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0029] Before introducing the technical solution of the present application, the following first describes the relevant knowledge of the embodiments of the present application:
[0030] 1. Digital Twin makes full use of physical models, sensor updates, operation history and other data, integrates multi-disciplinary, multi-physical quantity, multi-scale, and multi-probability simulation processes, completes mapping in virtual space, and thus reflects the entire life cycle of the corresponding physical objects.
[0031] 2. Transformer is a deep neural network model for natural language processing tasks. Different from the traditional recurrent neural network (RNN) model, the Transformer model uses a new self-attention mechanism to process the input sentence sequence, avoiding the dependency and order restrictions in the loop calculation, thereby greatly improving the parallel computing capability of the model.
[0032] The Transformer model can be viewed as a black box that takes a sentence in one language as input and translates it into a sentence in another language as output when processing natural language tasks.
[0033] The core of the Transformer model is the multi-head self-attention mechanism, which can simultaneously calculate multiple different representations to capture different features in the input sequence.
[0034] In addition to the self-attention mechanism, the Transformer model also includes technologies such as position encoding and residual connection. Position encoding is used to embed the position information in the input sequence into the model, thereby avoiding the influence of the order of the input sequence on the model. Residual connection is used to retain the original features in the input sequence, avoiding the loss of certain features during the learning process.
[0035] Through the above-mentioned Transformer technology, the Transformer model performs well in processing natural language processing tasks and is very suitable for natural language translation tasks.
[0036] 3. Reinforcement Learning (RL), also known as reinforcement learning, evaluation learning or enhanced learning, is one of the paradigms and methodologies of machine learning. It is used to describe and solve the problem of how an agent can maximize rewards or achieve specific goals through learning strategies during its interaction with the environment.
[0037] Specifically, when the agent is in an environment and performs an action, the environment will transfer to another state with a certain probability; at the same time, the environment will give the agent a reward based on the potential reward function.
[0038] Figure 1 A schematic diagram of a reinforcement learning model is provided, such as Figure 1 As shown, when the agent is in S t When the agent performs action A t After that, the environment will be transferred to another S with a certain probability. t+1 state; at the same time, the environment will give the agent a reward R based on the potential reward function t+1 .
[0039] Among them, reinforcement learning mainly includes four elements: state, action, transition probability and reward function.
[0040] Reinforcement learning is to interact with the environment through a series of action strategies to generate rewards, and then use the rewards to correct the action strategies. After several iterations, the agent will learn the action strategies required to complete the task. This process is also called the training process of the reinforcement learning model. Among them, the main model parameters may include: relevant parameters of the action strategy, but are not limited to these.
[0041] The reinforcement learning task involved in the embodiment of the present application is a traffic light duration prediction task, wherein the environment involved in the task may be a traffic scene at a certain intersection, and the action may be to set the duration of the traffic light to the predicted duration. Wherein, when the agent is in a traffic scene at time t at a certain intersection, and the agent performs an action at time t (i.e., sets the duration of the traffic light at the intersection to the predicted duration for time t), the environment will be transferred to the state at time t+1 with a certain probability. When the agent is in a traffic scene at time t+1 at a certain intersection, and the agent performs an action at time t+1 (i.e., sets the duration of the traffic light at the intersection to the predicted duration for time t+1), the environment will be transferred to the state at time t+2 with a certain probability, and so on.
[0042] 4. Deep reinforcement learning (Deep RL) model. Traditional reinforcement learning is limited to situations where the action space and sample space are very small and are generally discrete. However, more complex tasks that are closer to the actual situation often have a large state space and a continuous action space. When the input data is an image or sound, it often has a high dimension, which is difficult for traditional reinforcement learning to handle. Deep reinforcement learning combines the high-dimensional input of deep learning with reinforcement learning.
[0043] The technical problems to be solved by the technical solution of this application and the inventive concept are described below:
[0044] As mentioned above, currently the training device can train the reinforcement learning model based on the traffic scene characteristics of the intersection at various times. However, the model trained by this training method has low accuracy.
[0045] In order to solve the above technical problems, the embodiment of the present application proposes to train the model by combining user feedback, traffic scene characteristics, and the traffic light duration predicted by the unoptimized model.
[0046] In some embodiments, the system architecture of the embodiments of the present application is as follows: Figure 2 shown.
[0047] Figure 2 This is a schematic diagram of a system architecture involved in an embodiment of the present application, including a user device 201, a data acquisition device 202, a training device 203, an execution device 204, a database 205 and a content library 206.
[0048] The data acquisition device 202 is used to read the training data from the content library 206 and store the read training data in the database 205. The training data involved in the embodiment of the present application includes traffic scene characteristics, duration prediction values and feedback information.
[0049] The training device 203 trains the signal light duration prediction model based on the training data maintained in the database 205, so that the trained signal light duration prediction model can effectively predict the signal light duration based on the traffic scene characteristics.
[0050] In addition, refer to Figure 2 The execution device 204 is configured with an I / O interface 207 to exchange data with external devices. For example, the traffic scene features and feedback information sent by the user device 201 are received through the I / O interface. The calculation module 208 in the execution device 204 uses the trained signal light duration prediction model to process the input traffic scene features and feedback information, outputs the signal light duration prediction value, and sends the corresponding result to the signal light through the I / O interface to set the duration of the signal light to the above signal light duration prediction value.
[0051] The user device 201 may include a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a desktop computer, or other terminal devices with a browser function installed.
[0052] The execution device 204 may be a server.
[0053] Exemplarily, the server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0054] In this embodiment, the execution device 204 is connected to the user device 201 through a network. The network may be a wireless or wired network such as an intranet, the Internet, the Global System of Mobilecommunication (GSM), Wideband Code Division Multiple Access (WCDMA), the 4th Generation (4G) network, the 5th Generation (5G) network, Bluetooth, wireless fidelity (Wi-Fi), a call network, etc.
[0055] It should be noted that Figure 2 It is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. In some embodiments, the data acquisition device 202 and the user device 201, the training device 203 and the execution device 204 can be the same device. The database 205 can be distributed on one server or on multiple servers, and the content library 206 can be distributed on one server or on multiple servers.
[0056] The technical solutions of the embodiments of the present application are described in detail below through some embodiments. Among them, the solutions provided by the embodiments of the present application may involve machine learning technology of artificial intelligence. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0057] Figure 3 The following is a flow chart of a model training method provided in an embodiment of the present application, which can be executed by a training device. Figure 3 As shown, the method may include:
[0058] S310: Acquire a first traffic scene feature of a target intersection;
[0059] In some implementations, the target intersection may be any crossroads or a T-junction, etc.
[0060] In some implementations, the first traffic scene feature includes any of the following, but is not limited to: vehicle features, road network features, traffic light features, and vehicle operation rules.
[0061] In some implementations, the vehicle feature includes any of the following, but is not limited thereto: the number of vehicles near the target intersection, and the position, direction, and speed of each vehicle.
[0062] In some implementations, the training device can collect an image of the target intersection at the current moment through a camera located at the target intersection, and identify the number of vehicles and the position and direction of each vehicle based on the image. It should be understood that the embodiment of the present application does not limit the method for obtaining the vehicle position and direction.
[0063] In some implementations, the training device may collect the speed of each vehicle through a laser radar located at the target intersection. It should be understood that the embodiment of the present application does not limit the method for obtaining the vehicle speed.
[0064] In some implementations, the road network features include any of the following, but are not limited to: the number of lanes in each direction of the target intersection, the turning information of each lane, and the lane speed limit information. The turning information of each lane includes, but is not limited to: allowing a direct right turn or requiring a right turn according to the indication of the right turn lane signal light. The lane speed limit information includes, but is not limited to: whether there is a speed limit requirement for each lane, and for lanes with speed limit requirements, the specific speed limit value of the lane.
[0065] In some implementations, the training device can obtain the road network features set by the user in the setting interface through the I / O interface. It should be understood that the embodiment of the present application does not limit the way of obtaining the road network features.
[0066] In some implementations, the traffic light feature includes any one of the following, but is not limited to: an initial state of a traffic light at a target intersection, wherein the initial state includes at least one of the following, but is not limited to: a red light duration, a green light duration, and a yellow light duration.
[0067] In some implementations, the training device can obtain the traffic light characteristics set by the user in the setting interface through the I / O interface. It should be understood that the embodiment of the present application does not limit the method for obtaining the traffic light characteristics.
[0068] In some possible implementations, the vehicle operation rule includes any of the following, but is not limited thereto: stop at a red light, go at a green light, and turn left according to the instruction of a left turn lane signal light.
[0069] In some implementations, the training device may obtain the vehicle operation rules through an I / O interface. It should be understood that the embodiment of the present application does not limit the method for obtaining the vehicle operation rules.
[0070] The following is an example to illustrate the method of obtaining the first traffic scene feature:
[0071] For example, the training device can collect an image of the target intersection at time t through a camera located at the target intersection, and identify the image. Assume that the number of identified vehicles is 200, and vehicle 1 is in the left turn lane of the southbound intersection, facing north, vehicle 2 is in the straight lane of the northbound intersection, facing south, vehicle 3 is in the straight lane of the eastbound intersection, facing west, vehicle 4 is in the right turn lane of the westbound intersection, facing east, etc. The training device can collect the speed of each vehicle through a laser radar located at the target intersection, including: the speed of vehicle 1 is 20 kilometers per hour (km / h), the speed of vehicle 2 is 25km / h, the speed of vehicle 3 is 30km / h, the speed of vehicle 4 is 40km / h, and so on. The training device can also obtain the road network features set by the user in the setting interface through the I / O interface, including: the number of lanes in the four directions of the target intersection is two lanes, each lane allows direct right turns, the straight lane at the westbound intersection has a speed limit of 40km / h, and the lanes at other intersections have no speed limit. The training device can also obtain the signal light features set by the user in the setting interface through the I / O interface, including: the red light duration is 20 seconds (second, s), the green light duration is 30s, and the yellow light duration is 3s in the north-south direction. The training device can also obtain the vehicle operation rules set by the user in the setting interface through the I / O interface, including: stop at red lights, go at green lights, and each direction intersection at the target intersection needs to turn left according to the instructions of the left turn lane signal light.
[0072] S320: Inputting the first traffic scene feature into a traffic light duration prediction model to obtain a first duration prediction value of a traffic light at a target intersection;
[0073] In some implementations, the signal light duration prediction model may be a reinforcement learning model, specifically a deep reinforcement learning model, and the signal light duration prediction model may also be an RNN. It should be understood that the embodiments of the present application do not limit the signal light duration prediction model.
[0074] Taking the traffic light duration prediction model as an example, when the agent is in S t When the state is reached and the agent performs action A t After that, the environment will be transferred to another S with a certain probability. t+1 state; at the same time, the environment will give the agent a reward R based on the potential reward function t+1 .
[0075] The reinforcement learning task involved in the embodiment of the present application is a traffic light duration prediction task, wherein the environment involved in the task may be a traffic scene at a certain intersection, and the action may be setting the duration of the traffic light to the predicted duration. The first traffic scene feature may be understood as the current state of the agent.
[0076] In some implementations, the first duration prediction value includes at least one of the following, but is not limited thereto: green light duration, red light duration, and yellow light duration.
[0077] It should be understood that if the process from S310 to S350 is referred to as a round of training process for the signal light duration prediction model, then the signal light duration prediction model involved in S320 is the signal light duration prediction model obtained in the previous round of training before the current round of training, or is an untrained signal light duration prediction model. Based on this, the signal light duration prediction model involved in S320 can also be referred to as a signal light duration prediction model that has not been trained or optimized in the current round.
[0078] S330: Deducing the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and sending the deduction result to the terminal device;
[0079] In some possible implementations, the training device may use digital twin technology to simulate a traffic scene corresponding to the first traffic scene feature, and may set the traffic light duration of the target intersection to the first duration prediction value to deduce the traffic scene at the target intersection.
[0080] It should be understood that digital twin technology uses vehicle characteristics, road network characteristics, traffic light characteristics, vehicle operation rules, etc., through a multi-disciplinary, multi-physical, multi-scale and multi-probability simulation process to complete the mapping of real intersection scenes in virtual space. The training equipment can intuitively reflect the full life cycle process of the corresponding real intersection scene based on the deduction results of the simulation model.
[0081] In some possible implementations, the training device may use a simulation model in the digital twin technology to simulate a traffic scene corresponding to the first traffic scene feature. The simulation model may be a Simulation of Urban MObility (SUMO), but is not limited thereto.
[0082] Among them, the SUMO simulation model is an open source, microscopic, multi-modal traffic simulation software. The simulation software is mainly composed of three main files: road network file (.net.xml), routing file (.rou.xml), and simulation operation file (.sumocfg). These three files are all written in the "xml" language.
[0083] In some possible implementations, the above deduction results may be in video form, but are not limited thereto.
[0084] For example, the training device can input the first traffic scene feature and the first duration prediction value into the SUMO simulation model. The SUMO simulation model can deduce the traffic scene at the target intersection, such as deducing the traffic scene of the target intersection at a future moment, and push the deduced video to the terminal device so that the terminal device displays the deduced video.
[0085] In some possible implementations, the terminal device can be any electronic device with a display screen, such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, a smart TV, or an electronic display screen located at the target intersection. The embodiments of the present application are not limited to this.
[0086] S340: receiving feedback information regarding the deduction result sent by the terminal device;
[0087] In some possible implementations, the feedback information includes at least one of the following, but is not limited thereto: an evaluation of the deduction result, reasons leading to the evaluation, and suggestions for improvement of the duration of traffic lights.
[0088] For example, after user A watches the simulation video, he or she may provide the following feedback: the intersection is too congested.
[0089] For example, after user A watches the simulation video, the following information is fed back: the green light duration is too short.
[0090] For example, after user A watches the simulation video, the following information is fed back: the green light time needs to be increased.
[0091] For example, after user A watches the simulation video, he or she may provide the following feedback: the intersection is too congested because the green light duration is too short.
[0092] For example, after watching the simulation video, user A gives the following feedback: the intersection is too congested and it is recommended to increase the green light time.
[0093] For example, after user A watches the simulation video, he or she may provide the following feedback: the green light duration is too short, and it is recommended to increase the green light duration.
[0094] For example, after watching the simulation video, user A gives the following feedback: the intersection is too congested because the green light duration is too short, and it is recommended to increase the green light duration.
[0095] In some possible implementations, the feedback information may be in the form of voice, text, etc., which is not limited in the embodiments of the present application.
[0096] S350: Training a traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information.
[0097] In some implementations, when the training device trains the traffic light duration prediction model, a reward value can be obtained. If the reward value is less than a preset threshold, the training device continues to execute S310 to S350. If the reward value is greater than or equal to the preset threshold, the training device stops training the traffic light duration prediction model.
[0098] In other possible implementations, after the training device completes this round of training on the traffic light duration prediction model, if the current number of training times has not reached the preset number of times, the training device continues to execute S310 to S350; if the current number of training times is greater than or equal to the preset number of times, the training device stops training the traffic light duration prediction model.
[0099] In some possible implementations, the training device may train a fusion model including a traffic light duration prediction model to achieve the purpose of training the traffic light duration prediction model.
[0100] In other possible implementations, the training device may first obtain the numerical value of at least one parameter of the signal light duration prediction model based on the first duration prediction value and feedback information, and then assign a value to the signal light duration prediction model based on the numerical value of at least one parameter, that is, update the signal light duration prediction model, and finally train the updated signal light duration prediction model based on the first traffic scene feature.
[0101] Figure 4 The schematic diagram of the model optimization provided in the embodiment of the present application is as follows: Figure 4 As shown, first, the training device can predict the signal light duration of the current intersection through the signal light duration prediction model that has not been optimized in this round. Furthermore, the training device can use the simulation model to deduce the traffic scene based on the signal light duration prediction value and display it to the user. Based on this, the user can observe the deduction results and make feedback on the deduction results. Furthermore, the training device can input the feedback information into the signal light duration prediction model to optimize the signal light duration prediction model.
[0102] In an embodiment of the present application, the training device can train a traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information. Since the traffic light duration prediction model can be optimized by the feedback information of the deduction result, the model accuracy can be improved.
[0103] The above S350 can be implemented in any of the following implementable ways, but is not limited thereto. Several implementable ways of S350 are described in detail below:
[0104] In a first implementation mode, S350 may include:
[0105] S350-1A: training a first fusion model based on a first traffic scene feature, a first duration prediction value, and feedback information;
[0106] Among them, the first fusion model includes: a first conversion model, a first intermediate layer and a traffic light duration prediction model; the first conversion model is used to convert the feedback information to obtain a first adjustment amount for the first duration prediction value; the first intermediate layer is used to obtain the second traffic scene characteristics based on the first traffic scene characteristics, the first duration prediction value and the first adjustment amount; the traffic light duration prediction model is used to process the second traffic scene characteristics to obtain a second duration prediction value of the traffic light.
[0107] In some implementations, the first conversion model may be a Transfomer model, a Bidirectional Encoder Representations from Transformers (BERT) model, etc., but is not limited thereto.
[0108] It should be understood that the first conversion model can be used for language translation. The above feedback information is in natural language, and the first conversion model can translate the feedback information into another expression, that is, into a first adjustment amount for the first duration prediction value, and the first adjustment amount is in numerical form.
[0109] It should be understood that the first duration prediction value includes at least one of the following, but is not limited thereto: green light duration, red light duration, yellow light duration. Based on this, the number of items of the first adjustment amount for the first duration prediction value is the same as the number of items included in the first duration prediction value.
[0110] For example, the first duration prediction value is that the green light duration is 30 seconds, and the first adjustment amount is to increase the green light duration by 10 seconds.
[0111] For another example, the first duration prediction value includes: green light duration = 30s, red light duration = 20s, and the first adjustment amount includes: adjustment amount for green light duration + 10s, adjustment amount for red light duration 0s. In other words, the green light duration is increased by 10s and the red light duration remains unchanged.
[0112] In some possible implementations, the first intermediate layer is specifically used to: adjust the first duration prediction value based on the first adjustment amount to obtain a third duration prediction value of the traffic light; and obtain the second traffic scene feature based on the third duration prediction value and the first traffic scene feature.
[0113] The following is an exemplary description of the calculation method of the third duration prediction value:
[0114] For example, assuming that the first duration prediction value is that the green light duration is 30 seconds, and the first adjustment amount is to increase the green light duration by 10 seconds, then the third duration prediction value is 30 seconds+10 seconds=40 seconds.
[0115] For another example, the first duration prediction value includes: green light duration = 30s, red light duration = 20s, the first adjustment amount includes: adjustment amount for green light duration + 10s, adjustment amount for red light duration 0s, then the third duration prediction value includes: green light duration = 30s + 10s = 40s, red light duration = 20s + 0s = 20s.
[0116] The first intermediate layer may obtain the second traffic scene feature by any of the following achievable methods, but is not limited thereto:
[0117] In some possible implementations, the first intermediate layer is specifically used to: input the third duration prediction value and the first traffic scene feature into a feature prediction module of the first intermediate layer to obtain the second traffic scene feature.
[0118] It should be understood that the input of the feature prediction module is the third duration prediction value and the first traffic scene feature, and the output is the second traffic scene feature.
[0119] In some implementations, the feature prediction module may be a neural network model, but is not limited thereto.
[0120] In some implementations, the feature prediction module may be a trained feature prediction module. In other words, when performing this round of training on the first fusion model, the training device does not need to train the feature prediction module, but only needs to train the first conversion model and the traffic light duration prediction model. Alternatively, when performing this round of training on the first fusion model, the training device needs to train the first intermediate layer, the first conversion model, and the traffic light duration prediction model together.
[0121] In some possible implementations, if the feature prediction module is a trained feature prediction module, the training method for the feature prediction module may be a supervised training method or an unsupervised training method.
[0122] In the training phase of the feature prediction module, the electronic device may calculate the training loss. Further, the electronic device may minimize the loss to adjust the parameters of the feature prediction module until the loss converges or the number of training times reaches a preset number.
[0123] In some implementations, the loss may be a cross entropy loss, a one-norm (L1) loss, a mean square error loss (MSE), etc., but is not limited thereto.
[0124] The following is an example to illustrate the achievable method of obtaining the second traffic scene feature in the first intermediate layer:
[0125] For example, suppose the third duration prediction value is that the green light duration in the north-south direction is 40s, and the first traffic scene features include: the number of vehicles is 200, and vehicle 1 is in the left turn lane of the southbound intersection, facing north, vehicle 2 is in the straight lane of the northbound intersection, facing south, vehicle 3 is in the straight lane of the eastbound intersection, facing west, vehicle 4 is in the right turn lane of the westbound intersection, facing east, etc. The speed of vehicle 1 is 20km / h, the speed of vehicle 2 is 25km / h, the speed of vehicle 3 is 30km / h, the speed of vehicle 4 is 40km / h, etc. The number of lanes in the four directions of the target intersection is two lanes, each lane allows direct right turn, the speed limit of the straight lane at the westbound intersection is 40km / h, and the speed limit of each lane at the intersection in other directions is not limited. At present, the red light duration in the north-south direction is 20s, the green light duration is 30s, and the yellow light duration is 3s. The vehicle operation rules include: stop at red lights, go at green lights, and each direction intersection at the target intersection needs to turn left according to the instructions of the left turn lane signal light. The third duration prediction value and the first traffic scene feature are input into the feature prediction module of the first intermediate layer to obtain the second traffic scene feature. The difference between this feature and the first traffic scene feature is that the number of vehicles in the second traffic scene feature is 250, of which the position, direction and speed of 200 vehicles are consistent with the position, direction and speed of the 200 vehicles included in the second traffic scene feature, and the position, direction and speed of the remaining 50 vehicles are vehicle 1 and vehicle 2 respectively. ’ In the left turn lane of the southbound intersection, heading north, vehicle 2 ’ In the northbound intersection, in the straight lane, facing south, vehicle 3 ’ In the through lane of the eastbound intersection, facing west, vehicle 4 ’ In the right turn lane of a westbound intersection, direction east, etc. Vehicle 1 ’ The speed of vehicle 2 is 30 km / h. ’ The speed of vehicle 3 is 40km / h. ’ The speed of the vehicle is 30km / h, and vehicle 4 ’ The speed is 40km / h, etc. At present, the red light duration in the north-south direction is 20s, the green light duration is 40s, and the yellow light duration is 3s.
[0126] In some other possible implementations, the first intermediate layer is specifically used to: determine a second adjustment amount for the first traffic scene feature based on the third duration prediction value; and adjust the first traffic scene feature based on the second adjustment amount to obtain a second traffic scene feature.
[0127] In some possible implementations, the third duration prediction value corresponds to the second adjustment amount.
[0128] For example, when the third duration prediction value is a green light duration of 30s, the corresponding second adjustment amount is that the number of vehicles increases by 50 relative to the number of vehicles in the first traffic scene characteristic, and the position, speed and direction of the 50 added vehicles are consistent with the position, speed and direction of any 50 vehicles in the first traffic scene characteristic. As for the road network characteristics, traffic light characteristics and vehicle operation rules, the second traffic scene characteristics are consistent with the first traffic scene characteristics.
[0129] In some further implementations, the first intermediate layer is specifically used to: determine a third traffic scene feature corresponding to a third duration prediction value; and fuse the third traffic scene feature with the first traffic scene feature to obtain a second traffic scene feature.
[0130] In some possible implementations, assuming that the third duration prediction value is a duration prediction value for the traffic light at the target intersection at time t, the training device can obtain the traffic scene characteristics of the target intersection at time t under historical circumstances, and use the traffic scene characteristics as the third traffic scene characteristics corresponding to the third duration prediction value.
[0131] In some possible implementations, the traffic scene features of the target intersection at time t under historical circumstances may be the traffic scene features of the target intersection at time t on a certain day in history.
[0132] For example, assuming that the third duration prediction value is the duration prediction for the north-south traffic lights at the target intersection at 6:00 p.m., the training device can obtain the traffic scene characteristics of the target intersection at 6:00 p.m. the previous day, and use the traffic scene characteristics as the third traffic scene characteristics corresponding to the third duration prediction value.
[0133] In some other possible implementations, the traffic scene feature of the target intersection at time t under historical circumstances may be a fusion result of multiple traffic scene features of the target intersection at time t in multiple historical days.
[0134] In some implementations, an average value of the number of vehicles in multiple traffic scene features may be calculated for the number of vehicles, but is not limited thereto.
[0135] In some possible implementations, for the vehicle position, direction and speed of each vehicle, the training device may select any traffic scene feature in which the number of vehicles is greater than the above average value from the above multiple traffic scene features, and then select the position, direction and speed of the above average number of vehicles from the traffic scene feature.
[0136] In some possible implementations, for road network features, traffic light features and vehicle operation rules, the road network features, traffic light features and vehicle operation rules in any one of multiple traffic scene features can be used as the road network features, traffic light features and vehicle operation rules corresponding to the third traffic scene feature.
[0137] For example, assuming that the third duration prediction value is for the duration prediction of the north-south traffic light at the target intersection at 6:00 p.m., the training device can obtain the traffic scene features of the target intersection at 6:00 p.m. two days ago. Assume that the traffic scene features of one day include: the number of vehicles is 200, and vehicle 1 is in the left turn lane of the southbound intersection, facing north, vehicle 2 is in the straight lane of the northbound intersection, facing south, vehicle 3 is in the straight lane of the eastbound intersection, facing west, vehicle 4 is in the right turn lane of the westbound intersection, facing east, etc. The speed of vehicle 1 is 20km / h, the speed of vehicle 2 is 25km / h, the speed of vehicle 3 is 30km / h, the speed of vehicle 4 is 40km / h, etc. The number of lanes in the four directions of the target intersection is two lanes, each lane allows direct right turn, the straight lane at the westbound intersection has a speed limit of 40km / h, and the lanes at other directions are not limited. At present, the red light duration in the north-south direction is 20s, the green light duration is 30s, and the yellow light duration is 3s. The vehicle operation rules include: stop at red light, go at green light, and each direction intersection at the target intersection needs to turn left according to the instructions of the left turn lane signal light. Assume that the traffic scene characteristics of another day include: the number of vehicles is 300, and vehicle 1 is in the left turn lane of the southbound intersection, facing north, vehicle 2 is in the straight lane of the northbound intersection, facing south, vehicle 3 is in the straight lane of the eastbound intersection, facing west, vehicle 4 is in the right turn lane of the westbound intersection, facing east, etc. The speed of vehicle 1 is 30km / h, the speed of vehicle 2 is 20km / h, the speed of vehicle 3 is 30km / h, the speed of vehicle 4 is 20km / h, and so on. The number of lanes in the four directions of the target intersection is two lanes, each lane allows a direct right turn, the speed limit of the straight lane at the westbound intersection is 40km / h, and the speed limit of each lane at the intersections in other directions is not limited. At present, the red light duration in the north-south direction is 20s, the green light duration is 30s, and the yellow light duration is 3s. The vehicle operation rules include: stop at red light, go at green light, and each direction intersection on the target intersection needs to turn left according to the instructions of the left turn lane signal light. Based on this, the third traffic scene feature includes: the number of vehicles is 250, of which the position, direction and speed of these 250 vehicles are consistent with the position, direction and speed of any 250 vehicles in the traffic scene feature of another day mentioned above, and the number of lanes in the four directions of the target intersection is two lanes, each lane allows a direct right turn, the speed limit of the straight lane at the westbound intersection is 40km / h, and the speed limit of each lane at the intersections in other directions is not limited. At present, the red light duration in the north-south direction is 20s, the green light duration is 30s, and the yellow light duration is 3s. Vehicle operation rules include: stop at red lights, go at green lights, and each direction intersection at the target intersection needs to turn left according to the instructions of the left turn lane signal light.
[0138] In some possible implementations, the training device may integrate the first traffic scene feature with the third traffic scene feature in the following manner, but is not limited thereto:
[0139] In some implementations, the average value of the number of vehicles in the first traffic scene feature and the number of vehicles in the third traffic scene feature may be calculated with respect to the number of vehicles, but this is not limited thereto.
[0140] In some possible implementations, for the vehicle position, direction and speed of each vehicle, the training device may select any traffic scene feature in which the number of vehicles is greater than the above average value from the first traffic scene feature and the third traffic scene feature, and then select the position, direction and speed of the above average value of vehicles from the traffic scene feature.
[0141] In some possible implementations, with respect to the road network features, traffic light features and vehicle operation rules, the road network features, traffic light features and vehicle operation rules in the first traffic scene features and any one of the third traffic scene features may be used as the road network features, traffic light features and vehicle operation rules corresponding to the fused traffic scene features.
[0142] It should be understood that, regarding the example of fusing the first traffic scene feature with the third traffic scene feature, reference can be made to the above-mentioned example of fusing multiple traffic scene features at time t in multiple historical situations, and the embodiments of the present application will not be elaborated on this.
[0143] The following is a detailed description of the second possible implementation method of S350:
[0144] In a second implementation mode, S350 may include:
[0145] S350-1B: training a second fusion model based on the first traffic scene feature, the first duration prediction value and the feedback information;
[0146] Among them, the second fusion model includes: a second conversion model, a second intermediate layer and a traffic light duration prediction model; the second conversion model is used to convert the feedback information and the first duration prediction value to obtain a fourth duration prediction value of the traffic light; the second intermediate layer is used to obtain the fourth traffic scene feature based on the first traffic scene feature and the fourth duration prediction value; the traffic light duration prediction model is used to process the fourth traffic scene feature to obtain a fifth duration prediction value of the traffic light.
[0147] In some implementations, the second conversion model may be a Transfomer model, a BERT model, etc., but is not limited thereto.
[0148] It should be understood that the second conversion model can be used for language translation. The above feedback information uses natural language, and the first conversion model can translate the feedback information and the first duration prediction value into another expression, that is, translate it into a fourth duration prediction value, which is in numerical form.
[0149] It should be understood that the first duration prediction value includes at least one of the following, but is not limited to: green light duration, red light duration, and yellow light duration.
[0150] It should be understood that the fourth duration prediction value has the same number of items as the first duration prediction value.
[0151] For example, assuming that the first duration prediction value is that the green light duration is 30s, and the feedback information is to increase the green light duration, then the fourth duration prediction value may be 30s+10s=40s, where 10s may be the default value.
[0152] For another example, assuming that the first duration prediction value includes: green light duration = 30s, red light duration = 20s, and the feedback information is to increase the green light duration, then the fourth duration prediction value may include: green light duration = 30s+10s=40s, red light duration = 20s, where 10s here may be the default value.
[0153] The second intermediate layer may obtain the fourth traffic scene feature by any of the following achievable methods, but is not limited thereto:
[0154] In some possible implementations, the second intermediate layer is specifically used to: input the fourth duration prediction value and the first traffic scene feature into a feature prediction module of the second intermediate layer to obtain the fourth traffic scene feature.
[0155] It should be understood that the input of the feature prediction module is the third duration prediction value and the first traffic scene feature, and the output is the second traffic scene feature.
[0156] In some implementations, the feature prediction module may be a neural network model, but is not limited thereto.
[0157] In some implementations, the feature prediction module may be a trained feature prediction module. In other words, when performing this round of training for the second fusion model, the training device does not need to train the feature prediction module, but only needs to train the second conversion model and the traffic light duration prediction model. Alternatively, when performing this round of training for the second fusion model, the training device needs to train the second intermediate layer, the second conversion model, and the traffic light duration prediction model together.
[0158] In some possible implementations, if the feature prediction module is a trained feature prediction module, the training method for the feature prediction module may be a supervised training method or an unsupervised training method.
[0159] In the training phase of the feature prediction module, the electronic device may calculate the training loss. Further, the electronic device may minimize the loss to adjust the parameters of the feature prediction module until the loss converges or the number of training times reaches a preset number.
[0160] In some implementations, the loss may be a cross entropy loss, a one-norm (L1) loss, a MSE, etc., but is not limited thereto.
[0161] It should be understood that an example of this implementable method can refer to a specific example in which a training device inputs the third duration prediction value and the first traffic scene feature into a feature prediction module of the first intermediate layer to obtain the second traffic scene feature, which will not be elaborated on.
[0162] In some other possible implementations, the second intermediate layer is specifically used to: determine a third adjustment amount for the first traffic scene feature based on the fourth duration prediction value; and adjust the first traffic scene feature based on the third adjustment amount to obtain a fourth traffic scene feature.
[0163] In some possible implementations, the fourth duration prediction value corresponds to the third adjustment amount.
[0164] It should be understood that an example of this achievable method can refer to a specific example in which a training device adjusts the first traffic scene feature based on the second adjustment amount to obtain the second traffic scene feature, which will not be described in detail.
[0165] In some further implementable embodiments, the second intermediate layer is specifically used to: determine a fifth traffic scene feature corresponding to the fourth duration prediction value; and fuse the fifth traffic scene feature with the first traffic scene feature to obtain a fourth traffic scene feature.
[0166] In some possible implementations, assuming that the fourth duration prediction value is a duration prediction value for the traffic light at the target intersection at time t, the training device can obtain the traffic scene characteristics of the target intersection at time t under historical circumstances, and use the traffic scene characteristics as the fifth traffic scene characteristics corresponding to the fourth duration prediction value.
[0167] In some possible implementations, the traffic scene features of the target intersection at time t under historical circumstances may be the traffic scene features of the target intersection at time t on a certain day in history.
[0168] In some other possible implementations, the traffic scene feature of the target intersection at time t under historical circumstances may be a fusion result of multiple traffic scene features of the target intersection at time t in multiple historical days.
[0169] It should be understood that for the explanation and specific examples of these two implementable methods, as well as the way in which the training device integrates the fifth traffic scene characteristics with the third traffic scene characteristics, reference can be made to the corresponding content in the first implementable method of S350, and this embodiment of the present application will not go into details therein.
[0170] The following is a detailed description of the third possible implementation method of S350:
[0171] Possible implementation method three, S350 may include:
[0172] S350-1C: Convert the feedback information based on the third conversion model to obtain a first value corresponding to at least one parameter of the traffic light duration prediction model;
[0173] The at least one parameter mentioned above may be a parameter with a specific meaning, for example, the A parameter and the B parameter represent parameters of the green light duration.
[0174] In some possible implementations, the feedback information has a corresponding relationship with the first numerical value corresponding to each of the at least one parameter. Based on this, after the training device obtains the feedback information, it can determine the first numerical value corresponding to each of the at least one parameter based on the corresponding relationship.
[0175] For example, assuming that the feedback information is to increase the green light duration, based on this, it can be determined that the A parameter value of the traffic light duration prediction model is 1, the B parameter value is 2, and the other parameters remain unchanged.
[0176] In some possible implementations, the training device may analyze historical data to obtain a corresponding relationship between the feedback information and the first numerical value corresponding to each of the at least one parameter.
[0177] For example, assuming that in historical circumstances, the feedback information is to increase the green light duration, the training device sets the A parameter to 1 and the B parameter to 2. Based on this, the reward value obtained is greater than the preset threshold. Then the training device can establish feedback information: the corresponding relationship between increasing the green light duration and A=1, B=2.
[0178] S350-2C: adjusting the first value corresponding to each of the at least one parameter based on the first duration prediction value to obtain a second value corresponding to each of the at least one parameter;
[0179] In some possible implementations, the first duration prediction value has a corresponding relationship with the adjustment amount of the first numerical value corresponding to each of the at least one parameter. Based on this, the training device can adjust the first numerical value corresponding to each of the at least one parameter according to the adjustment amount to obtain the second numerical value corresponding to each of the at least one parameter.
[0180] For example, assuming that the A parameter of the traffic light duration prediction model is 1 and the B parameter is 2, and the first duration prediction value is that the green light duration is 30s, the adjustment amounts of the A and B parameters corresponding to the 30s are both +1. Based on this, the second value corresponding to the A parameter is 2, and the second value corresponding to the B parameter is 2.
[0181] In some possible implementations, the training device may analyze historical data to obtain a corresponding relationship between the duration prediction value and the adjustment amount of the first numerical value corresponding to each of the at least one parameter.
[0182] For example, assuming that in historical situations when the green light duration is 30 seconds, the increase in the A parameter and the B parameter is 1, then the training device can establish feedback information: the corresponding relationship between the green light duration being 30 seconds and the adjustment amount of the A parameter and the B parameter being 1 respectively.
[0183] S350-3C: Update the traffic light duration prediction model based on the second numerical value corresponding to at least one parameter; and train the updated traffic light duration prediction model based on the first traffic scene feature.
[0184] It should be understood that the updating of the traffic light duration prediction model here refers to assigning the second numerical value corresponding to at least one parameter to the corresponding parameter.
[0185] For example, assuming that the second value corresponding to parameter A is 2 and the second value corresponding to parameter B is 3, the training device can assign parameters A and B in the traffic light duration prediction model to 2 and 3 respectively, while the values of other parameters remain unchanged.
[0186] It should be understood that the embodiment of the present application will not elaborate on the training method of the updated traffic light duration prediction model based on the first traffic scene feature training.
[0187] It should be understood that the difference between the implementation method 3 of S350 and the implementation methods 1 and 2 is that: in the implementation method 3, the conversion model and the traffic light duration prediction model are two independent models, wherein the conversion model converts the feedback information to obtain the first value of at least one parameter, and the training device adjusts the first value corresponding to each of the at least one parameter based on the first duration prediction value to obtain the second value corresponding to each of the at least one parameter, and the second value corresponding to each of the at least one parameter is used to first optimize the traffic light duration prediction model, and then train the optimized traffic light duration prediction model based on the first traffic scene feature. In the implementation methods 1 and 2, the conversion model and the traffic light duration prediction model are trained as a whole model.
[0188] The following is a detailed description of the fourth possible implementation method of S350:
[0189] Implementation method 4: S350 may include:
[0190] S350-1D: Convert the feedback information and the first duration prediction value based on a fourth conversion model to obtain a third value corresponding to at least one parameter of the signal light duration prediction model;
[0191] The at least one parameter mentioned above may be a parameter with a specific meaning, for example, parameter A and parameter B represent parameters of the green light duration.
[0192] In some possible implementations, the combination of the feedback information and the first duration prediction value corresponds to a third numerical value corresponding to at least one parameter. Based on this, the training device can determine the third numerical value corresponding to at least one parameter according to the feedback information and the first duration prediction value.
[0193] For example, assuming that the feedback information is to increase the green light duration, and the first duration prediction value is that the green light duration is 30s, based on this, it can be determined that the A parameter value of the traffic light duration prediction model is 1, the B parameter value is 2, and the other parameters remain unchanged.
[0194] In some possible implementations, the training device may analyze historical data to obtain a corresponding relationship between a combination of feedback information and the first duration prediction value and a third numerical value corresponding to each of at least one parameter.
[0195] For example, assuming that in historical circumstances, the feedback information is to increase the green light duration, and the predicted duration is that the green light duration is 30s, the training device sets the A parameter to 1 and the B parameter to 2. Based on this, the training device can establish the corresponding relationship between increasing the green light duration and the green light duration of 30s, and A=1, B=2.
[0196] S350-2D: Update the traffic light duration prediction model based on the third numerical value corresponding to at least one parameter; and train the updated traffic light duration prediction model based on the first traffic scene feature.
[0197] It should be understood that the updating of the traffic light duration prediction model here refers to assigning the third numerical value corresponding to at least one parameter to the corresponding parameter.
[0198] For example, assuming that the third value corresponding to parameter A is 2 and the third value corresponding to parameter B is 3, the training device can assign parameters A and B in the traffic light duration prediction model to 2 and 3 respectively, while the values of other parameters remain unchanged.
[0199] It should be understood that the embodiment of the present application will not elaborate on the training method of the updated traffic light duration prediction model based on the first traffic scene feature training.
[0200] It should be understood that the difference between the fourth implementation mode of S350 and the first and second implementation modes is that: in the fourth implementation mode, the conversion model and the signal light duration prediction model are two independent models, wherein the conversion model converts the feedback information and the first duration prediction value to obtain a third value of at least one parameter, and the third value corresponding to each of the at least one parameter is used to first optimize the signal light duration prediction model, and then train the optimized signal light duration prediction model based on the first traffic scene feature. In the first and second implementation modes, the conversion model and the signal light duration prediction model are trained as a whole model.
[0201] In an embodiment of the present application, since the conversion model can convert feedback information in natural language form, or feedback information in natural language form and a first duration prediction value, the traffic light duration prediction model is trained based on the conversion result or the processing result of the conversion result by the intermediate layer, so that the feedback information is directly or indirectly used to optimize the traffic light duration prediction model, thereby improving the model accuracy.
[0202] Figure 5 A flowchart of a prediction method provided in an embodiment of the present application, the method can be executed by an execution device, the execution device can be a server, but is not limited thereto, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Figure 5 As shown, the method may include:
[0203] S510: Obtaining traffic scene features of the target intersection;
[0204] It should be understood that the explanation of the traffic scene characteristics can refer to the explanation of the first traffic scene characteristics above, and the embodiments of the present application will not go into details.
[0205] S520: Input the traffic scene features into the traffic light duration prediction model trained according to the above-mentioned model training method to obtain the predicted value of the duration of the traffic light at the target intersection.
[0206] For example, the execution device can input the traffic scene characteristics of the target intersection at time t into the trained traffic light duration prediction model, and obtain the predicted duration value of the traffic light at the target intersection at time t.
[0207] In some possible implementations, the execution device may also provide the traffic light with a predicted duration value of the traffic light at the target intersection, so that the traffic light sets the duration.
[0208] In the embodiment of the present application, since the traffic light duration prediction model can be optimized by feedback information based on the deduction results, the model accuracy can be improved, so that in the prediction stage, the accuracy of the duration prediction value can be improved, thereby reducing the probability of road congestion and traffic accidents.
[0209] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further explain various possible combinations. For another example, the various different embodiments of the present application can also be arbitrarily combined, as long as they do not violate the ideas of the present application, they should also be regarded as the contents disclosed in the present application.
[0210] It should also be understood that in the various method embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0211] The method provided in the embodiment of the present application is described above, and the device provided in the embodiment of the present application is described below.
[0212] Figure 6 A schematic diagram of a model training device 600 provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the device 600 may include: an acquisition module 610, an input module 620, a deduction module 630, a receiving module 640, and a training module 650, wherein the acquisition module 610 is used to acquire the first traffic scene feature of the target intersection; the input module 620 is used to input the first traffic scene feature into the traffic light duration prediction model to obtain the first duration prediction value of the traffic light located at the target intersection; the deduction module 630 is used to deduce the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and send the deduction result to the terminal device; the receiving module 640 is used to receive feedback information on the deduction result sent by the terminal device; the training module 650 is used to train the traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information.
[0213] In some possible implementations, the training module 650 is specifically used to: train a first fusion model based on the first traffic scene feature, the first duration prediction value and the feedback information; wherein the first fusion model includes: a first conversion model, a first intermediate layer and a traffic light duration prediction model; the first conversion model is used to convert the feedback information to obtain a first adjustment amount for the first duration prediction value; the first intermediate layer is used to obtain the second traffic scene feature based on the first traffic scene feature, the first duration prediction value and the first adjustment amount; the traffic light duration prediction model is used to process the second traffic scene feature to obtain a second duration prediction value of the traffic light.
[0214] In some possible implementations, the first intermediate layer is specifically used to: adjust the first duration prediction value based on the first adjustment amount to obtain a third duration prediction value of the traffic light; and obtain the second traffic scene feature based on the third duration prediction value and the first traffic scene feature.
[0215] In some possible implementations, the first intermediate layer is specifically used to: input the third duration prediction value and the first traffic scene feature into a feature prediction module of the first intermediate layer to obtain the second traffic scene feature.
[0216] In some possible implementations, the first intermediate layer is specifically used to: determine a second adjustment amount for the first traffic scene feature based on the third duration prediction value; and adjust the first traffic scene feature based on the second adjustment amount to obtain a second traffic scene feature.
[0217] In some possible implementations, the first intermediate layer is specifically used to: determine a third traffic scene feature corresponding to a third duration prediction value; and fuse the third traffic scene feature with the first traffic scene feature to obtain a second traffic scene feature.
[0218] In some possible implementations, the training module 650 is specifically used to: train a second fusion model based on the first traffic scene feature, the first duration prediction value and the feedback information; wherein the second fusion model includes: a second conversion model, a second intermediate layer and a traffic light duration prediction model; the second conversion model is used to convert the feedback information and the first duration prediction value to obtain a fourth duration prediction value of the traffic light; the second intermediate layer is used to obtain a fourth traffic scene feature based on the first traffic scene feature and the fourth duration prediction value; the traffic light duration prediction model is used to process the fourth traffic scene feature to obtain a fifth duration prediction value of the traffic light.
[0219] In some possible implementations, the second intermediate layer is specifically used to: input the fourth duration prediction value and the first traffic scene feature into a feature prediction module of the second intermediate layer to obtain the fourth traffic scene feature.
[0220] In some possible implementations, the second intermediate layer is specifically used to: determine a third adjustment amount for the first traffic scene feature based on the fourth duration prediction value; and adjust the first traffic scene feature based on the third adjustment amount to obtain a fourth traffic scene feature.
[0221] In some possible implementations, the second intermediate layer is specifically used to: determine the fifth traffic scene feature corresponding to the fourth duration prediction value; and fuse the fifth traffic scene feature with the first traffic scene feature to obtain the fourth traffic scene feature.
[0222] In some possible implementations, the training module 650 is specifically used to: convert the feedback information based on the third conversion model to obtain a first numerical value corresponding to at least one parameter of the traffic light duration prediction model; adjust the first numerical value corresponding to at least one parameter based on the first duration prediction value to obtain a second numerical value corresponding to at least one parameter; update the traffic light duration prediction model based on the second numerical value corresponding to at least one parameter; and train the updated traffic light duration prediction model based on the first traffic scene feature.
[0223] In some possible implementations, the training module 650 is specifically used to: convert the feedback information and the first duration prediction value based on the fourth conversion model to obtain a third numerical value corresponding to at least one parameter of the signal light duration prediction model; update the signal light duration prediction model based on the third numerical value corresponding to at least one parameter; and train the updated signal light duration prediction model based on the first traffic scene feature.
[0224] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 6 The device 600 shown may perform Figure 3 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 600 are respectively to implement Figure 3 For the sake of brevity, the corresponding processes in each method are not repeated here.
[0225] The above describes the device 600 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0226] Figure 7 A schematic diagram of a prediction device 700 provided in an embodiment of the present application is shown as follows: Figure 7 As shown, the device 700 may include: an acquisition module 710 and an input module 720, wherein the acquisition module 710 is used to acquire the traffic scene characteristics of the target intersection; the input module 720 is used to input the traffic scene characteristics into the traffic light duration prediction model trained according to the above-mentioned model training method to obtain the predicted duration value of the traffic light at the target intersection.
[0227] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here. Specifically, Figure 7 The device 700 shown may perform Figure 5 The corresponding method embodiments, and the aforementioned and other operations and / or functions of each module in the device 700 are respectively to implement Figure 5 For the sake of brevity, the corresponding processes in each method are not repeated here.
[0228] The above describes the device 700 of the embodiment of the present application from the perspective of the functional module in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or a combination of hardware and software modules in the decoding processor to perform. Optionally, the software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in conjunction with its hardware.
[0229] Figure 8 It is a schematic block diagram of an electronic device provided in an embodiment of the present application.
[0230] like Figure 8 As shown, the electronic device may include:
[0231] The memory 810 and the processor 820, the memory 810 is used to store the computer program and transmit the program code to the processor 820. In other words, the processor 820 can call and run the computer program from the memory 810 to implement the method in the embodiment of the present application.
[0232] For example, the processor 820 may be configured to execute the above method embodiments according to instructions in the computer program.
[0233] In some embodiments of the present application, the processor 820 may include but is not limited to:
[0234] General-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0235] In some embodiments of the present application, the memory 810 includes but is not limited to:
[0236] Volatile memory and / or non-volatile memory. Among them, the non-volatile memory can be read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM) or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0237] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 810 and executed by the processor 820 to complete the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0238] like Figure 8 As shown, the electronic device may also include:
[0239] The transceiver 830 may be connected to the processor 820 or the memory 810 .
[0240] The processor 820 may control the transceiver 830 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 830 may include a transmitter and a receiver. The transceiver 830 may further include an antenna, and the number of antennas may be one or more.
[0241] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0242] The present application also provides a computer storage medium on which a computer program is stored, and when the computer program is executed by a computer, the computer can perform the method of the above method embodiment. In other words, the present application embodiment also provides a computer program product containing instructions, and when the instructions are executed by a computer, the computer can perform the method of the above method embodiment.
[0243] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., a solid state drive (solid state disk, SSD)), etc.
[0244] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0245] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the module is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0246] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. For example, each functional module in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0247] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A model training method, It is characterized in that include: Acquire a first traffic scene feature of a target intersection; Inputting the first traffic scene feature into a traffic light duration prediction model to obtain a first duration prediction value of a traffic light located at the target intersection; Deducing the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and sending the deduction result to a terminal device; receiving feedback information regarding the deduction result sent by the terminal device; The traffic light duration prediction model is trained based on the first traffic scene feature, the first duration prediction value and the feedback information.
2. The method according to claim 1, It is characterized in that The training of the signal light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information includes: Training a first fusion model based on the first traffic scene feature, the first duration prediction value and the feedback information; Among them, the first fusion model includes: a first conversion model, a first intermediate layer and the traffic light duration prediction model; the first conversion model is used to convert the feedback information to obtain a first adjustment amount for the first duration prediction value; the first intermediate layer is used to obtain the second traffic scene feature based on the first traffic scene feature, the first duration prediction value and the first adjustment amount; the traffic light duration prediction model is used to process the second traffic scene feature to obtain the second duration prediction value of the traffic light.
3. The method according to claim 2, It is characterized in that The first intermediate layer is specifically used for: Adjusting the first duration prediction value based on the first adjustment amount to obtain a third duration prediction value of the traffic light; Based on the third duration prediction value and the first traffic scene feature, the second traffic scene feature is obtained.
4. The method according to claim 3, It is characterized in that The first intermediate layer is specifically used for: The third duration prediction value and the first traffic scene feature are input into the feature prediction module of the first intermediate layer to obtain the second traffic scene feature.
5. The method according to claim 3, It is characterized in that The first intermediate layer is specifically used for: Determining a second adjustment amount for the first traffic scene feature based on the third duration prediction value; The first traffic scene feature is adjusted based on the second adjustment amount to obtain the second traffic scene feature.
6. The method according to claim 3, It is characterized in that The first intermediate layer is specifically used for: Determining a third traffic scene feature corresponding to the third duration prediction value; The third traffic scene feature and the first traffic scene feature are fused to obtain the second traffic scene feature.
7. The method according to claim 1, It is characterized in that The training of the signal light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information includes: Training a second fusion model based on the first traffic scene feature, the first duration prediction value and the feedback information; Among them, the second fusion model includes: a second conversion model, a second intermediate layer and the traffic light duration prediction model; the second conversion model is used to convert the feedback information and the first duration prediction value to obtain the fourth duration prediction value of the traffic light; the second intermediate layer is used to obtain the fourth traffic scene feature based on the first traffic scene feature and the fourth duration prediction value; the traffic light duration prediction model is used to process the fourth traffic scene feature to obtain the fifth duration prediction value of the traffic light.
8. The method according to claim 7, It is characterized in that The second intermediate layer is specifically used for: The fourth duration prediction value and the first traffic scene feature are input into the feature prediction module of the second intermediate layer to obtain the fourth traffic scene feature.
9. The method according to claim 7, It is characterized in that The second intermediate layer is specifically used for: Determining a third adjustment amount for the first traffic scene feature based on the fourth duration prediction value; The first traffic scene feature is adjusted based on the third adjustment amount to obtain the fourth traffic scene feature.
10. The method according to claim 7, It is characterized in that The second intermediate layer is specifically used for: Determining a fifth traffic scene feature corresponding to the fourth duration prediction value; The fifth traffic scene feature and the first traffic scene feature are fused to obtain the fourth traffic scene feature.
11. The method according to claim 1, It is characterized in that The training of the signal light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information includes: Convert the feedback information based on a third conversion model to obtain a first value corresponding to at least one parameter of the signal light duration prediction model; Adjusting a first value corresponding to each of the at least one parameter based on the first duration prediction value to obtain a second value corresponding to each of the at least one parameter; The signal light duration prediction model is updated based on the second numerical value corresponding to each of the at least one parameter; and the updated signal light duration prediction model is trained based on the first traffic scene feature.
12. The method according to claim 1, It is characterized in that The training of the signal light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information includes: Convert the feedback information and the first duration prediction value based on a fourth conversion model to obtain a third value corresponding to at least one parameter of the signal light duration prediction model; The signal light duration prediction model is updated based on the third numerical value corresponding to each of the at least one parameter; and the updated signal light duration prediction model is trained based on the first traffic scene feature.
13. A prediction method, It is characterized in that include: Obtain traffic scene features of the target intersection; The traffic scene features are input into a traffic light duration prediction model trained according to the method according to any one of claims 1 to 12 to obtain a predicted duration value of the traffic light at the target intersection.
14. A model training device, It is characterized in that include: An acquisition module, used to acquire a first traffic scene feature of a target intersection; An input module, used for inputting the first traffic scene feature into a traffic light duration prediction model to obtain a first duration prediction value of the traffic light located at the target intersection; A deduction module, configured to deduce the traffic scene at the target intersection based on the first traffic scene feature and the first duration prediction value, and send the deduction result to a terminal device; A receiving module, configured to receive feedback information regarding the deduction result sent by the terminal device; A training module is used to train the traffic light duration prediction model based on the first traffic scene feature, the first duration prediction value and the feedback information.
15. A prediction device, It is characterized in that include: An acquisition module, used to acquire traffic scene features of a target intersection; An input module is used to input the traffic scene features into a traffic light duration prediction model trained according to the method according to any one of claims 1 to 12 to obtain a predicted value of the duration of the traffic light at the target intersection.
16. An electronic device, It is characterized in that include: A processor and a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 13.
17. A computer-readable storage medium, It is characterized in that Used to store a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 13.
