Charging billing method and electronic device

By acquiring the relay connection status and using a combination of conventional and fault-based billing strategies, the problems of bloated functions and billing errors in charging pile billing schemes are solved, achieving a more accurate and flexible billing method.

CN117935429BActive Publication Date: 2026-05-29ZHEJIANG DAHUA TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2023-12-26
Publication Date
2026-05-29

Smart Images

  • Figure CN117935429B_ABST
    Figure CN117935429B_ABST
Patent Text Reader

Abstract

The application discloses a charging and billing method and an electronic device. The charging and billing method comprises the following steps: acquiring a relay connection state; if the relay connection is normal, a server adopts a normal charging strategy to charge a current charging service, and a charging execution end adopts a normal charging strategy to execute the current charging service; if the relay connection is abnormal, the server adopts a fault charging strategy to charge the current charging service; and the charging execution end replaces the relay connection when the relay connection is abnormal, and adopts the fault charging strategy to execute the current charging service during the replacement of the relay connection; and the server counts charging and billing records of the current charging service to obtain a billing result. According to the actual communication condition between the server and the charging execution end, corresponding charging strategies and charging strategies can be flexibly selected, and the accuracy of charging and billing is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy charging technology, and in particular to a charging billing method and electronic equipment. Background Technology

[0002] With the booming development of the new energy industry, electric vehicles are becoming increasingly common in daily life, and more and more areas are actively deploying charging stations. Charging stations are facilities that provide charging services for electric vehicles, generally by installing charging piles to meet the charging needs of electric vehicles.

[0003] Currently, charging stations mainly employ two billing schemes: local billing and cloud billing. Local billing primarily uses the charging station's local billing board to calculate charges based on factors such as power and power supply time. After calculation, it reports the billing information to the billing server for deduction. However, local billing requires the charging station to have the payment processing media and computer program built into it, making the charging station bloated and consuming its available resources. Cloud billing, on the other hand, uses information periodically reported by the charging station to the billing server. While this simplifies charging station development, cloud billing is susceptible to errors due to network failures or congestion, which may prevent the billing server from correctly receiving the reported information, leading to billing errors. Summary of the Invention

[0004] This application provides at least one charging billing method and electronic device.

[0005] The first aspect of this application provides a charging billing method applied to a server. The server communicates with a charging execution end via a relay. The method includes: obtaining the relay connection status, which reflects the connection status between the charging execution end and the server and the relay respectively; if the relay connection is normal, receiving the charging status of the current charging service periodically sent by the charging execution end through the relay, and billing the current charging service according to the charging status using a conventional billing strategy; wherein the charging status is generated by the charging execution end executing the current charging service using a conventional charging strategy when the relay connection is normal; if the relay connection is abnormal, billing the current charging service using a fault billing strategy; wherein the charging execution end performs relay connection replacement when the relay connection is abnormal, and executes the current charging service using a fault charging strategy during the relay connection replacement period; and statistically analyzing the charging billing records of the current charging service to obtain the billing result.

[0006] In one embodiment, before receiving the charging status of the current charging service periodically transmitted by the charging execution terminal via a relay, and before using a conventional billing strategy to charge the current charging service based on the charging status, the method further includes: receiving a preset charging duration for the current charging service transmitted by the charging execution terminal; calculating a prepaid fee using the preset charging duration; and sending a payment interface to the charging execution terminal based on the prepaid fee, so that the charging execution terminal can use the payment interface to perform a payment operation, and in response to successful payment, executing the current charging service.

[0007] In one embodiment, charging billing for the current charging service is performed using a conventional billing strategy based on the charging status, including: recording the charging duration corresponding to the current charging service based on the charging status; and using the charging duration to perform charging billing for the current charging service.

[0008] In one embodiment, a fault-based billing strategy is used to charge the current charging service, including: stopping the recording of the charging duration corresponding to the current charging service.

[0009] In one embodiment, the method further includes: counting the duration of relay connection anomalies; if the duration exceeds a preset duration threshold, terminating the charging billing for the current charging service and counting the cumulative charging time of the current charging service; calculating the actual cost using the cumulative charging time; counting the charging billing records of the current charging service to obtain the billing result, including: performing a refund operation on the current charging service based on the prepaid cost and the actual cost.

[0010] The second aspect of this application provides a charging billing method applied to a charging execution end. The charging execution end communicates with a server via a relay. The method includes: obtaining the relay connection status, which reflects the connection status between the charging execution end and the server and the relay respectively; if the relay connection is normal, the current charging service is executed using a conventional charging strategy, and the charging status of the current charging service is periodically sent to the server through the connected relay, so that the server can use a conventional billing strategy to bill the current charging service based on the charging status; if the relay connection is abnormal, the relay connection is replaced, and a fault charging strategy is used to execute the current charging service during the relay connection replacement period; wherein, in response to the relay connection abnormality, the server uses a fault billing strategy to bill the current charging service, and counts the charging billing records of the current charging service to obtain the billing result.

[0011] In one embodiment, the current charging service is executed using a fault charging strategy, which includes: interrupting the execution of the current charging service.

