A power calculation method and device, electronic device and medium

CN122645889APending Publication Date: 2026-08-28AULTON NEW ENERGY AUTOMOBILE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510234902.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种电量计算方法、设备、电子设备及介质,用以解决现有技术电量计算效率及准确率较低的技术问题

Benefits of technology

[0046] This application automatically determines whether a new battery has been installed by reading the initial battery code and initial power information recorded by the on-board battery swapping controller of the battery swapping vehicle and comparing it with the corresponding information of the current battery. It also calculates the power consumption when the battery is replaced, eliminating the need for manual querying and improving the efficiency and accuracy of power calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122645889A_ABST
    Figure CN122645889A_ABST
Patent Text Reader

Abstract

The application discloses a power calculation method and device, an electronic device and a medium, and aims to solve the problem of low power calculation efficiency and accuracy. The power calculation method comprises the following steps: obtaining initial battery code and initial power information recorded in the battery swap controller; obtaining the current battery code and the current power information of the battery swap battery; determining whether the current battery code is consistent with the initial battery code; in the case that the current battery code is consistent with the initial battery code, determining the consumed power of the current battery swap battery according to the initial power information and the current power information. By reading the initial battery code and the initial power information recorded in the on-board battery swap controller of the battery swap vehicle, and comparing them with the corresponding information of the current battery, it is automatically determined whether the vehicle is replaced with a new battery, and the power consumption when the battery is replaced is calculated, without manual inquiry, thereby improving the efficiency and accuracy of power calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle battery swapping technology, and in particular to a method, device, electronic device and medium for calculating battery capacity. Background Technology

[0002] New energy vehicles use non-traditional fuels, which can significantly reduce environmental pollution and have significant advantages in environmental protection and energy conservation, making them an important direction for the future development of the automotive industry. With the popularization of new energy vehicles, battery swapping, as a fast and efficient way to replenish the power of these vehicles, has attracted much attention.

[0003] With the gradual promotion of battery swapping technology, the number of battery swapping stations and vehicles is also increasing. In the traditional battery swapping method, the battery swapping fee can be calculated based on the battery's power consumption. When calculating the power consumed by the battery, the station staff usually need to check the battery's power level when it was swapped into the vehicle, and then determine the power consumed based on the remaining power level when it was swapped out. However, the manual query process results in low power calculation efficiency, and errors by the station staff can easily lead to calculation errors, affecting the accuracy of the calculation. Summary of the Invention

[0004] This application provides a power calculation method, device, electronic device, and medium to solve the technical problem of low power calculation efficiency and accuracy in the prior art.

[0005] On one hand, embodiments of this application provide a method for calculating electricity consumption, including:

[0006] Obtain the initial battery code and initial power information recorded in the battery swapping controller;

[0007] Obtain the current battery code and current battery level information of the swapped battery;

[0008] Determine whether the current battery code is consistent with the initial battery code;

[0009] If the current battery code is consistent with the initial battery code, the power consumption of the current battery is determined based on the initial power information and the current power information.

[0010] In this embodiment, the initial battery code and initial power information recorded by the on-board battery swapping controller of the battery swapping vehicle are read and compared with the corresponding information of the current battery. This allows the system to automatically determine whether the vehicle has been replaced with a new battery and calculate the power consumption when the battery is replaced. This eliminates the need for manual querying and improves the efficiency and accuracy of power calculation.

[0011] In one implementation of this application, obtaining the current battery code and current battery level information of the swapped battery includes:

[0012] The battery level data of the current battery being swapped is acquired multiple times within a preset period.

[0013] The current battery level information is obtained by averaging multiple battery level data.

[0014] In this embodiment of the application, when obtaining the current power data of the swappable battery, the current battery code of the swappable battery is first determined. Then, the power data of the swappable battery corresponding to the battery code can be obtained multiple times within a preset period, and the average value of the multiple power data is taken as the current power information, thereby reducing the error in obtaining power data and improving the accuracy of power calculation.

[0015] In one implementation of this application, after the step of determining whether the current battery code is consistent with the initial battery code, the method further includes:

[0016] If the current battery code is inconsistent with the initial battery code, the initial battery code and the initial battery information are updated according to the current battery code and the current power information.

[0017] In this embodiment of the application, when the current battery code obtained is inconsistent with the initial battery code previously saved by the battery swapping controller, it indicates that the electric vehicle has been replaced with a new battery. In this case, the initial battery code and initial power information in the battery swapping controller can be updated to the current battery code and current power information, thereby recording the initial information of the newly replaced battery. This information can then be used to calculate the power consumption of the battery during the next battery swap of the electric vehicle.

