Charging pile occupation state detection method based on image recognition and storage medium
By combining real-time charging operation parameters and parking characteristics with the YOLOv8 deep learning network, the problem of low utilization efficiency of charging pile resources is solved, accurate occupancy status detection and management are achieved, and the user experience is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-29
- Publication Date
- 2026-03-13
AI Technical Summary
The low utilization efficiency of charging piles, the limited detection factors in existing technologies, and the incomplete status judgments have led to serious problems such as illegal occupation by fuel vehicles and failure of new energy vehicles to charge or leave the charging piles in a timely manner, thus reducing the user's charging experience.
An image recognition-based approach is adopted, using the YOLOv8 deep learning network to identify the occupancy status of charging piles. This is combined with real-time charging operation parameters and parking characteristics for multi-dimensional analysis, including vehicle type, cumulative parking time, and charging current, to form a systematic occupancy status encryption mechanism.
It significantly improves the accuracy of charging pile occupancy detection, enhances resource utilization efficiency, meets users' charging needs, and provides systematic occupancy status management.
Smart Images

Figure CN121661041A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of charging pile technology, and in particular to a charging pile occupancy status detection method, electronic device, and computer-readable storage medium based on image recognition. Background Technology
[0002] With the rapid popularization of electric vehicles, the demand for the construction and management of charging piles, as core infrastructure, is constantly increasing. By 2025, China had over 3 million public charging piles, and the market size continued to expand. However, the problem of "difficulty in securing charging spots" is becoming increasingly serious, especially the illegal occupation by gasoline vehicles, and the phenomenon of new energy vehicles being plugged in but not charging, or not leaving the charging pile in a timely manner after charging. These issues greatly reduce the resource utilization efficiency of charging piles, bringing a poor charging experience to users, and have become a key problem that urgently needs to be addressed in industry management. Summary of the Invention
[0003] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, this invention proposes a charging pile occupancy status detection method and storage medium based on image recognition, which can intelligently and accurately identify the vehicle occupancy status of charging piles.
[0004] In a first aspect, embodiments of the present invention provide a method for detecting the occupancy status of charging piles based on image recognition, comprising the following steps: Step S1: Acquire the real-time video stream of the charging pile and preprocess the real-time video stream to obtain the input image; Step S2: Input the input image into the pre-trained YOLOv8 deep learning network to obtain the image detection result output by the YOLOv8 deep learning network; Step S3: Obtain the real-time charging operation parameters of the vehicles occupying the parking space in the real-time parking space image, and identify the parking characteristics of the vehicles occupying the parking space based on the image detection results. Step S4: Based on the image detection results, the real-time charging operation parameters, and the parking characteristics, determine the real-time occupancy status of the vehicle occupying the parking space.
[0005] Optionally, in one embodiment of the present invention, when the parking characteristics include cumulative parking time and vehicle type, step S4 includes the following steps: Step S41: When it is determined that the cumulative parking time exceeds the preset parking time threshold or the vehicle type is a non-new energy vehicle, it is determined that the vehicle occupying the parking space is in an illegal occupation state. or, Step S42: When the vehicle type is determined to be a new energy vehicle, the real-time occupancy status of the occupant vehicle is determined based on the image detection results and the real-time charging operation parameters.
[0006] Optionally, in one embodiment of the present invention, when the real-time charging operating parameters include real-time charging current, step S42 includes the following steps: Step S421: When the real-time charging current is greater than the first preset charging current threshold and the image detection result indicates that the vehicle occupying the space overlaps with the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a real-time charging state. or, Step S422: When the real-time charging current is less than the second preset charging current threshold or the image detection result indicates that the vehicle occupying the space is not connected to the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a non-charging state. Wherein, the second preset charging current threshold is less than the first preset charging current threshold.
[0007] Optionally, in one embodiment of the present invention, step S1, which involves preprocessing the real-time video stream to obtain an input image, includes the following steps: Step S11: Obtain the original image frames of the real-time video stream; Step S12: Perform grayscale conversion, Gaussian filtering, and histogram equalization on the original image frame in sequence to obtain the input image.
[0008] Optionally, in one embodiment of the present invention, when the YOLOv8 deep learning network includes a backbone network, a neck network, and a head network connected in sequence, step S2 includes the following steps: Step S21: Extract multi-scale salient features from the input image through the backbone network; Step S22: The salient features at multiple scales are fused through the neck network to obtain fused features; Step S23: Input the fused features into the head network to obtain an image bounding box output by the head network with a confidence level exceeding a preset confidence threshold; Step S24: Perform attention optimization enhancement on the image bounding box using SENet to obtain the output image bounding box as the image detection result.
[0009] Optionally, in one embodiment of the present invention, when the parking feature includes vehicle type, step S3, identifying the parking feature of the occupier vehicle based on the image detection result, includes the following steps: Step S31: Input the image detection result into the pre-configured OCR module to identify the license plate number of the occupier vehicle in the image detection result through the OCR module; Step S32: Match the license plate number of the vehicle occupying the space with the database to obtain the license plate matching result; Step S33: Determine the vehicle type of the occupant vehicle based on the license plate matching result.
[0010] Optionally, in one embodiment of the present invention, after step S4, the following step is further included: Step S5: Encapsulate the real-time occupancy status of the occupied vehicle to obtain occupancy status data; Step S6: Report the placeholder status data via the 5G network based on the MQTT protocol.
[0011] In a second aspect, embodiments of the present invention provide an electronic device, comprising: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the charging pile occupancy status detection method based on image recognition as described in the first aspect is implemented.
[0012] Thirdly, embodiments of the present invention provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the image recognition-based charging pile occupancy status detection method as described in the first aspect.
[0013] This invention proposes an image recognition-based method and storage medium for detecting the occupancy status of charging piles. Compared to existing technologies that suffer from limitations such as relying on a single detection factor and incomplete status assessment, this method inputs the acquired charging pile image into a pre-trained YOLOv8 deep learning network to output corresponding image detection results. Then, based on these results, a multi-dimensional analysis and judgment are performed using the real-time charging operation parameters and parking characteristics of the occupant vehicle. This effectively identifies the real-time occupancy status of the vehicle, significantly improving the accuracy of charging pile occupancy detection and facilitating the formation of a systematic occupancy status encryption mechanism. This, in turn, enhances the resource utilization efficiency of charging piles and meets users' charging needs. Attached Figure Description
[0014] Figure 1 This is a flowchart of a charging pile occupancy status detection method based on image recognition provided in an embodiment of the present invention; Figure 2 yes Figure 1 The flowchart of step S1, "Preprocessing the real-time video stream to obtain the input image", is shown below. Figure 3 This is a schematic diagram of the execution flow of a charging pile occupancy status detection method based on image recognition provided in an embodiment of the present invention; Figure 4 yes Figure 1 The flowchart of step S2 in the text; Figure 5 This is a schematic diagram illustrating the image detection principle of the YOLOv8 deep learning network provided in an embodiment of the present invention; Figure 6 yes Figure 1 A partial flowchart of step S3, "Identify the parking characteristics of vehicles occupying spaces based on image detection results"; Figure 7 This is a flowchart illustrating the working principle of an OCR module provided in an embodiment of the present invention; Figure 8 yes Figure 1 The flowchart following step S4; Figure 9 This is a schematic diagram illustrating an application scenario of the charging pile occupancy status detection method based on image recognition provided in an embodiment of the present invention. Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0015] like Figure 1 As shown, an embodiment of the present invention provides a charging pile occupancy status detection method based on image recognition. The method may include, but is not limited to, steps S1 to S4.
[0016] Step S1: Acquire the real-time video stream of the charging pile and preprocess the real-time video stream to obtain the input image; Step S2: Input the input image into the pre-trained YOLOv8 deep learning network to obtain the image detection result output by the YOLOv8 deep learning network; Step S3: Obtain the real-time charging operation parameters of the vehicles occupying the parking space in the real-time parking space image, and identify the parking characteristics of the vehicles occupying the parking space based on the image detection results. Step S4: Based on the image detection results, real-time charging operation parameters, and parking characteristics, determine the real-time occupancy status of the vehicle occupying the parking space. There can be multiple vehicles occupying the parking space, meaning that there can be multiple charging piles and parking spaces involved. To avoid redundancy, this embodiment and the following embodiments only use a single vehicle occupying the parking space as an example to illustrate the principle. The situation is similar for multiple vehicles occupying the parking space. It is only necessary to execute the charging pile occupancy status detection method provided in this embodiment multiple times, which will not be elaborated further.
[0017] In this step, compared to the technical shortcomings of existing technologies that rely on a single detection factor and incomplete state judgment, the acquired input image of the charging pile is input into a pre-trained YOLOv8 deep learning network to output corresponding image detection results. Then, based on the image detection results, multi-dimensional analysis and judgment are performed in combination with the real-time charging operation parameters and parking characteristics of the vehicle occupying the space. This can effectively identify the real-time occupancy status of the vehicle occupying the space. This not only significantly improves the accuracy of charging pile occupancy detection, but also helps to further form a systematic occupancy status encryption mechanism, thereby improving the resource utilization efficiency of charging piles and meeting users' charging needs.
[0018] In one embodiment, the specific method for acquiring the real-time video stream of the charging pile in step S1 can be configured according to the actual scenario, and there are no restrictions here. For example, a high-resolution industrial-grade camera (such as Hikvision DS-2CD2143G0-I, with a resolution of 1080p and a waterproof rating of IP66) can be installed about 1.5 to 2 meters above the charging pile parking space to capture a continuous video stream at a frequency of 5 to 10 frames per second, ensuring full coverage of the parking area of the charging pile and adapting to dynamic scenes. Finally, continuous image frames are generated as subsequent network input. The frame rate can be set to 15 to 30 fps to balance image clarity and edge device computing power. It is recommended that the camera installation position cover the entire parking space area, license plate area, and charging gun location area, and have the ability to provide infrared supplementary lighting or low-light enhancement at night to ensure all-weather operation. The acquired image frames can be output in RGB or YUV format, but are not limited to.
[0019] In one embodiment, the specific method for obtaining the real-time charging operation parameters of the vehicle occupying the parking space in the real-time parking space image in step S3 can be various and is well known to those skilled in the art. No limitation is made here. For example, after determining the corresponding vehicle occupying the parking space, its real-time charging operation parameters can be obtained through remote monitoring in the background.
[0020] In one embodiment, the pre-training method of the YOLOv8 deep learning network can be varied and is not limited here. Taking the lightweight version (YOLOv8n) or the standard version (YOLOv8s) as examples, pre-trained weights provided by Ultralytics can be used, and fine-tuning can be performed using a dataset of more than 1,000 charging station parking space images. This dataset is labeled with areas such as vehicles occupying parking spaces, charging guns, and license plates using LabelImg or Roboflow tools to achieve real-time target detection of vehicles occupying parking spaces, charging guns, and license plates. The entire training process uses the PyTorch framework, with a batch size of 16, an initial learning rate of 0.01, and 50 epochs of training. The loss function is optimized using WIoUv3, with an average accuracy greater than 95%, as shown in the following formula: ; in, To optimize the loss function value, For intersection, union, and comparison, Pre-trained weights to adjust object size, This represents the size of the combined region of the input charging station parking space image.
[0021] like Figure 2 As shown in one embodiment of the present invention, step S1, which involves preprocessing the real-time video stream to obtain the input image, may include, but is not limited to, the following steps: Step S11: Obtain the raw image frames of the real-time video stream; Step S12: Perform grayscale conversion, Gaussian filtering, and histogram equalization on the original image frame in sequence to obtain the input image.
[0022] In this step, the original image frames corresponding to the captured real-time video stream are obtained by parsing the video stream, such as... Figure 3 As shown, the original image frame is first grayscaled to enhance its effect. Then, Gaussian filtering is used to suppress image noise. Finally, histogram equalization is used to enhance contrast to adapt to changes in lighting. For example, an enhanced image dataset stored as a NumPy array can be output, which maintains the original resolution and targets a peak signal-to-noise ratio (PSNR) of over 30dB. The dataset is validated under different lighting (day / night) and weather (sunny / rainy) scenarios to ensure robustness.
[0023] Specifically, the formula for grayscale processing can be, but is not limited to, the following: ; in, Indicates the intensity value of the red channel. Indicates the green channel strength value. This indicates the intensity value of the blue channel; The formula for Gaussian filtering can be, but is not limited to, as follows: ; in, , Represents the x and y coordinate values of the original image frame. This represents the standard deviation of the input image; The formula for histogram equalization can be, but is not limited to, the following: ; in, This represents the current cumulative distribution function. Denotes the minimum cumulative distribution function. This represents the maximum cumulative distribution function.
[0024] It can be seen that by sequentially performing grayscale processing, Gaussian filtering, and histogram equalization on the original image frames, the input image can adapt to complex scenes such as changes in lighting, weather interference, and partial occlusion, thereby ensuring that the YOLOv8 deep learning network can still maintain a high detection accuracy under complex lighting and interfering weather conditions.
[0025] like Figure 4 As shown, in one embodiment of the present invention, when the YOLOv8 deep learning network includes a backbone network, a neck network, and a head network connected in sequence, step S2 may include, but is not limited to, the following steps: Step S21: Extract multi-scale salient features from the input image through the backbone network; Step S22: Fuse multi-scale salient features through the neck network to obtain fused features; Step S23: Input the fused features into the head network to obtain the image bounding box output by the head network with a confidence level exceeding a preset confidence threshold. The preset confidence threshold may, but is not limited to, be 90%. Step S24: Use SENet to perform attention optimization and enhancement on the image bounding boxes to obtain the output image bounding boxes as the image detection results.
[0026] Specifically, such as Figure 5 As shown, the backbone network, neck network, and head network are used to perform the core detection steps of this embodiment. For the backbone network, a variant of the Cross-Stage Part (CSP) architecture can be adopted. The CSP architecture promotes robust information flow by introducing cross-stage part connections between network layers, including 53 convolutional layers, specifically including, but not limited to, CSPDarknet53 and Backbone. CSPDarknet53 and Backbone extract multiple salient features at different scales of the input image. For the neck network, feature fusion can be achieved using a Neck module, but is not limited to. For the head network, it is mainly used to perform detection and recognition of fused features, regression of image boundaries, etc. Its preset confidence threshold can be set according to the actual scenario, such as 0.9. The calculation formula for attention optimization enhancement based on SENet can be, but is not limited to, as follows: , This represents the final output image bounding box. This represents the bounding box of the input image. This indicates the adjusted feature channel weights.
[0027] like Figure 6 As shown, in one embodiment of the present invention, when the parking features include vehicle type, step S3, identifying the parking features of the vehicle occupying the space based on the image detection results, may include, but is not limited to, the following steps: Step S31: Input the image detection result into the pre-configured OCR module to identify the license plate number of the vehicle occupying space in the image detection result through the OCR module; Step S32: Match the license plate number of the vehicle occupying the space with the database to obtain the license plate matching result; Step S33: Determine the vehicle type of the vehicle occupying the space based on the license plate matching results.
[0028] Specifically, such as Figure 7 As shown, the OCR module can apply character segmentation and recognition technology, mainly used to effectively identify the license plate numbers of vehicles occupying parking spaces, so as to realize the corresponding binding between parking space occupancy and license plate numbers. The database can be a pre-set database that stores license plate models of relevant types of vehicles. By comparing the license plate number of the vehicle occupying the space with the license plates of different types of vehicles in the database, the license plate matching result corresponding to the license plate number of the vehicle occupying the space can be obtained. If the license plate matching result shows that it matches a new energy vehicle, it can be determined that the vehicle occupying the space is a new energy vehicle; otherwise, it is determined that it is a non-new energy vehicle, such as a fuel vehicle or other unused vehicle. If the vehicle occupying the space is determined to be a new energy vehicle, the next step of determining the occupancy status is carried out.
[0029] In one embodiment of the present invention, when the parking characteristics include cumulative parking time and vehicle type, step S4 may include, but is not limited to, the following steps: Step S41: When it is determined that the cumulative parking time exceeds the preset parking time threshold or the vehicle type is a non-new energy vehicle, it is determined that the vehicle occupying the parking space is in an illegal occupation state. or, Step S42: When the vehicle type is determined to be a new energy vehicle, the real-time occupancy status of the occupant vehicle is determined based on the image detection results and real-time charging operation parameters.
[0030] In one embodiment of the present invention, when the real-time charging operating parameters include the real-time charging current, step S42 may include, but is not limited to, the following steps: Step S421: When the real-time charging current is greater than the first preset charging current threshold and the image detection result indicates that the vehicle occupying the space overlaps with the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a real-time charging state. or, Step S422: When the real-time charging current is less than the second preset charging current threshold or the image detection result indicates that the vehicle occupying the space is not connected to the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a non-charging state. Wherein, the second preset charging current threshold is less than the first preset charging current threshold, the second preset charging current threshold may be, but is not limited to, 0.1A, and the first preset charging current threshold may be, but is not limited to, 0.5A.
[0031] Specifically, such as Figure 3As shown, after obtaining the image detection results, further SENet attention optimization can be performed on the image detection results to enhance them. When the cumulative parking time exceeds a preset parking time threshold, it indicates that the vehicle occupying the space is not effectively charging but is in a parked state. Alternatively, if the vehicle type is determined to be a non-new energy vehicle, it indicates that the vehicle occupying the space cannot be charging, thus determining that the vehicle is illegally occupying the space. Conversely, if the vehicle type is determined to be a new energy vehicle, the real-time occupancy status of the vehicle is further determined based on the image detection results and real-time charging current. Real-time charging current can be obtained, but is not limited to, through sampling by a current sensor. When the real-time charging current is greater than the first preset charging current threshold and the image detection result indicates that the vehicle occupying the space overlaps with the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a real-time charging state, that is, the vehicle occupying the space is charging at this time and the charging gun is connected and there is actual charging current that can be monitored. Another situation is that the real-time charging current is less than the second preset charging current threshold or the image detection result indicates that the vehicle occupying the space is not connected to the charging gun of the charging pile, that is, either the real-time charging current is almost undetectable or the charging gun is not connected. In this case, it can be determined that the vehicle occupying the space is in a non-charging state.
[0032] It can be seen that, compared with the difficulty of distinguishing between "charging" and "not charging" states by existing technologies, OCR technology extracts license plate information and combines it with a database to determine the vehicle type. Then, based on the image detection results and real-time charging current, it determines the real-time occupancy status of the vehicle occupying the space. This can effectively distinguish between normal charging occupancy, non-charging occupancy, and illegal occupancy, providing data support for subsequent tracking and liability determination. It effectively solves the technical defects of existing technologies, such as single detection dimensions and incomplete status judgment.
[0033] like Figure 8 As shown in one embodiment of the present invention, after step S4, the following steps may be included, but are not limited to: Step S5: Encapsulate the real-time occupancy status of the vehicles occupying the space to obtain occupancy status data; Step S6: Report the placeholder status data via the 5G network based on the MQTT protocol.
[0034] Specifically, such as Figure 9 As shown, one terminal reporting the occupancy status data can be, but is not limited to, a cloud platform. Low-latency transmission of occupancy information is achieved through a 5G network and the lightweight MQTT protocol. Tests show that the average data upload latency is less than 100 ms, which meets the requirements for dynamic scheduling and real-time notification of charging piles. For example... Figure 3As shown, the occupancy status data can be encapsulated in, but is not limited to, the JSON standard format. The structured data format facilitates integration with different types of cloud platforms, exhibiting good portability and scalability. Simultaneously, the cloud platform supports the simultaneous access of current sensors, cameras, and edge processing units formed by the YOLOv8 deep learning network and OCR module, thereby acquiring multi-source data and further enhancing the overall robustness of the system.
[0035] In one embodiment, the cloud platform can not only automatically identify occupancy status data to know about abnormal situations of charging pile occupancy, but also send real-time alarms to relevant users and managers via SMS, push notifications or emails to improve the intelligence level and utilization efficiency of charging pile management.
[0036] In one embodiment, 5G network communication may, but is not limited to, employ 5G communication modules conforming to 3GPP Release 15 and above standards, supporting 5G NR (New Radio) non-standalone and standalone (NSA / SA) network modes, covering Sub-6GHz and millimeter wave frequencies. Compared to 4G, 5G offers wider bandwidth and directional latency. Typical end-to-end latency in 5G networks is relatively lower, and under ideal conditions, instantaneous peak speeds are higher (Gbps). This wider range of variation also results in higher network capacity and throughput. Therefore, when sending MQTT messages via a 5G communication module, the speed and clock latency of long-distance traditional cellular networks can be achieved.
[0037] It should be noted that in practical applications, different scenarios have different requirements for latency and reliability. For example, in scenarios such as vehicle-to-everything (V2X) queue control, the end-to-end latency requirement is less than 5 milliseconds. The specific upload method includes: starting the 5G communication module and connecting to an available 5G base station; after protocol interaction between the wireless air interface and the core network, the aforementioned MQTT message is uploaded to the cloud platform via the 5G network. During the upload process, data encryption and signing can be performed according to security policies to ensure the integrity and confidentiality of the uploaded data.
[0038] Figure 10 This is a schematic diagram of the structure of an electronic device 1000 provided in an embodiment of the present invention. For example... Figure 10 As shown, the electronic device 1000 includes a memory 1100 and a processor 1200. The number of memories 1100 and processors 1200 can be one or more. Figure 10 Taking a memory 1100 and a processor 1200 as an example; the memory 1100 and the processor 1200 in the device can be connected via a bus or other means. Figure 10 Taking the example of a connection between China and Israel via a bus.
[0039] The memory 1100, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the image recognition-based charging pile occupancy status detection method provided in any embodiment of the present invention. The processor 1200 implements the above-described image recognition-based charging pile occupancy status detection method by running the software programs, instructions, and modules stored in the memory 1100.
[0040] The memory 1100 may primarily include a program storage area and a data storage area, wherein the program storage area may store the operating system and application programs required for at least one function. Furthermore, the memory 1100 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 1100 may further include memory remotely located relative to the processor 1200, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0041] An embodiment of the present invention also provides a computer-readable storage medium storing computer-executable instructions for performing the image recognition-based charging pile occupancy status detection method provided in any embodiment of the present invention.
[0042] An embodiment of the present invention also provides a computer program product, including a computer program or computer instructions, which are stored in a computer-readable storage medium. The processor of a computer device reads the computer program or computer instructions from the computer-readable storage medium and executes the computer program or computer instructions, causing the computer device to perform the charging pile occupancy status detection method based on image recognition as provided in any embodiment of the present invention.
[0043] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0044] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0045] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).
Claims
1. A method for detecting the occupancy status of charging piles based on image recognition, characterized in that, Includes the following steps: Step S1: Acquire the real-time video stream of the charging pile and preprocess the real-time video stream to obtain the input image; Step S2: Input the input image into the pre-trained YOLOv8 deep learning network to obtain the image detection result output by the YOLOv8 deep learning network; Step S3: Obtain the real-time charging operation parameters of the vehicles occupying the parking space in the real-time parking space image, and identify the parking characteristics of the vehicles occupying the parking space based on the image detection results. Step S4: Based on the image detection results, the real-time charging operation parameters, and the parking characteristics, determine the real-time occupancy status of the vehicle occupying the parking space.
2. The charging pile occupancy status detection method based on image recognition according to claim 1, characterized in that, When the parking characteristics include cumulative parking time and vehicle type, step S4 includes the following steps: Step S41: When it is determined that the cumulative parking time exceeds the preset parking time threshold or the vehicle type is a non-new energy vehicle, it is determined that the vehicle occupying the parking space is in an illegal occupation state. or, Step S42: When the vehicle type is determined to be a new energy vehicle, the real-time occupancy status of the occupant vehicle is determined based on the image detection results and the real-time charging operation parameters.
3. The charging pile occupancy status detection method based on image recognition according to claim 2, characterized in that, When the real-time charging operating parameters include the real-time charging current, step S42 includes the following steps: Step S421: When the real-time charging current is greater than the first preset charging current threshold and the image detection result indicates that the vehicle occupying the space overlaps with the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a real-time charging state. or, Step S422: When the real-time charging current is less than the second preset charging current threshold or the image detection result indicates that the vehicle occupying the space is not connected to the charging gun of the charging pile, it is determined that the vehicle occupying the space is in a non-charging state. Wherein, the second preset charging current threshold is less than the first preset charging current threshold.
4. The charging pile occupancy status detection method based on image recognition according to claim 1, characterized in that, The step S1, which preprocesses the real-time video stream to obtain the input image, includes the following steps: Step S11: Obtain the original image frames of the real-time video stream; Step S12: Perform grayscale conversion, Gaussian filtering, and histogram equalization on the original image frame in sequence to obtain the input image.
5. The charging pile occupancy status detection method based on image recognition according to claim 1, characterized in that, When the YOLOv8 deep learning network comprises a backbone network, a neck network, and a head network connected in sequence, step S2 includes the following steps: Step S21: Extract multi-scale salient features from the input image through the backbone network; Step S22: The salient features at multiple scales are fused through the neck network to obtain fused features; Step S23: Input the fused features into the head network to obtain an image bounding box output by the head network with a confidence level exceeding a preset confidence threshold; Step S24: Perform attention optimization enhancement on the image bounding box using SENet to obtain the output image bounding box as the image detection result.
6. The charging pile occupancy status detection method based on image recognition according to claim 1, characterized in that, When the parking feature includes vehicle type, step S3, which identifies the parking feature of the occupier vehicle based on the image detection result, includes the following steps: Step S31: Input the image detection result into the pre-configured OCR module to identify the license plate number of the occupier vehicle in the image detection result through the OCR module; Step S32: Match the license plate number of the vehicle occupying the space with the database to obtain the license plate matching result; Step S33: Determine the vehicle type of the occupant vehicle based on the license plate matching result.
7. The charging pile occupancy status detection method based on image recognition according to any one of claims 1 to 6, characterized in that, Following step S4, the following steps are also included: Step S5: Encapsulate the real-time occupancy status of the occupied vehicle to obtain occupancy status data; Step S6: Report the placeholder status data via the 5G network based on the MQTT protocol.
8. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the image recognition-based charging pile occupancy status detection method as described in any one of claims 1 to 7 is implemented.
9. A computer-readable storage medium, characterized in that, It stores a processor-executable program, which, when executed by the processor, is used to implement the image recognition-based charging pile occupancy status detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Vehicle illegal space occupying behavior detection method and device and computer equipment
CN118840713A
Charging pile occupation judgment method and device and medium
CN119445490A
Brain tumor MRI image detection method based on improved YOLOv8n
CN119648705A
Queuing charging method and related equipment
CN120481700A