Method and device for determining remaining capacity of smart card battery, smart card and medium

By calculating power consumption in functional stages and using ADC calibration only when needed, the method accurately determines smart card battery power, overcoming inaccuracies in existing methods and reducing costs.

CN119247141APending Publication Date: 2025-01-03GUANGDONG CHUTIAN DRAGON SMART CARD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411611453.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Existing methods for determining the remaining power of smart card batteries using paper batteries are inaccurate due to slow voltage changes and voltage rebound phenomena, leading to unreliable power calculations.

Method used

A method and device that calculate power consumption in distinct functional stages of a smart card, set a preset remaining power threshold, and use ADC voltage calibration only when necessary to determine the final remaining power accurately.

Benefits of technology

This approach provides accurate and cost-effective determination of smart card battery power by minimizing unnecessary ADC usage and avoiding hardware costs associated with coulomb meters, ensuring precise power estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247141A_ABST
    Figure CN119247141A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of battery management, and discloses a smart card battery remaining capacity determination method and device, a smart card and a medium, and the method comprises the steps: obtaining the power consumption of the smart card in each functional process stage at the end of each functional process stage, and calculating the total power consumption at the end of the current functional process stage; based on the initial electric quantity of the smart card battery and the total electric quantity consumption at the end of the current functional process stage, determining the initial residual electric quantity; and if the initial residual electric quantity is lower than a preset residual electric quantity threshold value, calibrating the initial residual electric quantity based on the ADC voltage of the intelligent card battery to obtain the final residual electric quantity of the intelligent card battery, and displaying the final residual electric quantity on the intelligent card. According to the method, the residual electric quantity of the intelligent card battery can be efficiently and accurately determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of battery management technology, and in particular to a method and device for determining the remaining power of a smart card battery, a smart card, and a medium. Background Art

[0002] Currently, smart cards are all powered by paper batteries. However, the discharge characteristics of such paper batteries are such that when the power is around 70%, the voltage changes very slowly during the discharge process, and there is a voltage rebound phenomenon after discharge. Therefore, the existing method of collecting battery voltage to calculate the remaining power of the smart card battery obtains inaccurate results. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a method, device, smart card and medium for determining the remaining power of a smart card battery, which can accurately and efficiently obtain the remaining power of the smart card battery.

[0004] In a first aspect, an embodiment of the present application provides a method for determining the remaining power of a smart card battery, comprising:

[0005] At the end of each functional process stage, the power consumption of the smart card in each functional process stage is obtained, and the total power consumption at the end of the current functional process stage is calculated;

[0006] Determine the preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage;

[0007] If the preliminary remaining power is lower than a preset remaining power threshold, the preliminary remaining power is calibrated based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, and the final remaining power is displayed on the smart card.

[0008] In some embodiments, before obtaining the power consumption of the smart card in each of the functional process stages, the method further includes:

[0009] Based on the function of the smart card, the functional process stages of the smart card are determined; wherein the functional process stages include a power-on stage, a power-off stage, a display stage, a standby stage and a non-working stage.

[0010] In some embodiments, obtaining the power consumption of the smart card in each of the functional process stages and calculating the total power consumption at the end of the current functional process stage includes:

[0011] Determining the power consumption during the startup phase based on a single preset startup power consumption and the number of startups;

[0012] Determining the shutdown power consumption in the shutdown phase based on a single preset shutdown power consumption and the number of shutdowns;

[0013] Determining the display power consumption in the display stage based on the preset display power consumption per unit time and the display time;

[0014] Determining the standby power consumption in the standby stage based on the preset standby power consumption per unit time and the standby time;

[0015] Based on the preset non-working power consumption and non-working time per unit time, determine the non-working time power consumption of the non-working stage;

[0016] The total power consumption at the end of the current functional process stage is determined based on the power consumption during startup, the power consumption during shutdown, the power consumption during display, the power consumption during standby, and the power consumption during non-working hours.

[0017] In some embodiments, if the preliminary remaining power is lower than a preset remaining power threshold, before calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, the method further includes:

[0018] Determining whether the preliminary remaining power is lower than the preset remaining power threshold;

[0019] If not, the preliminary remaining power is determined to be the final remaining power of the smart card battery, and the final remaining power is displayed on the smart card.

[0020] In some embodiments, the preset remaining power threshold is 30% of the total power of the smart card battery.

[0021] In some embodiments, before calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, the method further includes:

[0022] When the smart card is in a standby stage, the smart card is awakened and enters a calibration mode.

[0023] In some embodiments, the calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery includes:

[0024] Collecting the ADC voltage of the smart card battery through an analog-to-digital converter;

[0025] If the ADC voltage is greater than or equal to a preset voltage value, determining the preliminary remaining power as the current final remaining power of the smart card battery;

[0026] If the ADC voltage is less than a preset voltage value, consumption compensation is performed on the preliminary remaining power to obtain the final remaining power.

[0027] In a second aspect, an embodiment of the present application provides a device for determining the remaining power of a smart card battery, comprising:

[0028] A total power consumption acquisition module is used to acquire the power consumption of the smart card at each functional process stage at the end of each functional process stage, and calculate the total power consumption at the end of the current functional process stage;

[0029] A preliminary remaining power determination module, used to determine the preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage;

[0030] The final remaining power determination module is used to calibrate the preliminary remaining power based on the ADC voltage of the smart card battery if the preliminary remaining power is lower than a preset remaining power threshold, so as to obtain the final remaining power of the smart card battery, and display the final remaining power on the smart card.

[0031] In a third aspect, an embodiment of the present application provides a smart card, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the above-mentioned method for determining the remaining battery power of the smart card.

[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed on a processor, implements the above-mentioned method for determining the remaining battery power of a smart card.

[0033] The embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain the power consumption of each functional process stage of the smart card, and then determine the current preliminary remaining power of the smart card battery according to the power consumption and the initial power of each functional process stage. Compared with the prior art of counting the battery power through a coulomb meter, the present application can effectively save the cost of the coulomb meter; and in order to avoid unnecessary waste of power by frequently collecting the battery voltage through the ADC, the embodiments of the present application set a preset remaining power threshold. The embodiments of the present application only collect the ADC voltage through the ADC when the preliminary remaining power is less than the preset remaining power threshold, and then calibrate the preliminary remaining power. In this way, the embodiments of the present application can save the program for determining the remaining power, and when the final remaining power is determined, it is adjusted in combination with the real-time situation of the smart card battery, so that the determination of the remaining power is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A first flow chart of a method for determining the remaining power of a smart card battery according to an embodiment of the present application is shown;

[0036] Figure 2 A second flow chart of the method for determining the remaining power of a smart card battery according to an embodiment of the present application is shown;

[0037] Figure 3 A third flow chart of the method for determining the remaining battery power of a smart card according to an embodiment of the present application is shown;

[0038] Figure 4 A schematic diagram of the structure of a device for determining the remaining battery power of a smart card according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0040] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0041] Hereinafter, the terms "including", "having" and their cognates that can be used in various embodiments of the present application are intended only to indicate specific features, numbers, steps, operations, elements, components or a combination of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components or a combination of the foregoing items or increasing the possibility of one or more features, numbers, steps, operations, elements, components or a combination of the foregoing items. In addition, the terms "first", "second", "third" and the like are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.

[0042] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0043] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0044] A smart card is a small integrated circuit card that integrates a microprocessor and memory. Currently, smart cards are used in many fields, such as payment systems, identity authentication, mobile communications, medical records, etc. The basic structure of a smart card includes one or more integrated circuit chips, which are usually packaged in a thin plastic card. Therefore, smart cards are usually powered by non-rechargeable paper batteries. Generally speaking, the discharge characteristics of paper batteries are that when the power consumed by the paper battery is less than about 70% of the total battery power, the voltage change value during the discharge process is very slow, and the voltage rebound phenomenon will occur after discharge. Therefore, the remaining battery power obtained by simply collecting the battery voltage through an analog-to-digital converter and then calculating the remaining battery power of the smart card battery based on the collected battery voltage is inaccurate.

[0045] Based on this, the present application proposes a method, device, smart card and medium for determining the remaining power of a smart card battery, so as to obtain the remaining power of the smart card battery in real time and accurately.

[0046] The method for determining the remaining battery power of a smart card is described below in conjunction with some specific embodiments.

[0047] Figure 1 A flow chart of a method for determining the remaining battery power of a smart card according to an embodiment of the present application is shown. Exemplarily, the method for determining the remaining battery power of a smart card includes the following steps:

[0048] Step S100, at the end of each functional process stage, obtain the power consumption of the smart card in each functional process stage, and calculate the total power consumption at the end of the current functional process stage.

