A method for sensing electric vehicle charging demand based on roadside cameras

By combining greedy algorithms and genetic algorithms to optimize camera deployment, the problem of insufficient roadside camera coverage was solved, enabling accurate and rapid early warning of electric vehicle charging needs and improving the real-time performance and security of video transmission.

CN119889055BActive Publication Date: 2025-11-14CHONGQING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510068932.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-16
Publication Date
2025-11-14
Estimated Expiration
2045-01-16

AI Technical Summary

Technical Problem

Existing roadside cameras are not widely deployed for detecting traffic accidents and violations, have insufficient coverage, and suffer from low real-time video transmission and low clarity, failing to meet the needs for early warning of electric vehicle charging demand.

Method used

A combination of greedy and genetic algorithms is used to optimize camera deployment locations, determine camera clarity and number, and transmit the data to the cloud for comprehensive judgment and early warning after edge processing.

Benefits of technology

It achieves more comprehensive road coverage, improves the accuracy and real-time nature of camera data acquisition, ensures timely video transmission and the security of driver information, and enables accurate charging demand warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889055B_ABST
    Figure CN119889055B_ABST
Patent Text Reader

Abstract

This invention pertains to the field of electric vehicle charging and relates to a method for sensing electric vehicle charging demand based on roadside cameras. The method includes: calculating the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost at each intersection; determining the intersections where cameras are deployed using a greedy algorithm and a genetic algorithm; determining the resolution and number of cameras at each intersection based on the traffic flow weight, vehicle waiting time weight, and road width weight; collecting video data using the cameras; performing edge processing on the collected video data before transmitting it to the cloud; and making comprehensive judgments and issuing warnings based on the received data. This invention combines an improved greedy algorithm and a genetic algorithm to determine the location of road monitoring cameras based on the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost, thereby maximizing road coverage while minimizing deployment costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of electric vehicle charging and relates to a method for sensing electric vehicle charging demand based on roadside cameras. Background Technology

[0002] Developing new energy vehicles is an essential path for my country to transform from a major automobile producer to a leading automobile power, and a crucial measure to address global climate change and promote green development to achieve a dual-carbon strategy. Currently, my country has a very large number of new energy vehicles. Such a large-scale connection of electric vehicles to the power grid will severely impact the grid load. Furthermore, since electric vehicle charging takes longer than refueling, it may lead to congestion at charging stations. To address these issues, roadside cameras are used to collect driver information and transmit it to traffic management departments, power companies, and other relevant departments. By analyzing the data, early warnings and guidance can be provided for areas where large-scale charging is expected, reducing the risk of grid load disruption in those areas.

[0003] Currently, roadside cameras are only deployed for traffic accidents and violations. Their coverage area is not wide enough, the deployment cost is not low enough, and the real-time video transmission and clarity are low, which cannot meet the needs of early warning. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention employs a method for sensing electric vehicle charging demand based on a roadside camera, comprising:

[0005] S1. Calculate the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost for each intersection. Combine greedy algorithm and genetic algorithm to determine the intersections where cameras are deployed based on the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost.

[0006] S2. Determine the resolution and number of cameras at intersections where cameras are deployed based on traffic flow weight, vehicle waiting time weight, and road width weight.

[0007] S3. Use deployed cameras to collect video data, perform edge processing on the video data collected by the cameras, and then transmit it to the cloud;

[0008] S4. The cloud platform makes comprehensive judgments and issues warnings based on the received data.

[0009] The intersections where cameras will be deployed include:

[0010] S11. Construct an undirected graph G of urban roads. 0 = (P, S), construct the minimum vertex cover set; where P is the vertex set, vertices are intersections, and S is the edge set, edges are roads connecting intersections;

[0011] S12. Calculate the value of each vertex p based on traffic flow weight, vehicle waiting time weight, road width weight, and the cost of deploying cameras. i Overall weight Where i is the index of the vertex;

[0012] S13. Calculate the undirected graph G of urban roads. z-1 Each vertex p in i Adjacency Adjacency and comprehensive weight By combining the results, we obtain the overall adjacency degree. Where z is the number of iterations;

[0013] S14, If the adjacency degree is considered If there are multiple highest-degree vertices, then the vertex with the highest overall proximity degree is selected. The vertex with the lowest adjacency; otherwise, directly select the vertex with the combined adjacency. The highest peak;

[0014] S15. Add the selected vertex to the minimum vertex cover set in the undirected graph G of city roads. z-1 Delete the selected vertex and its associated edges to obtain the undirected graph G of the city roads. z ;

[0015] S16. Determine the location of an undirected graph G in a city. z If all edges have been deleted, then the minimum vertex cover set of the greedy algorithm is obtained, which is the optimized camera deployment location; otherwise, return to step S13.

