Charging control method and system for charging pile, electronic device, and storage medium
Through the charging control system of lightweight coroutine and event-driven model, modular configuration and event queue management of the charging process are realized, which solves the problem that traditional charging piles are difficult to adapt to diverse scenarios and improves charging efficiency and safety.
Patent Information
- Application Number
- CN202510933505.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Traditional charging pile control methods are difficult to quickly adapt to the diverse needs of different scenarios, are inefficient, and cannot meet users' personalized and safety requirements.
It adopts a charging control system based on lightweight coroutines and event-driven models, distinguishes between private and public charging piles through modular configuration and event queue management, and realizes flexible charging process control.
It improves charging efficiency and safety, meets the personalized needs of different scenarios, protects the exclusive rights and interests of private charging piles, and optimizes the resource utilization of public charging piles.
Smart Images

Figure CN120439863B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of charging control technology, and more specifically, relates to a charging control method and system for a charging pile, an electronic device, and a storage medium. Background Art
[0002] Electric vehicle technology continues to improve and upgrade, with a wide variety of electric vehicles and electric machinery being used in various industrial and civilian scenarios. The charging infrastructure industry is also developing rapidly, with charging piles installed in private parking spaces, public parking lots, and industrial enterprise campuses. Different users have different ways of operating charging facilities, and their charging pile usage requirements vary across different scenarios. As the electric vehicle industry booms, charging piles, as critical infrastructure, have a direct impact on user experience, energy efficiency, and equipment safety.
[0003] However, traditional charging pile control methods are not only inefficient but also often customized, making them difficult to quickly adapt to different scenarios. Therefore, a low-level architecture is needed that supports flexible process configuration while providing a standardized interface for upper-level charging control strategies. This allows for the development of more flexible charging control methods to meet diverse charging pile requirements. Summary of the Invention
[0004] The purpose of this application is to provide a charging control method and system for a charging pile, an electronic device, and a storage medium to solve the problem that traditional charging control methods for charging piles are difficult to meet the needs of diverse scenarios.
[0005] According to a first aspect of an embodiment of the present application, a charging control method for a charging pile is provided, comprising:
[0006] In response to receiving a first trigger instruction, parsing the first trigger instruction to obtain a target charging event;
[0007] If the charging pile corresponding to the target charging event is a private charging pile, a user authentication step is triggered; in response to the user authentication being qualified, target charging parameters are determined based on the target charging event, and charging pile resources are controlled based on the target charging parameters;
[0008] If the charging pile corresponding to the target charging event is a public charging pile, the target charging parameters are determined based on the event priority corresponding to the target charging event; the event queue of the charging pile is updated based on the target charging parameters to obtain a target event queue, and the charging pile resources are controlled based on the target event queue; the event queue of the charging pile includes the execution status and charging parameters of multiple charging events.
[0009] A second aspect of the embodiments of the present application provides a charging control system for a charging pile, including:
[0010] an event detection module, configured to, in response to receiving a first trigger instruction, parse the first trigger instruction to obtain a target charging event;
[0011] a first charging control module configured to trigger a user authentication step if the charging pile corresponding to the target charging event is a private charging pile; in response to the user authentication being qualified, determine target charging parameters based on the target charging event, and control charging pile resources based on the target charging parameters;
[0012] The second charging control module is used to determine the target charging parameters based on the event priority corresponding to the target charging event if the charging pile corresponding to the target charging event is a public charging pile; update the event queue of the charging pile based on the target charging parameters to obtain the target event queue, and control the charging pile resources based on the target event queue; the event queue of the charging pile includes the execution status and charging parameters of multiple charging events.
[0013] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned charging control method for a charging pile are implemented.
[0014] In a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned charging control method for a charging pile are implemented.
[0015] The beneficial effects of the charging control method and system, electronic device, and storage medium provided by the embodiments of the present application are as follows: By constructing a portable, configurable, and customizable charging control system for charging piles based on lightweight coroutines and event-driven models, the embodiments of the present application decompose the charging process into independently configurable step coroutines, supporting dynamic process combination based on charging pile type. Based on this system architecture, the embodiments of the present application, targeting private charging piles, ensure the security and exclusive rights of use through user authentication steps, prevent illegal use by others, and meet the personalized security needs of private scenarios.
[0016] The embodiment of the present application is aimed at public charging piles, and the charging parameters are determined and the event queue is updated based on the event priority. It can optimize resource allocation according to the urgency and importance of the charging event, give priority to high-priority events, reduce user waiting time, and improve overall charging efficiency.
[0017] The embodiment of the present application distinguishes between private and public scenarios and implements differentiated control, which not only ensures the exclusive attributes of private charging piles, but also improves the resource utilization of public charging piles through intelligent scheduling, effectively solving the problem that traditional methods are inefficient and difficult to meet the needs of diverse scenarios, taking into account safety, efficiency and user experience, and realizing intelligent charging piles and sustainable energy management. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 A flow chart of a charging control method for a charging pile provided in one embodiment of the present application;
[0020] Figure 2 A schematic diagram showing the relationship between the charging pile, charging gun, and steps provided in one embodiment of the present application;
[0021] Figure 3 A schematic flow chart of a charging control method for a charging pile provided in another embodiment of the present application;
[0022] Figure 4 This is a structural block diagram of a charging control system for a charging pile provided in one embodiment of the present application;
[0023] Figure 5 A schematic block diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0025] In order to make the purpose, technical solutions and advantages of this application clearer, specific embodiments will be described below with reference to the accompanying drawings.
[0026] Please refer to Figure 1 , Figure 1 This is a flow chart of a charging control method for a charging pile provided in one embodiment of the present application. The method may include S101 to S103.
[0027] S101: In response to receiving a first trigger instruction, the first trigger instruction is parsed to obtain a target charging event.
[0028] In this embodiment, the first trigger instruction is an operation signal from a user initiating a charging request, such as swiping a card or scanning a code on a charging station, touching the charging station's display, or issuing an instruction via a mobile phone app. The target charging event is a specific description of the charging demand and may include target charging station information, target charging device information, user information, event identifier, charging mode, etc.
[0029] This embodiment is based on a portable and configurable charging pile charging process architecture system. Configurability and tailorability refer to the ability to flexibly adjust the functional composition and system scale according to user needs. This requires the charging pile system to be highly modular, with features such as configuration management and dynamic loading. Portability refers to a software system that can run in multiple computing environments without modifying the source code. This capability enables the software system to span different hardware platforms, operating systems, and operating environments. The charging pile charging process architecture system has the following features:
[0030] (1) Coroutine task scheduling: Each charging gun corresponds to an independent charging gun coroutine, which contains step coroutines such as user authentication and charging parameter calculation. It blocks the event queue and waits for specific events, such as successful authentication and reservation expiration, to achieve lightweight concurrency.
[0031] (2) Event-driven model: The charging pile process registers events of interest in each step through an event detector, such as the presentation of authentication credentials for private charging piles and the timeout of the selected charging method for public charging piles. After the event occurs, the corresponding coroutine is triggered through the event queue of the producer-consumer model to reduce CPU usage and improve real-time performance.
[0032] (3) Modular configuration: The existence and jump logic of the step coroutine are defined by storing the scenario configuration file in non-volatile memory, and common configuration templates such as home and public charging stations are built in. For example, the user authentication coroutine is enabled for private charging piles, while it is disabled for public charging piles. After the public charging pile is connected to the charging gun, it jumps to the event priority calculation, while the private charging pile jumps to the charging start.
[0033] This embodiment uses a task implementation based on coroutines. Coroutines are a more lightweight concurrent programming model than threads. They allow for the collaborative scheduling of multiple tasks within a single thread and feature suspendability and resumability (blocking). The charging pile management system software implemented in this way isolates the underlying operating system from the upper-level charging process control software through self-built coroutines. This allows the software system to be easily ported to single-chip microcontrollers without an operating system to meet cost requirements, or to platforms with operating systems such as Linux, Windows, and Android to implement more advanced features.
[0034] The method for implementing modular programs in this embodiment specifically includes defining appropriate interfaces to ensure good interaction between modules and defining all processes as event-driven. Event-driven is a software architecture paradigm whose core concept is that system behavior is triggered by events rather than traditional sequential execution. Events can include user input, sensor data, messages, timer expiration, or changes in the system's internal state. Event-driven systems have the following characteristics:
[0035] (1) Asynchrony: Events are generated and processed asynchronously, without blocking the main process;
[0036] (2) Responsive: The system passively waits for events rather than actively polling;
[0037] (3) Loose coupling: There is no direct dependency between event producers and consumers.
[0038] The design of this embodiment can not only realize the structure of the charging process, make the software highly modular, but also reduce CPU usage, lower power consumption, and increase real-time performance.
[0039] Exemplarily, the charging process architecture system of the charging pile is based on event-driven and lightweight coroutine technology, which divides the charging process into customizable step coroutines, such as user authentication, charging mode selection, connecting the charging gun, etc., and defines the jump logic between steps through the configuration file to support rapid adaptation to different scenarios such as private charging piles and public charging piles.
[0040] The charging process architecture system of the charging pile can use coroutines to isolate the steps of the charging process. Each charging gun corresponds to an independent coroutine instance, and asynchronously processes user operations and device status through the event queue, reducing CPU usage and improving real-time performance.
[0041] The charging process architecture system of the charging pile can define standardized event interfaces, such as successful authentication and charging start timeout. The coroutines of each step achieve loosely coupled interaction by registering events of interest, and support dynamic loading or removal of functional modules, such as enabling user authentication steps only for private charging piles.
[0042] The charging process architecture system can store scenario profiles in non-volatile memory, allowing for flexible adjustment of the sequence of steps. For example, public charging stations prioritize event priority calculations, while private charging stations skip queue management and directly enter charging. The system also includes built-in universal configuration templates for home use, bus depots, and community charging stations to simplify deployment.
[0043] Exemplarily, the charging process of a charging pile can be divided into the following steps: selecting a charging gun, performing user authentication, selecting a charging method and additional services, connecting the charging gun, starting charging, charging, and ending charging.
[0044] Exemplarily, events of a charging pile may include connecting a charging gun, timing out of connecting a charging gun, cancelling the connection of a charging gun, removing a charging gun, timing out of removing a charging gun, presenting an authentication credential, timing out of presenting an authentication credential, cancelling the presentation of an authentication credential, successful verification of an authentication credential, failed verification of an authentication credential, timeout of timeout of timeout, remote start, remote end, selection of a charging method and service, cancelling the selection of a charging method and service, timeout of timeout of timeout of selecting a charging method and service, successful start of charging, failure to start charging, timeout of timeout of start of charging, generation of a fault, fault recovery, reservation, renewal, cancellation of reservation, expiration of reservation, etc.
[0045] For example, events of interest in the step of selecting a charging gun may include remote start, fault generation, fault recovery, and reservation. Events of interest in the step of performing user authentication may include presentation of authentication credentials, timeout of authentication credential presentation, cancellation of authentication credential presentation, successful authentication credential verification, failed authentication credential verification, timeout of authentication credential verification, and fault generation. Events of interest in the step of selecting a charging method and additional services may include selection of a charging method and service, cancellation of selection of a charging method and service, timeout of selection of a charging method and service, and fault generation.
[0046] Events of interest in the charging gun connection step may include charging gun connection, charging gun connection timeout, charging gun disconnection, and fault generation. Events of interest in the charging start step may include successful charging start, charging start failure, charging start timeout, remote termination, and fault generation. Events of interest in the charging step may include remote termination and fault generation. Events of interest in the charging termination step may include charging gun removal, charging gun removal timeout, and fault generation.
[0047] For example, a user sends a charging command (the first trigger command) to a home charging station via a mobile app. This embodiment parses this command and generates a target charging event containing user information and the vehicle's remaining battery life. Because the configuration file is marked with private_mode=1, the charging station activates the user authentication coroutine and waits for the user's fingerprint authentication through the event queue. Once authentication is successful, the charging station directly jumps to the charging start coroutine according to the configuration, bypassing the event queue management process required for public charging stations and completing the charging connection, meeting the convenience and security requirements of private scenarios.
[0048] For example, a taxi driver swipes their card at a public charging station (the first trigger instruction). This embodiment analyzes the target charging events, including normal charging mode, 20% remaining power, and 80% required power. Because the configuration file flags public_mode=1, the event priority calculation coroutine is activated. The priority is calculated based on the arrival time. If the priority is high, the fast charging wait sequence insertion logic is triggered. When a fast charging gun completes the previous charging task, a charging end event is triggered. The event queue automatically schedules the charging event for the taxi, prioritizing 60kW of power. This improves efficiency by 40% compared to traditional polling scheduling, enabling fast charging for high-priority vehicles.
[0049] S102: If the charging pile corresponding to the target charging event is a private charging pile, a user authentication step is triggered. In response to the user passing the authentication, target charging parameters are determined based on the target charging event, and charging pile resources are controlled based on the target charging parameters.
[0050] In this embodiment, charging piles are categorized into private and public types. Private charging piles are designated for use only by specific users. The user authentication step verifies that the user has the legal authority to use the charging pile. This step involves obtaining user authentication information such as a user account, password, fingerprint, facial recognition feature, or QR code. Target charging parameters are parameters used to control the charging process at the charging pile. These parameters may include charging time, charging power, and more.
[0051] Controlling charging pile resources based on target charging parameters includes adjusting the operating state of the charging pile based on the target charging parameters. Adjusting the operating state of the charging pile may include turning charging on and off, adjusting the charging power, etc.
[0052] For example, when the target charging event corresponds to a private charging station, the charging station system initiates user authentication, comparing the user's provided identity information with pre-stored valid user information. If authentication is successful, the charging station system determines appropriate target charging parameters based on the device information and power requirements in the target charging event. Finally, based on these parameters, the charging station system controls the charging station resources to enable charging.
[0053] For example, the user authentication step is implemented by the user authentication coroutine, which is activated by the configuration file flag (is_private=1) and registers events such as the presentation of authentication credentials and authentication timeout. When the user swipes a card or scans a QR code to trigger the presentation of authentication credentials event, the coroutine blocks and waits for an authentication success or failure event. After authentication is successful, the charging gun coroutine jumps directly to the charging parameter control coroutine according to the configuration file, skipping the event queue management process required for public charging piles and achieving the efficiency of dedicated control.
[0054] S103: If the charging pile corresponding to the target charging event is a public charging pile, target charging parameters are determined based on the event priority corresponding to the target charging event. The charging pile's event queue is updated based on the target charging parameters to obtain a target event queue. Charging pile resources are then controlled based on the target event queue. The charging pile's event queue includes the execution status and charging parameters of multiple charging events.
[0055] In this embodiment, a public charging pile is a charging pile open to the public for use by multiple users. Event priority is used to measure the urgency and importance of different charging events to determine the target charging parameters. The higher the event priority, the higher the corresponding target charging parameters. The target charging parameters are specific parameters that control the public charging pile to charge the target charging device. Each charging device has its own corresponding charging parameters. The event queue is a list that records multiple charging events. The event queue contains the execution status and charging parameters of each charging event. The execution status can include waiting, charging, completed, etc. The target event queue is a new queue obtained by updating the event queue based on the newly added target charging event.
[0056] In this embodiment, when the target charging event corresponds to a public charging pile, its event priority is determined based on the relevant information of the target charging event. Different arrival times, remaining power, required power, and charging modes will affect the priority. The target charging parameters are determined based on the event priority. For example, a high-priority event may be assigned a higher charging power and a shorter charging time. The target charging event and its target charging parameters are added to the event queue of the charging pile, and the queue order is updated according to certain rules to obtain the target event queue. Based on the order and parameters of each charging event in the target event queue, the charging pile resources are reasonably allocated and controlled, and high-priority charging events are given priority.
[0057] In this embodiment, the target charging event corresponds to an event in the event queue in the charging process architecture system of the charging pile. The role of the target charging event is to trigger the input of the step coroutine, such as the remote start event can trigger the selection of the charging gun coroutine. The event priority corresponds to the step coroutine jump condition in the charging process architecture system of the charging pile. The role of the event priority is that high-priority events trigger the insertion logic of the waiting sequence corresponding to the fast charging resource. The event queue corresponds to the communication medium between the coroutines in the charging process architecture system of the charging pile. The role of the event queue is that the charging gun coroutine obtains events such as successful charging startup through the event queue to determine the next step.
[0058] Exemplarily, before determining the target charging parameters based on the event priority corresponding to the target charging event, the event priority calculation of the public charging pile is implemented by an independent priority calculation coroutine, which is activated by the configuration file mark (is_public=1) and receives information such as arrival time and remaining power in the target charging event. The calculated priority is used to determine the target waiting sequence, such as the fast charging waiting sequence corresponding to the first-level resource, and the charging event is inserted into the corresponding position through the event queue update coroutine. The combination of step coroutines is defined by the public charging pile configuration file, and supports adjusting the process sequence by modifying the configuration. For example, the combination of step coroutines can include connecting the charging gun → priority calculation → event queue update. In actual application, a new appointment charging preprocessing step can also be added).
[0059] For example, this embodiment uses lightweight coroutine technology to implement modular scheduling of the charging process. The charging process architecture system for a charging pile can include multiple charging gun coroutines, each of which corresponds to the full process control of a charging gun. Specifically, it can include step coroutines such as user authentication coroutine and charging parameter calculation coroutine. Step coroutines block in the event queue waiting for specific events, such as successful authentication credential verification and reservation expiration. Once the specific event occurs, the step jump logic is triggered.
[0060] After the charging pile process registers the events of interest to the detection queue based on the currently executed step, the event detector can detect whether an event has occurred. After an event occurs, the event detector clears the detection queue and transmits it to the charging pile process via the event queue. The event queue uses a producer-consumer model to maintain the queue data structure to facilitate asynchronous event transmission. The charging pile process only runs the corresponding charging gun coroutine to handle the event based on the event. If no event is received, it will be blocked on the event queue. When the event of interest is detected, the step coroutine will jump accordingly and then re-register the event of interest to the event detection queue, thus executing in a loop.
[0061] For example, Figure 2 As shown, Figure 2Schematic diagram of the relationship between charging piles, charging guns and steps.
[0062] In this embodiment, each step of the charging process is implemented using a coroutine, called a step coroutine. The step coroutine is responsible for specific transaction processing. In each step coroutine, it is necessary to register the events of current concern according to the step, and block on the event queue waiting for the occurrence of the events of concern. The events that need to be processed in each step can be a sequence, and each step in the sequence can wait for one or more events. For example, in the user authentication step, it is necessary to wait for the user verification event first, and then wait for the verification result event, the user cancels the verification event, and the verification timeout event at the same time. After all the blocked waiting events in the step coroutine are processed, the step coroutine is jumped out and returned to the charging gun coroutine. The step coroutine is reentrant and can be called simultaneously by different charging guns.
[0063] The charging gun coroutine is responsible for processing steps and process transitions for a particular charging gun. It can be composed of multiple step coroutines. The combination of step coroutines is arbitrary and can be modified and tailored based on configuration or compilation. Configuration is typically stored in non-volatile memory so that the behavior of the charging pile can be adjusted over time based on configuration changes. The charging gun coroutine does not handle specific transactions; it only manages the transitions between steps. When the event sequence in a step coroutine completes and the coroutine returns to the charging gun coroutine, the coroutine controls the transition to the next pre-configured step coroutine. For example, after completing the charging gun connection step, it can directly jump to the charging step or the user verification step. Typically, a step is executed only once in the entire process; after all processes have completed, execution restarts from the beginning. If a specific event requires a jump to the beginning step, re-execution of the current step, or a specified other step, this can be easily implemented and configured. The charging gun coroutine is reentrant and can be called simultaneously by the charging pile process.
[0064] The charging pile process is responsible for the entire charging pile event processing process jump, which can be executed concurrently by multiple charging gun coroutines. The charging gun coroutines are executed independently and concurrently. If communication and synchronization between charging guns is required, this can be done through the event queue to ensure overall consistency.
[0065] Whether the step coroutine exists and how to jump can be configured arbitrarily to meet various needs to the greatest extent. In addition, the charging pile charging process architecture system will have multiple commonly used configurations built in, such as general bus station configuration, general social charging station configuration, general home charging pile configuration, etc., to improve the convenience of configuration.
[0066] For example, for a private charging pile scenario, the charging gun coroutine waits for the authentication success event in the user authentication step coroutine. After the authentication is passed, it directly enters the charging parameter control coroutine and skips the event queue management.
[0067] For the public charging pile scenario, after the event priority calculation step coroutine is completed, the charging event is inserted into the target waiting sequence through the event queue update coroutine, relying on the asynchronous scheduling mechanism of the event queue to achieve resource allocation.
[0068] This embodiment supports dynamic adjustment of the charging process through the configuration file, including:
[0069] The flag bit (such as is_private_charging) determines whether to enable the user authentication step or whether to skip the waiting period logic for scheduled charging.
[0070] Specify the dependencies between steps in the configuration file. For example, after the charging gun connection step is completed, the public charging pile jumps to the event priority calculation step, while the private charging pile jumps to the charging start step.
[0071] By isolating the underlying hardware interfaces, such as the charging gun communication protocol and power control module, through coroutines, the same set of software can be ported to the microcontroller or Linux system, and only the hardware driver layer interface needs to be replaced.
[0072] For example, Figure 3 As shown, Figure 3 The charging pile in the example contains two charging gun coroutines. Figure 3 The right side shows a simplified example of the charging gun coroutine to illustrate the workflow.
[0073] As can be seen from the above, this embodiment can provide accurate and efficient charging control services for both private and public charging piles, tailored to their characteristics and user needs. This helps improve the quality and user experience of the entire charging service system and meet diverse needs. Specifically, in terms of security and privacy, the user authentication steps implemented in this embodiment for private charging piles significantly protect the exclusive rights and interests of private charging pile owners. By strictly verifying user identity information, it effectively prevents unauthorized use of private charging piles and avoids the illegal occupation of resources.
[0074] In terms of public charging pile resource management, this embodiment achieves efficient and optimized allocation of public charging pile resources by determining target charging parameters based on event priority and updating the event queue. This embodiment flexibly adjusts charging parameters based on the urgency and importance of different charging events, prioritizing the charging needs of high-priority users, reducing user wait times and improving overall charging efficiency. Furthermore, through the rational management of the event queue, this embodiment systematically arranges the execution order of various charging events, ensuring the orderly utilization of charging pile resources and avoiding resource confusion and waste.
[0075] This embodiment also has good versatility and adaptability. In addition to the private charging piles and public charging piles mentioned in this embodiment, for further subdivided scenarios, for example, private charging piles are divided into private courtyards, public garages, etc., and some charging piles at bus stations, airports, industrial and mining enterprises, express transportation companies, etc. are also internally operated and not open to the public; public charging piles such as scenic spots, highway service areas, public parking lots, gas stations, shopping malls, etc., the requirements of charging piles in these different scenarios are different. The charging pile charging process underlying architecture system provided by this embodiment can meet their needs through tailoring and flexible configuration. The same set of software can be switched to private charging piles or public charging piles through configuration files, reducing development costs; coroutine technology makes the concurrent processing of multiple guns in public charging piles more lightweight, event-driven reduces polling overhead, and cooperates with priority scheduling to provide event processing efficiency; the underlying coroutine isolation operating system of this embodiment supports seamless porting from single-chip microcomputers to Linux platforms, reducing porting costs.
[0076] In one embodiment of the present application, a charging control method for a charging pile further includes:
[0077] Target charging device information and a charging mode are determined based on the target charging event.
[0078] Event priority is determined based on target charging device information and charging mode.
[0079] In this embodiment, the charging mode includes normal charging or scheduled charging. The target charging device information includes arrival time, remaining power, and required power.
[0080] Determine event priorities based on target charging device information and charging mode, including:
[0081] If the charging mode is normal charging, the priority score is calculated based on the arrival time, remaining power, required power and priority formula.
[0082] If the priority score is less than or equal to the first threshold, the event priority is determined to be the first level.
[0083] If the priority score is greater than the first threshold, the event priority is determined to be the second level.
[0084] If the charging mode is scheduled charging, the waiting time period and the charging time period are determined based on the scheduled charging information.
[0085] During the waiting period, the event priority is determined to be level three.
[0086] During the charging period, the charging mode is updated to normal charging.
[0087] The processing priority of the first level is higher than that of the second level, and the processing priority of the second level is higher than that of the third level.
[0088] In this embodiment, the charging mode is the charging method selected by the user. Different charging modes correspond to different charging strategies and priority rules. Normal charging is a conventional instant charging method, where the user initiates a charging request and begins charging immediately upon arriving at the charging station. Scheduled charging allows the user to set a charging time in advance, and the charging station will charge the device within the specified time range. This mode can help users take advantage of preferential policies such as off-peak electricity prices and reduce charging costs.
[0089] Level 1 charging events are priority events, which can improve charging efficiency. Level 2 charging events are normal events, which can be charged according to preset charging parameters such as charging power. Level 3 charging events are mainly for events within the waiting period of scheduled charging. At this time, the device has not yet reached the set charging time, and the urgency of handling them is relatively low.
[0090] The priority score is calculated using a specific priority formula based on the target charging device information. It is used to determine the priority level of an event. The first threshold is the critical value used to classify an event into Level 1 and Level 2. The first threshold can be a pre-set fixed value used to determine the priority range to which the priority score belongs.
[0091] For example, the method of this embodiment is implemented based on a configurable coroutine-based underlying architecture system. Priority calculation and charging mode determination are both implemented as independent coroutines, such as the priority calculation coroutine and the charging mode processing coroutine, which receive target charging events through an event queue. This embodiment uses a configuration file to mark the charging mode (normal / reserved) to trigger different coroutine paths:
[0092] For normal charging: directly call the priority formula calculation routine, input the arrival time, remaining power, required power and weight coefficient, and output the priority score.
[0093] For scheduled charging: Activate the scheduled timing coroutine, maintain the third priority during the waiting period, and automatically switch to the normal charging coroutine when the charging time is reached.
[0094] After the priority calculation is completed, this embodiment sends a priority calculation completion event through the event queue, carrying the priority level, to trigger subsequent parameter generation or queue update.
[0095] In this embodiment, the priority formula is:
[0096]
[0097] in, represents the priority score, Indicates the arrival time, Indicates the minimum end value of the time interval corresponding to the arrival time T, Indicates the maximum end value of the time interval corresponding to the arrival time T, represents the weight coefficient, Indicates the required power, and R indicates the remaining power.
[0098] In this embodiment, the lower the priority score, the higher the priority. The power requirement is represented by R, the remaining power, and DR, the required power. The required power can be the full capacity of the charging device or a user-defined target power. The higher the user's power requirement, the lower the priority score and the higher the priority.
[0099] The 24 hours of a day can be divided into multiple time intervals, for example, each 15 minutes long. The earlier the arrival time, the higher the priority score. Vehicles arriving within the same time interval can be charged in the order determined by their event priority. For example, if there are no idle charging guns at the charging station, and two electric vehicles, A and B, arrive at 10:10 and 10:13 respectively, the priority scores are calculated based on their required power, remaining power, and arrival time. If A has a higher priority score, then A has a lower priority than B, and B can be scheduled to charge first. At the same time, the calculated priority score can also be used to determine the event priority, and the charging parameters can be determined based on the event priority.
[0100] In this embodiment, the target charging parameters include charging time and charging power. The target charging device information includes device type, remaining power, and required power.
[0101] The target charging parameters are determined based on the event priority corresponding to the target charging event, including:
[0102] The charging power is calculated based on the event priority corresponding to the target charging event, the target charging device information, and the charging time calculation formula.
[0103] The charging time is determined based on the charging power and the target charging equipment information.
[0104] In this embodiment, the charging time calculation formula is:
[0105]
[0106] in, Indicates charging time, Indicates the maximum charging time corresponding to the device type C, L indicates the event priority, Indicates the weight coefficient corresponding to the event priority.
[0107] In this embodiment, by You can get a benchmark charging time. Different device types have different maximum charging times. This is the characteristic of the device itself. You can pre-calculate the maximum charging time corresponding to different device types. The higher the event priority, the higher the corresponding weight coefficient. The smaller the value, the longer the charging time. The shorter the time, the higher the charging power allocated if the battery level remains unchanged. For example, the weight coefficient corresponding to the first level event can be 0.9, the weight coefficient corresponding to the third level event can be 1, and the weight coefficient corresponding to the third level event can be 0. The lower the remaining battery level and the higher the required power level, the greater the charging power to meet the device's need for faster charging.
[0108] Exemplarily, each charging gun resource corresponds to an independent coroutine, and its waiting sequence is stored in an event queue, including the execution status and parameters of the charging event, such as power and time.
[0109] When a new charging event is received, this embodiment uses the power classification coroutine to determine whether the power is greater than or equal to the first power threshold to decide whether to insert the first-level resource (fast charging gun) or the second-level resource (slow charging gun) waiting sequence.
[0110] If the target waiting sequence length is less than the first number, it is directly inserted into the end of the queue; otherwise, the global queue calculation coroutine is triggered to determine the optimal insertion position based on factors such as release time and priority.
[0111] In this embodiment, the number of primary resources, the number of secondary resources, and the power threshold can be defined through a configuration file, and the underlying architecture is automatically mapped to the corresponding coroutine group, such as the fast charging gun coroutine group and the slow charging gun coroutine group.
[0112] For example, in a 10-charger public charging station (5 fast-charging and 5 slow-charging), a vehicle requests 80kW of power, triggering the waiting sequence of the fast-charging gun coroutine. If the waiting sequence length of a fast-charging gun is 2 (less than 3), it is directly inserted. If the waiting sequence length of a slow-charging gun is 3, the global sorting coroutine is called to calculate the insertion point based on the remaining charging time of each gun to avoid idle resources.
[0113] In terms of resource allocation, this embodiment determines charging parameters and sequence based on event priority, prioritizes high-priority events, rationally allocates charging pile resources, reduces user wait time, and improves overall charging efficiency. In terms of cost control, the scheduled charging mode helps users take advantage of off-peak electricity prices and reduce charging costs. Furthermore, by considering multiple factors such as device type, remaining power, and required power, the priority score and charging parameters are calculated to better meet the diverse charging needs of different users and devices, providing personalized services, optimizing the user charging experience, and promoting the efficient and intelligent development of the charging pile industry.
[0114] In one embodiment of the present application, the event queue of the charging pile includes multiple waiting sequences, and each waiting sequence corresponds to a charging pile resource.
[0115] The event queue of the charging pile is updated based on the target charging parameters to obtain the target event queue, including:
[0116] A target waiting sequence is determined based on the target charging parameters.
[0117] If the number of the multiple charging events in the target waiting sequence is less than the first number, a target insertion sequence of the target charging event is determined based on the target waiting sequence, and the target charging event is inserted into the end of the target waiting sequence to obtain a target event queue.
[0118] If the number of charging events in the target waiting sequence is greater than or equal to a first number, a target insertion sequence for the target charging event is calculated based on all waiting sequences in the charging pile event queue, and the target charging event is inserted at the end of the target insertion sequence to obtain a target event queue. The first number is the number of charging pile resources corresponding to the target waiting sequence.
[0119] In this embodiment, the target charging parameter includes charging power. Charging pile resources include primary resources and secondary resources. Determining the target waiting sequence based on the target charging parameter includes:
[0120] If the charging power is greater than or equal to the first power, the waiting sequences corresponding to all the first-level resources are used as the target waiting sequences.
[0121] If the charging power is less than the first power, the waiting sequences corresponding to all secondary resources are used as target waiting sequences.
[0122] In this embodiment, a waiting sequence is a substructure of the event queue. Each waiting sequence corresponds to a charging pile resource and is used to store charging events waiting for that resource. The charging pile resource can be a charging gun. The first quantity is a benchmark value for measuring the number of charging events in the target waiting sequence. It is equal to the number of charging pile resources corresponding to the target waiting sequence, that is, the number of all target waiting sequences.
[0123] The target waiting sequence is a waiting sequence selected based on the target charging parameters for inserting the target charging event. There can be multiple target waiting sequences. For example, if there are three suitable target waiting sequences selected based on the charging parameters, the first number is 3. The target insertion sequence is the only sequence in which the target charging event is ultimately inserted. The first power is the power threshold that distinguishes between using the primary resource and the secondary resource waiting sequence.
[0124] Exemplarily, the target waiting sequence is determined based on the charging power in the target charging parameter. If the charging power is greater than or equal to the first power, indicating a high requirement for charging efficiency, the waiting sequences corresponding to all primary resources are selected as the target waiting sequence; otherwise, the waiting sequences corresponding to secondary resources are selected. The relationship between the number of charging events in the target waiting sequence and the first number is determined. If the number is less than the first number, the target charging event is directly inserted at the end of the target waiting sequence; if the number is greater than or equal to the first number, the target insertion sequence is calculated based on all waiting sequences, and the target charging event is then inserted at the end of the sequence, thereby completing the update of the event queue and achieving reasonable planning of the charging sequence.
[0125] As can be seen from the above, the method for updating the charging pile event queue based on target charging parameters in this embodiment can effectively optimize the charging sequence and improve charging efficiency. For users, this can reduce waiting time, especially for those with high charging efficiency requirements, who can quickly access fast charging resources. For charging pile operators, reasonable event queue management avoids idle resources and conflicts, fully utilizes charging pile resources, improves equipment utilization and service capabilities, enhances user satisfaction, and promotes the healthy development of the charging pile business.
[0126] In one embodiment of the present application, the charging pile resources include primary resources and secondary resources. The charging efficiency of the primary resources is higher than that of the secondary resources.
[0127] Control charging pile resources based on the target event queue, including:
[0128] A first waiting sequence corresponding to the first-level resource is selected from the target event queue.
[0129] The release time of all the primary resources is predicted based on the execution status of all the charging events in the first waiting sequence, and the primary resource priority table is determined based on the release time of all the primary resources.
[0130] A second waiting sequence corresponding to the secondary resource is selected from the target event queue.
[0131] The release time of all secondary resources is predicted based on the execution status of all charging events in the second waiting sequence, and a secondary resource priority table is determined based on the release time of all secondary resources.
[0132] All charging pile resources are controlled based on the first-level resource priority table and the second-level resource priority table.
[0133] In this embodiment, the first waiting sequence is the waiting sequence corresponding to the primary resource in the target event queue, storing events waiting to be charged using the primary resource. The second waiting sequence is the waiting sequence corresponding to the secondary resource in the target event queue, storing events waiting to be charged using the secondary resource.
[0134] The primary resource priority table is a priority ranking table based on the release time of primary resources and is used to determine the allocation order of primary resources. It can include the primary resource number, expected release time, and priority ranking. The secondary resource priority table is a priority ranking table based on the release time of secondary resources and is used to determine the allocation order of secondary resources. It can include the secondary resource number, expected release time, and priority ranking.
[0135] In this embodiment, waiting sequences corresponding to the primary resources and secondary resources are respectively screened out from the target event queue, namely the first waiting sequence and the second waiting sequence. Based on the execution status of the charging event in each waiting sequence, the release time of the corresponding resource is predicted. For example, if the charging time of a certain charging event accounts for a high proportion of the total charging time, then the corresponding resource is expected to be released soon. Then, based on the predicted release time, a priority table is generated for the primary resources and the secondary resources respectively, and the one with the earlier release time has a higher priority. Finally, combined with the priority table of the primary resources and the priority table of the secondary resources, the charging pile resources are reasonably allocated in order of priority, and the high-priority charging needs are given priority, thereby improving the overall charging efficiency.
[0136] For example, this embodiment can monitor the charging event status of each waiting sequence and calculate the resource release time through the prediction function coroutine. If there are unfinished events in the waiting sequence, this embodiment calculates the release time through the time accumulation coroutine, where release time = current time + total remaining time.
[0137] If there are no unfinished events, the release time = the maximum of the current time and the end time of all events.
[0138] This embodiment extracts the first waiting sequence group corresponding to the first-level resources and the second waiting sequence group corresponding to the second-level resources from the event queue; for each group of waiting sequences, a resource priority table is generated in ascending order of release time, including resource number, expected release time, and priority sorting; the resource allocation coroutine prioritizes the allocation of corresponding resource coroutines to high-priority events according to the priority table, such as the fast charging gun coroutine.
[0139] In this embodiment, predicting the release time of all primary resources based on the execution status of all charging events in the first waiting sequence includes:
[0140] The release time of all the primary resources is calculated based on the execution state prediction of all the charging events in the first waiting sequence and the prediction function.
[0141] The prediction function is:
[0142]
[0143] in, Indicates the release time of the jth primary resource represents the number of charging events in the waiting sequence corresponding to the j-th primary resource, Indicates the current moment, Indicates charging events The start event, Indicates charging events Remaining charging time, Indicates charging events The total time required to complete charging. It is a conditional limitation, which means that Among all the values of i under this condition, find the value that can make Get the maximum value of i. i represents the index of all charging events in the waiting sequence.
[0144] In this embodiment, the first formula means that the release time of the primary resource is at least the current time and the maximum end time of all charging events in the waiting sequence. This is because the primary resource will only be released when all charging events in the waiting sequence are completed.
[0145] Considering the current charging event. If there is an ongoing charging event in the waiting sequence, the release time is the current time plus the sum of the remaining charging time of all unfinished events; otherwise, the release time is the maximum of the current time and the end time of all unfinished events.
[0146] For example, the prediction function obtains data such as the current time and remaining time through coroutine parameters and embeds it into the calculation logic of the release time prediction coroutine. For example, a fast charging gun has two uncompleted events in the waiting sequence. The time accumulation coroutine calculates the total remaining time, and the release time prediction coroutine outputs "current time + total remaining time" as the gun's release time.
[0147] From the above, it can be concluded that, on the one hand, this embodiment realizes efficient scheduling and flexible adaptation of the charging pile control process by decomposing the embodiment logic such as event queue management and resource allocation into independent coroutines, and utilizing the event-driven and configuration mechanism of the underlying architecture, thereby enhancing the scalability and scenario adaptability of the system.
[0148] On the other hand, at the resource allocation level, this embodiment distinguishes between primary and secondary resources, and determines the resource release time and priority table based on the waiting sequence and charging event status. This can prioritize high-priority charging needs, improve overall charging efficiency, and reduce user waiting time. In event queue management, the target waiting sequence is determined based on the charging power, and new events are reasonably inserted based on the number of events, optimizing the charging sequence and avoiding resource idleness and conflicts. This method fully utilizes charging pile resources, improves the service capabilities of the charging pile system, provides users with a more efficient and convenient charging experience, and helps promote the intelligent development of the charging pile industry and meet diverse needs.
[0149] Corresponding to the charging control method of a charging pile in the above embodiment, Figure 4 This is a structural block diagram of a charging control system for a charging pile provided in one embodiment of the present application. For ease of explanation, only the parts related to the embodiment of the present application are shown. Figure 4 The charging control system 20 of the charging pile includes: an event detection module 21, a first charging control module 22 and a second charging control module 23.
[0150] The event detection module 21 is configured to, in response to receiving a first trigger instruction, parse the first trigger instruction to obtain a target charging event.
[0151] The first charging control module 22 is configured to trigger a user authentication step if the charging pile corresponding to the target charging event is a private charging pile. In response to the user passing the authentication, the module determines target charging parameters based on the target charging event and controls the charging pile resources based on the target charging parameters.
[0152] The second charging control module 23 is configured to determine target charging parameters based on the event priority of the target charging event if the charging pile corresponding to the target charging event is a public charging pile. The charging pile's event queue is updated based on the target charging parameters to obtain a target event queue, and the charging pile resources are controlled based on the target event queue. The charging pile's event queue includes the execution status and charging parameters of multiple charging events.
[0153] In one embodiment of the present application, a charging control system 20 of a charging pile further includes: an event priority determination module, configured to determine target charging device information and a charging mode based on a target charging event.
[0154] Event priority is determined based on target charging device information and charging mode.
[0155] In one embodiment of the present application, the charging mode includes normal charging or scheduled charging. The target charging device information includes arrival time, remaining power, and required power.
[0156] The event priority determination module is specifically used to calculate the priority score based on the arrival time, remaining power, required power and priority formula if the charging mode is normal charging.
[0157] If the priority score is less than or equal to the first threshold, the event priority is determined to be the first level.
[0158] If the priority score is greater than the first threshold, the event priority is determined to be the second level.
[0159] If the charging mode is scheduled charging, the waiting time period and the charging time period are determined based on the scheduled charging information.
[0160] During the waiting period, the event priority is determined to be level three.
[0161] During the charging period, the charging mode is updated to normal charging.
[0162] The processing priority of the first level is higher than that of the second level, and the processing priority of the second level is higher than that of the third level.
[0163] In one embodiment of the present application, the event priority determination module is further configured to use the priority formula:
[0164]
[0165] in, represents the priority score, Indicates the arrival time, Indicates the minimum end value of the time interval corresponding to the arrival time T, Indicates the maximum end value of the time interval corresponding to the arrival time T, represents the weight coefficient, Indicates the required power, and R indicates the remaining power.
[0166] In one embodiment of the present application, the event queue of the charging pile includes multiple waiting sequences, each waiting sequence corresponds to a charging pile resource. The second charging control module 23 is specifically configured to determine a target waiting sequence based on a target charging parameter.
[0167] If the number of the multiple charging events in the target waiting sequence is less than the first number, a target insertion sequence of the target charging event is determined based on the target waiting sequence, and the target charging event is inserted into the end of the target waiting sequence to obtain a target event queue.
[0168] If the number of charging events in the target waiting sequence is greater than or equal to a first number, a target insertion sequence for the target charging event is calculated based on all waiting sequences in the charging pile event queue, and the target charging event is inserted at the end of the target insertion sequence to obtain a target event queue. The first number is the number of charging pile resources corresponding to the target waiting sequence.
[0169] In one embodiment of the present application, charging pile resources include primary resources and secondary resources. The charging efficiency of primary resources is higher than that of secondary resources. The second charging control module 23 is further configured to select a first waiting sequence corresponding to the primary resource from the target event queue.
[0170] The release time of all the primary resources is predicted based on the execution status of all the charging events in the first waiting sequence, and the primary resource priority table is determined based on the release time of all the primary resources.
[0171] A second waiting sequence corresponding to the secondary resource is selected from the target event queue.
[0172] The release time of all secondary resources is predicted based on the execution status of all charging events in the second waiting sequence, and a secondary resource priority table is determined based on the release time of all secondary resources.
[0173] All charging pile resources are controlled based on the first-level resource priority table and the second-level resource priority table.
[0174] In one embodiment of the present application, a charging pile charging process underlying architecture system also includes: multiple charging gun coroutines and an event queue; each charging gun coroutine corresponds to the charging process of a charging gun in the charging pile, and a charging gun coroutine includes multiple step coroutines, and each step coroutine corresponds to a charging step; wherein, the charging gun coroutine is used to control the jump of multiple step coroutines, and the step coroutine is used to execute the charging step; the multiple step coroutines are determined based on a configuration file, and the configuration file includes a configuration file corresponding to a private charging pile and a configuration file corresponding to a public charging pile; the event queue is used to store the target charging event when the target charging event is received, and trigger the charging gun coroutine.
[0175] See also Figure 5 , Figure 5 This is a schematic block diagram of an electronic device provided in one embodiment of the present application. Figure 5The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned system embodiments, such as Figure 4 The functions of modules 21 to 23 are shown.
[0176] It should be understood that in the embodiment of the present application, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0177] The input device 302 may include a touchpad, a fingerprint collection sensor (for collecting user fingerprint information and fingerprint direction information), a microphone, etc. The output device 303 may include a display (LCD, etc.), a speaker, etc.
[0178] The memory 304 may include a read-only memory and a random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0179] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present application can execute the implementation methods described in the first and second embodiments of the charging control method for a charging pile provided in the embodiments of the present application, and can also execute the implementation methods of the electronic device 300 described in the embodiments of the present application, which will not be repeated here.
[0180] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, all or part of the process of the method in the above embodiment is implemented. The computer program can also be used to instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of each of the above method embodiments are implemented. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium.
[0181] The computer-readable storage medium can be an internal storage unit of the electronic device in any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the computer-readable storage medium can include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store data that has been output or is about to be output.
[0182] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0183] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0184] In the several embodiments provided in this application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or can be an electrical, mechanical or other form of connection.
[0185] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0186] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0187] The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A charging control method for a charging pile, characterized in that: The method comprises: In response to receiving a first trigger instruction, parsing the first trigger instruction to obtain a target charging event; If the charging pile corresponding to the target charging event is a private charging pile, a user authentication step is triggered; in response to the user authentication being qualified, charging parameters are determined based on the target charging event, and charging pile resources are controlled based on the charging parameters; If the charging pile corresponding to the target charging event is a public charging pile, determining a target charging parameter based on the event priority corresponding to the target charging event; updating the event queue of the charging pile based on the target charging parameter to obtain a target event queue, and controlling the charging pile resources based on the target event queue; the event queue of the charging pile includes the execution status and charging parameters of multiple charging events; The method further comprises: Determine target charging device information and charging mode based on the target charging event; the charging mode includes normal charging or scheduled charging; the target charging device information includes arrival time, remaining power and required power; If the charging mode is normal charging, calculating a priority score based on the arrival time, the remaining power, the required power, and a priority formula; If the priority score is less than or equal to a first threshold, determining the event priority as a first level; If the priority score is greater than the first threshold, determining the event priority as the second level; If the charging mode is scheduled charging, determining a waiting time period and a charging time period based on the scheduled charging information; During the waiting period, determining the event priority as the third level; During the charging time period, updating the charging mode to normal charging; The processing priority of the first level is higher than that of the second level, and the processing priority of the second level is higher than that of the third level.
2. The charging control method of a charging pile according to claim 1, characterized in that: The priority formula is: in, represents the priority score, Indicates the arrival time, Indicates the minimum end value of the time interval corresponding to the arrival time T, Indicates the maximum end value of the time interval corresponding to the arrival time T, represents the weight coefficient, Indicates the required power, and R indicates the remaining power.
3. The charging control method for a charging pile according to claim 1, characterized in that: The event queue of the charging pile includes multiple waiting sequences, each waiting sequence corresponds to a charging pile resource; The updating of the event queue of the charging pile based on the target charging parameter to obtain the target event queue includes: determining a target waiting sequence based on the target charging parameter; If the number of the plurality of charging events in the target waiting sequence is less than a first number, determining a target insertion sequence for the target charging event based on the target waiting sequence, and inserting the target charging event into the end of the target waiting sequence to obtain a target event queue; If the number of multiple charging events in the target waiting sequence is greater than or equal to the first number, the target insertion sequence of the target charging event is calculated based on all waiting sequences in the event queue of the charging pile, and the target charging event is inserted into the end of the target insertion sequence to obtain the target event queue; the first number is the number of charging pile resources corresponding to the target waiting sequence.
4. The charging control method of a charging pile according to claim 1, characterized in that: The charging pile resources include primary resources and secondary resources; the charging efficiency of the primary resources is higher than the charging efficiency of the secondary resources; The controlling of charging pile resources based on the target event queue includes: Selecting a first waiting sequence corresponding to the first-level resource from the target event queue; Predicting release times of all primary resources based on the execution status of all charging events in the first waiting sequence; determining a primary resource priority table based on the release times of all primary resources; Selecting a second waiting sequence corresponding to the secondary resource from the target event queue; Predicting release times of all secondary resources based on the execution status of all charging events in the second waiting sequence; determining a secondary resource priority table based on the release times of all secondary resources; All charging pile resources are controlled based on the first-level resource priority table and the second-level resource priority table.
5. A charging control system for a charging pile, characterized in that: include: an event detection module, configured to, in response to receiving a first trigger instruction, parse the first trigger instruction to obtain a target charging event; A first charging control module is configured to trigger a user authentication step if the charging pile corresponding to the target charging event is a private charging pile; In response to the user being authenticated as qualified, determining target charging parameters based on the target charging event, and controlling charging pile resources based on the target charging parameters; a second charging control module configured to, if the charging pile corresponding to the target charging event is a public charging pile, determine a target charging parameter based on the event priority corresponding to the target charging event; update the event queue of the charging pile based on the target charging parameter to obtain a target event queue; and control charging pile resources based on the target event queue; the event queue of the charging pile includes the execution status and charging parameters of multiple charging events; An event priority determination module is configured to determine target charging device information and a charging mode based on the target charging event; the charging mode includes normal charging or scheduled charging; the target charging device information includes arrival time, remaining power, and required power; If the charging mode is normal charging, calculating a priority score based on the arrival time, the remaining power, the required power, and a priority formula; If the priority score is less than or equal to a first threshold, determining the event priority as a first level; If the priority score is greater than the first threshold, determining the event priority as the second level; If the charging mode is scheduled charging, determining a waiting time period and a charging time period based on the scheduled charging information; During the waiting period, determining the event priority as the third level; During the charging time period, updating the charging mode to normal charging; The processing priority of the first level is higher than that of the second level, and the processing priority of the second level is higher than that of the third level.
6. A charging control system for a charging pile as claimed in claim 5, characterized in that: Also includes: Multiple charging gun coroutines and event queues; Each charging gun coroutine corresponds to the charging process of a charging gun in the charging pile. A charging gun coroutine includes multiple step coroutines, and each step coroutine corresponds to a charging step; The charging gun coroutine is used to control the jump of multiple step coroutines, and the step coroutine is used to execute the charging step; The multiple step coroutines are determined based on a configuration file, wherein the configuration file includes a configuration file corresponding to a private charging pile and a configuration file corresponding to a public charging pile; The event queue is used to store the target charging event when the target charging event is received and trigger the charging gun coroutine.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Charging control method and system for charging pile
CN109878353A
Method and device for processing charging request of electric carrier, and charging service system
CN118397754A