[0012] In one embodiment, the method further includes: if the relay connection replacement is successful, then the current charging service is resumed; if the relay connection replacement fails, then the current charging service is terminated.

[0013] In one embodiment, performing a relay connection change includes: obtaining a backup relay; sending a connection request to the backup relay so that the backup relay establishes a connection with the charging execution terminal based on the connection request; and changing the relay connection status to normal in response to a successful connection establishment.

[0014] A third aspect of this application provides a billing device for charging anomalies, deployed on a server. The device includes: a first status acquisition module for acquiring the relay connection status, which reflects the connection status between the charging execution end and the server and the relay, respectively; a billing judgment module for receiving the charging status of the current charging service periodically sent by the charging execution end through the relay if the relay connection is normal, and billing the current charging service according to the conventional billing strategy based on the charging status; wherein the charging status is generated by the charging execution end executing the current charging service using the conventional charging strategy when the relay connection is normal; if the relay connection is abnormal, billing the current charging service using a fault billing strategy; wherein the charging execution end performs relay connection replacement when the relay connection is abnormal, and executes the current charging service using a fault charging strategy during the relay connection replacement period; and a statistics module for statistically analyzing the charging billing records of the current charging service to obtain the billing result.

[0015] The fourth aspect of this application provides a billing device for charging anomalies, deployed at the charging execution end. The device includes: a second status acquisition module for acquiring the relay connection status, which reflects the connection status between the charging execution end and the server and the relay respectively; a charging module for executing the current charging service using a conventional charging strategy if the relay connection is normal, and periodically sending the charging status of the current charging service to the server through the connected relay, so that the server can bill the current charging service using a conventional billing strategy based on the charging status; if the relay connection is abnormal, performing a relay connection replacement, and executing the current charging service using a fault charging strategy during the relay connection replacement period; wherein, in response to the relay connection abnormality, the server uses a fault billing strategy to bill the current charging service, and counts the charging billing records of the current charging service to obtain the billing result.

[0016] The fifth aspect of this application provides an electronic device, including a memory and a processor, wherein the processor is configured to execute program instructions stored in the memory to implement the above-described charging billing method.

[0017] The sixth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the above-described charging billing method.

[0018] The above scheme obtains the relay connection status. If the relay connection is normal, the server receives the charging status of the current charging service periodically sent by the charging execution end through the relay, and uses a conventional billing strategy to bill the current charging service based on the charging status. The charging status is generated by the charging execution end executing the current charging service using a conventional charging strategy when the relay connection is normal. If the relay connection is abnormal, the server uses a fault billing strategy to bill the current charging service. Specifically, when the relay connection is abnormal, the charging execution end replaces the relay connection and uses a fault charging strategy to execute the current charging service during the replacement period. The server compiles the charging billing records of the current charging service to obtain the billing result. Based on the actual communication between the server and the charging execution end, the server can flexibly select the corresponding billing and charging strategies to improve the accuracy of billing.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.

[0021] Figure 1 This is a schematic diagram illustrating an implementation environment of the charging billing method according to an exemplary embodiment of this application;

[0022] Figure 2 This is a schematic diagram of the relay structure shown in an exemplary embodiment of this application;

[0023] Figure 3 This is a flowchart illustrating a charging billing method in an exemplary embodiment of this application;

[0024] Figure 4 This is a schematic diagram illustrating an abnormal relay connection between the charging execution terminal and the server, as shown in an exemplary embodiment of this application.

[0025] Figure 5 This is an exemplary embodiment of the present application illustrating a multi-terminal interaction diagram for performing the current charging service;

[0026] Figure 6 This is a flowchart illustrating a charging billing method in an exemplary embodiment of this application;

[0027] Figure 7 This is another exemplary embodiment of the present application illustrating a multi-terminal interaction diagram for performing the current charging service;

[0028] Figure 8This is another exemplary embodiment of the present application illustrating a multi-terminal interaction diagram for performing the current charging service;

[0029] Figure 9 This is a schematic diagram illustrating an abnormality in the charging module at the charging execution end, as shown in an exemplary embodiment of this application.

[0030] Figure 10 This is another exemplary embodiment of the present application illustrating a multi-terminal interaction diagram for performing the current charging service;

[0031] Figure 11 This is a schematic diagram illustrating an abnormality in the communication module of the charging execution terminal, as shown in an exemplary embodiment of this application.

[0032] Figure 12 This is another exemplary embodiment of the present application illustrating a multi-terminal interaction diagram for performing the current charging service;

[0033] Figure 13 This is a block diagram illustrating a billing device under charging abnormality, as shown in an exemplary embodiment of this application;

[0034] Figure 14 This is a block diagram illustrating a billing device under charging abnormality, as shown in another exemplary embodiment of this application;

[0035] Figure 15 This is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of this application;

[0036] Figure 16 This is a schematic diagram illustrating the structure of a computer-readable storage medium, as shown in an exemplary embodiment of this application. Detailed Implementation

[0037] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0038] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.

[0039] In this document, the term "and / or" is merely a description of the association information of related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0040] The charging billing method provided in the embodiments of this application will be described below.