[0018] In one implementation of this application, determining the current battery consumption based on the initial battery level information and the current battery level information includes:

[0019] Based on the initial power information and the current power information, determine whether the current battery is being charged;

[0020] If the current battery is not being charged, the difference between the initial power information and the current power information is taken as the consumed power.

[0021] In this embodiment of the application, after obtaining the initial power information and the current power information of the battery swapping device, it is also necessary to determine whether the electric vehicle has overcharged during the battery swapping cycle. If there is overcharging, the power consumption of the electric vehicle cannot be accurately obtained based on the initial power information and the current power information. The power obtained from charging also needs to be considered. If there is no overcharging, the difference between the initial power information and the current power information can be directly used as the power consumption to facilitate the settlement of subsequent battery swapping fees.

[0022] In one implementation of this application, the electric vehicle includes multiple battery swapping units, and the method further includes:

[0023] Determine whether the current battery code of each swapped battery is consistent with its initial battery code;

[0024] For swapped batteries whose current battery code matches the initial battery code, determine the power consumption of that swapped battery;

[0025] For swapped batteries whose current battery code is inconsistent with the initial battery code, update the initial battery code and initial charge information of the swapped battery.

[0026] In this embodiment of the application, for commercial vehicles such as electric trucks, multiple battery swapping devices may be installed on the vehicle body at the same time. For these vehicles, the battery swapping controller stores information on multiple battery swapping devices. The power consumption of each battery swapping device should also be calculated separately. For each battery swapping device, it is determined whether its current battery code is consistent with its initial battery code, thereby determining whether each battery swapping device is a newly installed battery. The power consumption of non-newly installed batteries is calculated, and the initial battery code and initial power information of newly installed batteries are updated. Subsequently, the power consumption of each newly installed battery swapping device can be added together as the power consumption of the electric vehicle.

[0027] In one implementation of this application, after determining the current battery consumption based on the initial battery level information and the current battery level information, the method further includes:

[0028] The power consumption was verified.

[0029] Battery swapping will be carried out on electric vehicles once the verification is passed.

[0030] In this embodiment of the application, after determining the current battery consumption, the battery consumption can be verified. For example, the battery consumption can be verified based on relevant information such as vehicle mileage. If the verification is successful, it means that the battery consumption data is accurate and can be used for battery swapping fee settlement and other operations. After successful verification, the current battery can be replaced and a new battery can be installed in the electric vehicle.

[0031] In one implementation of this application, after the step of swapping the battery of the electric vehicle upon successful verification, the method further includes:

[0032] The battery code and power information of the replaced battery are saved as the initial battery code and initial power information to the battery swapping controller.

[0033] In this embodiment, after replacing the battery in an electric vehicle, the battery code and charge information of the new battery can be saved as initial battery code and initial charge information in the battery swapping controller, thereby completing the data update for this battery swapping cycle. The initial battery code and initial charge information saved in the battery swapping controller are used by the electric vehicle to calculate the charge consumption of the new battery in the next battery swapping cycle, thereby accurately and efficiently realizing the automatic calculation of charge consumption.

[0034] On the other hand, embodiments of this application also provide a power calculation device, the device comprising:

[0035] The initial acquisition module is used to acquire the initial battery code and initial power information recorded in the battery swapping controller;

[0036] The current acquisition module is used to acquire the current battery code and current battery level information of the swapped battery;

[0037] The judgment module is used to determine whether the current battery code is consistent with the initial battery code;

[0038] The calculation module is used to determine the power consumption of the current battery swapping battery based on the initial power information and the current power information, when the current battery code is consistent with the initial battery code.

[0039] In this embodiment, the initial battery code and initial charge information recorded by the on-board battery swapping controller of the battery swapping vehicle are read and compared with the corresponding information of the current battery. This automatically determines whether the vehicle has been replaced with a new battery and calculates the charge consumption when the battery is replaced. This eliminates the need for manual querying, improving the efficiency and accuracy of charge calculation.

[0040] On the other hand, embodiments of this application also provide an electronic device, the device comprising:

[0041] At least one processor;

[0042] And, a memory communicatively connected to the at least one processor;

[0043] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform any of the power calculation methods described above.

[0044] On the other hand, embodiments of this application also provide a non-volatile computer storage medium storing computer-executable instructions, wherein the computer, when executing the executable instructions, implements any of the power calculation methods described above.

