Method and device for generating an electric vehicle charging bill, electronic device, program product
Patent Information
- Application Number
- CN202610990760.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-22
AI Technical Summary
[0005]本发明实施例提供了一种电瓶车充电账单的生成方法及装置、电子设备、程序产品,以至少解决相关技术中由于采用异常数据计算得到错误费用,导致生成的账单准确性较低的技术问题
[0022]在本发明中,获取目标车辆的初始充电费用,其中,初始充电费用是通过目标计费模型计算得到的,目标计费模型是从多个预设计费模型中进行匹配得到的;构建多级修正策略,并基于多级修正策略,对初始充电费用进行修正,得到目标充电费用;基于目标充电费用,对目标车辆的充电费用进行结算,并生成目标充电账单,解决了相关技术中由于采用异常数据计算得到错误费用,导致生成的账单准确性较低的技术问题。
Smart Images

Figure CN122798413A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle charging control technology, and more specifically, to a method and apparatus for generating electric vehicle charging bills, electronic equipment, and program products. Background Technology
[0002] With the popularization of low-speed two-wheeled vehicle travel scenarios and the large-scale construction of new energy charging infrastructure, public charging for two-wheeled vehicles has shifted from scattered self-service to platform-based, intelligent, and standardized operation. As the core link of charging operation, the billing system still has technical shortcomings and is difficult to adapt to the requirements of large-scale, refined, and compliant operation.
[0003] In terms of metering reliability and billing stability, current methods lack abnormal data filtering and cost fairness fallback mechanisms. For example, scenarios such as device metering drift, communication interruption, power rebound, and short-term low-power ineffective charging can easily cause billing distortion. In addition, billing rules rely on local configuration and cannot be updated remotely and dynamically. The order, payment, discount, and settlement processes are fragmented, making it difficult to generate accurate bills.
[0004] There is currently no effective solution to the above problems. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and program product for generating electric vehicle charging bills, in order to at least solve the technical problem in the related art that the accuracy of the generated bills is low due to the use of abnormal data to calculate incorrect fees.
[0006] According to one aspect of the embodiments of this application, a method for generating a charging bill for an electric vehicle is provided, comprising: obtaining the initial charging cost of a target vehicle, wherein the initial charging cost is calculated by a target billing model, and the target billing model is obtained by matching multiple pre-designed charging cost models; constructing a multi-level correction strategy, and correcting the initial charging cost based on the multi-level correction strategy to obtain a target charging cost; settling the charging cost of the target vehicle based on the target charging cost, and generating a target charging bill.
[0007] Furthermore, before obtaining the initial charging cost of the target vehicle, the process includes: receiving a charging request initiated by the target vehicle, charging the target vehicle based on the charging request, and generating multiple charging data; determining the charging service scenario in which the target vehicle is located, and matching it with multiple pre-designed billing models based on the charging service scenario to obtain the target billing model.
[0008] Furthermore, based on the charging business scenario, after matching multiple pre-designed billing models to obtain the target billing model, the process includes: determining multiple charging billing parameters in the target billing model, obtaining parameter data corresponding to each charging billing parameter from multiple charging data, and using the target billing model to charge the target vehicle based on all parameter data to obtain the initial charging cost.
[0009] Furthermore, the steps for constructing a multi-level correction strategy include: constructing a first-level correction strategy based on charging duration parameters and preset charging duration thresholds; constructing a second-level correction strategy based on initial charging cost parameters and multiple preset charging cost thresholds; constructing a third-level correction strategy based on initial charging power parameters and preset charging power thresholds; and constructing a fourth-level correction strategy based on charging capacity parameters and preset charging capacity thresholds.
[0010] Furthermore, the step of correcting the initial charging cost based on a multi-level correction strategy to obtain the target charging cost includes: obtaining the charging duration, initial charging power, and cumulative charging amount of the target vehicle; comparing the charging duration with a preset charging duration threshold based on a first-level correction strategy to obtain a first comparison result; if the first comparison result indicates that the charging duration is greater than the preset charging duration threshold, comparing the initial charging cost with each preset charging cost threshold based on a second-level correction strategy to obtain multiple comparison results; and determining the target charging cost based on the multiple comparison results.
[0011] Furthermore, the multiple preset charging cost thresholds include at least a first preset charging cost threshold and a second preset charging cost threshold, and the multiple comparison results include at least a second comparison result and a third comparison result. The step of comparing the initial charging cost with each preset charging cost threshold to obtain multiple comparison results includes: comparing the initial charging cost with the first preset charging cost threshold to obtain a second comparison result; and if the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold, comparing the initial charging cost with the second preset charging cost threshold to obtain a third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
[0012] Furthermore, the step of determining the target charging cost based on multiple comparison results includes: if the third comparison result indicates that the initial charging cost is less than or equal to the second preset charging cost threshold, comparing the initial charging power with a preset charging power threshold based on a third-level correction strategy to obtain a third comparison result; if the third comparison result indicates that the initial charging power is greater than the preset charging power threshold, comparing the cumulative charging amount with a preset charging amount threshold based on a fourth-level correction strategy to obtain a fourth comparison result; if the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold, correcting the initial charging cost based on a preset correction strategy to obtain the target charging cost.
[0013] According to another aspect of the embodiments of this application, an apparatus for generating a charging bill for an electric vehicle is also provided, comprising: an acquisition unit, configured to acquire the initial charging cost of a target vehicle, wherein the initial charging cost is calculated by a target billing model, and the target billing model is obtained by matching multiple pre-designed charging cost models; a correction unit, configured to construct a multi-level correction strategy and correct the initial charging cost based on the multi-level correction strategy to obtain a target charging cost; and a generation unit, configured to settle the charging cost of the target vehicle based on the target charging cost and generate a target charging bill.
[0014] Furthermore, the device for generating electric vehicle charging bills also includes: a first receiving module, used to receive a charging request initiated by the target vehicle before obtaining the initial charging fee of the target vehicle, and to charge the target vehicle based on the charging request, generating multiple charging data; and a first matching module, used to determine the charging business scenario in which the target vehicle is located, and to match it among multiple pre-designed billing models based on the charging business scenario to obtain the target billing model.
[0015] Furthermore, the device for generating electric vehicle charging bills also includes: a first determining module, used to match multiple pre-designed billing models based on the charging business scenario to obtain a target billing model, determine multiple charging billing parameters in the target billing model, and obtain parameter data corresponding to each charging billing parameter from multiple charging data; and a first billing module, used to perform charging billing for the target vehicle based on all parameter data and using the target billing model to obtain the initial charging fee.
[0016] Furthermore, the correction unit includes: a first construction module for constructing a first-level correction strategy based on charging duration parameters and preset charging duration thresholds; a second construction module for constructing a second-level correction strategy based on initial charging cost parameters and multiple preset charging cost thresholds; a third construction module for constructing a third-level correction strategy based on initial charging power parameters and preset charging power thresholds; and a fourth construction module for constructing a fourth-level correction strategy based on charging capacity parameters and preset charging capacity thresholds.
[0017] Furthermore, the correction unit also includes: a first acquisition module, used to acquire the charging time, initial charging power, and cumulative charging amount of the target vehicle; a first comparison module, used to compare the charging time with a preset charging time threshold based on a first-level correction strategy to obtain a first comparison result; a second comparison module, used to compare the initial charging cost with each preset charging cost threshold based on a second-level correction strategy when the first comparison result indicates that the charging time is greater than the preset charging time threshold, to obtain multiple comparison results; and a second determination module, used to determine the target charging cost based on the multiple comparison results.
[0018] Furthermore, the multiple preset charging cost thresholds include at least a first preset charging cost threshold and a second preset charging cost threshold, and the multiple comparison results include at least a second comparison result and a third comparison result. The second comparison module includes: a first comparison submodule, used to compare the initial charging cost with the first preset charging cost threshold to obtain a second comparison result; and a second comparison submodule, used to compare the initial charging cost with the second preset charging cost threshold when the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold to obtain a third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
[0019] Further, the second determining module includes: a third comparison submodule, used to compare the initial charging power with a preset charging power threshold based on a third-level correction strategy to obtain a third comparison result when the third comparison result indicates that the initial charging cost is less than or equal to a second preset charging cost threshold; a fourth comparison submodule, used to compare the cumulative charging amount with a preset charging amount threshold based on a fourth-level correction strategy to obtain a fourth comparison result when the third comparison result indicates that the initial charging power is greater than the preset charging power threshold; and a first correction submodule, used to correct the initial charging cost based on a preset correction strategy to obtain a target charging cost when the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold.
[0020] According to another aspect of the embodiments of this application, a computer program product is also provided, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the above-described methods for generating electric vehicle charging bills.
[0021] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement any of the above-described methods for generating electric vehicle charging bills.
[0022] In this invention, the initial charging cost of the target vehicle is obtained, wherein the initial charging cost is calculated through a target billing model, which is obtained by matching multiple pre-designed charging cost models; a multi-level correction strategy is constructed, and the initial charging cost is corrected based on the multi-level correction strategy to obtain the target charging cost; based on the target charging cost, the charging cost of the target vehicle is settled, and a target charging bill is generated, which solves the technical problem in related technologies where the generated bill has low accuracy due to the use of abnormal data to calculate incorrect costs.
[0023] In this invention, the initial charging cost is calculated using a target billing model matched from multiple pre-designed cost models, and this initial charging cost is obtained. A multi-level correction strategy is constructed, and the initial charging cost is verified and corrected through the multi-level correction strategy to obtain an accurate target charging cost. Based on this target charging cost, settlement and target charging bill generation are completed. This invention achieves configurable billing logic, automated exception handling, and transparency and fairness in the settlement process, thereby improving the accuracy of bill generation. Attached Figure Description
[0024] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings:
[0025] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a method for generating charging bills for electric bicycles is shown.
[0026] Figure 2 This is a flowchart of a method for generating a battery-powered vehicle charging bill according to Embodiment 1 of this application;
[0027] Figure 3 This is a flowchart of a charging fee settlement method according to an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of a two-wheeled vehicle charging billing system according to an embodiment of this application;
[0029] Figure 5 This is a flowchart of a charging fee correction method according to an embodiment of this application;
[0030] Figure 6 This is a flowchart illustrating the operation of a two-wheeled vehicle charging billing system according to an embodiment of this application;
[0031] Figure 7 This is a schematic diagram of a device for generating a charging bill for an electric vehicle according to an embodiment of this application;
[0032] Figure 8 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0033] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0035] It should be noted that all relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, and displayed data) collected and involved in this invention are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data comply with the relevant laws, regulations, and standards of the relevant regions, do not violate public order and good morals, and provide corresponding operation entry points for users to choose to authorize or refuse. For example, this system has an interface with relevant users or organizations. Before obtaining relevant information, a request to obtain the information needs to be sent to the aforementioned user or organization through the interface. After receiving consent from the aforementioned user or organization, the relevant information is obtained. If the user chooses to refuse, the process enters the expert decision-making process.
[0036] The present invention will now be described in detail with reference to various embodiments.
[0037] Example 1
[0038] According to an embodiment of this application, an embodiment of a method for generating a charging bill for an electric bicycle is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0039] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for generating a method for charging bills for electric bicycles is shown. Figure 1 As shown, computer terminal 10 (or mobile device) may include one or more ( Figure 1 The processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions may also be included. In addition, it may include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera, wherein the network interface can be connected to wired and / or wireless networks. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0040] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for generating electric vehicle charging bills in this embodiment of the application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned method for generating electric vehicle charging bills. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 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.
[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0043] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0044] Under the aforementioned operating environment, this application provides the following: Figure 2 The method for generating electric vehicle charging bills is shown. Figure 2 This is a flowchart of a method for generating electric vehicle charging bills according to Embodiment 1 of this application, as follows: Figure 2 As shown, the method includes the following steps:
[0045] Step S201: Obtain the initial charging cost of the target vehicle. The initial charging cost is calculated using the target billing model, which is obtained by matching multiple pre-designed charging models.
[0046] In this embodiment of the invention, when any one of the following conditions is met—vehicle fully charged, user stopped, fault shutdown, remote forced shutdown, or timeout order closure—the settlement process can be triggered. At this time, the initial charging fee calculated by loading the corresponding target billing model through the billing engine module can be obtained.
[0047] Optionally, the target billing model is obtained by matching multiple pre-designed billing models based on the charging business scenario of the target vehicle (e.g., power-dimensional scenarios, including low-power slow charging, standard power, high-power fast charging, etc.). The pre-designed billing models are pre-configured, pluggable sets of billing rules. By dynamically matching the target billing model, it is possible to meet the diverse operational needs of different regions, different sites, and different equipment types.
[0048] Step S202: Construct a multi-level correction strategy, and based on the multi-level correction strategy, correct the initial charging cost to obtain the target charging cost.
[0049] In this embodiment of the invention, the multi-level correction strategy is not a single strategy, but rather executed in a hierarchical manner. For example, it first determines whether the charge is below the minimum consumption threshold, then whether it is above the maximum consumption threshold, and finally whether the power / energy level is abnormal. The initial charging fee can be increased, decreased, or reset to zero according to the rules of the multi-level correction strategy to obtain the target charging fee. Correction can eliminate erroneous data caused by sensor drift or communication interruptions, thus avoiding incorrect billing.
[0050] Step S203: Based on the target charging cost, settle the charging cost for the target vehicle and generate the target charging bill.
[0051] In this embodiment of the invention, the charging cost for the target vehicle is settled based on the target charging fee, including deductions and discounts. For example, balances and points can be used for combined payment to generate a target charging bill.
[0052] Figure 3 This is a flowchart of a charging fee settlement method according to an embodiment of this application, such as... Figure 3As shown, data filtering can be performed first. For example, if a device reports the same charging fee repeatedly due to network retransmission mechanisms, only one record is kept, and duplicate data is filtered out. Then, the billing engine module matches the billing template strategy to obtain the initial charging fee. The billing template strategy can include: power-based billing, time-based billing, electricity-based billing, electricity-and-service-fee-based billing, and a hybrid billing model that calculates electricity fees based on electricity and service fees based on power and time. After that, the final charging fee can be calculated based on the template fallback rules, such as the maximum / minimum charge and the maximum charging time rule. Users can also choose the charging fee deduction method (such as using balance, using site discounts, packages, etc.) to settle the charging fee.
[0053] Figure 4 This is a schematic diagram of a two-wheeled vehicle charging billing system according to an embodiment of this application, as shown below. Figure 4As shown, the system can adopt a layered microservice architecture, which can be divided into seven layers according to their responsibilities: terminal layer, gateway layer, aggregation service layer, application service layer, basic domain service layer, basic middleware layer, and device access layer. Each module is loosely coupled, scalable, and can be deployed and iterated independently to meet the industrial-grade operation requirements of high concurrency, high availability, and high security. Among them, the terminal layer can provide multiple user and operation entry points, covering mainstream interaction scenarios, such as APP (Application), h5 (HTML5, the fifth generation of hypertext markup language, is the standard markup language for web pages), and PC (Personal Computer) terminals. These provide lightweight, native, and web-level services such as charging start / stop, order inquiry, and account management to C-end (client) users, respectively. The PC terminal mainly provides a backend management entry point for operation personnel. The gateway layer serves as a unified entry point for traffic, implementing request routing, security protection, and traffic control. The C-end core gateway handles high-frequency core business requests from C-end users (such as charging start / stop, payment, and real-time monitoring), implementing authentication, rate limiting, load balancing, and security filtering to ensure stable response of core business. The C-end non-core gateway handles non-real-time business requests such as user center, message notifications, and activity redemption, reducing the pressure on the core gateway and improving the overall system throughput. The B-end (i.e., operation end) gateway provides request access, permission routing, operation auditing, and interface protection to the management backend and operation personnel, ensuring safe and compliant operation. The aggregation service layer can aggregate user and operational business scenarios in a scenario-based manner, encapsulate standardized interfaces, and encapsulate high-frequency core user operations such as charging start / stop, order inquiry, cost pre-calculation, and real-time status monitoring, providing a unified business entry point. Important C-end aggregation modules can implement auxiliary functions such as personal information settings, message notification subscriptions, and feedback, improving the completeness of the user experience. Non-core aggregation modules can provide basic support capabilities such as system configuration query, public dictionary, version updates, and operational announcements. The management service module can provide operations personnel with visual management functions such as rate template configuration, time-of-use pricing configuration, equipment management, order management, and data statistics. The application service layer can provide... It provides general business support capabilities to support the entire business process; the login function module can provide multi-mode identity authentication, session management, token (credential / credential) generation and permission verification to ensure the credibility of user and operation personnel identities; the message push service module can push messages such as charging status changes, settlement notifications, and equipment failures in real time through channels such as in-site messages, APP push, and SMS; the data push module can realize standardized synchronization and interface adaptation of charging data, order data, settlement data, and equipment status data to the regulatory platform, third-party systems, and financial systems; the scheduled task module can execute background tasks such as data cleaning, report generation, abnormal order closure, and status synchronization based on a distributed scheduling framework, reducing manual operation and maintenance costs.The basic service layer (i.e., the core business layer) implements the core business logic of charging billing, supporting the system's core capabilities. The order service module is responsible for the entire lifecycle management of charging orders, including order creation, status transition, mid-term termination, abnormal order closure, settlement triggering, order archiving, and data traceability. The user service module manages user information, account details, vehicle information, usage preferences, and behavioral tags, supporting precise operation and personalized services. The payment wallet module manages account balances, top-ups, payment deductions, refunds, discounts, bill generation, and transaction records. The device management module handles charging device registration, binding, grouping, status monitoring, and more. The system includes features such as online / offline detection, fault alarms, remote parameter configuration, and firmware upgrade management; a built-in pluggable billing rule engine that supports dynamic loading of five types of billing templates, time-of-use pricing segmented calculation, abnormal data filtering, cost detail generation, automatic discount deduction, and settlement result write-back; a device signal processing module that can perform message parsing, verification, deduplication, and time-series storage, as well as package, distribution, and receipt confirmation of platform-side charging commands, power-off commands, and parameter configuration commands; an activity management module that supports rule configuration, eligibility judgment, and automatic discount matching for packages, site discounts, and new user benefits; and an authentication module that can implement three-level management of users, roles, and permissions based on the RBAC (Role-Based Access Control) model, supporting C-end user authentication, B-end operator permission isolation, and interface-level access control. The device access layer enables reliable communication between charging devices and the platform. The device access TCP (Transmission Control Protocol) module can achieve stable communication between charging devices and the platform based on the long-connection TCP protocol, supporting heartbeat keep-alive, disconnection reconnection, orderly command issuance, and reliable message transmission. The MQTT (Message Queuing Telemetry Transport) access module can achieve massive concurrent access of devices based on the lightweight MQTT IoT protocol, supporting QoS (Quality of Service) level assurance, topic subscription and distribution, and real-time perception of device online / offline status.The basic middleware layer provides underlying support for the system, including data storage, message queues, and distributed scheduling. Redis (Remote Dictionary Server) can be used to cache user sessions, device status, and hot data, improving system response speed. MySQL (relational database) can store structured core business data such as orders, users, devices, and billing rules, ensuring data consistency and traceability. Kafka (for high-performance message queues) acts as a message middleware, enabling asynchronous processing and peak shaving for device-reported data and business events. Elasticsearch (distributed search and analytics engine) is used for full-text search and log analysis of order logs, device messages, and operation logs, supporting troubleshooting and auditing. XXL-Job (distributed task scheduling platform) provides distributed scheduled capabilities, supporting unified management and monitoring of scheduled tasks. MongoDB (document-based database) can store massive amounts of time-series data such as unstructured device-reported data and user behavior logs, adapting to high-concurrency write scenarios. Nacos (Naming and Configuration...) Service (service discovery, configuration management, and service management platform) serves as a service registration and configuration center, enabling microservice registration, discovery, configuration management, and dynamic routing, thus ensuring system scalability and maintainability.
[0054] Since current billing rules cannot be configured remotely and the system has poor scalability, this embodiment of the invention can enable remote visual configuration, dynamic loading and activation of billing templates by configuring different pre-designed billing models in the system, thereby meeting the flexible operation needs of different regions and sites.
[0055] In summary, by constructing a pluggable billing engine with a layered microservice architecture, the target billing model among multiple pre-designed billing models is dynamically matched according to pre-defined rules to calculate the initial charging cost. Then, a multi-level correction strategy, including abnormal data filtering, threshold exemption, minimum / maximum consumption fallback, and regionally differentiated configuration, is constructed to automatically verify and correct the initial charging cost, resulting in the final target charging cost. Finally, settlement is performed based on this cost, generating a fully traceable target charging bill. This achieves flexible configuration and seamless adaptation to multiple scenarios for the charging billing model, improving billing accuracy and compliance. It also solves the technical problem of low billing accuracy caused by calculating incorrect costs using abnormal data in related technologies.
[0056] In order to accurately obtain the target billing model, in the method for generating electric vehicle charging bills provided in Embodiment 1 of this application, a charging request initiated by the target vehicle is received, and the target vehicle is charged based on the charging request to generate multiple charging data; the charging service scenario in which the target vehicle is located is determined, and the target billing model is obtained by matching multiple pre-designed billing models based on the charging service scenario.
[0057] In this embodiment of the invention, the terminal layer first receives a charging request initiated by the target vehicle user. This request may include information such as the user's identity identifier, the target charging pile number, and the socket number. After the system gateway layer authenticates the request, the aggregation service layer performs multiple verifications (e.g., socket, device, account, and area rules). If the verification passes, the payment wallet module completes the pre-deduction or balance authorization, and the order service module can generate a charging order. Subsequently, the device access layer sends a power-on command to the target charging pile, and the device executes a closed loop and begins supplying power to the target vehicle. During the charging process, the device signal processing module collects and reports multiple charging data in real time. This charging data includes, but is not limited to, real-time power, cumulative power consumption, charging duration, device status signals (e.g., start, end, fault), and timestamps. The system parses, verifies, and deduplicates this data, then stores it in the basic middleware layer (e.g., MongoDB for time-series data and MySQL for order status), forming a complete charging session record. During a charging session or before settlement is triggered, the system needs to define the current billing logic. First, based on real-time collected charging data (such as timestamps, geographical locations, user tags, power characteristics, etc.), the system determines the charging service scenario of the target vehicle. Based on the charging service scenario, the system can match multiple pre-designed billing models to obtain the target billing model. For example, if the scenario is determined to be low-power slow charging, then a power-based billing model is matched (e.g., calculating the average power and multiplying it by the price to calculate the cost).
[0058] In order to accurately obtain the initial charging cost, in the method for generating electric vehicle charging bills provided in Embodiment 1 of this application, multiple charging billing parameters in the target billing model are determined, and parameter data corresponding to each charging billing parameter is obtained from multiple charging data. Based on all parameter data, the target billing model is used to charge the target vehicle to obtain the initial charging cost.
[0059] In this embodiment of the invention, charging billing parameters are the basic elements constituting the billing formula. Different target billing models correspond to different parameter sets. If the target model is a power-based billing model, the charging billing parameters include: real-time power sampling value. If the target model is a power-based billing model, the charging billing parameters include: cumulative charging power. If the target model is a time-based billing model, the charging billing parameters include: actual charging time, etc.
[0060] The system obtains parameter data (such as charging duration, charging power, and charging amount) for each charging billing parameter from multiple charging data sources. Based on all parameter data, it uses the target billing model to charge the target vehicle, executes the corresponding mathematical operation logic, and calculates the original cost before correction, i.e., the initial charging cost.
[0061] In order to accurately construct a multi-level correction strategy, in the method for generating electric vehicle charging bills provided in Embodiment 1 of this application, a first-level correction strategy is constructed based on the charging duration parameter and a preset charging duration threshold; a second-level correction strategy is constructed based on the initial charging cost parameter and multiple preset charging cost thresholds; a third-level correction strategy is constructed based on the initial charging power parameter and a preset charging power threshold; and a fourth-level correction strategy is constructed based on the charging amount parameter and a preset charging amount threshold.
[0062] In this embodiment of the invention, the first-level correction strategy is a time-based filtering or exemption rule. Its correction logic is as follows: if the user's charging time does not reach the preset charging time threshold, it is determined to be an invalid charging or a short-term charging failure scenario, triggering a free charge or zero-charge logic. This can prevent unnecessary charges caused by user misoperation (such as immediately unplugging the wrong charging port), device self-checking, or extremely short-term trial charging.
[0063] In this embodiment of the invention, the second-level correction strategy is a bottom-line protection rule based on the amount dimension. Its correction logic includes two aspects: first, minimum consumption protection, if the initial charging cost is lower than the minimum consumption threshold, the cost is forcibly corrected to the minimum consumption amount (or set to zero according to the strategy); second, maximum consumption capping, if the initial charging cost is higher than the maximum consumption threshold, the cost is corrected to the maximum consumption amount to prevent exorbitant bills caused by meter drift or abnormally high power.
[0064] The third-level correction strategy is an anomaly filtering rule based on the power dimension. Its correction logic is as follows: if the detected initial charging power is lower than a preset charging power threshold, it is judged as invalid charging (such as poor contact, intermittent connection, or power consumption only during device self-testing), triggering a filtering or exemption mechanism. By physically eliminating invalid charging data—for example, many fault scenarios (such as a loose plug) can produce extremely low or intermittent power—such charging not only wastes grid resources but also results in inaccurate metering. Power threshold filtering ensures that only charging with actual energy transfer is billed.
[0065] The fourth-level correction strategy is an anomaly filtering rule based on the power level. Its correction logic is as follows: if the charging power is lower than the preset charging power threshold, it is judged as metering noise or extremely small charging, triggering the filtering or exemption mechanism. Even if the power is normal, if the accumulated power is extremely small (such as a small accumulation caused by sensor zero-point drift), it should not be charged. Combined with the power threshold, this forms a double insurance.
[0066] To accurately determine the target charging cost, the method for generating a battery charging bill provided in Embodiment 1 of this application obtains the charging duration, initial charging power, and cumulative charging amount of the target vehicle; based on a first-level correction strategy, the charging duration is compared with a preset charging duration threshold to obtain a first comparison result; if the first comparison result indicates that the charging duration is greater than the preset charging duration threshold, based on a second-level correction strategy, the initial charging cost is compared with each preset charging cost threshold to obtain multiple comparison results; based on the multiple comparison results, the target charging cost is determined.
[0067] In this embodiment of the invention, when the charging session ends and the final settlement process is triggered, the complete record of the charging session can be read from the basic middleware layer (such as MongoDB or MySQL) to obtain the charging duration, initial charging power and cumulative charging amount of the target vehicle. First, the first-level correction strategy is called. If a user inserts the charging gun and finds that the socket is damaged, and then unplugs it after 2 minutes to end the charging, the charging duration is 2 minutes. The charging duration is compared with the preset charging duration threshold (e.g., 5 minutes) to obtain the first comparison result (i.e., it is determined that the charging does not meet the minimum billing duration). Therefore, the output result of this strategy is to set the fee to zero or skip the billing, without entering the subsequent fee calculation stage.
[0068] If the first comparison result indicates that the charging time is greater than the preset charging time threshold, such as charging for 6 minutes, the charging time is greater than 2 minutes. Based on the second-level correction strategy, the initial charging cost can be compared with each preset charging cost threshold (such as the minimum consumption threshold and the maximum consumption threshold) to obtain multiple comparison results, including the second comparison result and the third comparison result. Then, the target charging cost can be determined based on the second comparison result and the third comparison result.
[0069] The multiple preset charging cost thresholds include at least a first preset charging cost threshold and a second preset charging cost threshold, and the multiple comparison results include at least a second comparison result and a third comparison result. In order to accurately obtain the third comparison result, in the method for generating a battery charging bill provided in Embodiment 1 of this application, the initial charging cost is compared with the first preset charging cost threshold to obtain the second comparison result; if the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold, the initial charging cost is compared with the second preset charging cost threshold to obtain the third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
[0070] In this embodiment of the invention, the multiple preset charging fee thresholds include at least a first preset charging fee threshold and a second preset charging fee threshold, corresponding to the upper and lower limits of the billing. The first preset charging fee threshold is a minimum charging threshold (or minimum consumption amount), and the second preset charging fee threshold is a maximum charging threshold (or capped amount). The initial charging fee can be compared with the first preset charging fee threshold to obtain a second comparison result. If the fee is lower than the minimum charging threshold (i.e., the second comparison result indicates that the initial charging fee is less than the first preset charging fee threshold), there is insufficient metering, triggering an exemption or charging according to the minimum charging threshold. If the second comparison result indicates that the initial charging fee is greater than the first preset charging fee threshold, the initial charging fee can be compared with the second preset charging fee threshold to obtain a third comparison result.
[0071] To improve the accuracy of the target charging cost, in the electric vehicle charging bill generation method provided in Embodiment 1 of this application, if the third comparison result indicates that the initial charging cost is less than or equal to the second preset charging cost threshold, the initial charging power is compared with the preset charging power threshold based on the third-level correction strategy to obtain the third comparison result; if the third comparison result indicates that the initial charging power is greater than the preset charging power threshold, the cumulative charging amount is compared with the preset charging amount threshold based on the fourth-level correction strategy to obtain the fourth comparison result; if the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold, the initial charging cost is corrected based on the preset correction strategy to obtain the target charging cost.
[0072] In this embodiment of the invention, if the third comparison result indicates that the initial charging cost is greater than the second preset charging cost threshold, the cost is settled based on the value (the second preset charging cost threshold). If the third comparison result indicates that the initial charging cost is less than or equal to the second preset charging cost threshold, the initial charging power is compared with the preset charging power threshold based on the third-level correction strategy to obtain the third comparison result.
[0073] If the third comparison result indicates that the initial charging power is less than or equal to the preset charging power threshold, the charging fee will be recalculated according to the local regulatory rules based on the area code where the charging pile is located. If the third comparison result indicates that the initial charging power is greater than the preset charging power threshold, the cumulative charging amount will be compared with the preset charging amount threshold based on the fourth-level correction strategy to obtain the fourth comparison result. If the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold, the initial charging fee will be corrected based on the preset correction strategy (such as applying the power reserve strategy, including setting the fee to zero) to obtain the target charging fee.
[0074] Figure 5 This is a flowchart of a charging fee correction method according to an embodiment of this application, such as... Figure 5 As shown, the process first checks if the total charging cost is less than the template minimum consumption (i.e., the minimum free charging duration). If so, a billing reset procedure is triggered (i.e., the free duration strategy is applied). Next, it checks if the total charging cost is less than or equal to the template minimum consumption. If so, the minimum consumption strategy is applied, forcibly adjusting the settlement amount to the rate corresponding to the preset minimum free charging duration (e.g., 5 cents for 5 minutes). If not, the settlement result is maintained, and the process proceeds to the next level of verification. This involves checking if the total charging cost is greater than the template maximum consumption. If so, the maximum consumption strategy is triggered, clamping the cost limit to a preset threshold (e.g., a maximum charge of 5 yuan). If not, the settlement result is maintained, and the process proceeds to the third level of verification. This level can execute the following two fallback checks in parallel or sequentially: whether the power is below the threshold. If so, the power fallback strategy is invoked, i.e., recalculating according to local rules. If not, whether the battery level is below the threshold. If so, the battery fallback strategy is invoked, i.e., recalculating the cost according to the minimum metering unit. If not, the calculation result (i.e., the initial charging cost) is maintained. After all the above strategies are executed, the final settlement result, after multiple fallback adjustments, is output.
[0075] Figure 6 This is a flowchart illustrating the operation of a two-wheeled vehicle charging billing system according to an embodiment of this application, such as... Figure 6As shown, the user initiates a charging request through the terminal layer (i.e., user scans a code / swipes a card to charge), which is routed through the gateway layer to the aggregation service layer. The system performs five-fold verification of the user, socket, device, account, and area rules (i.e., determining whether the current socket and user can charge). If the verification fails, the terminal will display the reason why charging is not possible. After the verification passes, data preparation before charging begins, i.e., the user completes payment or balance authorization, and then the order service module can generate a charging order and a charging in progress record order, and the payment wallet module completes the pre-deduction. The device access layer sends a charging start command to the device. If the device responds successfully, it executes a closed loop and starts supplying power, asynchronously pushes a charging start service notification, and synchronously updates the device status to charging. The device periodically reports power, energy data, charging status, etc. The device signal processing module can complete data parsing, verification, and storage, and the billing engine module updates the intermediate billing status in real time. When any of the following conditions is met (i.e., charging ends), such as full charge, user stop, fault shutdown, remote forced termination, or timeout, the settlement process is triggered. The billing engine module loads the corresponding billing template, filters abnormal data, and calculates the final cost. The order service module updates the order status, device status, and user balance; the payment wallet module completes the deduction or refund; the message push module pushes the settlement notification; the data push module synchronizes data to the regulatory system and financial system; the device status is updated to idle; and the charging process ends.
[0076] The method for generating electric vehicle charging bills provided in this application embodiment can receive charging requests and generate charging data by constructing a layered microservice architecture and a pluggable billing engine. It can also dynamically match the target billing model to determine the charging business scenario in real time, thereby obtaining the initial charging cost. By serially executing a four-level correction strategy, it first performs an initial screening based on charging duration and a preset threshold to eliminate short-term invalid charging. Then, the costs that pass the initial screening are compared sequentially with the lowest and highest preset cost thresholds to initially lock in the cost range. Afterward, if the cost is within the limit, it checks whether the initial charging power is lower than the power threshold. If the power is higher than the preset power threshold, it checks whether the cumulative charging amount is lower than the energy threshold. If the energy is abnormal, a preset correction strategy is triggered to correct the initial cost. This achieves multi-dimensional abnormal data filtering and cost protection for two-wheeled vehicle charging. Through joint verification of duration, power, and energy, it effectively identifies and filters invalid charging such as poor contact and metering drift, ultimately obtaining an accurate and compliant target charging cost.
[0077] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0078] Example 2
[0079] This application also provides an apparatus for generating electric vehicle charging bills. It should be noted that this apparatus can be used to execute the method for generating electric vehicle charging bills provided in this application. The following describes the apparatus for generating electric vehicle charging bills provided in this application.
[0080] According to an embodiment of this application, an apparatus for implementing the above-described method for generating electric vehicle charging bills is also provided. Figure 7 This is a schematic diagram of a device for generating a charging bill for an electric bicycle according to an embodiment of this application, as shown below. Figure 7 As shown, the device for generating the electric vehicle charging bill may include: an acquisition unit 70, a correction unit 71, and a generation unit 72.
[0081] The acquisition unit 70 is used to acquire the initial charging cost of the target vehicle. The initial charging cost is calculated by the target billing model, which is obtained by matching multiple pre-designed charging cost models.
[0082] The correction unit 71 is used to construct a multi-level correction strategy and, based on the multi-level correction strategy, correct the initial charging cost to obtain the target charging cost.
[0083] The generation unit 72 is used to settle the charging cost of the target vehicle based on the target charging cost and generate the target charging bill.
[0084] The electric vehicle charging bill generation device provided in this application embodiment can obtain the initial charging cost of the target vehicle through the acquisition unit 70, construct a multi-level correction strategy through the correction unit 71, and correct the initial charging cost based on the multi-level correction strategy to obtain the target charging cost. The generation unit 72 can settle the charging cost of the target vehicle based on the target charging cost and generate the target charging bill.
[0085] Optionally, the device for generating electric vehicle charging bills further includes: a first receiving module, used to receive a charging request initiated by the target vehicle before obtaining the initial charging fee of the target vehicle, and to charge the target vehicle based on the charging request, generating multiple charging data; and a first matching module, used to determine the charging business scenario in which the target vehicle is located, and to match it among multiple pre-designed billing models based on the charging business scenario to obtain a target billing model.
[0086] Optionally, the device for generating electric vehicle charging bills further includes: a first determining module, used to match multiple pre-designed billing models based on the charging business scenario to obtain a target billing model, determine multiple charging billing parameters in the target billing model, and obtain parameter data corresponding to each charging billing parameter from multiple charging data; and a first billing module, used to charge the target vehicle using the target billing model based on all parameter data to obtain the initial charging fee.
[0087] Optionally, the correction unit 71 includes: a first construction module for constructing a first-level correction strategy based on charging duration parameters and preset charging duration thresholds; a second construction module for constructing a second-level correction strategy based on initial charging cost parameters and multiple preset charging cost thresholds; a third construction module for constructing a third-level correction strategy based on initial charging power parameters and preset charging power thresholds; and a fourth construction module for constructing a fourth-level correction strategy based on charging capacity parameters and preset charging capacity thresholds.
[0088] Optionally, the correction unit 71 further includes: a first acquisition module, used to acquire the charging time, initial charging power, and cumulative charging amount of the target vehicle; a first comparison module, used to compare the charging time with a preset charging time threshold based on a first-level correction strategy to obtain a first comparison result; a second comparison module, used to compare the initial charging cost with each preset charging cost threshold based on a second-level correction strategy when the first comparison result indicates that the charging time is greater than the preset charging time threshold, to obtain multiple comparison results; and a second determination module, used to determine the target charging cost based on the multiple comparison results.
[0089] Optionally, the multiple preset charging cost thresholds include at least a first preset charging cost threshold and a second preset charging cost threshold, and the multiple comparison results include at least a second comparison result and a third comparison result. The second comparison module includes: a first comparison submodule, used to compare the initial charging cost with the first preset charging cost threshold to obtain a second comparison result; and a second comparison submodule, used to compare the initial charging cost with the second preset charging cost threshold when the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold to obtain a third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
[0090] Optionally, the second determining module includes: a third comparison submodule, used to compare the initial charging power with a preset charging power threshold based on a third-level correction strategy to obtain a third comparison result when the third comparison result indicates that the initial charging cost is less than or equal to a second preset charging cost threshold; a fourth comparison submodule, used to compare the cumulative charging amount with a preset charging amount threshold based on a fourth-level correction strategy to obtain a fourth comparison result when the third comparison result indicates that the initial charging power is greater than the preset charging power threshold; and a first correction submodule, used to correct the initial charging cost based on a preset correction strategy to obtain a target charging cost when the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold.
[0091] The above-mentioned device for generating electric vehicle charging bills may also include a processor and a memory. The acquisition unit 70, correction unit 71, generation unit 72, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions.
[0092] The aforementioned processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and by adjusting kernel parameters, the charging cost for the target vehicle can be calculated based on the target charging fee, and a target charging bill can be generated.
[0093] The aforementioned memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0094] It should be noted that the acquisition unit 70, correction unit 71, and generation unit 72 mentioned above correspond to steps S201 to S203 in Embodiment 1. The instances and application scenarios implemented by the above units and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0095] Example 3
[0096] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced with a mobile terminal or an electronic device, etc.
[0097] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.
[0098] In this embodiment, the computer terminal described above can execute the program code for the following steps in the method for generating a charging bill for an electric vehicle: obtaining the initial charging cost of the target vehicle, wherein the initial charging cost is calculated through a target billing model, and the target billing model is obtained by matching multiple pre-designed billing models; constructing a multi-level correction strategy, and correcting the initial charging cost based on the multi-level correction strategy to obtain the target charging cost; settling the charging cost of the target vehicle based on the target charging cost, and generating a target charging bill.
[0099] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the method for generating electric vehicle charging bills: receiving a charging request initiated by the target vehicle, and charging the target vehicle based on the charging request to generate multiple charging data; determining the charging business scenario in which the target vehicle is located, and matching it among multiple pre-designed billing models based on the charging business scenario to obtain the target billing model.
[0100] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the method for generating electric vehicle charging bills: determining multiple charging billing parameters in the target billing model, obtaining parameter data corresponding to each charging billing parameter from multiple charging data, and, based on all parameter data, using the target billing model to charge the target vehicle to obtain the initial charging cost.
[0101] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the method for generating electric vehicle charging bills: constructing a first-level correction strategy based on charging duration parameters and preset charging duration thresholds; constructing a second-level correction strategy based on initial charging cost parameters and multiple preset charging cost thresholds; constructing a third-level correction strategy based on initial charging power parameters and preset charging power thresholds; and constructing a fourth-level correction strategy based on charging capacity parameters and preset charging capacity thresholds.
[0102] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the method for generating a battery charging bill: obtaining the charging duration, initial charging power, and cumulative charging amount of the target vehicle; comparing the charging duration with a preset charging duration threshold based on a first-level correction strategy to obtain a first comparison result; if the first comparison result indicates that the charging duration is greater than the preset charging duration threshold, comparing the initial charging fee with each preset charging fee threshold based on a second-level correction strategy to obtain multiple comparison results; and determining the target charging fee based on the multiple comparison results.
[0103] Optionally, the computer terminal described above can execute the program code for the following steps in the method for generating a charging bill for an electric vehicle: comparing the initial charging cost with a first preset charging cost threshold to obtain a second comparison result; if the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold, comparing the initial charging cost with a second preset charging cost threshold to obtain a third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
[0104] Optionally, the aforementioned computer terminal can execute the program code for the following steps in the method for generating a battery charging bill: if the third comparison result indicates that the initial charging cost is less than or equal to the second preset charging cost threshold, the initial charging power is compared with the preset charging power threshold based on the third-level correction strategy to obtain the third comparison result; if the third comparison result indicates that the initial charging power is greater than the preset charging power threshold, the cumulative charging amount is compared with the preset charging amount threshold based on the fourth-level correction strategy to obtain the fourth comparison result; if the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold, the initial charging cost is corrected based on the preset correction strategy to obtain the target charging cost.
[0105] Optionally, Figure 8 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 8 As shown, the electronic device may include: one or more ( Figure 8 (Only one is shown) processor 802, memory 804, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0106] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and apparatus for generating electric vehicle charging bills in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned method for generating electric vehicle charging bills. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal 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.
[0107] The processor can access the information and application program stored in the memory via the transmission device to execute the steps described above in the method for generating the electric vehicle charging bill.
[0108] The embodiments of this application provide a scheme for generating charging bills. By constructing a multi-level correction strategy system that includes dual threshold filtering mechanisms for power and energy, abnormal data (such as sensor drift, communication interruption, and low-power invalid charging) during the charging process is identified and eliminated. At the same time, the initial cost is corrected by combining a minimum / maximum consumption fallback strategy. This enables dynamic matching of billing templates, automatic filtering of abnormal data, and accurate calculation of the final billing result in a single charging session. It achieves configurable billing logic, automated abnormal handling, and transparency and fairness in the settlement process, thereby solving the technical problem in related technologies where incorrect costs are calculated using abnormal data, resulting in low accuracy of the generated bills.
[0109] Those skilled in the art will understand that Figure 8 The structure shown is for illustrative purposes only. Electronic devices can also be terminal devices such as smartphones, tablets, PDAs, and mobile internet devices (MIDs). Figure 8 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 8 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 8 The different configurations shown.
[0110] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0111] Example 4
[0112] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the method for generating electric vehicle charging bills provided in Embodiment 1.
[0113] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0114] This application also provides a computer program product, which, when executed on a data processing device, is adapted to perform the steps of a method for generating a charging bill for an electric vehicle.
[0115] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0116] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0117] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0118] The units described as separate components may or may not be physically separate. 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 can be selected to achieve the purpose of this embodiment according to actual needs.
[0119] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0120] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0121] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for generating a charging bill for an electric bicycle, characterized in that, include: The initial charging cost of the target vehicle is obtained, wherein the initial charging cost is calculated through a target billing model, which is obtained by matching multiple pre-designed charging models; A multi-level correction strategy is constructed, and the initial charging cost is corrected based on the multi-level correction strategy to obtain the target charging cost; Based on the target charging cost, the charging cost of the target vehicle is settled, and a target charging bill is generated.
2. The method for generating a charging bill for an electric bicycle according to claim 1, characterized in that, Before obtaining the initial charging cost for the target vehicle, including: Receive the charging request initiated by the target vehicle, and charge the target vehicle based on the charging request, generating multiple charging data; The charging service scenario in which the target vehicle is located is determined, and based on the charging service scenario, the target billing model is obtained by matching among the multiple pre-designed fee models.
3. The method for generating a charging bill for an electric bicycle according to claim 2, characterized in that, After matching the target billing model among the multiple pre-designed billing models based on the charging service scenario, the process includes: Multiple charging billing parameters are determined in the target billing model, and parameter data corresponding to each charging billing parameter is obtained from the multiple charging data. Based on all the parameter data, the target charging model is used to charge the target vehicle to obtain the initial charging cost.
4. The method for generating a charging bill for an electric bicycle according to claim 1, characterized in that, The steps for constructing a multi-level correction strategy include: Based on the charging time parameter and the preset charging time threshold, a first-level correction strategy is constructed. Based on the initial charging cost parameters and multiple preset charging cost thresholds, a second-level correction strategy is constructed. Based on the initial charging power parameters and the preset charging power threshold, a third-level correction strategy is constructed. A fourth-level correction strategy is constructed based on the charging power parameters and the preset charging power threshold.
5. The method for generating a charging bill for an electric bicycle according to claim 1, characterized in that, The step of correcting the initial charging cost based on the multi-level correction strategy to obtain the target charging cost includes: Obtain the charging time, initial charging power, and cumulative charging amount of the target vehicle; Based on the first-level correction strategy, the charging time is compared with a preset charging time threshold to obtain a first comparison result; If the first comparison result indicates that the charging time is greater than the preset charging time threshold, the initial charging cost is compared with each preset charging cost threshold based on the second-level correction strategy to obtain multiple comparison results; Based on the multiple comparison results, the target charging cost is determined.
6. The method for generating a charging bill for an electric bicycle according to claim 5, characterized in that, The multiple preset charging cost thresholds include at least a first preset charging cost threshold and a second preset charging cost threshold, and the multiple comparison results include at least a second comparison result and a third comparison result. The step of comparing the initial charging cost with each preset charging cost threshold to obtain multiple comparison results includes: The initial charging cost is compared with the first preset charging cost threshold to obtain the second comparison result; If the second comparison result indicates that the initial charging cost is greater than the first preset charging cost threshold, the initial charging cost is compared with the second preset charging cost threshold to obtain the third comparison result, wherein the first preset charging cost threshold is less than the second preset charging cost threshold.
7. The method for generating a charging bill for an electric bicycle according to claim 5, characterized in that, The step of determining the target charging cost based on the multiple comparison results includes: If the third comparison result indicates that the initial charging cost is less than or equal to the second preset charging cost threshold, the initial charging power is compared with the preset charging power threshold based on the third-level correction strategy to obtain the third comparison result; If the third comparison result indicates that the initial charging power is greater than the preset charging power threshold, the cumulative charging amount is compared with the preset charging power threshold based on the fourth-level correction strategy to obtain the fourth comparison result; If the fourth comparison result indicates that the cumulative charging amount is less than or equal to the preset charging amount threshold, the initial charging cost is corrected based on a preset correction strategy to obtain the target charging cost.
8. A device for generating charging bills for electric bicycles, characterized in that, include: An acquisition unit is used to acquire the initial charging cost of the target vehicle, wherein the initial charging cost is calculated through a target billing model, which is obtained by matching multiple pre-designed charging cost models; The correction unit is used to construct a multi-level correction strategy and, based on the multi-level correction strategy, correct the initial charging cost to obtain the target charging cost. The generation unit is used to settle the charging cost of the target vehicle based on the target charging cost and generate a target charging bill.
9. A computer program product, characterized in that, The method includes a non-volatile computer-readable storage medium storing a computer program that, when executed by a processor, implements the method for generating a charging bill for an electric vehicle as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method for generating electric vehicle charging bills as described in any one of claims 1 to 7.