[0041] Please refer to Figure 1 The diagram illustrates an implementation environment provided in one embodiment of this application. This implementation environment may include a charging execution terminal 110, a relay 120, and a server 130, with the charging execution terminal 110 communicating with the server 130 via the relay 120.

[0042] The number of charging actuators 110 can be one or more. The charging actuators 110 are used to charge new energy devices, such as electric vehicles and electric motorcycles.

[0043] Relay 120 is used to establish a communication connection between charging execution terminal 110 and server 130. For example, as shown... Figure 2 As shown, the relay 120 includes a first communication module and a second communication module. The first communication module establishes a long-distance communication connection with the server 130, and the second communication module establishes a short-distance communication connection with the charging execution terminal 110. Of course, the relay 120 may also include other components, which are not limited in this application.

[0044] The charging execution terminal 110 can select the relay to be connected based on the physical location of the relay 120. For example, the charging execution terminal filters out candidate relays that can be connected based on the physical location of each relay, and then selects the candidate relay with the fewest connected charging execution terminals as the target connection relay based on the number of currently connected charging execution terminals of each candidate relay.

[0045] Server 130 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0046] For example, a charging operation platform is deployed in server 130, which is used for unified management of charging execution terminals, charging billing and charging, etc.

[0047] Please see Figure 3 , Figure 3 This is a flowchart illustrating a charging billing method in an exemplary embodiment of this application. This charging billing method can be applied to... Figure 1 The implementation environment is shown, and is specifically executed by the server in that implementation environment.

[0048] like Figure 3 As shown, the charging billing method includes at least steps S310 to S340, which are described in detail below:

[0049] Step S310: Obtain the relay connection status. The relay connection status is used to reflect the connection status between the charging execution end and the server and the relay, respectively.

[0050] The relay connection status reflects the connection status between the charging execution terminal and the server and the relay, respectively.

[0051] For example, relay connection status includes normal relay connection and abnormal relay connection. A normal relay connection indicates that the charging actuator and the server can establish a communication link through the relay, and that this communication link can transmit data normally; please refer to [link to relevant documentation]. Figure 4 A relay connection failure indicates that the charging actuator and the server cannot establish a communication link through the relay (e.g., the relay is faulty), or the established communication link cannot transmit data normally (e.g., the charging actuator and the relay connection is faulty, or the server and the relay connection is faulty).

[0052] Step S320: If the relay connection is normal, the charging execution end receives the charging status of the current charging service periodically sent by the relay, and charges the current charging service according to the charging status using the conventional billing strategy; wherein, the charging status is generated by the charging execution end executing the current charging service using the conventional charging strategy when the relay connection is normal.

[0053] The charging status is used to reflect the current execution status of the charging service, such as the power information of the device being charged, the power output, order information, heartbeat information, etc. This application does not limit the specific data content contained in the charging status.

[0054] The determination of whether a relay connection is normal can be achieved in several ways. For example, the relay may periodically send heartbeat packets to the server; if the server receives these heartbeat packets on schedule, the relay connection is considered normal. Alternatively, the charging terminal may periodically send heartbeat packets to the server (e.g., during charging); if the server receives these heartbeat packets on schedule, the relay connection is considered normal. This application does not limit the method by which the server determines the relay connection status.

[0055] When the relay connection is normal, the charging execution terminal can communicate normally with the server. Under normal relay connection conditions, the charging execution terminal uses a standard charging strategy to perform the current charging service and generates corresponding charging information. The standard charging strategy refers to the charging strategy used to charge the device when the relay connection is normal. For example, a standard charging strategy could be: charging the device according to a preset voltage.

[0056] By receiving the charging status information from the charging execution terminal, the server can ascertain the execution status of the current charging service and apply a standard billing strategy to charge for the service based on this information. The standard billing strategy refers to the strategy used when the relay connection is normal. For example, a standard billing strategy could be: calculating the amount of electricity already charged based on the charging status; or calculating the duration the device has been charging based on the charging status.

[0057] It should be noted that the billing strategy (regular billing strategy, fault billing strategy) in this application can be based on charging duration, that is, recording the charging duration corresponding to the current charging service based on the charging status, and billing based on the charging duration; or it can be based on charging amount, that is, recording the charging amount corresponding to the current charging service based on the charging status, and billing based on the charging amount. This application does not limit the specific method.

[0058] Step S330: If the relay connection is abnormal, the fault billing strategy is adopted to charge the current charging service; wherein, when the relay connection is abnormal, the charging execution end performs relay connection replacement, and the fault charging strategy is adopted to execute the current charging service during the relay connection replacement.

[0059] To determine whether a relay connection is abnormal, for example, the relay can periodically send heartbeat packets to the server. If the server does not receive the relay heartbeat packet on time, it is determined that the relay connection is abnormal. Alternatively, the charging execution end can periodically send heartbeat packets to the server (such as during charging). If the server does not receive the charging execution end heartbeat packet on time, it is determined that the relay connection is abnormal.