[0049] Since a smart card is an electronic device with a relatively simple hardware unit and is a device with low power consumption, changes in its external environment (such as temperature, humidity, etc.) have little effect on the power consumption of the smart card. In order to obtain the remaining power of the smart card in a timely and accurate manner, this embodiment obtains the power consumption of each functional process stage once after the end of each functional process stage (that is, obtains the power consumption of each functional process stage from the beginning of leaving the factory to the end of the current functional process stage), and then the total power consumption of the smart card at the end of the current functional process stage can be obtained based on the power consumption of each functional process stage.

[0050] Therefore, before step S100, this embodiment further includes: determining various functional process stages of the smart card based on the functions of the smart card.

[0051] Among them, the functional process stages include the power-on stage, the power-off stage, the display stage, the standby stage and the non-working stage.

[0052] Among them, the power-on stage refers to the process of the smart card starting from a completely power-off state and entering a normal working state; the power-off stage refers to the process of the smart card switching from a normal working state to a completely power-off state; the display stage refers to the process in which the smart card needs to display information, such as the process in which a bank card displays parameters such as balance and date; the standby stage refers to the smart card maintaining the lowest power consumption state and waiting for user operations without displaying or other high-power operations. Specifically, the smart card is in the power-on state, but does not perform any operations or tasks, but is in a low-power state, waiting for user operations or instructions. Smart cards in the standby stage will still consume a certain amount of power because they need to maintain the state of memory and internal data, as well as monitor external events or instructions; the non-working state refers to the long-term non-working state of the smart card after it is turned off without performing any operations. It can be understood that the above division of the functional process stages of the smart card should ensure that the divided functional process stages include all power-consuming processes of the smart card.

[0053] After determining each functional process stage of the smart card, step S100 may be executed. For example, Figure 2 As shown, step S100 includes steps S110 to S160:

[0054] Step S110, determining the power consumption during the startup phase based on a single preset startup power consumption and the number of startups.

[0055] Step S120, determining the shutdown power consumption in the shutdown phase based on the single preset shutdown power consumption and the shutdown times.

[0056] Step S130 , determining the display power consumption in the display phase based on the preset display power consumption per unit time and the display time.

[0057] Step S140 , determining the standby power consumption in the standby stage based on the preset standby power consumption per unit time and the standby time.

[0058] Step S150, determining the non-working time power consumption in the non-working stage based on the preset non-working power consumption and non-working time per unit time.

[0059] Step S160, determining the total power consumption at the end of the current functional process stage according to the power consumption during startup, power consumption during shutdown, power consumption during display, power consumption during standby, and power consumption during non-working hours.

[0060] In some implementations, the RTC (real-time clock) timing and BKP (backup register) data storage area inside the smart card can be used to count the number or time of each functional process stage. Among them, RTC (real-time clock) is a hardware component that can maintain the accuracy of time even if the device is powered off. The start time and end time of each functional process stage can be obtained through RTC, so that the duration of each functional process stage can be calculated. The BKP data storage area will not lose data even when the smart card is powered off. Therefore, statistical data can be stored for a long time through BKP, thereby ensuring the integrity of the data when calculating the remaining power.

[0061] The power consumption in the startup and shutdown phases can be determined by the number of times recorded, and the power consumption in the display phase, standby phase and non-working phase can be determined by time.

[0062] Exemplarily, in this embodiment, at the end of each functional process stage, the remaining power of the smart card battery needs to be updated once. For example, when the current functional process stage is the startup stage, at the end of the current startup, the total power consumption can be calculated according to the above steps S110-S160 and combined with the data stored in BKP to obtain the remaining power of the smart card battery at the end of the current startup stage; other functional process stages are the same as the startup stage. As long as it is determined that the current functional process stage has ended and the next functional process stage is to be entered, the remaining power of the battery is calculated once.

[0063] The single preset startup power consumption in the startup phase, the single preset shutdown power consumption in the shutdown phase, the preset standby power consumption per unit time in the display phase, the preset standby power consumption per unit time in the standby phase and the preset non-working power consumption per unit time in the non-working phase are all obtained through multiple tests and are preset values.