[0045] This application provides a method, device, electronic device, and medium for calculating electricity consumption. Compared with the prior art, the embodiments of this application have the following beneficial technical effects:

[0046] This application automatically determines whether a new battery has been installed by reading the initial battery code and initial power information recorded by the on-board battery swapping controller of the battery swapping vehicle and comparing it with the corresponding information of the current battery. It also calculates the power consumption when the battery is replaced, eliminating the need for manual querying and improving the efficiency and accuracy of power calculation. Attached Figure Description

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0048] Figure 1 A flowchart illustrating a power calculation method provided in an embodiment of this application;

[0049] Figure 2 This is a schematic diagram of the structure of a power calculation device provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the internal structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.

[0052] This application discloses a method, device, electronic device, and medium for calculating electricity, which solves the problem of low efficiency and accuracy of electricity calculation in the prior art.

[0053] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0054] Figure 1 This is a flowchart illustrating a power calculation method provided in an embodiment of this application.

[0055] The power calculation method described in this application can be implemented by a terminal device, a server, or a combination of both. This application does not impose any special limitations on this. For ease of understanding and description, the following embodiments will be described in detail using a server as an example.

[0056] It should be noted that the server can be a single device or a system composed of multiple devices, i.e., a distributed server. This application does not make any specific limitations on this.

[0057] like Figure 1 As shown in the embodiment of this application, a power consumption calculation method includes:

[0058] Step S110: Obtain the initial battery code and initial power information recorded in the battery swapping controller.

[0059] After an electric vehicle enters a battery swapping station, the station establishes a communication connection with the vehicle via near-field communication (NFC) to obtain the initial battery code and initial charge information of the swapped battery recorded in the vehicle's battery swapping controller. The battery code has a one-to-one correspondence with the swapped battery and serves as its unique identifier. When the swapped battery is installed in the electric vehicle, the battery swapping controller saves the battery code as the initial battery code and simultaneously obtains and saves the initial charge information of the battery when it is installed, so that the power consumption can be calculated when the battery is subsequently replaced.

[0060] Step S120: Obtain the current battery code and current battery level information of the swapped battery.

[0061] After obtaining the initial battery code and initial power information stored in the battery swapping controller, it is also necessary to obtain the current battery code and current power information of the battery swapping battery installed on the electric vehicle through the battery management system. The current battery code can be used to verify whether the current battery swapping battery is a newly installed battery, and the current power information can be used to calculate the power consumption of the current battery.

[0062] Step S130: Determine whether the current battery code is consistent with the initial battery code.

[0063] Step S140: If the current battery code is consistent with the initial battery code, determine the current battery power consumption based on the initial power information and the current power information.

[0064] After obtaining the initial battery code and the current battery code, the current battery code can be compared with the initial battery code. If the current battery code matches the initial battery code, it is determined that the battery installed in the current electric vehicle is not a newly installed battery, but rather a battery that was installed during the last battery swap. This indicates that the battery has been used by the electric vehicle before being swapped again. Therefore, based on the initial charge information recorded when the battery was installed in the electric vehicle during the last swap, and the current charge information obtained before this swap, the charge consumption of the battery in this swap cycle can be determined. If the current battery code does not match the initial battery code, it is determined that the battery installed in the current electric vehicle is a newly installed battery, and the charge consumption does not need to be calculated.

[0065] This application embodiment reads the initial battery code and initial power information recorded by the on-board battery swapping controller on the battery swapping vehicle, and compares it with the corresponding information of the current battery, thereby automatically determining whether the vehicle has been replaced with a new battery and calculating the power consumption when the battery is replaced. This eliminates the need for manual querying and improves the efficiency and accuracy of power calculation.

[0066] In one embodiment, step S120 may include:

[0067] The battery level data of the current battery being swapped is acquired multiple times within a preset period.

[0068] The current battery level is obtained by averaging multiple battery data points.

[0069] In this embodiment, when acquiring the current power data of the swapped battery, the current battery code of the swapped battery is first determined. Then, the power data of the swapped battery corresponding to the battery code can be acquired multiple times within a preset period, and the average value of the multiple power data is taken as the current power information, thereby reducing the error in acquiring power data and improving the accuracy of power calculation.

[0070] In one embodiment, after step S130, the method further includes:

[0071] If the current battery code is inconsistent with the initial battery code, update the initial battery code and initial battery information according to the current battery code and the current power information.