[0060] When the server determines that the relay connection is abnormal, the charging execution terminal cannot communicate normally with the server, and the server adopts a fault-based billing strategy to charge the current charging service. The fault-based billing strategy refers to the billing strategy used when charging the current charging service in the event of a relay connection failure.

[0061] For example, taking billing based on charging power as an example, the fault billing strategy can be: to estimate the charging power of the device being charged during the period when it is out of contact with the charging execution terminal based on the average charging power of the device being charged per unit time period counted within a preset historical time period; or, to stop counting the charging power of the device being charged.

[0062] Furthermore, when the relay connection is abnormal, the charging execution terminal performs relay connection replacement and adopts a fault charging strategy to execute the current charging service during the relay connection replacement period. For example, the fault charging strategy can be: according to the average charging amount of the device being charged within a unit time period statistically recorded within a preset historical time period, continue to charge the device being charged during the period of disconnection from the server, so that the charging amount of the device being charged within a unit time period remains at the average charging amount; or, stop charging the device being charged.

[0063] It should be noted that during periods of relay connection failure, the fault billing strategy used by the server and the fault charging strategy used by the charging execution end are mutually corresponding. For example, if the server's fault billing strategy is: to estimate the charging capacity of the devices being charged during the period of disconnection from the charging execution end based on the average charging capacity of the devices being charged per unit time within a preset historical time period; then the charging execution end's fault charging strategy is: to continue charging the devices being charged during the period of disconnection from the server, based on the average charging capacity of the devices being charged per unit time within a preset historical time period, so that the charging capacity of the devices being charged remains at the average charging capacity within that time period. As another example, if the server's fault billing strategy is: to stop calculating the charging capacity of the devices being charged; then the charging execution end's fault charging strategy is: to stop charging the devices being charged.

[0064] It should also be noted that the above-mentioned fault billing and fault charging strategies are merely illustrative examples. In actual application scenarios, other fault billing and fault charging strategies can be flexibly adopted. For example, the fault charging strategy adopted by the charging execution end can also be: continue to charge the device being charged according to the normal charging strategy; the fault billing strategy adopted by the server can also be: obtain the charging execution end that is close to the disconnected charging execution end. If the close-range charging execution end can communicate normally and is currently performing a charging service, then reuse the charging power output of the close-range charging execution end and continue to count the charging power of the current charging service corresponding to the disconnected charging execution end.

[0065] Among them, the fault billing strategy and fault charging strategy can be preset or flexibly determined according to the actual situation.

[0066] For example, the service parameters of the current charging service are obtained, and a matching fault billing policy and fault charging policy are selected from the policy library based on the service parameters.

[0067] Business parameters include, but are not limited to, the remaining charge of the device being charged, the urgency of the current charging service, and the user information associated with the current charging service.

[0068] For example, when the server and the charging execution end detect a relay connection anomaly, they determine the fault billing strategy and the fault charging strategy based on the remaining uncharged power of the device being charged.

[0069] For example, for the server, if the remaining charge level exceeds a preset threshold based on the most recently received charging status data of the current charging service, the fault billing strategy is determined to be to estimate the charge for the current charging service. Correspondingly, for the charging execution end, if the remaining charge level exceeds the preset threshold, the fault charging strategy is determined to continue charging the device. Conversely, for the server, if the remaining charge level does not exceed the preset threshold based on the most recently received charging status data of the current charging service, the fault billing strategy is to stop billing for the current charging service. Correspondingly, for the charging execution end, if the remaining charge level does not exceed the preset threshold, the fault charging strategy is determined to stop charging the device.

[0070] Step S340: Calculate the charging billing records for the current charging service and obtain the billing results.

[0071] The charging billing records for the current charging service are statistically analyzed to obtain the billing result for the current charging service.

[0072] This could involve compiling charging billing records for the current charging service after it has been completed; or it could involve compiling charging billing records for the current charging service after it has been terminated midway. For example, if the charging execution terminal remains disconnected for more than a threshold, it is determined that the current charging service has been terminated midway, and the charging billing records for the current charging service are then compiled. Another example is if the device being charged is detected to have actively terminated the current charging service, which is also determined to be a midway termination of the current charging service, and the charging billing records for the current charging service are then compiled.

[0073] It should be noted that the judgment methods of the charging execution terminal and the server correspond to those for situations where the current charging service is terminated midway. For example, the judgment method of the charging execution terminal is: if the continuous disconnection time between the charging execution terminal and the server exceeds a first threshold, then the current charging service is terminated; the judgment method of the server is: if the continuous disconnection time between the server and the charging execution terminal exceeds a first threshold, then the current charging service is determined to have been terminated midway.

[0074] The following example, which uses charging time as the basis for billing, will be used to illustrate some application scenarios of the above embodiments.

[0075] In some implementations, the current charging service involves a prepayment step, and the current charging service is only executed after the prepayment is successful. Specifically: before receiving the charging status of the current charging service periodically sent by the charging execution end via a relay, and before using a conventional billing strategy to charge the current charging service based on the charging status, the process further includes: receiving a preset charging duration for the current charging service sent by the charging execution end; calculating the prepayment fee using the preset charging duration; sending a payment interface to the charging execution end based on the prepayment fee, so that the charging execution end can use the payment interface to perform a payment operation, and in response to successful payment, executing the current charging service.