[0016] S17. Use the minimum vertex cover set of the greedy algorithm as an individual in the genetic algorithm, process the individual using the genetic algorithm, and obtain the final minimum vertex cover set, which determines the intersection where the camera is deployed.

[0017] Calculate intersection p i Traffic flow weighting includes: obtaining intersection p i Based on the traffic flow, calculate p for each intersection. i Average traffic flow during peak hours and average daily traffic volume Average traffic volume at all intersections Select the largest traffic flow as the maximum average traffic flow during peak hours. Average traffic volume at all intersections Choose the highest traffic volume as the maximum average traffic volume for the day. Based on average traffic flow Get intersection p iTraffic flow weight.

[0018] Calculate intersection p i Road width weights include: obtaining intersection p i Calculate the width of the connecting roads and the intersection p. i The sum of the widths of all roads, R i Choose the road width r that connects all intersections. max According to the sum of widths R i and maximum road width r max Calculate intersection p i Road width weight.

[0019] Calculate intersection p i Vehicle waiting time includes: obtaining intersection p i In each phase Green light time of traffic lights at the location and period C; the phase corresponds to a traffic flow direction at the intersection; obtain intersection p i In each phase saturation flow at Get intersection p i In each phase Traffic flow at the location According to traffic flow Calculate intersection p i In each phase Weighted average traffic flow at the location Calculate the weighted average traffic flow and saturation flow ratio Based on weighted average traffic flow time Period C and ratio Calculate the vehicle's speed at the intersection p i Total delay time t i Based on the total delay time t i Calculate intersection p i The weight of vehicle waiting time.

[0020] The cost of deploying cameras includes: obtaining the road width at each intersection, and obtaining the value of camera p at each intersection. i Camera installation height h i and the camera's horizontal angle α h Vertical angle α v And price, based on height h i Horizontal angle α h and vertical angle α v Calculate intersection p i The bottom width WB of the camera's monitoring rangei According to the bottom width WB i and intersection p i Road width calculation in p i The number of cameras installed at the intersection is calculated based on the number of cameras and their prices. i The cost of deploying cameras.

[0021] Determining the camera clarity at an intersection where cameras are deployed involves: calculating camera selection weights based on traffic flow weights, vehicle waiting time weights, and road width weights at the intersection where cameras are deployed; and then determining the camera clarity at the intersection based on these selection weights.

[0022] Transmitting edge-processed video data collected by cameras to the cloud includes: constructing a system model, which includes the cloud, base stations, and their associated cameras; constructing a task offloading model and a computing resource allocation model based on the system model; constructing a video data task optimization model based on the task offloading model and the computing resource allocation model; solving the video data task optimization model to obtain the optimal task offloading decision and computing resource allocation decision; and transmitting edge-processed video data collected by cameras to the cloud based on the optimal task offloading decision and computing resource allocation decision.

[0023] The video data task optimization model is as follows:

[0024]

[0025]

[0026] Where C1 represents each camera u i The video can only be unloaded to one base station e j Or executed in the cloud, C2 represents each base station e j For its associated camera u i Allocate one computing resource, and the allocated computing resources cannot exceed those of base station e. j Total resources, C3 represents the total resources of each base station e j Each subband k can be associated with at most one camera u. i For video transmission, C4 indicates that the previous layer's video data must be transmitted before the next layer's; J(X, F) represents the objective optimization function. For camera u i The computational unloading efficiency, Indicates the base station's connection to the camera u i The degree of preference, X and F represent the task unloading decision and computing resource allocation decision, respectively, N(e j ) indicates the connection with base station e jThe associated set of cameras, where E represents the set of base stations. This indicates the task unloading decision, specifying whether to unload from the camera. i The m-th layer of the video is offloaded to the base station e via sub-band k. j Above, M represents the set of video levels, and K represents the set of sub-bands. Indicates base station e j Assigned to camera u i The amount of computing resources, f s Available computing resources for the base station Indicates camera u i via subband k to base station e j The upload speed of the m-layer video.

[0027] camera u i The computational unloading efficiency is:

[0028]

[0029]

[0030] in, These represent preferences for latency, energy consumption, and cost, respectively. These represent the time characteristics, energy consumption characteristics, and cost characteristics of video data transmission tasks, respectively. To reduce latency when directly offloading video data tasks to the cloud, To make the camera u i The total latency of offloading video data tasks to the base station. Energy consumption for directly offloading video data tasks to the cloud. To make the camera u i The total energy consumption of offloading video data tasks to the base station. Indicates that the camera u i Videos are unloaded to base station e j The decision, To make the camera u i The transmission cost of offloading video data tasks to the base station. Camera u i The transmission cost of directly transmitting video data to the cloud.

[0031] Beneficial effects:

[0032] 1. This invention combines an improved greedy algorithm and a genetic algorithm to determine the location of road surveillance cameras based on traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost. This maximizes road coverage while minimizing deployment costs, enabling cameras to acquire more comprehensive vehicle data and conduct more accurate and rapid comprehensive judgments and warnings. 2. This invention selects cameras with targeted clarity and quantity at intersections based on traffic flow weight, vehicle waiting time weight, and road width weight, improving the effectiveness of camera clarity and quantity at these intersections. 3. This invention segments and transmits video to an edge server for processing before transmitting it back to the cloud or control center, reducing video transmission latency, ensuring real-time video transmission, and protecting driver information security. Attached Figure Description

[0033] Figure 1 A flowchart illustrating an electric vehicle charging demand sensing method based on a roadside camera, provided as an embodiment of the present invention;

[0034] Figure 2 A flowchart combining an improved greedy algorithm and a genetic algorithm is provided for embodiments of the present invention. Detailed Implementation

[0035] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] like Figure 1 As shown, the present invention employs a method for sensing electric vehicle charging demand based on a roadside camera, comprising:

[0037] S1. Calculate the traffic flow weight, vehicle waiting time weight, road width weight, and the cost of deploying cameras at each intersection. Combine greedy algorithm and genetic algorithm to determine the location of camera deployment based on the traffic flow weight, vehicle waiting time weight, road width weight, and the cost of deploying cameras at each intersection.

[0038] Mapping the urban road surveillance camera network as an undirected graph, the problem of optimizing camera network deployment can be transformed into finding the minimum number of vertices that cover all edges of the graph. An improved greedy algorithm combined with a genetic algorithm is used to solve the camera deployment problem, resulting in an urban road-side camera deployment strategy. The goal of this strategy is to maximize coverage of all roads while minimizing deployment costs.

[0039] like Figure 2 As shown, the specific steps include:

[0040] S11. Initialize parameters: Construct an undirected graph G of city roads. 0 = (P, S); where P = {p1, p2, ..., p...} n Let} be the set of vertices representing an intersection, S = {s1, s2, ..., s} m Let} be the set of edges, representing the roads connecting intersections; counting graph G 0 The number of edges POS is initialized, the minimum vertex cover set MPOS is initialized to empty, and the number of covered edges COS is initialized to 0.

[0041] S12. Calculate the value of each vertex p based on traffic flow weight, vehicle waiting time weight, road width weight, and the cost of deploying cameras. i Overall weight Where i is the index of the vertex;

[0042] S13. Calculate the undirected graph G of urban roads obtained in the previous iteration z-1. z-1 Each vertex p in i Adjacency Adjacency and comprehensive weight By combining the results, we obtain the overall adjacency degree. Where z is the number of iterations;

[0043] The specific steps include:

[0044] Calculate the adjacency of each vertex:

[0045] In the undirected graph G of urban roads z-1 Midpoint and vertex p i The set of all adjacent points is N G (p i If the vertex p is true, then the vertex p is true. i Adjacency for:

[0046]

[0047] Where, p j For vertex p i Adjacent vertices, d i It is vertex p i The degree (degree refers to the number of edges connected to a vertex).

[0048] The calculation of traffic flow weights at each intersection includes:

[0049] Traffic flow reflects the number of vehicles passing through a particular intersection or road segment, and can be obtained through direct observation or calculation using traffic models. The higher the traffic flow, the greater the importance of monitoring. (The set of traffic flow through an intersection...) in Through intersection p i Traffic flow It is the time period h during which the intersection p is passed. i Let H be the traffic flow rate, and H be the number of time periods, then the intersection p i Traffic flow weight W flow (p i )for:

[0050]

[0051] α1+β1=1

[0052] Among them, W flow (p i ) is the intersection p i Traffic flow weight It's an intersection p i Average traffic volume during peak hours It's an intersection p i Average traffic volume over a day; This represents the maximum average traffic volume at all intersections during peak hours. It represents the maximum average traffic flow at all intersections within a day; α1 and β1 are the weighting coefficients for peak hour traffic flow and average traffic flow within a day, respectively.

[0053] The calculation of road width weights at each intersection includes:

[0054] Road width affects the coverage area of ​​surveillance cameras. Wider roads require higher resolution or more cameras to cover them. Road width weighting is as follows:

[0055]

[0056] Among them, W width (p i ) is the intersection p i Road width weight, R i For intersection p i The sum of the widths of the connecting roads, r max The maximum road width among all roads connected by intersections.

[0057] The calculation of waiting time weights for vehicles at each intersection includes:

[0058] Waiting time reflects the time vehicles spend waiting to pass through an intersection, and is usually related to traffic lights and the degree of congestion at the intersection. The longer the waiting time, the greater the importance of monitoring. The set of vehicle travel times at each intersection is T = {t1, t2, ..., t...}. n The traffic light time set for each intersection is L = {l1, l2, ... l}. O}, then the vehicle passes through intersection p i Total delay time t i for:

[0059]

[0060] Where O represents the number of phases at the intersection, each phase corresponding to a specific traffic flow direction (such as north-south straight, east-west straight, north-south left turn, east-west left turn, etc.). Within one signal cycle, all phases sequentially receive green light time. For p i Intersection phase The corresponding weighted average traffic flow, t i This indicates that the car is passing through intersection p. i The total delay time is given by C, where C is the traffic light cycle (in seconds). For p i Intersection phase The corresponding green light time (in seconds), For p i Intersection phase Traffic flow and saturation flow Q i The ratio, For intersection p i During peak hours in phase Average traffic flow at the location For intersection p i Phases within a day Average traffic flow at the location, average traffic flow The calculation can be performed using the formulas for calculating the average traffic flow during peak hours and the average traffic flow throughout the day in the above calculation of traffic flow weights for each intersection, except that intersection p... i Traffic flow Replace with intersection p i In each phase Traffic flow at the location Saturation flow This refers to the intersection p under ideal conditions. i In phase The maximum number of vehicles that can pass through within a unit of time (usually one hour) is then weighted by the vehicle waiting time:

[0061]

[0062] Among them, W wait (p i ) is the intersection p i The waiting time weight, t i This indicates that the vehicle is passing through intersection p. i Total delay time, t max This represents the maximum total delay time across all intersections.

[0063] Calculate at intersection p i The cost of deploying cameras includes:

[0064] The monitoring range is usually trapezoidal, with the bottom edge at the camera location and the top edge at the farthest point of the monitoring range.

[0065] Calculate the distance CD from the camera to the ground:

[0066]

[0067] Calculate the bottom width WB of the monitored area:

[0068]

[0069] Where h represents p i The installation height of the camera is generally selected based on the actual location of the installation area. h α represents the horizontal field of view of the camera. v α represents the vertical angle of view of the camera. h and α v Provided by the camera manufacturer.

[0070] Calculate the number of cameras:

[0071]

[0072] Calculate the cost of deploying cameras:

[0073] C deploy (p i ) = C cam (p i CA i

[0074] Among them, CA i Indicates in p i The number of cameras installed at the location, r i,j Indicates intersection p j At the intersection p i The width of the connected roads, N G (p i ) indicates the intersection p i A collection of connected intersections. This indicates rounding up to the nearest integer to ensure there are enough cameras to cover the entire intersection. (C) deploy (p i ) indicates at the intersection p i The cost of deploying cameras at location C cam (p i ) indicates at the intersection p i The price of deploying a single camera.

[0075] The overall weight calculation includes:

[0076]

[0077] α+β+γ=1

[0078] in, Represents vertex p i The overall weighting, α, β, γ, and λ are weighting coefficients that reflect the relative importance of traffic flow, waiting time, road width, and camera deployment cost in the overall weighting.

[0079] Calculate the combined adjacency of each vertex. Combining weights and adjacency, i.e.:

[0080]

[0081] S14, If the adjacency degree is considered If there are multiple highest-degree vertices, then the vertex with the highest overall proximity degree is selected. The vertex with the lowest adjacency; otherwise, directly select the vertex with the combined adjacency. The highest peak;

[0082] S15. Add the selected vertex to the minimum vertex cover set in the undirected graph G of city roads. z-1 Delete the selected vertex and its associated edges, and update the degree of the remaining vertices to obtain the undirected graph G of the city roads. z ;

[0083] S16. Determine the location of an undirected graph G in a city. z If all edges have been deleted, then the minimum vertex cover set of the greedy algorithm is obtained, which is the optimized camera deployment location; otherwise, return to step S13.

[0084] Although greedy algorithms can quickly generate an approximate solution, they may get stuck in local optima.

[0085] In one embodiment, the vertex cover set of the greedy algorithm is further optimized by combining a genetic algorithm to achieve global optimality; the specific steps include:

[0086] Step 1, Individual Encoding: Represent the minimum vertex cover set generated by the greedy algorithm as a binary vector, with each vertex corresponding to a bit. 1 indicates that the vertex is in the cover set (i.e., the camera is deployed), and 0 indicates that it is not.

[0087] Step 2, Initial Population: The minimum vertex cover set represented as a binary vector is used as the individuals in the population, and multiple individuals are randomly generated to increase the diversity of the population.

[0088] Step 3: Calculate the fitness function for each individual in the population: The fitness function evaluates the quality of each individual, with the goal of minimizing the number of vertices and covering all edges. The fitness function fitness(X) can be expressed as:

[0089]

[0090] Where μ is the penalty weight that controls the number of vertices to prevent an individual from containing too many vertices, and X represents the current individual.

[0091] Step 4: Selection operation: Based on the fitness value of individuals, use roulette wheel selection or tournament selection methods to select individuals with higher fitness values ​​from the population as the selection set.

[0092] Step 5, Crossover Operation: Perform single-point or multi-point crossover on individuals in the selected individual set to generate new individuals, and combine all the new individuals into a crossover individual set; the offspring after crossover will inherit some characteristics of the parent.

[0093] Step 6, Mutation Operation: Randomly select certain genes of individuals in the crossover set and mutate them to obtain a mutated individual set. The mutation operation can remove certain vertices from the cover set (0 indicates no camera deployment) or add vertices to the cover set (1 indicates camera deployment), increasing population diversity and avoiding local optima.

[0094] Step 7, Repair Operation: After mutation and crossover operations, individuals that do not meet the constraints may be generated (e.g., a vertex cover set that does not cover all edges). At this time, it is necessary to perform a repair operation on the individuals in the mutated individual set, add the necessary vertices again, so that all edges in the undirected graph of the city road are covered, and obtain the repaired individual set.

[0095] Step 8: Merge the selected individuals set and the repaired individuals set to obtain a new population.

[0096] Step 9, Iteration and Termination: Repeat steps 3 to 8 until the termination condition is met (such as reaching the maximum number of iterations or the fitness no longer significantly improving). The individual with the highest fitness in the current population is taken as the final minimum vertex cover set.

[0097] S2. Determine the resolution and number of cameras at intersections where cameras are deployed based on traffic flow weight, vehicle waiting time weight, and road width weight.

[0098] Determining the image quality of cameras at intersections where cameras are deployed includes:

[0099] Based on the minimum vertex cover set MPOS of the above output, cameras are selected for deployment. Camera resolutions are categorized into ultra-high definition (UHD), high definition (HD), and standard definition (SD). Different resolution cameras are selected for intersections with varying traffic volumes and vehicle waiting times. Intersections with higher traffic volumes and longer waiting times require higher-resolution cameras, and vice versa. The camera selection weight W is then used. camera for:

[0100] W camera (p i )=α2*W flow (p i )+β2*W wait (p i )+γ2*W width (p i )

[0101] α² + β² + γ² = 1

[0102] Among them, W flow (p i ) indicates that in p i Traffic flow weight at location W wait (p i ) indicates that in p i Vehicle waiting time weight at location W width (p i ) indicates that in p i The road width weight, α2, γ2, and β2 represent the corresponding weighting coefficients, reflecting the importance of traffic flow, road width, and vehicle waiting time for selecting camera resolution.

[0103] Then the camera resolution θ i for:

[0104]

[0105] Camera selection weight W camera The higher the elevation, the clearer the cameras deployed at the intersection.

[0106] Determining the number of cameras at intersections where cameras will be deployed includes:

[0107] Determine the camera deployment method for the selected deployment location, specifically including:

[0108] Intersection camera deployment should aim to cover oncoming traffic as much as possible, with the camera's field of view as close to the center of the main road as possible. Frontal and overhead views should be prioritized, avoiding side views that could distort lane width excessively, and minimizing vehicle obstruction. The cameras are primarily installed to collect driver information, but also to monitor traffic violations and safety incidents. This embodiment uses directional cameras, which have a fixed field of view and typically monitor a trapezoidal or fan-shaped area.

[0109] Calculating the camera's monitoring range specifically includes:

[0110] The coverage area of ​​a camera is usually trapezoidal, with the bottom edge at the camera's location and the top edge at the furthest point in the monitoring range.

[0111] Camera to ground distance CD i :

[0112]

[0113] The bottom width WB of the monitoring range:

[0114]

[0115] Where h represents p i The installation height of the camera is generally selected based on the actual location of the installation area. h α represents the horizontal field of view of the camera. v α represents the vertical angle of view of the camera. h and α v Provided by the camera manufacturer.

[0116] Calculate the required number of cameras (CA) i :

[0117]

[0118] Among them, CA i Indicates in p i The sum of the number of cameras installed at the location, r i,j It indicates that the vertex p j With vertex p i The width of the connected roads, N G (p i ) represents the connection with vertex p i The set of connected vertices. This indicates rounding up to the nearest whole number to ensure that there are enough cameras to cover the entire intersection.

[0119] S3. Use deployed cameras to collect video data, perform edge processing on the video data collected by the cameras, and then transmit it to the cloud;

[0120] To ensure the validity and timeliness of video data, the video data captured by the cameras needs to be offloaded to a nearby edge server for processing, using U = {u1, u2, u3...u...}. U} represents the set of cameras deployed on the side of the road, E = {e1, e2, e3...e...} E} represents the set of MEC edge servers, and M = {1, 2, 3...M} represents the set of video layers, with different video layers having different resolutions.