[0072] Furthermore, when the current battery code obtained is inconsistent with the initial battery code previously saved by the battery swapping controller, it indicates that the electric vehicle has been replaced with a new battery. In this case, the initial battery code and initial power information in the battery swapping controller can be updated to the current battery code and current power information, thereby recording the initial information of the newly replaced battery. This information can then be used to calculate the power consumption of the battery during the next battery swap of the electric vehicle.

[0073] In one embodiment of this application, step S140 may include:

[0074] Determine whether the current battery is being charged based on the initial and current battery levels.

[0075] If the battery is not currently being charged, the difference between the initial battery level and the current battery level will be used as the consumed battery power.

[0076] In this embodiment, after obtaining the initial and current battery level information of the swapped battery, it is necessary to determine whether the electric vehicle has engaged in any charging behavior during the battery swapping cycle. If charging behavior has occurred, the initial and current battery level information alone cannot accurately determine the electric vehicle's power consumption; the power gained during charging must also be considered. If no charging behavior has occurred, the difference between the initial and current battery level information can be directly used as the power consumption for subsequent battery swapping fee settlement. If the electric vehicle has engaged in charging behavior, and the current battery level exceeds the recorded initial battery level, it indicates that the electric vehicle's charging power exceeds its power consumption, and no battery swapping fee needs to be paid. If the current battery level does not exceed the initial battery level, the electric vehicle's power consumption needs to be calculated based on preset rules and the charging power to facilitate subsequent battery swapping fee settlement.

[0077] In one embodiment of this application, the electric vehicle includes multiple battery swapping units, and the above method may further include:

[0078] Determine whether the current battery code of each swapped battery is consistent with its initial battery code;

[0079] For swapped batteries whose current battery code matches the initial battery code, determine the power consumption of that swapped battery;

[0080] For swapped batteries whose current battery code is inconsistent with the initial battery code, update the initial battery code and initial charge information of the swapped battery.

[0081] In this embodiment, for commercial vehicles such as electric trucks, multiple battery swapping units may be installed on the vehicle body. For these vehicles, the battery swapping controller stores information on multiple battery swapping units. The power consumption of each battery swapping unit should also be calculated separately. For each battery swapping unit, it is determined whether its current battery code is consistent with its initial battery code to determine whether each battery swapping unit is a newly installed battery. The power consumption of non-newly installed batteries is then calculated, and the initial battery code and initial power information of newly installed batteries are updated. Subsequently, the power consumption of each newly installed battery swapping unit can be summed as the power consumption of the electric vehicle.

[0082] In one embodiment of this application, after step S140, the method further includes:

[0083] Verify the power consumption.

[0084] Battery swapping will be carried out on electric vehicles once the verification is passed.

[0085] In this embodiment, after determining the current battery consumption, the consumption can be verified. For example, the consumption can be verified based on relevant information such as vehicle mileage. If the verification is successful, it means that the consumption data is accurate and can be used for battery swapping fee settlement and other operations. After successful verification, the current battery can be replaced and a new battery can be installed in the electric vehicle.

[0086] Furthermore, in one embodiment of this application, after the step of swapping the battery of the electric vehicle upon successful verification, the above method further includes:

[0087] The battery code and power information of the replaced battery are saved as the initial battery code and initial power information to the battery swapping controller.

[0088] In this embodiment, after replacing the battery in an electric vehicle, the battery code and charge information of the new battery can be saved as initial battery code and initial charge information in the battery swapping controller, thereby completing the data update for this battery swapping cycle. The initial battery code and initial charge information saved in the battery swapping controller are used by the electric vehicle to calculate the power consumption of the new battery in the next battery swapping cycle, thereby accurately and efficiently realizing the automatic calculation of power consumption.

[0089] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a power calculation device, the structure of which is as follows: Figure 2 As shown.

[0090] Figure 2 This is a schematic diagram of the structure of a power calculation device provided in an embodiment of this application. Figure 2 As shown, the power calculation device includes:

[0091] The initial acquisition module 210 is used to acquire the initial battery code and initial power information recorded in the battery swapping controller;

[0092] The current acquisition module 220 is used to acquire the current battery code and current power information of the battery swapping device;

[0093] The judgment module 230 is used to determine whether the current battery code is consistent with the initial battery code;

[0094] The calculation module 240 is used to determine the power consumption of the current battery swapping battery based on the initial power information and the current power information, provided that the current battery code is consistent with the initial battery code.

[0095] The aforementioned power calculation device reads the initial battery code and initial power information recorded by the on-board battery swapping controller of the battery swapping vehicle, and compares it with the corresponding information of the current battery. This allows it to automatically determine whether the vehicle has been replaced with a new battery and calculate the power consumption when the battery is replaced. This eliminates the need for manual querying and improves the efficiency and accuracy of power calculation.