[0076] The preset charging time can be set by the user.

[0077] For example, the charging execution terminal is equipped with a display device, which displays a parameter configuration interface to the user and receives the preset charging time input by the user through the parameter configuration interface.

[0078] Then, the server receives the preset charging duration for the current charging service from the charging execution terminal, calculates the prepaid fee using the preset charging duration, and sends a payment interface to the charging execution terminal based on the prepaid fee. This payment interface is bound to the charging operator's payment account. This allows the charging execution terminal to use the payment interface to perform the payment operation and respond with a successful payment to continue the current charging service.

[0079] The payment operation can be implemented by displaying a QR code so that the user can scan the QR code to make payment; the payment operation can also be cash payment, prompting the user to put cash into a preset cash receiving slot to complete the payment; the payment operation can also be physical card payment; the payment operation can also be online payment through the mobile terminal after the user registers and logs in to the charging operation platform on the mobile terminal. This application does not limit the implementation method of the payment operation.

[0080] For examples, please refer to Figure 5 , Figure 5 This is a schematic diagram illustrating multi-terminal interaction for performing the current charging service, as shown in an exemplary embodiment of this application. Figure 5As shown, the charging execution terminal detects a user's charging request and performs status checks, such as checking if the connection between the charging execution terminal and the relay is normal, or checking if the charging execution terminal is faulty. If the status check passes, it obtains the charging parameters configured by the user for the current charging service. The charging parameters include information such as preset charging duration and charging voltage. Then, the charging execution terminal generates a charging execution request carrying the charging parameters. The server deploys a charging operation platform, which calculates the prepaid fee based on the charging parameters in the charging execution request and sends a payment QR code to the charging execution terminal based on the prepaid fee. The charging execution terminal displays the payment QR code, and after the user scans the code and successfully pays, the charging execution terminal returns a payment success message to the charging operation platform. The charging operation platform records the billing information, notifies the charging execution terminal to start charging, and starts timing. The charging execution terminal executes the current charging service to start charging the device being charged, and periodically sends charging status updates to the charging operation platform to indicate that the current charging service is in a charging maintenance state.

[0081] The aforementioned payment methods allow users to charge their devices without needing to register an account, obtain a physical card, top up, undergo facial recognition, follow a mobile app, or download a mobile application. Furthermore, settlement and payment are handled through the charging station operation platform, enhancing transaction security, avoiding the financial security risks associated with direct communication between the charging terminal and the bank's back-end system, and reducing the complexity of the charging terminal itself.

[0082] In some implementations, when the server detects a relay connection anomaly, it will also count the duration of the relay connection anomaly. If the duration exceeds a preset duration threshold, the charging billing for the current charging service will be terminated, and the cumulative charging time of the current charging service will be counted. The actual cost will be calculated using the cumulative charging time. If the actual cost is less than the prepaid amount, a refund will be issued for the current charging service based on the prepaid amount and the actual cost.

[0083] It should be noted that the charging execution terminal also counts the duration of abnormal relay connection. If the duration exceeds the preset duration threshold, it is assumed that there is no normal relay that can be connected, and the current charging service is terminated.

[0084] Please see Figure 6 , Figure 6 This is a flowchart illustrating a charging billing method in another exemplary embodiment of this application. This charging billing method can be applied to... Figure 1 The implementation environment is shown, and the charging execution terminal in the implementation environment is specifically executed.

[0085] like Figure 6 As shown, the charging billing method includes at least steps S610 to S630, which are described in detail below:

[0086] Step S610: Obtain the relay connection status. The relay connection status is used to reflect the connection status between the charging execution end and the server and the relay, respectively.

[0087] Step S620: If the relay connection is normal, the current charging service is executed using the conventional charging strategy, and the charging status of the current charging service is periodically sent to the server through the connected relay, so that the server can use the conventional billing strategy to charge the current charging service according to the charging status.

[0088] Step S630: If the relay connection is abnormal, the relay connection is replaced, and the current charging service is executed using a fault charging strategy during the relay connection replacement period; wherein, in response to the relay connection abnormality, the server uses a fault billing strategy to charge the current charging service, and counts the charging billing records of the current charging service to obtain the billing result.

[0089] For a detailed explanation of steps S610 to S630, please refer to steps S310 to S340 above, which will not be repeated here.

[0090] In some implementations, a fault-based charging strategy is employed to execute the current charging service, including: the charging execution terminal interrupts the execution of the current charging service. Correspondingly, the server's fault-based billing strategy is to stop billing for the current charging service.

[0091] Furthermore, if the relay connection replacement is successful, the current charging service will resume, meaning the relay connection status changes from abnormal to normal, and the current charging service will be executed using the regular charging strategy; if the relay connection replacement fails, the current charging service will be terminated.

[0092] For example, if the charging execution terminal fails to find a relay that can be connected normally within a preset time period, it is determined that the relay connection replacement has failed and the current charging service is terminated.