[0121] Building a system model:

[0122] The system model includes: multiple cameras, multiple base stations (BS), and a cloud platform, with each base station (e)... j Multiple cameras are linked, each camera corresponds to one base station; each camera u i There are video computing tasks Its performance depends on the size of the task data. and computing resource requirements Composition: Each base station's server has certain computing resources (CPU cycles), and each video task can be offloaded to the associated base station's MEC server for processing; Orthogonal Frequency Division Multiple Access (OFDMA) technology is applied to the uplink transmission system, dividing the transmission frequency band B into N equal sub-bands of size ω, i.e. Each BS can receive up to N tasks uploaded from cameras simultaneously, and the set of subbands available to each BS is K = {1, 2, 3...N}.

[0123] Build a task unloading model:

[0124] Define the uninstallation variable as Among them, u i ∈N(e j ), m∈M, e j ∈E, k∈K, N(e j ) indicates the connection with base station e j The set of associated cameras, where E represents the set of base stations and M represents the set of video layers; Indicates from camera u i The m-th layer of the video is offloaded to the base station e via sub-band k. j superior, The opposite meaning is:

[0125]

[0126] The task unloading strategy X is:

[0127]

[0128] Feasibility analysis reveals the following:

[0129]

[0130] Construct a computing resource allocation model:

[0131] Define the computing resource allocation decision F as:

[0132]

[0133] Among them, f s Available computing resources for each base station Indicates base station e j Assigned to camera u i The amount of computing resources,

[0134] Calculate the total system latency and total energy consumption based on the task offloading model and computing resource allocation model:

[0135] The following latency issues may occur during the unloading process: latency in directly unloading the video task to the remote cloud; latency in the camera unloading the video task to the MEC server in the base station via the uplink; latency in the MEC server in the base station processing the upload task; and time in transmitting the processed data back to the cloud from the base station.

[0136] Latency of directly offloading video tasks to a remote cloud and energy consumption and transmission costs for:

[0137]

[0138]

[0139] Among them, R u Indicates camera u i The transmission rate at which video tasks are sent back to the cloud. Indicates camera u i Transmission power, Indicates camera u i The size of the camera data, θ i Indicates the resolution of the camera, F i T represents the camera's frame rate. interval This indicates the set camera transmission time interval (e.g., every 1 second or 5 seconds) at which the captured data will be transmitted to the cloud. η represents the compression ratio, used to account for the amount of data after video compression (e.g., H.264 encoding). This is usually provided by the camera itself or can be manually set according to the actual scene. From node u i The cost of transmitting data to the cloud, C cloud (ui This is the cost per bit transmitted to the cloud, which is related to the network type and transmission distance.

[0140] Offloading tasks to a local edge server (MEC) process includes:

[0141] Calculate the latency of offloading the video task to the MEC server via the uplink:

[0142] camera u i Both the BS and the camera have a single antenna for uplink transmission. i The signal-to-noise ratio of the m-th layer of the video task transmitted to subband k for:

[0143]

[0144] Among them, e l ∈E\{e j} represents base station e j All base stations other than N(e) l ) indicates the connection with base station e l The set of associated cameras, u′ represents base station e l Associated camera, σ 2 For environmental noise variance; Indicates base station e j With associated camera u i The channel gain coefficient transmitted in the k-th subband. Indicates camera u i The power required to transmit tasks to the server. This indicates that camera u′ offloads the m-th layer of video to server e. l On the decision, p u′ This indicates the power at which camera u′ transmits data to the server; Indicates server e j The channel gain coefficient transmitted between the camera u′ and the camera u′.

[0145] The road loss model used in this invention is in, Indicates server e j With camera u i The distance between them determines the channel gain. for:

[0146]

[0147] Where g is a parameter used to represent the combined effect of random effects such as small-scale fading and multipath gain of the signal in the wireless channel. In simulation, it is usually represented by a random variable generated by Rayleigh or Rice distribution.

[0148] camera u i To base station e j Upload video speed for:

[0149]

[0150] in, Indicates camera u i To base station e j Signal-to-noise ratio of uploaded video, camera u i Sending video data on the uplink Transmission time for:

[0151]

[0152] in, Indicates camera u i The m-th layer of the video is offloaded to server e via subband k. j Decisions made on behalf of the government.

[0153] Calculate the latency of the MEC server in the base station processing upload tasks.

[0154]

[0155] in, This indicates the computing resources required for the video data; the latency for the computation to transmit the processed data from the edge computing server back to the cloud:

[0156]

[0157] Transmission cost for:

[0158]