[0064] For the number of power-on times, it is determined by the number of power-on commands received from factory activation to the current calculation of the remaining power recorded by BKP; for the number of power-off times, it is determined by the number of power-off commands received from factory activation to the current calculation of the remaining power recorded by BKP; for the display time, each time the display screen lights up, RTC starts to record the time when the screen lights up, and when the screen turns off, RTC records the time when the screen turns off to obtain the display time each time, and the obtained display time each time is stored in BKP, and the total display time of the smart card from factory activation to the current calculation of the remaining power is determined based on the recorded display time of the smart card each time; for the standby time, each time the standby state is reached, RTC starts to record the standby time. The start time, when the smart card resumes normal operation, RTC records the end time of standby to obtain the standby time each time, and stores the obtained standby time each time in BKP, and determines the total standby time of the smart card from factory activation to the current calculation of the remaining power according to the recorded standby time of the smart card each time; for non-working time, each time the smart card is turned off, RTC starts to record the start time of non-working until other operations are started, then the non-working time ends, and then the non-working time each time can be obtained, and the obtained non-working time each time is stored in BKP, and determines the total non-working time of the smart card from factory activation to the current calculation of the remaining power according to the recorded non-working time of the smart card each time.

[0065] After determining the single preset power-on power consumption and power-on times during the power-on phase, according to P a ⅹC a =W a ; Among them, P a is the single preset power consumption during the power-on phase, C a is the number of boot times, W a It is the power consumption during the startup phase.

[0066] After determining the single preset shutdown power consumption and shutdown times in the shutdown phase, according to P b ⅹC b =W b ; Among them, P b is the single preset shutdown power consumption during the shutdown phase, C b is the number of shutdowns, W b Power consumption during shutdown phase.

[0067] After determining the preset standby power consumption and display time per unit time of the display stage, according to P c ⅹT c =W c ; Among them, P c The standby power consumption per unit time is preset for the display stage, T c To display the time, W cPower is consumed during the display phase.

[0068] After determining the preset standby power consumption and standby time per unit time of the standby phase, according to P d ⅹT d =W d ; Among them, P d The preset standby power consumption per unit time in the standby stage, T d is the standby time, W d It is the power consumption during the standby phase.

[0069] After determining the non-working phase, the non-working power consumption and non-working time are preset per unit time. e ⅹT e =W e ; Among them, P e The non-working power consumption per unit time is preset for the non-working stage, T e W is non-working time. e It consumes electricity during non-working hours.

[0070] After each calculation of the power-on power consumption, power-off power consumption, display power consumption, standby power consumption and non-working power consumption from factory activation to the current calculation of remaining power, the calculated power-on power consumption, power-off power consumption, display power consumption, standby power consumption and non-working power consumption are added together to obtain the total power consumption from factory activation to the current calculation of remaining power.

[0071] It can be understood that there is no chronological order between the above steps S210 to S250, and they can be executed in parallel or one by one, which is not limited here.

[0072] Step S200, determining a preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage.

[0073] The initial power is the power of the smart card battery when it leaves the factory. In this step, the initial remaining power can be obtained by subtracting the total power consumption calculated at the end of the current functional process stage from the initial power.

[0074] Step S300: if the preliminary remaining power is lower than the preset remaining power threshold, the preliminary remaining power is calibrated based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, and the final remaining power is displayed on the smart card.

[0075] Exemplarily, before step S300, this embodiment further includes: determining whether the preliminary remaining power is lower than a preset remaining power threshold.

[0076] If the calculated preliminary remaining power is not lower than the preset remaining power threshold, the preliminary remaining power is the current final remaining power of the smart card battery, and the final remaining power is then displayed on the smart card.

[0077] If the calculated preliminary remaining power is lower than the preset remaining power threshold, the preliminary remaining power is calibrated based on the ADC voltage of the smart card battery in step S300 to obtain the final remaining power of the smart card battery; wherein the ADC voltage is the voltage collected by the analog-to-digital converter (ADC).

[0078] Among them, the preset remaining power threshold is 30% of the total power of the smart card battery. When the power of the smart card battery is lower than 30% of the total power, the battery will be unstable inside, so the discharge curve changes greatly, which makes the error of estimating the remaining power of the battery based on the voltage relatively large. Therefore, this embodiment sets the preset remaining power threshold to 30%. When the remaining power of the smart card battery is lower than the preset remaining power threshold, when determining the final remaining power, the preliminary remaining power must first be calibrated based on the ADC voltage of the smart card battery.

[0079] In some implementations, before calibrating the preliminary remaining power based on the ADC voltage to obtain the final remaining power of the smart card battery, the method further includes: when the smart card is in a standby stage, waking up the smart card and entering a calibration mode.