[0093] The steps for changing the relay connection include: obtaining a backup relay, sending a connection request to the backup relay so that the backup relay can establish a connection with the charging execution end based on the connection request, and changing the relay connection status to normal in response to the successful connection establishment.

[0094] Based on the above embodiments, and still taking the charging-time-based billing method as an example, we will illustrate various scenarios that may occur during the current charging service execution:

[0095] Scenario 1, such as Figure 5As shown, during the current charging service execution process, the charging execution terminal and the server are both in normal connection status with the relay. Then, after the charging operation platform counts that the charging time corresponding to the current charging service has reached the preset charging time, it notifies the charging execution terminal to terminate the charging.

[0096] Scenario 2: The current charging service has been completed, but during the process, a communication link failure caused a loss of connection between the charging execution terminal and the charging operation platform on the server. An example of this scenario is provided below: Please refer to [link / reference]. Figure 7 , Figure 7 This is a schematic diagram illustrating multi-terminal interaction for performing the current charging service, as shown in another exemplary embodiment of this application. Figure 7 As shown, the charging execution terminal communicates with the server through a first relay. During the process of the charging execution terminal charging the device and the charging operation platform deployed on the server timing the current charging service, both the charging execution terminal and the server detect an anomaly in the first relay connection. The charging execution terminal stops charging, and the charging operation platform stops timing. Then, the charging execution terminal switches the relay connection from the first relay to the second relay. After the relay connection switch is successful, the charging execution terminal reports the change information to the charging operation platform. The change information includes the identifier of the charging execution terminal and the service identifier of the current charging service. The charging operation platform verifies the pre-stored billing information of the current charging service based on the change information. After successful verification, it sends a confirmation message to the charging execution terminal. The charging execution terminal continues to charge the device corresponding to the current charging service based on the confirmation message, and the charging operation platform also continues to time the current charging service.

[0097] Scenario 3: The current charging service is terminated midway due to a prolonged loss of connection between the charging execution end and the charging operation platform on the server. For an example illustrating this scenario, please refer to [link / reference]. Figure 8 , Figure 8 This is a schematic diagram illustrating multi-terminal interaction for performing the current charging service, as shown in another exemplary embodiment of this application. Figure 8 As shown, during the charging execution terminal's process of charging the device and the server-deployed charging operation platform's timing of the current charging service, both the charging execution terminal and the server detect an anomaly in the first relay connection. The charging execution terminal stops charging, and the charging operation platform stops timing. Then, the charging execution terminal attempts to replace the relay connection, but if it fails to connect to a normally functioning relay within a preset time period, it is determined that the relay connection replacement has failed. The charging execution terminal terminates the current charging service, and the charging operation platform stops timing the current charging service. Furthermore, if prepayment exists, the charging operation platform refunds the price difference.

[0098] Scenario 4: The current charging service is terminated midway, and if... Figure 9 As shown, the termination is due to an abnormality in the charging module at the charging execution end. For example, it could be caused by a manual request to stop, a malfunction in the charging module, or, in the case of a preset charging time, the device being charged has already reached full capacity before the preset charging time has ended. This application collectively refers to the above-mentioned abnormalities as charging module abnormalities. An example of this scenario is provided: Please refer to [link to example]. Figure 10 , Figure 10 This is a schematic diagram illustrating multi-terminal interaction for performing the current charging service, as shown in another exemplary embodiment of this application. Figure 10 As shown, during the charging execution terminal's process of charging the device and the server-deployed charging operation platform's timing of the current charging service, if the charging execution terminal detects an anomaly in the charging module, it terminates the current charging service and sends a stop-charging request to the server-deployed charging operation platform. The charging operation platform responds to the stop-charging request and terminates the timing of the current charging service. Furthermore, if prepayment exists, the charging operation platform refunds the difference in price.

[0099] Scenario 5: The current charging service is terminated midway, and if... Figure 11 As shown, the termination is due to an anomaly in the communication module of the charging execution end. For example, the communication module may malfunction, preventing it from establishing contact with the relay communication module; alternatively, the communication module may be temporarily unable to establish contact with the relay communication module due to network fluctuations. This application refers to these anomalies collectively as "communication module anomalies." An example of this scenario is provided below: Please refer to... Figure 12 , Figure 12 This is a schematic diagram illustrating multi-terminal interaction for performing the current charging service, as shown in another exemplary embodiment of this application. Figure 12 As shown, during the charging execution process where the charging device is charged by the charging execution terminal and the charging operation platform deployed on the server is timing the charging process, if the charging execution terminal detects an anomaly in the aforementioned communication module, a link connection attempt is necessary to prevent short-term link interruptions due to network fluctuations. If the communication module remains abnormal within a preset time, the charging process is stopped, thus terminating the current charging service. Furthermore, if the charging operation platform does not receive the charging status of the current charging service within the preset time, the timing of the current charging service is terminated. Additionally, if prepayment exists, the charging operation platform will refund the difference.

[0100] By using the above methods, when executing the current charging service, targeted fault response mechanisms can be proposed according to the specific reasons that cause the current charging service to malfunction, so as to solve the problem of being unable to charge or having incomplete charging logic when anomalies occur during the charging process.

