An edge server-based electric vehicle charging demand perception method and system
Patent Information
- Application Number
- CN202311523258.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2043-11-14
AI Technical Summary
[0002]由于充电比加油所需时间更长,效率没有加油高,依然会出现新能源汽车充电排队、等待时间过长的问题
[0021] This invention provides a method for sensing electric vehicle charging demand based on edge servers. The method mainly consists of three steps: First, the type and number of cameras are selected according to the target area, and the type of edge server is determined in combination with the traffic flow of the target area; then, the specific deployment location of the edge server is determined based on response latency and deployment cost, that is, considering which camera the edge server is specifically configured to serve all cameras within its service range; finally, considering the actual road traffic fluctuation problem, the collaborative effect of multiple edge servers is realized, and the tasks on the heavily loaded edge servers are offloaded to idle edge servers to improve the overall system CPU utilization.
Smart Images

Figure CN117579655B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electric vehicles, and more specifically to a method and system for sensing electric vehicle charging demand based on an edge server. Background Technology
[0002] Because charging takes longer than refueling and is less efficient, long queues and waiting times for charging electric vehicles still occur. Anticipating and providing early warnings regarding the charging needs of electric vehicle drivers can alleviate and reduce these long waiting times. Summary of the Invention
[0003] To address the aforementioned issues, this invention provides a method and system for sensing electric vehicle charging demand based on an edge server. While fully protecting driver privacy, the system uses an external camera and an edge server to sense the driver's charging needs in advance and provides early warnings for charging stations where long queues are anticipated.
[0004] In a first aspect, the present invention provides a method for early warning of electric vehicle charging demand based on an edge server, the specific scheme of which includes:
[0005] S1. Determine the model of the device for each target application scenario within the target area, wherein the device includes an edge server and a camera;
[0006] S2. Based on the deployment location of cameras, establish the edge server location deployment problem with the optimization goal of minimizing response latency and deployment cost;
[0007] S3. An improved genetic algorithm is used to solve the edge server location deployment problem, and an edge server placement strategy is obtained;
[0008] S4. According to the edge server placement strategy, each camera will decompose the captured video into multiple video units and transmit them to the corresponding edge server for task offloading;
[0009] S5. The edge server processes the received video units to obtain the corresponding unit combination information and transmits the unit combination information to the cloud;
[0010] S6. The cloud platform makes comprehensive judgments and issues warnings based on the unit combination information provided by the edge server.
[0011] In a second aspect, based on the method proposed in the first aspect, the present invention provides an electric vehicle charging demand sensing system based on an edge server, comprising:
[0012] The device location management system manages the locations of all cameras and edge servers within a target area. It includes a device statistics unit and a server deployment strategy unit, wherein:
[0013] The device statistics unit is used to determine the number and type of edge servers based on the number and type of cameras in the target area and traffic flow.
[0014] The server deployment strategy unit is used to establish an edge server location deployment problem based on the deployment locations of all cameras in the target area, with the optimization goal of minimizing response latency and deployment cost. An improved genetic algorithm is used to solve the edge server location deployment problem and output the edge server placement strategy.
[0015] The data control system manages the data acquisition and segmentation of all cameras within the target area and the data processing of all edge servers. It includes a camera video processing unit, a task offloading unit, and a task processing unit, wherein:
[0016] The camera video processing unit is used to segment the video captured by the camera into multiple video units according to the video configuration;
[0017] The task offloading unit is used to allocate video units to the corresponding edge servers based on the resource capacity of the edge servers, the resource requirements of the cameras, and the data transmission latency.
[0018] The task processing unit is used to process the video units received by the edge server to obtain unit combination information and upload the unit combination information to the cloud system.
[0019] The cloud system receives and processes combined unit information to obtain the comprehensive probability of electric vehicle charging demand. Based on the comprehensive probability of charging demand, it determines whether an electric vehicle has a charging tendency. Based on the number of electric vehicles with a charging tendency, it sends early warning information to the map software to inform the driver of the queuing situation at charging stations. It also sends early warning information to the operator of the nearest charging station.
[0020] The beneficial effects of this invention are:
[0021] This invention provides a method for sensing electric vehicle charging demand based on edge servers. The method mainly consists of three steps: First, the type and number of cameras are selected according to the target area, and the type of edge server is determined in combination with the traffic flow of the target area; then, the specific deployment location of the edge server is determined based on response latency and deployment cost, that is, considering which camera the edge server is specifically configured to serve all cameras within its service range; finally, considering the actual road traffic fluctuation problem, the collaborative effect of multiple edge servers is realized, and the tasks on the heavily loaded edge servers are offloaded to idle edge servers to improve the overall system CPU utilization.
[0022] Specifically, this invention optimizes the deployment locations of cameras and edge servers, improving image acquisition quality and processing speed while controlling costs to some extent. The edge server deployment location involves a two-step site selection process (first determining the camera location, then determining the edge server location based on the camera location), and an improved genetic algorithm is used to determine the edge server location, reducing latency while considering practical considerations.
[0023] Video is segmented into video units for transmission and processing, and a minority game model is used for task offloading. This reduces latency in video processing tasks and improves CPU utilization of edge servers. Deploying image processing steps at the edge and uploading processed, anonymized data to cloud servers reduces the risk of information leakage.
[0024] By recognizing and fusing the driver's facial expressions and movement characteristics, it is possible to more accurately determine whether the driver has a need for charging. Attached Figure Description
[0025] Figure 1 This is a flowchart of the electric vehicle charging demand early warning method based on an edge server according to the present invention.
[0026] Figure 2 This is a flowchart illustrating the improved genetic algorithm used in this invention to solve the edge server location deployment problem.
[0027] Figure 3 This is a flowchart of the video unit feature extraction process of the present invention. Detailed Implementation
[0028] 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.
[0029] This invention provides a method for sensing electric vehicle charging demand based on an edge server, such as... Figure 1 As shown, it includes the following steps:
[0030] S1. Determine the model of the device for each target application scenario within the target area, wherein the device includes an edge server and a camera.
[0031] Specifically, step S1 determines the model of the device for the target application scenario, including:
[0032] S11. Determine the number of target application scenarios within the target area, and configure one camera for each target application scenario, wherein:
[0033] S111. If the target application scenario is a roadside location, select a camera with the corresponding frame rate based on the road's speed limit requirements. Specifically, if the road speed limit is 30-70 km / h, select a camera with a frame rate of 30fps; if the road speed limit is 70-100 km / h, select a camera with a frame rate of 60fps; if the road speed limit is above 1000 km / h, select a camera with a frame rate of 120fps. This avoids image trailing during shooting. Furthermore, when fixing the camera, it's necessary to increase its height, setting it at 5-6 meters to increase the detection area width and prevent large vehicles from obstructing the entire camera view.
[0034] S112. If the target application scenario is a road intersection, select a wide-angle high-definition camera with a small focal length, or a wide-angle ultra-high-definition camera with a small focal length. The purpose of this selection is to facilitate the shooting of vehicles coming from multiple directions. At the same time, the camera's shooting angle should be as close to the center of the road as possible, mainly using front and overhead views, avoiding side views to prevent excessive distortion of lane width, and reducing the phenomenon of vehicles blocking each other.
[0035] S12. Select Jetson embedded platforms with different performance levels as edge servers based on the number of cameras and the traffic flow in the target area, such as Jetson Xavier NX, Jetson TX2 (8GB), and Jetson TX2i. Specifically, consider that the total performance of all edge servers in the target area basically meets the resource requirements of all cameras in the target area, and also consider the traffic flow characteristics to determine the edge server corresponding to each camera.
[0036] Generally, the number of edge servers is less than the number of cameras, and one edge server will serve multiple nearby cameras at the same time.
[0037] S2. Based on the deployment location of cameras, establish the edge server location deployment problem with the optimization goal of minimizing response latency and deployment cost.
[0038] Specifically, a mathematical model is first constructed based on the edge server location deployment problem, including:
[0039] Define the set of edge servers within the target region as E = {e1, e2, ..., e...} i ,…,e |E| The set of cameras is C = {c1, c2, ..., c}. j ,…,c |C|}; where e i Let c represent the i-th edge server. jLet |E| represent the j-th camera, |C| represent the number of edge servers, and |E| represent the number of cameras. In this embodiment, at most one edge server is deployed at each camera, and one edge server can only be deployed at one camera. Define a binary variable x. ij Indicate whether the i-th edge server is serving the j-th camera. If x ij =1, then the i-th edge server serves the j-th camera; if x ij If the value is 0, then the i-th edge server will not serve the j-th camera.
[0040] The resource capacity of each edge server is no less than the sum of the resource requirements of all the cameras it serves, which is expressed as:
[0041]
[0042] Where, r i D represents the resource capacity of the i-th edge server. j This represents the resource requirement of the j-th camera.
[0043] Average response latency of all edge servers within the target area The calculation formula is:
[0044]
[0045] Among them, ED i Let represent the sum of response latency of the i-th edge server to all the cameras it serves, calculated using the following formula:
[0046]
[0047] Where V represents the electromagnetic wave propagation speed, P i This represents the processing rate of the i-th edge server. This represents the total processing time for the i-th edge server to handle the resource requirements of all the cameras it serves; Let represent the combined distance between the deployment location of the i-th edge server and all cameras in the small area camera set obtained by taking the deployment location as the target object. The calculation formula is:
[0048]
[0049] in, This represents a small area set of cameras selected from the N cameras closest to the j-th camera as the target object. (This mainly refers to the scenario where an edge server is deployed at the j-th camera, and all cameras within the service range of that edge server, excluding the j-th camera, are retrieved.) dmin and d max Let i and n represent the i-th edge server and the set of cameras in the small area, respectively. The minimum and maximum distances between all cameras in the system; d ij Represents a small area of cameras The distance from the j-th camera to the i-th edge server is calculated using the following formula:
[0050]
[0051] in, These are the latitudes of the j-th camera and the i-th edge server, respectively, in radian units.
[0052] λ1 and λ2 are the longitudes of the j-th camera and the i-th edge server in radians, respectively; r is the Earth's radius.
[0053] The formula for calculating the deployment cost of edge servers is:
[0054]
[0055] Where f represents the deployment cost of all edge servers, and μ is the weighting coefficient; W i The load deviation value is calculated using the following formula:
[0056]
[0057]
[0058] Among them, t j This represents the load of the j-th camera. This represents the average workload of all cameras within the target area.
[0059] S3. An improved genetic algorithm is used to solve the edge server location deployment problem and obtain the edge server placement strategy.
[0060] Specifically, an improved genetic algorithm is used to solve the edge server location deployment problem, such as... Figure 2 As shown, it includes:
[0061] S31. Set the initial temperature, cutoff temperature, cooling rate, and mutation rate; then perform population initialization, including: randomly generating multiple chromosomes based on the number of cameras, camera locations, and the number of edge servers;
[0062] S32. Calculate the fitness of each chromosome in the initial population, and then proceed to step S33; the initial fitness of each chromosome in the initial population is calculated by taking the deployment cost of all its edge servers as the initial fitness.
[0063] S33. Select chromosomes with fitness values less than the fitness threshold from the current population to form the first population;
[0064] S34. After performing a crossover operation on the first population, a second population is obtained. The chromosomes in the second population are updated using the simulated annealing algorithm.
[0065] S35. After performing mutation operations on the updated second population, a third population is obtained. The chromosomes in the third population are updated using the simulated annealing algorithm.
[0066] S36. Calculate the fitness of each chromosome in the updated third population and extract the optimal fitness. Determine whether the optimal fitness is greater than the historical maximum value (i.e. the previous maximum fitness). If yes, update the optimal solution and proceed to step S37. If not, proceed directly to step S37.
[0067] S37. Calculate whether the current temperature is lower than the cutoff temperature. If yes, output the optimal solution. If not, update the temperature and return to step S33.
[0068] Specifically, the process of updating the second or third population using the simulated annealing algorithm includes:
[0069] S301. Calculate the fitness of any chromosome in the population and determine if the fitness is less than 0. If yes, retain the chromosome; otherwise, proceed to step S302. The formula for calculating the fitness of a chromosome is as follows:
[0070] Δf=f(child)-min(f(parent1),f(parent2))
[0071] Where Δf represents the fitness of the chromosome, f(child) represents the deployment cost of the chromosome, and f(parent1) and f(parent2) represent the deployment costs of the two parent chromosomes of the chromosome, respectively.
[0072] S302. Calculate the probability value ρ of the chromosome, and select a random number rand in the interval [0,1]. If rand < ρ, then use the chromosome to replace its parent chromosome; otherwise, discard the chromosome and retain its parent chromosome. The formula for calculating the probability value ρ is:
[0073]
[0074] Where k is a constant and T is the current temperature of the simulated annealing algorithm.
[0075] S4. Based on the edge server placement strategy, each camera will decompose the captured video into multiple video units and transmit them to the corresponding edge server for task offloading.
[0076] Specifically, in step S4, the process of decomposing and transmitting the video captured by the j-th camera to the corresponding edge server for task offloading includes:
[0077] S41. To fully utilize the computing power of the edge server, considering the uplink and downlink bandwidth of the base station network, the video captured by the j-th camera is segmented according to the configuration to obtain s. j The segmentation formula for each video unit is:
[0078]
[0079] Among them, l j Let L represent the video length captured by the j-th camera, τ represent the video frame rate captured by the j-th camera, and L and τ represent the common factor of the video length of all selected cameras and the common factor of the video resolution of all selected cameras, respectively.
[0080] Let the set of cutoff values be α = {α1, α2, ... α} i ,…,α |E|}, α i Let |E| represent the truncation value for the i-th edge server, which is the threshold number of video units received by the i-th edge server from all cameras. |E| represents the number of edge servers. The truncation value is obtained based on a minority game, specifically calculated under the ideal condition that all cameras have the same communication and computation latency.
[0081] S42. Allocate video units based on the truncation value set, assigning more video units to edge servers with larger truncation values. Calculate the initial number of video units offloaded from the j-th camera to the i-th edge server, and approximate the initial number of video units I using a rounding method. ij :
[0082]
[0083] S43. After the j-th camera is initially unloaded, update the number of video units received by each edge server, where the updated number of video units for the i-th edge server is represented as:
[0084] λ m =λ old +λ new
[0085] Where, λ m λ represents the number of video units received by the i-th edge server after the update. old λ represents the number of video units received by the i-th edge server before the update. new This represents the number of newly received video units on the i-th edge server;
[0086] S44. Obtain the number of video units that have not yet been allocated to the j-th camera, and calculate the current estimated latency of each edge server based on the updated number of video units on each edge server. Then, offload all the video units that have not yet been allocated to the j-th camera to the edge server with the lowest current estimated latency.
[0087] Specifically, the video units remaining due to the approximation method in step S41 are represented as follows:
[0088]
[0089] m j Let represent the number of video units that have not yet been allocated to the j-th camera. These units will be offloaded to the edge server with the lowest estimated latency. The estimated latency of the i-th edge server is represented as:
[0090]
[0091] in, Let λ represent the current estimated latency of the i-th edge server, Q represent the data volume of each video unit, and λ represent the data volume of each video unit. m p represents the current number of video units on the i-th edge server. i This represents the computing power of the i-th edge server; The transmission delay for the j-th camera to offload its video unit to the i-th edge server is represented by the following formula:
[0092]
[0093] Among them, D j This represents the resource requirement of the j-th camera; r ji The rate at which the video unit of the j-th camera is offloaded to the i-th edge server is represented by the following formula:
[0094]
[0095] Where W represents the channel bandwidth, P j H represents the transmission power of the j-th camera. ji σ represents the channel gain between the j-th camera and the i-th edge server. 2 This represents the variance of the background noise.
[0096] S5. The edge server processes the received video units to obtain the corresponding unit combination information and transmits the unit combination information to the cloud.
[0097] Specifically, the edge server processes any received video unit to obtain unit combination information, including:
[0098] S51. The SSD target detection algorithm is used to analyze the video unit and extract images containing vehicles;
[0099] S52. Based on wavelet transform, locate the license plate position and license plate information of the vehicle in the image, determine whether the vehicle in the image is a new energy vehicle, and if so, encrypt and desensitize the license plate information, and then proceed to step S53.
[0100] S53. A lightweight deep network, MobileNet-SSD, is used to obtain face region images from images. Based on the dlib library, 68 feature points of the face are obtained from these face region images to acquire facial features; for example... Figure 3 As shown, it specifically includes:
[0101] Based on the organ movement regions of six basic facial expressions (anger, disgust, fear, happiness, sadness, and surprise), the facial region image is divided into eight local region images: eyebrow, upper eye socket, eyes and lower eye socket, nose, mouth, temple, mouth and temple, and mouth and lower cheek. The eight local region images after normalization are input into a feature extraction network to obtain spatiotemporal motion features. The feature extraction network includes eight extraction modules and one fusion output module. Each extraction module corresponds to the processing of one local region image, and each extraction module includes a different number of convolutional layers and pooling layers. The fusion output module concatenates the outputs of the eight extraction modules and outputs the result.
[0102] S54. Use a C3D network to extract features of the driver's body movements in the image to obtain the spatiotemporal features of the video unit's movements.
[0103] S55. Use neural network learning to obtain the posterior probabilities of facial features and spatiotemporal features of actions, and sum the weighted posterior probabilities of facial features and spatiotemporal features of actions to obtain the preliminary probability.
[0104] S56. The preliminary probability, the processed license plate information, the location information of the edge server to which the video unit is connected, and the time information of the camera uploading the video unit are combined to form the unit combination information of the video unit and send it to the cloud.
[0105] S6. The cloud platform makes comprehensive judgments and issues warnings based on the unit combination information provided by the edge server.
[0106] Specifically, in step S6, the cloud performs a comprehensive judgment and provides early warning based on the unit combination information provided by the edge server, including:
[0107] S61. Obtain all unit combination information containing the same license plate information from the cloud and extract preliminary probabilities from them; then group all preliminary probabilities according to their corresponding location information, and sort the groups according to time information to obtain multiple sets, where Ai =[q1,q2,…,q n ] represents the i-th set, q n This represents the nth initial probability in the i-th set; there are a total of |E| sets;
[0108] S62. Calculate the mean and variance of each set, and obtain the comprehensive probability of charging demand for this license plate information based on the mean and variance of all sets. The calculation formula is as follows:
[0109]
[0110]
[0111]
[0112] in, Let set A be i The probability mean of set A, where n represents the set A. i The number of elements, Let set A be i The probability variance, μ i Let set A be i The set with smaller variance has a larger weight, P c This represents the overall probability of charging demand.
[0113] If the overall probability of charging demand is greater than 0.7, the vehicle corresponding to the license plate information is considered to have a charging tendency, and the latest location information is recorded.
[0114] S63. When the number of vehicles with a tendency to charge in an area reaches the warning threshold, the cloud sends a warning message to the map software and the operator of the nearest charging station, and then displays it on the relevant page of the relevant APP or mini program to remind the driver that there may be a queue at the charging station.
[0115] In one embodiment, the present invention also provides an electric vehicle charging demand sensing system based on an edge server, comprising:
[0116] The device location management system manages the locations of all cameras and edge servers within a target area. It includes a device statistics unit and a server deployment strategy unit, wherein:
[0117] The device statistics unit is used to determine the number and type of edge servers based on the number and type of cameras in the target area and traffic flow.
[0118] The server deployment strategy unit is used to establish an edge server location deployment problem based on the deployment locations of all cameras in the target area, with the optimization goal of minimizing response latency and deployment cost. An improved genetic algorithm is used to solve the edge server location deployment problem and output the edge server placement strategy.
[0119] The data control system manages the data acquisition and segmentation of all cameras within the target area and the data processing of all edge servers. It includes a camera video processing unit, a task offloading unit, and a task processing unit, wherein:
[0120] The camera video processing unit is used to segment the video captured by the camera into multiple video units according to the video configuration;
[0121] The task offloading unit is used to allocate video units to the corresponding edge servers based on the resource capacity of the edge servers, the resource requirements of the cameras, and the data transmission latency.
[0122] The task processing unit is used to process the video units received by the edge server to obtain unit combination information and upload the unit combination information to the cloud system.
[0123] The cloud system receives and processes combined unit information to obtain the comprehensive probability of electric vehicle charging demand. Based on the comprehensive probability of charging demand, it determines whether an electric vehicle has a charging tendency. Based on the number of electric vehicles with a charging tendency, it sends early warning information to the map software to inform the driver of the queuing situation at charging stations. It also sends early warning information to the operator of the nearest charging station.
[0124] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "setting," "connection," "fixing," "rotation," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal connection of two components or the interaction between two components. Unless otherwise explicitly limited, those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0125] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for sensing electric vehicle charging demand based on an edge server, characterized in that, Includes the following steps: S1. Determine the model of the device for each target application scenario within the target area, wherein the device includes an edge server and a camera; S2. Based on the deployment location of cameras, establish the edge server location deployment problem with the optimization goal of minimizing response latency and deployment cost; S3. An improved genetic algorithm is used to solve the edge server location deployment problem, and an edge server placement strategy is obtained; S4. According to the edge server placement strategy, each camera will decompose the captured video into multiple video units and transmit them to the corresponding edge server for task offloading; S5. The edge server processes the received video units to obtain the corresponding unit combination information and transmits the unit combination information to the cloud; The edge server processes any received video unit to obtain unit combination information, including: S51. The SSD target detection algorithm is used to analyze the video unit and extract images containing vehicles; S52. Based on wavelet transform, locate the license plate position and license plate information of the vehicle in the image, determine whether the vehicle in the image is a new energy vehicle, and if so, encrypt and desensitize the license plate information, and then proceed to step S53. S53. The lightweight deep network MobileNet-SSD is used to obtain face region images from images. Based on the face region images, eight local region images are divided: eyebrow, upper eye socket, eyes and lower eye socket, nose, mouth, temple, mouth and temple, and mouth and lower cheek. The eight normalized local region images are input into the feature extraction network to obtain facial features. S54. Use the C3D network to extract features of the driver's body movements in the image to obtain the spatiotemporal features of the movements; S55. Use neural network learning to obtain the posterior probabilities of facial features and spatiotemporal features of actions, and sum the weighted posterior probabilities of facial features and spatiotemporal features of actions to obtain the preliminary probability. S56. The unit combination information of the video unit, composed of the preliminary probability, the processed license plate information, the location information of the edge server, and the time information of the video unit uploaded by the camera, is sent to the cloud. S6. The cloud platform makes comprehensive judgments and issues warnings based on the unit combination information provided by the edge server, including: S61. Obtain all unit combination information containing the same license plate information from the cloud and extract preliminary probabilities from them; then group all preliminary probabilities according to their corresponding location information, and sort the groups according to time information to obtain multiple sets; S62. Calculate the mean and variance of each set, and obtain the comprehensive probability of charging demand for the license plate information based on the mean and variance of all sets. If the comprehensive probability of charging demand is greater than 0.7, it is determined that the vehicle corresponding to the license plate information has a charging tendency, and the latest location information is recorded. S63. When the number of vehicles with a tendency to charge in a region reaches the warning threshold, the cloud sends a warning message to the map software and the operator of the nearest charging station.
2. The electric vehicle charging demand sensing method based on an edge server according to claim 1, characterized in that, Step S1 determines the model of the device for the target application scenario, including: S11. Determine the number of target application scenarios within the target area, and configure one camera for each target application scenario, wherein: S111. If the target application scenario is a roadside, select a camera with the corresponding frame rate according to the road's speed limit requirements; S112. If the target application scenario is a road intersection, select a wide-angle high-definition camera with a small focal length, or select a wide-angle ultra-high-definition camera with a small focal length. S12. Select Jetson embedded platforms with different performance levels as edge servers based on the number of cameras and the traffic flow in the target area.
3. The electric vehicle charging demand sensing method based on an edge server according to claim 1, characterized in that, A mathematical model is constructed based on the edge server location deployment problem, including: S21. Define the set of edge servers within the target region. Camera collection ;in, This represents the i-th edge server. Let |E| represent the j-th camera, |C| represent the number of edge servers, and |C| represent the number of cameras. S22. Deploy at most one edge server at each camera location; define binary variables. Indicate whether the i-th edge server is serving the j-th camera. Then the i-th edge server serves the j-th camera; if If the i-th edge server does not serve the j-th camera; S23. The resource capacity of each edge server shall not be less than the sum of the resource requirements of all the cameras it serves: Where, r i This represents the resource capacity of the i-th edge server. This represents the resource requirement of the j-th camera; S24. Average response latency of all edge servers within the target area The calculation formula is: in, Let represent the sum of response latency of the i-th edge server to all the cameras it serves, calculated using the following formula: Where V represents the electromagnetic wave propagation speed. This represents the processing rate of the i-th edge server; This represents a small area set of cameras selected from the N cameras closest to the j-th camera as the target object. This indicates that when the i-th edge server is deployed at the j-th camera, it is in conjunction with... The combined distance of all cameras in the system is calculated using the following formula: in, d min and d max Let i and n represent the i-th edge server and the set of cameras in the small area, respectively. The minimum and maximum distances between all cameras in the system; d ij Let represent the distance from the j-th camera to the i-th edge server, and its calculation formula is: in, , These are the latitudes of the j-th camera and the i-th edge server, respectively, in radian units. , , where are the longitudes of the j-th camera and the i-th edge server in radians, respectively; r is the Earth's radius; S25. The formula for calculating the deployment cost of edge servers is: Where f represents the deployment cost of all edge servers, W represents the weighting coefficient. i The load deviation value is calculated using the following formula: Among them, t j This represents the load of the j-th camera. This represents the average workload of all cameras.
4. The electric vehicle charging demand sensing method based on an edge server according to claim 1, characterized in that, An improved genetic algorithm is used to solve the edge server location deployment problem, including: S31. Set the initial temperature, cutoff temperature, cooling rate, and mutation rate; then perform population initialization, including: randomly generating multiple chromosomes based on the number of cameras, camera locations, and the number of edge servers; S32. Calculate the fitness of each chromosome in the initial population, and then proceed to step S33; S33. Select chromosomes with fitness values less than the fitness threshold from the current population to form the first population; S34. After performing a crossover operation on the first population, a second population is obtained. The chromosomes in the second population are updated using the simulated annealing algorithm. S35. After performing mutation operations on the updated second population, a third population is obtained. The chromosomes in the third population are updated using the simulated annealing algorithm. S36. Calculate the fitness of each chromosome in the updated third population, extract the optimal fitness, and determine whether the optimal fitness is greater than the historical maximum value. If so, update the optimal solution and proceed to step S37. If not, proceed directly to step S37. S37. Calculate whether the current temperature is lower than the cutoff temperature. If yes, output the optimal solution. If not, update the temperature and return to step S33.
5. The electric vehicle charging demand sensing method based on an edge server according to claim 4, characterized in that, The process of updating the population using the simulated annealing algorithm includes: S301. Calculate the fitness of the chromosome and determine if the fitness is less than 0. If yes, retain the chromosome; otherwise, proceed to step S302. The fitness calculation formula is: in, Indicates the fitness of chromosomes. This indicates the deployment cost of the chromosome. These represent the deployment costs of the two parent chromosomes of this chromosome; S302. Calculate the probability value of chromosomes. And select a random number rand from the interval [0,1]; if rand < If the chromosome is positive, then the parent chromosome is replaced with the positive chromosome; otherwise, the positive chromosome is discarded and the parent chromosome is retained. The probability values are as follows: The calculation formula is: Where k is a constant and T is the current temperature of the simulated annealing algorithm.
6. The electric vehicle charging demand sensing method based on an edge server according to claim 1, characterized in that, Step S4, the process of decomposing and transmitting the video captured by the j-th camera to the corresponding edge server for task offloading includes: S41. Divide the video captured by the j-th camera into segments according to the configuration to obtain s. j Each video unit has a set of truncation values. , Let |E| represent the truncation value of the i-th edge server, and |E| represent the number of edge servers. S42. Allocate video units according to the truncation value set, and calculate the number of video units I initially offloaded from the j-th camera to the i-th edge server. ij ; S43. Update the number of video units received by each edge server; S44. Obtain the number of video units that have not yet been allocated to the j-th camera, and calculate the current estimated latency of each edge server based on the updated number of video units. Then, offload all the video units that have not yet been allocated to the j-th camera to the edge server with the lowest current estimated latency.
7. The electric vehicle charging demand sensing method based on an edge server according to claim 6, characterized in that, Step S44 calculates the current estimated latency of the i-th edge server using the following formula: in, Let Q represent the current estimated latency of the i-th edge server, and let Q represent the amount of data in each video unit. This represents the current number of video units on the i-th edge server. This represents the computing power of the i-th edge server; The transmission delay for the j-th camera to offload its video unit to the i-th edge server is represented by the following formula: in, This represents the resource requirement of the j-th camera; The rate at which the video unit of the j-th camera is offloaded to the i-th edge server is represented by the following formula: Where W represents the channel bandwidth, This represents the transmission power of the j-th camera. This represents the channel gain between the j-th camera and the i-th edge server. This represents the variance of the background noise.
8. An electric vehicle charging demand sensing system based on an edge server, implemented using the method described in any one of claims 1-7, characterized in that, include: The device location management system manages the locations of all cameras and edge servers within a target area. It includes a device statistics unit and a server deployment strategy unit, wherein: The device statistics unit is used to determine the number and type of edge servers based on the number and type of cameras in the target area and traffic flow. The server deployment strategy unit is used to establish an edge server location deployment problem based on the deployment locations of all cameras in the target area, with the optimization goal of minimizing response latency and deployment cost. An improved genetic algorithm is used to solve the edge server location deployment problem and output the edge server placement strategy. The data control system manages the data acquisition and segmentation of all cameras within the target area and the data processing of all edge servers. It includes a camera video processing unit, a task offloading unit, and a task processing unit, wherein: The camera video processing unit is used to segment the video captured by the camera into multiple video units according to the video configuration; The task offloading unit is used to allocate video units to the corresponding edge servers based on the resource capacity of the edge servers, the resource requirements of the cameras, and the data transmission latency. The task processing unit is used to process the video units received by the edge server to obtain unit combination information and upload the unit combination information to the cloud system. The cloud system receives and processes combined unit information to obtain the comprehensive probability of electric vehicle charging demand. Based on the comprehensive probability of charging demand, it determines whether an electric vehicle has a charging tendency. Based on the number of electric vehicles with a charging tendency, it sends early warning information to the map software to inform the driver of the queuing situation at charging stations. It also sends early warning information to the operator of the nearest charging station.