[0080] It can be understood that when the initial remaining power is lower than the preset remaining power threshold, when the battery remaining power needs to be calibrated, in order to avoid the peripheral devices working and causing the battery to generate large current, thereby causing the battery voltage to drop and affecting the accuracy of the calibration, in this embodiment, when the battery remaining power needs to be calibrated, it is necessary to wake up the smart card and enter the calibration mode when the smart card is in standby state, that is, when the peripheral devices are not working.

[0081] In some embodiments, Figure 3 As shown, the preliminary remaining capacity is calibrated based on the ADC voltage to obtain the final remaining capacity of the smart card battery, including:

[0082] Step S310: collecting the ADC voltage of the smart card battery through an analog-to-digital converter.

[0083] Step S320: If the ADC voltage is greater than or equal to the preset voltage value, the preliminary remaining power is determined as the current final remaining power of the smart card battery.

[0084] Step S330: If the ADC voltage is less than the preset voltage value, the initial remaining power is consumed and compensated to obtain the final remaining power.

[0085] It can be understood that after entering the calibration mode, an analog-to-digital converter is used to collect the current voltage value of the battery, that is, the ADC voltage, and then the collected ADC voltage is compared with a preset voltage value (reference voltage value. If the ADC voltage is greater than or equal to the preset voltage value, the above-determined preliminary remaining voltage is the final remaining power of the smart card. If the ADC voltage is less than the preset voltage value, it means that the battery voltage may drop for some reason and needs to be backward compatible with the actual power of the battery to perform consumption compensation, that is, calibrate the preliminary remaining power. When calibrating the preliminary remaining power, the compensation amount can be determined first. The compensation amount can be determined according to experimental data. If the compensation amount is determined by experimental data , you can first perform discharge tests on multiple batteries, record the battery capacity corresponding to different voltage values, and then collect data from multiple sample points to establish a voltage-capacity comparison table. According to the voltage-capacity comparison table, when the collected ADC voltage is less than the preset voltage value, determine the corresponding compensation amount according to the voltage-capacity comparison table. Of course, other methods can also be used to calibrate the preliminary remaining power, and perform consumption compensation for backward compatibility with the actual battery capacity. For example: when the battery is discharged by 70% or more, the battery voltage and power change curve tend to be proportional. In this state, collecting voltage through ADC and referring to the ratio of voltage to power ratio will make the battery power calibration more accurate.

[0086] In some implementations, in this embodiment, after the final remaining power of the smart card battery is determined, the final remaining power can be displayed on the smart card and sent to the host computer or battery management system, so that the user or administrator can obtain the power status of the smart card in time and make corresponding management of the smart card according to the power status of the smart card battery.

[0087] The embodiment of the present application obtains the power consumption of each functional process stage of the smart card, and then determines the current preliminary remaining power of the smart card battery according to the power consumption and the initial power of each functional process stage. That is, the embodiment of the present application determines the battery power of the smart card by simulating a coulomb meter, and there is no need to add hardware equipment related to the coulomb meter in the smart card. Therefore, compared with the prior art of counting the battery power by a coulomb meter, the present application can effectively save the cost of the coulomb meter; and in order to avoid unnecessary waste of power caused by frequent acquisition of the battery voltage through ADC, the embodiment of the present application sets a preset remaining power threshold, and when the preliminary remaining power is not less than the preset When the remaining power threshold is set, the voltage value changes very little on the battery discharge curve. Therefore, when the preliminary remaining power is not lower than the preset remaining power threshold, it is not very useful to use ADC to collect voltage to determine the remaining power of the battery. Therefore, the embodiment of the present application only collects ADC voltage through ADC when the preliminary remaining power is lower than the preset remaining power threshold, and then compares it with the preset voltage value. If the ADC voltage is less than the preset voltage value, the preliminary remaining power is calibrated. In this way, the embodiment of the present application can save the procedure for determining the remaining power, and when the final remaining power is determined, it is adjusted in combination with the real-time situation of the smart card battery, so that the determination of the remaining power is more accurate.

[0088] Figure 4 A schematic diagram of the structure of a device for determining the remaining battery power of a smart card according to an embodiment of the present application is shown. Exemplarily, the device for determining the remaining battery power of a smart card comprises:

[0089] The total power consumption acquisition module 100 is used to acquire the power consumption of the smart card in each functional process stage at the end of each functional process stage, and calculate the total power consumption at the end of the current functional process stage.

[0090] The preliminary remaining power determination module 200 is used to determine the preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage.

[0091] The final remaining power determination module 300 is used to calibrate the preliminary remaining power based on the ADC voltage of the smart card battery if the preliminary remaining power is lower than the preset remaining power threshold, so as to obtain the final remaining power of the smart card battery, and display the final remaining power on the smart card.

[0092] It can be understood that the device of this embodiment corresponds to the method for determining the remaining battery power of a smart card in the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.

[0093] The present application also provides a smart card. Exemplarily, the smart card includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the terminal device to execute the functions of the various modules in the above-mentioned smart card battery remaining power determination method or the above-mentioned smart card battery remaining power determination device.

[0094] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0095] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0096] The present application also provides a computer-readable storage medium for storing the computer program used in the smart card. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0097] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0098] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0099] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.