[0096] It is understood that the above-mentioned power calculation device can also be used to implement the power calculation method in any of the above embodiments, and has corresponding functional modules.

[0097] Figure 3 This is a schematic diagram of the internal structure of an electronic device provided in an embodiment of this application. Figure 3 As shown, the device includes:

[0098] At least one processor;

[0099] And, a memory that is communicatively connected to at least one processor;

[0100] The memory stores instructions that can be executed by at least one processor. When the instructions are executed by at least one processor, the power calculation method described in any of the above embodiments is implemented.

[0101] In one embodiment of this application, when the processor executes the instructions, it can: obtain the initial battery code and initial power information recorded in the battery swapping controller; obtain the current battery code and current power information of the swapping battery; determine whether the current battery code is consistent with the initial battery code; and if the current battery code is consistent with the initial battery code, determine the power consumption of the current swapping battery based on the initial power information and the current power information.

[0102] This application also provides a non-volatile computer storage medium storing computer-executable instructions, which, when executed by a computer, implement the power calculation method as described in any of the above embodiments.

[0103] In one embodiment of this application, when the above instructions are executed by the processor, they can achieve the following: when the processor executes the instructions, it can achieve the following: obtain the initial battery code and initial power information recorded in the battery swapping controller; obtain the current battery code and current power information of the swapping battery; determine whether the current battery code is consistent with the initial battery code; if the current battery code is consistent with the initial battery code, determine the power consumption of the current swapping battery based on the initial power information and the current power information.

[0104] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.

[0105] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0106] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.

[0107] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0108] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0109] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0110] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0111] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0112] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0113] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0114] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0115] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for calculating electricity consumption, characterized in that, The method includes: Obtain the initial battery code and initial power information recorded in the battery swapping controller; Obtain the current battery code and current battery level information of the swapped battery; Determine whether the current battery code is consistent with the initial battery code; If the current battery code is consistent with the initial battery code, the power consumption of the current battery is determined based on the initial power information and the current power information.

2. The method for calculating electricity consumption according to claim 1, characterized in that, The process of obtaining the current battery code and current battery level information of the swapped battery includes: The battery level data of the current battery being swapped is acquired multiple times within a preset period. The current battery level information is obtained by averaging multiple battery level data.

3. The method for calculating electricity consumption according to claim 1, characterized in that, After determining whether the current battery code is consistent with the initial battery code, the method further includes: If the current battery code is inconsistent with the initial battery code, the initial battery code and the initial battery information are updated according to the current battery code and the current power information.

4. The method for calculating electricity consumption according to claim 1, characterized in that, The step of determining the current battery consumption based on the initial battery level information and the current battery level information includes: Based on the initial power information and the current power information, determine whether the current battery is being charged; If the current battery is not being charged, the difference between the initial power information and the current power information is taken as the consumed power.

5. The method for calculating electricity consumption according to claim 1, characterized in that, The electric vehicle includes multiple battery swapping units, and the method further includes: Determine whether the current battery code of each swapped battery is consistent with its initial battery code; For swapped batteries whose current battery code matches the initial battery code, determine the power consumption of that swapped battery; For swapped batteries whose current battery code is inconsistent with the initial battery code, update the initial battery code and initial charge information of the swapped battery.

6. The method for calculating electricity consumption according to claim 1, characterized in that, After determining the current battery consumption based on the initial battery level information and the current battery level information, the method further includes: The power consumption was verified. Battery swapping will be carried out on electric vehicles once the verification is passed.

7. The method for calculating electricity consumption according to claim 6, characterized in that, After the step of swapping the battery of the electric vehicle if the verification is successful, the method further includes: The battery code and power information of the replaced battery are saved as the initial battery code and initial power information to the battery swapping controller.

8. A power calculation device, characterized in that, The device includes: The initial acquisition module is used to acquire the initial battery code and initial power information recorded in the battery swapping controller; The current acquisition module is used to acquire the current battery code and current battery level information of the swapped battery; The judgment module is used to determine whether the current battery code is consistent with the initial battery code; The calculation module is used to determine the power consumption of the current battery swapping battery based on the initial power information and the current power information, when the current battery code is consistent with the initial battery code.

9. An electronic device, characterized in that, The device includes: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the power calculation method as described in any one of claims 1-7.

10. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, The computer implements the power calculation method as described in any one of claims 1-7 when executing executable instructions.