[0159] in, Indicates camera u i The size of the camera data, R mc It refers to the transmission rate from the MEC server to the cloud. C represents the size of the task data after processing by the edge server, σ represents the compression ratio after the video is processed by the lightweight CNN processing algorithm deployed on the edge server, and C represents the compression ratio. local (u i This is the cost per bit transmitted to the edge server, which is related to the network type and transmission distance.

[0160] On edge servers, the main task of CNN processing algorithms is to analyze and extract key information from video data, reduce data volume, and extract features related to vehicle charging demand. The compression ratio σ is determined primarily by factors such as the system's application objectives, the algorithm's processing power, network bandwidth, and computational resource limitations. A suitable compression ratio is typically determined through experimental testing, dynamic adjustments, and optimization of the CNN model, thereby achieving a balance between data volume and processing efficiency.

[0161] camera u i The total latency for task offloading to the base station for processing is:

[0162]

[0163] camera u i The energy consumption for processing the uplink of the task is:

[0164]

[0165] Base station e j The energy consumption for transmitting the processed data to the cloud is:

[0166]

[0167] camera u i The total energy consumption for offloading tasks to the base station for processing is:

[0168]

[0169] in, The cameras are u i The power consumption for transmitting tasks to the server and the power consumption for the server to transmit data to the cloud.

[0170] Then camera u i The optimization function is:

[0171]

[0172] in, Indicates camera u i The computational unloading efficiency, and These represent preferences for latency and energy consumption, respectively. This indicates that the weighting factor for costs can be set through actual adjustments, and and These represent the time characteristics, energy consumption characteristics, and cost characteristics of video data task transmission completion, respectively.

[0173] The video data task optimization model is as follows:

[0174]

[0175] Where C1 represents each camera u i The video can only be unloaded to one base station e j Or executed in the cloud, C2 represents each base station e j For its associated camera u i Allocate a meaningful computing resource, but the allocated computing resource cannot exceed that of base station e. j Total resources, C3 represents the total resources of each base station e j Each subband k can be associated with at most one camera u. i For video transmission, C4 indicates that the previous layer's video data must be transmitted before the next layer's data. This scalable video transmission feature is used to avoid receiving only upper-layer data without receiving lower-layer data. J(X,F) is the objective optimization function, representing the weighted sum of system performance. For camera u i The computational unloading efficiency, Indicates the base station's connection to the camera u i The degree of preference.

[0176] For camera u i via subband k to base station e j The upload rate of the m-layer video:

[0177] The above optimization problem is solved using a mixed-integer linear programming optimization algorithm to obtain the unloading decision.

[0178] S4. The cloud platform makes comprehensive judgments and issues warnings based on the received data.

[0179] The cloud platform comprehensively assesses the charging demand of electric vehicles based on the received data and sends out early warning information. Specifically, the cloud platform can analyze driver information collected by cameras and data processed by base stations to provide early warnings and guidance for areas where large-scale charging is expected, reducing the risk of grid load disruption in those areas.

[0180] The above-described embodiments further illustrate the purpose, technical solution, and advantages of the present invention. It should be understood that the above-described embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made to the present invention within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for sensing electric vehicle charging demand based on roadside cameras, characterized in that, include: S1. Calculate the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost for each intersection. Combine greedy algorithm and genetic algorithm to determine the intersections where cameras are deployed based on the traffic flow weight, vehicle waiting time weight, road width weight, and camera deployment cost. S2. Determine the resolution and number of cameras at intersections where cameras are deployed based on traffic flow weight, vehicle waiting time weight, and road width weight. S3. Use deployed cameras to collect video data, perform edge processing on the video data collected by the cameras, and then transmit it to the cloud; S4. The cloud platform makes comprehensive judgments and issues warnings based on the received data; Calculate intersections Traffic flow weighting includes: obtaining intersection Traffic flow is calculated for each intersection based on traffic flow. Average traffic flow during peak hours and average daily traffic volume Average traffic volume at all intersections Select the largest traffic flow as the maximum average traffic flow during peak hours. Average traffic volume at all intersections Choose the highest traffic volume as the maximum average traffic volume for the day. Based on average traffic flow , , , Get to the intersection Traffic flow weight; Calculate intersections Road width weights include: obtaining intersections Calculate the width of the connecting roads and the intersection. The sum of the widths of all roads Choose the largest road width among all roads connecting at the intersection. According to the sum of widths and maximum road width Calculate intersections Road width weight; Calculate intersection Vehicle waiting time includes: obtaining intersection In each phase Green light time of traffic lights at the location and period C; the phase corresponds to a traffic flow direction at the intersection; obtain the intersection In each phase saturation flow at Get the intersection In each phase Traffic flow at the location According to traffic flow Calculate intersection In each phase Weighted average traffic flow at the location Calculate the weighted average traffic flow and saturation flow ratio Based on weighted average traffic flow ,time Period C and ratio Calculate the vehicle's speed when passing through the intersection Total delay time Based on total delay time Calculate intersection The weighting of vehicle waiting time; Calculating the cost of deploying cameras includes: obtaining the road width at each intersection, obtaining the location of cameras at the intersection. Camera installation height and the camera's horizontal angle Vertical perspective And price, based on altitude Horizontal perspective and vertical perspective Calculate intersection The bottom width of the camera's monitoring range According to the bottom width and intersection Road width calculation in The number of cameras installed at the intersection is calculated based on the number of cameras and their prices. The cost of deploying cameras; Determining the camera clarity at an intersection where cameras are deployed involves: calculating camera selection weights based on traffic flow weights, vehicle waiting time weights, and road width weights at the intersection where cameras are deployed; and then determining the camera clarity at the intersection based on these selection weights.

2. The method for sensing electric vehicle charging demand based on a roadside camera according to claim 1, characterized in that, The intersections where cameras will be deployed include: S11. Construct an undirected graph of urban roads. Construct a minimum vertex cover set; where P is the vertex set, vertices are intersections, and S is the edge set, edges are roads connecting intersections; S12. Calculate the weight of each vertex based on traffic flow, vehicle waiting time, road width, and the cost of deploying cameras. Overall weight Where i is the index of the vertex; S13. Calculate the undirected graph of urban roads. Each vertex Adjacency Adjacency and comprehensive weight By combining the results, we obtain the overall adjacency degree. Where z is the number of iterations; S14, If the adjacency degree is considered If there are multiple highest-degree vertices, then the vertex with the highest overall proximity degree is selected. The vertex with the lowest adjacency; otherwise, directly select the vertex with the combined adjacency. The highest peak; S15. Add the selected vertex to the minimum vertex cover set in the undirected graph of city roads. Delete the selected vertex and its associated edges to obtain an undirected graph of city roads. ; S16. Determine the location of an undirected graph of city roads. If all edges have been deleted, then the minimum vertex cover set of the greedy algorithm is obtained, which is the optimized camera deployment location; otherwise, return to step S13. S17. Use the minimum vertex cover set of the greedy algorithm as an individual in the genetic algorithm, process the individual using the genetic algorithm, and obtain the final minimum vertex cover set, which determines the intersection where the camera is deployed.

3. The method for sensing electric vehicle charging demand based on a roadside camera according to claim 1, characterized in that, Transmitting edge-processed video data collected by cameras to the cloud includes: constructing a system model, which includes the cloud, base stations, and their associated cameras; constructing a task offloading model and a computing resource allocation model based on the system model; constructing a video data task optimization model based on the task offloading model and the computing resource allocation model; solving the video data task optimization model to obtain the optimal task offloading decision and computing resource allocation decision; and transmitting edge-processed video data collected by cameras to the cloud based on the optimal task offloading decision and computing resource allocation decision.

4. The method for sensing electric vehicle charging demand based on a roadside camera according to claim 3, characterized in that, The video data task optimization model is as follows: in, Indicates each camera The video can only be unloaded to one base station. Or execute in the cloud, Indicates each base station For its associated camera Allocate one computing resource, and the allocated computing resources cannot exceed those of the base station. Total resources Indicates each base station Each subband k can be associated with at most one camera. To transmit video, This means that during video transmission, the previous layer of video data must be transmitted before the next layer of video data is transmitted. Denotes the objective optimization function. For camera The computational unloading efficiency, Indicates the base station to the camera The degree of preference, , These represent task unloading decisions and computing resource allocation decisions, respectively. Indicates connection with base station A collection of related cameras, Represents a set of base stations. This indicates the task unloading decision, specifying whether to unload from the camera. via sub-band The video's first Layer offloading to base station superior, A collection of video layers. Denotes the set of subbands. Indicates base station Assigned to camera The amount of computing resources, Available computing resources for the base station Indicates camera via sub-band k to base station The upload speed of the m-layer video.

5. The method for sensing electric vehicle charging demand based on a roadside camera according to claim 4, characterized in that, Camera The computational unloading efficiency is: in, , , These represent preferences for latency, energy consumption, and cost, respectively. These represent the time characteristics, energy consumption characteristics, and cost characteristics of video data transmission tasks, respectively. To reduce latency when directly offloading video data tasks to the cloud, To put the camera The total latency of offloading video data tasks to the base station. Energy consumption for directly offloading video data tasks to the cloud. To put the camera The total energy consumption of offloading video data tasks to the base station. Indicates that the camera Video unloading to base station The decision, To put the camera The transmission cost of offloading video data tasks to the base station. camera The transmission cost of directly transmitting video data to the cloud.

Citation Information

Patent Citations

  • Real-time sharing system and method for road condition information based on vehicle network

    CN108648489A

  • Traffic signal light control method and system based on visual recognition of correlated intersections

    CN108831168A