[0100] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for determining the remaining power of a smart card battery, characterized in that: include: At the end of each functional process stage, the power consumption of the smart card in each functional process stage is obtained, and the total power consumption at the end of the current functional process stage is calculated; Determine the preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage; If the preliminary remaining power is lower than a preset remaining power threshold, the preliminary remaining power is calibrated based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, and the final remaining power is displayed on the smart card.

2. The method for determining the remaining power of a smart card battery according to claim 1, characterized in that: Before obtaining the power consumption of the smart card in each functional process stage, the method further includes: Based on the function of the smart card, the functional process stages of the smart card are determined; wherein the functional process stages include a power-on stage, a power-off stage, a display stage, a standby stage and a non-working stage.

3. The method for determining the remaining power of a smart card battery according to claim 2, characterized in that: The obtaining of the power consumption of the smart card in each functional process stage and calculating the total power consumption at the end of the current functional process stage includes: Determining the power consumption during the startup phase based on a single preset startup power consumption and the number of startups; Determining the shutdown power consumption in the shutdown phase based on a single preset shutdown power consumption and the number of shutdowns; Determining the display power consumption in the display stage based on the preset display power consumption per unit time and the display time; Determining the standby power consumption in the standby stage based on the preset standby power consumption per unit time and the standby time; Based on the preset non-working power consumption and non-working time per unit time, determine the non-working time power consumption of the non-working stage; The total power consumption at the end of the current functional process stage is determined based on the power consumption during startup, the power consumption during shutdown, the power consumption during display, the power consumption during standby, and the power consumption during non-working hours.

4. The method for determining the remaining power of a smart card battery according to claim 1, characterized in that: If the preliminary remaining power is lower than a preset remaining power threshold, before calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, the method further includes: Determining whether the preliminary remaining power is lower than the preset remaining power threshold; If not, the preliminary remaining power is determined to be the final remaining power of the smart card battery, and the final remaining power is displayed on the smart card.

5. The method for determining the remaining power of a smart card battery according to claim 1, characterized in that: The preset remaining power threshold is 30% of the total power of the smart card battery.

6. The method for determining the remaining power of a smart card battery according to claim 1, characterized in that: Before calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery, the method further includes: When the smart card is in a standby stage, the smart card is awakened and enters a calibration mode.

7. The method for determining the remaining power of a smart card battery according to claim 1 or 6, characterized in that: The calibrating the preliminary remaining power based on the ADC voltage of the smart card battery to obtain the final remaining power of the smart card battery includes: Collecting the ADC voltage of the smart card battery through an analog-to-digital converter; If the ADC voltage is greater than or equal to a preset voltage value, determining the preliminary remaining power as the current final remaining power of the smart card battery; If the ADC voltage is less than a preset voltage value, consumption compensation is performed on the preliminary remaining power to obtain the final remaining power.

8. A device for determining the remaining battery power of a smart card, characterized in that: include: A total power consumption acquisition module is used to acquire the power consumption of the smart card at each functional process stage at the end of each functional process stage, and calculate the total power consumption at the end of the current functional process stage; A preliminary remaining power determination module, used to determine the preliminary remaining power based on the initial power of the smart card battery and the total power consumption at the end of the current functional process stage; The final remaining power determination module is used to calibrate the preliminary remaining power based on the ADC voltage of the smart card battery if the preliminary remaining power is lower than a preset remaining power threshold, so as to obtain the final remaining power of the smart card battery, and display the final remaining power on the smart card.

9. A smart card, characterized in that: The smart card comprises a processor and a memory, the memory stores a computer program, and the processor is used to execute the computer program to implement the smart card battery remaining power determination method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that: The computer program is stored therein, and when the computer program is executed on a processor, the method for determining the remaining power of a smart card battery according to any one of claims 1 to 7 is implemented.