[0101] The charging billing method provided in this application obtains the relay connection status. If the relay connection is normal, the server receives the charging status of the current charging service periodically sent by the charging execution end through the relay, and performs charging billing for the current charging service according to the charging status using a conventional billing strategy. The charging status is generated by the charging execution end executing the current charging service using a conventional charging strategy when the relay connection is normal. If the relay connection is abnormal, the server performs charging billing for the current charging service using a fault billing strategy. Specifically, when the relay connection is abnormal, the charging execution end performs relay connection replacement and executes the current charging service using a fault charging strategy during the relay connection replacement period. The server statistically analyzes the charging billing records of the current charging service to obtain the billing result. Based on the actual communication between the server and the charging execution end, the server can flexibly select the corresponding billing and charging strategies to improve the accuracy of billing.

[0102] Figure 13 This is a block diagram illustrating a billing device under charging abnormality, deployed on a server, as shown in an exemplary embodiment of this application. Figure 13 As shown, the exemplary billing device 1300 under abnormal charging conditions includes: a first status acquisition module 1310, a billing judgment module 1320, and a statistics module 1330. Specifically:

[0103] The first state acquisition module 1310 is used to acquire the relay connection status, which reflects the connection status between the charging execution end and the server and the relay, respectively.

[0104] The billing judgment module 1320 is used to receive the charging status of the current charging service periodically sent by the charging execution end through the relay if the relay connection is normal, and to perform charging billing for the current charging service according to the conventional billing strategy based on the charging status; wherein, the charging status is generated by the charging execution end executing the current charging service using the conventional charging strategy when the relay connection is normal; if the relay connection is abnormal, a fault billing strategy is used to perform charging billing for the current charging service; wherein, when the relay connection is abnormal, the charging execution end performs relay connection replacement, and performs the current charging service using the fault charging strategy during the relay connection replacement period;

[0105] The statistics module 1330 is used to collect the charging billing records of the current charging service and obtain the billing results.

[0106] Figure 14 This is a block diagram illustrating a billing device under charging abnormality, deployed at the charging execution end, as shown in another exemplary embodiment of this application. Figure 14 As shown, the exemplary billing device 1400 under abnormal charging conditions includes: a second status acquisition module 1410 and a charging determination module 1420. Specifically:

[0107] The second state acquisition module 1410 is used to acquire the relay connection status, which reflects the connection status between the charging execution end and the server and the relay, respectively.

[0108] The charging module 1420 is used to execute the current charging service using a conventional charging strategy if the relay connection is normal, and periodically send the charging status of the current charging service to the server through the connected relay, so that the server can use a conventional billing strategy to charge the current charging service according to the charging status; if the relay connection is abnormal, the relay connection is replaced, and the current charging service is executed using a fault charging strategy during the relay connection replacement period; wherein, in response to the relay connection abnormality, the server uses a fault billing strategy to charge the current charging service, and counts the charging billing records of the current charging service to obtain the billing result.

[0109] Please see Figure 15 , Figure 15 This is a schematic diagram of the structure of an embodiment of the electronic device of this application. The electronic device 1500 includes a memory 1501 and a processor 1502. The processor 1502 is used to execute program instructions stored in the memory 1501 to implement the steps in any of the above-described charging billing method embodiments. In a specific implementation scenario, the electronic device 1500 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 1500 may also include mobile devices such as laptops and tablets, which are not limited here.

[0110] Specifically, processor 1502 controls itself and memory 1501 to implement the steps in any of the above-described charging billing method embodiments. Processor 1502 can also be referred to as a Central Processing Unit (CPU). Processor 1502 may be an integrated circuit chip with signal processing capabilities. Processor 1502 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 1502 can be implemented using integrated circuit chips.

[0111] Please see Figure 16 , Figure 16This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 1600 stores program instructions 1610 that can be executed by a processor. The program instructions 1610 are used to implement the steps in any of the above-described embodiments of the charging billing method.

[0112] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0113] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0114] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0115] 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. 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.) or processor to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A charging billing method, characterized in that, Applied to a server, the server communicates with the charging execution terminal via a relay, including: Obtain the relay connection status, which reflects the connection status between the charging execution terminal and the server and the relay, respectively; If the relay connection is normal, the charging execution terminal receives the charging status of the current charging service periodically sent by the relay, and performs charging billing for the current charging service according to the charging status using a conventional billing strategy; wherein, the charging status is generated by the charging execution terminal when the relay connection is normal and the current charging service is executed using the conventional charging strategy. If the relay connection is abnormal, the remaining charge of the most recently received current charging service is obtained. If the remaining charge exceeds a preset charge threshold, the fault billing strategy is determined to estimate the charge for the current charging service. If the remaining charge does not exceed the preset charge threshold, the fault billing strategy is determined to stop billing for the current charging service, and the current charging service is charged using the fault billing strategy. Specifically, when the relay connection is abnormal, if the charging execution terminal detects that the remaining charge of the device being charged exceeds the preset charge threshold, it determines that the fault charging strategy is to continue charging the device being charged. If it detects that the remaining charge of the device being charged does not exceed the preset charge threshold, it determines that the fault charging strategy is to stop charging the device being charged and to perform a relay connection change. During the relay connection change, the current charging service is executed using the fault charging strategy. The estimation and billing of the current charging service includes estimating the charging power of the device being charged based on the average charging power of the device within a unit time period as statistically recorded within a preset historical time period, and continuing to charge the device being charged includes continuing to charge the device being charged based on the average charging power; or, the estimation and billing of the current charging service includes obtaining the charging execution terminal adjacent to the disconnected charging execution terminal, and if the adjacent charging execution terminal can communicate normally and is currently performing a charging service, then reusing the charging power output of the adjacent charging execution terminal, continuing to statistically record the charging power of the current charging service corresponding to the disconnected charging execution terminal, and continuing to charge the device being charged includes continuing to charge the device being charged according to the conventional charging strategy; The charging billing records for the current charging service are statistically analyzed to obtain the billing results.

2. The method according to claim 1, characterized in that, Before receiving the charging status of the current charging service periodically transmitted by the charging execution terminal through the relay, and before performing charging billing for the current charging service based on the charging status using a conventional billing strategy, the method further includes: Receive the preset charging duration for the current charging service sent by the charging execution terminal; The prepaid fee is calculated using the preset charging time. Based on the prepaid fee, a payment interface is sent to the charging execution terminal so that the charging execution terminal can use the payment interface to perform a payment operation, and in response to successful payment, execute the current charging service.

3. The method according to claim 2, characterized in that, The step of charging the current charging service using a conventional billing strategy based on the charging status includes: Record the charging duration corresponding to the current charging service based on the charging status; The charging duration is used to bill the current charging service.

4. The method according to claim 3, characterized in that, The step of using the fault-based billing strategy to charge the current charging service includes: Stop recording the charging duration corresponding to the current charging service.

5. The method according to claim 4, characterized in that, Also includes: The duration of the relay connection anomaly was recorded. If the duration exceeds a preset duration threshold, charging billing for the current charging service will be terminated, and the cumulative charging duration of the current charging service will be calculated. The actual cost is calculated using the accumulated charging time. The method of statistically analyzing the charging billing records of the current charging service to obtain the billing results includes: Based on the prepaid fees and the actual costs, a refund will be issued for the current charging service.

6. A charging billing method, characterized in that, Applied to a charging execution terminal, the charging execution terminal communicates with a server via a relay, including: Obtain the relay connection status, which reflects the connection status between the charging execution terminal and the server and the relay, respectively; If the relay connection is normal, the current charging service is executed using a conventional charging strategy, and the charging status of the current charging service is periodically sent to the server through the connected relay, so that the server can charge the current charging service using a conventional billing strategy based on the charging status. If the relay connection is abnormal, the remaining charge of the device being charged in the current charging service is obtained. If the remaining charge exceeds a preset charge threshold, the fault charging strategy is determined to continue charging the device. If the remaining charge does not exceed the preset charge threshold, the fault charging strategy is determined to stop charging the device and perform relay connection replacement. During the relay connection replacement, the fault charging strategy is used to execute the current charging service. In response to the relay connection abnormality, the server obtains the remaining charge of the most recently received current charging service. If the remaining charge exceeds a preset charge threshold, the fault billing strategy is determined to estimate the charge for the current charging service. If the remaining charge does not exceed the preset charge threshold, the fault billing strategy is determined to stop billing the current charging service. The fault billing strategy is used to bill the current charging service, and the charging billing records for the current charging service are statistically analyzed to obtain the billing result. The estimation and billing of the current charging service includes estimating the charging power of the device being charged based on the average charging power of the device within a unit time period as statistically recorded within a preset historical time period, and continuing to charge the device being charged includes continuing to charge the device being charged based on the average charging power; or, the estimation and billing of the current charging service includes obtaining the charging execution terminal adjacent to the disconnected charging execution terminal, and if the adjacent charging execution terminal can communicate normally and is currently performing a charging service, then reusing the charging power output of the adjacent charging execution terminal, continuing to statistically record the charging power of the current charging service corresponding to the disconnected charging execution terminal, and continuing to charge the device being charged includes continuing to charge the device being charged according to the conventional charging strategy.

7. The method according to claim 6, characterized in that, The step of executing the current charging service using the fault charging strategy includes: The current charging service is interrupted.

8. The method according to claim 7, characterized in that, Also includes: If the relay connection is successfully replaced, the current charging service will resume. If the relay connection replacement fails, the current charging service will be terminated.

9. The method according to claim 6, characterized in that, The relay connection replacement includes: Obtain alternative relays; A connection request is sent to the alternative relay, so that the alternative relay establishes a connection with the charging execution terminal based on the connection request; In response to a successful connection establishment, the relay connection status is changed to normal.

10. An electronic device, characterized in that, The electronic device includes a memory and a processor, the processor being configured to execute program instructions stored in the memory to implement the steps of the method as described in any one of claims 1-9.