Electric quantity regulation method and device for scanning code power consumption and storage medium
By responding to users' QR code payment instructions in the shared power system, obtaining the power storage pool and the initial payment amount, detecting the decimal truncation condition, and adjusting the initial payment amount using a preset storage threshold, the problem of inaccurate power payment is solved, and the accuracy and stability of power payment are achieved.
Patent Information
- Application Number
- CN202410287631.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-13
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2044-03-13
AI Technical Summary
The inconsistency between monthly and QR code-based electricity billing methods in existing shared power systems leads to inaccurate electricity billing and can easily result in unpaid electricity bills.
By responding to the user's QR code payment instruction, the system obtains the power storage pool and the initial settlement power, detects the decimal truncation condition, and adjusts the initial settlement power using a preset storage threshold to obtain the target settlement power, thus ensuring the accuracy of power settlement.
It effectively solved the problem of unpaid electricity meters, improved the accuracy and stability of electricity billing, and reduced billing errors.
Smart Images

Figure CN118644261B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application generally relates to the technical field of data processing. More particularly, the present application relates to an electric quantity regulation method, device and storage medium for code scanning power use. BACKGROUND
[0002] With the development of economic society, the demand for "short-time power use" in residents' life is increasing. To solve the charging demand anytime and anywhere, a shared power system emerges as the times require. The existing shared power system mainly sets metering devices such as electric energy meters and electrical modules such as sockets connected with users in the power box. Users use power by scanning codes, thereby realizing shared power use.
[0003] Among them, the shared power system adopts the rounding method to process the power consumption when issuing electricity bills monthly, and the code scanning power use adopts the method of settlement by times and rounding to two decimal places to process the power consumption. However, due to the inconsistency of the two processing methods, users who frequently use code scanning power use are more likely to accumulate deviation, and thus the cumulative power consumption of code scanning power use may be less than the monthly issued power consumption, resulting in the situation of electric meter arrears.
[0004] Therefore, it is necessary to propose an electric quantity regulation method for code scanning power use, so as to solve the accuracy of power settlement and thus solve the problem of electric meter arrears. SUMMARY
[0005] In order to at least solve one or more technical problems mentioned above, the present application proposes an electric quantity regulation scheme for code scanning power use in multiple aspects.
[0006] In a first aspect, the present application provides an electric quantity regulation method for code scanning power use, in response to a code scanning settlement instruction of a user, obtaining an electric quantity storage pool and an initial settlement electric quantity of the user; and when detecting that the initial settlement electric quantity meets a preset decimal truncation condition, regulating the initial settlement electric quantity based on a preset storage threshold and the electric quantity storage pool to obtain a target settlement electric quantity.
[0007] In some embodiments, in response to a code scanning settlement instruction of a user, an electric quantity storage pool and an initial settlement electric quantity of the user are obtained; and when detecting that the initial settlement electric quantity meets a preset decimal truncation condition, the initial settlement electric quantity is regulated based on a preset storage threshold and the electric quantity storage pool to obtain a target settlement electric quantity.
[0008] In some embodiments, a decimal tail of the initial settlement electric quantity is determined, and it is detected whether the electric quantity in the electric quantity storage pool is greater than the storage threshold; if yes, a truncated part of the initial settlement electric quantity is determined based on the decimal tail to obtain the target settlement electric quantity, and corresponding electric quantity is deducted from the electric quantity storage pool according to the truncated part; if no, a supplement part of the initial settlement electric quantity is determined based on the decimal tail to obtain the target settlement electric quantity, and the supplement part of the electric quantity is stored in the electric quantity storage pool.
[0009] In some embodiments, the decimal tail is extracted to obtain the truncated part, and the target settlement electric quantity is obtained by deleting the electric quantity in the initial settlement electric quantity according to the truncated part.
[0010] In some embodiments, the decimal tail is upwardly carried to obtain the target settlement electric quantity, and the supplement part of the decimal tail is obtained by upwardly carrying.
[0011] In some embodiments, the decimal truncation condition comprises that the decimal part of the initial settlement electric quantity is less than or equal to a preset truncation threshold.
[0012] In some embodiments, when it is detected that the initial settlement electric quantity does not satisfy the decimal truncation condition, the supplement part of the decimal tail is obtained by upwardly carrying, and the supplement part of the electric quantity is stored in the electric quantity storage pool.
[0013] In some embodiments, a pre-created configuration template and personal information of the user are obtained, and the electric quantity storage pool is generated based on the configuration template according to the personal information.
[0014] In some embodiments, the configuration template comprises at least one of a user balance record table, a scene configuration table, a user initial settlement electric quantity table, and a user bill table.
[0015] In a second aspect, the present application provides a terminal device, comprising a memory, a processor, and a power control program for scanning power consumption stored on the memory and executable on the processor, wherein the power control program for scanning power consumption, when executed by the processor, implements the steps of the power control method for scanning power consumption according to any one of the above.
[0016] In a third aspect, the present application provides a computer readable storage medium, wherein the computer readable storage medium stores a power control program for scanning power consumption, and the power control program for scanning power consumption, when executed by a processor, implements the steps of the power control method for scanning power consumption according to any one of the above.
[0017] By means of the power regulation method, device and storage medium for scanning code for power consumption as provided above, the power storage pool and initial settlement power of the user are acquired in response to the user's scanning code settlement instruction; and when it is detected that the initial settlement power meets the preset decimal truncation condition, the initial settlement power is regulated based on the preset storage threshold and the power storage pool to obtain the target settlement power. By detecting whether the initial settlement power meets the decimal truncation condition and the regulation mechanism of the storage threshold and the power storage pool, the accuracy of power settlement is ensured, and the problem of power meter arrears can be effectively solved. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present application exemplary embodiments will be readily understood through reading the detailed description that follows, with reference to the accompanying drawings. In the drawings, several embodiments of the present application are illustrated by way of example and not limitation, in which like reference numerals indicate like or corresponding parts, wherein:
[0019] Figure 1 An exemplary flowchart of the power regulation method for scanning code for power consumption according to some embodiments of the present application is shown;
[0020] Figure 2 An exemplary flowchart of the power regulation method for scanning code for power consumption according to some other embodiments of the present application is shown;
[0021] Figure 3 An exemplary flowchart of the power regulation method for scanning code for power consumption according to some other embodiments of the present application is shown;
[0022] Figure 4 An exemplary flowchart of the power regulation method for scanning code for power consumption according to some other embodiments of the present application is shown;
[0023] Figure 5 An exemplary structural block diagram of the power regulation device 500 for scanning code for power consumption according to embodiments of the present application is shown. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0025] It should be understood that the terms "comprises" and "comprising" used in the specification and claims of the application indicate the presence of the described features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0026] It should also be understood that the terms used in the specification and the claims of the application are merely for the purpose of describing particular embodiments and do not intend to limit the application. As used in the specification and the claims of the application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "and / or" as used in the specification and the claims of the application, mean one or more of the associated listed items as well as all possible combinations of the items and include the items.
[0027] As used in the specification and the claims of the application, the term "if' can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrases "if determined" or "if detected [the described condition or event]" can be interpreted to mean "once determined" or "in response to a determination" or "once detected [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.
[0028] The specific embodiments of the application will be described in detail below with reference to the accompanying drawings.
[0029] Example application scenarios
[0030] Specifically, with the development of the economic society, the demand for "short-time electricity" in residents' life is increasing. To solve the charging needs of people anytime and anywhere, the shared power system emerges as the times require. The existing shared power system mainly sets metering devices such as electric energy meters and electrical modules such as sockets connected with users in the power box, and users can use electricity by scanning the code, thereby realizing shared electricity. For example, in various areas of the city, shared power sites can be set up. These shared power sites can be used to charge electric bicycles, mobile phones, tablets and other devices. For example, if a user wants to use shared power, he or she only needs to open the mobile phone application and scan the two-dimensional code on the shared power box. Through the application, the user can select the socket needed to use and then confirm the charging time.
[0031] In the current settlement strategy of the shared power supply system, generally two rounding methods are included. First, the marketing rounding method is used for amount settlement, but the user's power consumption is based on "rounding up" or "rounding down", which has certain random uncertainty, and thus causes the difference between the sub-code power consumption and the monthly issued power, and this difference may become larger and larger. Second, the upward rounding method is used, but it will cause additional charges for each code power consumption, resulting in the account balance of the meter increasing with the increase of the number of power consumption. For example, active (flat) power: this time 2846.05- last time 2394.79 = 451.26, by rounding, the settlement power of 451 is obtained. Active (peak): this time 1698.35- last time 1498.8 = 198.55, by rounding, the settlement power of 199 is obtained.
[0032] Figure 1 An exemplary flowchart of the power consumption regulation method 100 for code scanning is shown for some embodiments of the application.
[0033] Step S110, in response to the user's code scanning settlement instruction, obtaining the user's power storage pool and initial settlement power;
[0034] The execution subject of the embodiment of the application can be a power consumption regulation device for code scanning, or a power consumption regulation terminal device or server for code scanning. The embodiment takes the power consumption regulation device for code scanning as an example, which can be integrated on a terminal device with data processing function such as power supply box.
[0035] Specifically, the user initiates the code scanning settlement instruction, which can be triggered when using power service, charging equipment or other electric energy related services, and needs to complete payment, settlement of bills or obtain detailed power consumption information. Then, the system can obtain the relevant user information according to the user's code scanning settlement instruction, including the power storage pool and the initial settlement power. The initial settlement power is the settlement power before rounding under this code scanning, and the power storage pool can be the power balance in the user's account or the energy storage in the battery storage system.
[0036] Step S120, when it is detected that the initial settlement power meets the preset decimal truncation condition, the initial settlement power is regulated based on the preset storage threshold and the power storage pool to obtain the target settlement power.
[0037] Specifically, in order to improve the accuracy of settlement and ensure the reasonableness of user bills, the decimal truncation condition can be a judgment on the decimal part of the electricity value, so as to avoid rounding errors of the decimal part of the initial settlement electricity. When it is detected that the initial settlement electricity meets the preset decimal truncation condition, for example, the decimal tail of the decimal part can be truncated, the system can trigger the regulation process of the next electricity step.
[0038] According to whether the electricity in the electricity storage pool meets the storage threshold, the initial settlement electricity can be regulated correspondingly to generate the target settlement electricity, which can be a settlement value processed and adjusted by the system. The target settlement electricity reflects the supplementary adjustment or truncation adjustment of the decimal part to ensure the accuracy of electricity settlement.
[0039] Exemplarily, a plurality of shared power sites are set up in shopping centers, parks, office buildings and communities in cities. Each site has a smart power box, and the outside of the box is provided with a two-dimensional code. Users can use the shared power by scanning the two-dimensional code through a mobile application, and then select the time and electricity to be used. The electric energy metering device in the power box records the initial settlement electricity of the user, and then detects whether the decimal part of the initial settlement electricity belongs to "round up" or "round down"; and then the initial settlement electricity can be regulated based on the detection result, combined with the storage threshold and the electricity storage pool, to obtain the target settlement electricity, which is displayed on the application.
[0040] The application embodiment triggers the system to execute the settlement process by the user issuing the code scanning settlement instruction; the system obtains the electricity storage pool and the initial settlement electricity of the user after responding to the user instruction. These information can involve user accounts, device readings, etc.; the system detects whether the initial settlement electricity meets the preset decimal truncation condition. This can be a condition, for example, the electricity decimal part reaches a certain number of digits; if the initial settlement electricity meets the decimal truncation condition, the system will regulate the electricity; through the electricity regulation, the system obtains the target settlement electricity, which can ensure the accuracy of electricity settlement and can effectively solve the problem of electricity meter arrears.
[0041] Figure 2 An exemplary flowchart of the electricity regulation method 200 for scanning code for electricity is shown, which is another embodiment of the application. It can be understood that the decimal part includes the first decimal and the decimal tail, Figure 2 The method 200 shown is a specific implementation of the foregoing step S120, which regulates the initial settlement electricity based on the preset storage threshold and the electricity storage pool to obtain the target settlement electricity, so the foregoing description of the features can be similarly applied. Figure 2
[0042] Step S210, when it is detected that the initial settlement electricity meets the preset decimal truncation condition, the decimal tail of the initial settlement electricity is determined, and it is detected whether the electricity in the electricity storage pool is greater than the storage threshold;
[0043] The execution subject of the method of the embodiment of the application can be an electricity regulation and control device for scanning code for electricity consumption, or an electricity regulation and control terminal device or server for scanning code for electricity consumption. The embodiment takes the electricity regulation and control device for scanning code for electricity consumption as an example. The electricity regulation and control device for scanning code for electricity consumption can be integrated on a terminal device with a data processing function, such as a shared power supply box, a smart phone, a tablet computer, and the like.
[0044] The embodiment of the application considers that for monthly issued electricity, the rounding method is used, so that the electricity scanned by the user for electricity consumption has random uncertainty, that is, it is difficult to determine whether to round up or round down, thereby causing a difference between the electricity scanned for electricity consumption and the monthly issued electricity. Due to the uncertainty, the difference can be greater.
[0045] Therefore, the embodiment of the application can use the rounding up method for the electricity scanned by the user for electricity consumption, and store the overpaid electricity fee in the electricity storage pool corresponding to the user, so as to prevent the user from being in arrears due to the uncertainty caused by rounding. When the electricity storage pool of the user reaches a certain threshold, the part of the fee overpaid by the user can be subsidized to the settlement electricity corresponding to the electricity scanned by the user for electricity consumption from the electricity storage pool, so as to consume the balance in the electricity storage pool of the user.
[0046] Specifically, the decimal tail can refer to the small decimal in the decimal part of the initial settlement electricity value, for example, the initial settlement electricity includes two decimals 34.25, and the decimal tail is 0.05. For example, the initial settlement electricity includes three decimals 34.256, and the decimal tail can be 0.56 or 0.06. For example, the initial settlement electricity includes four decimals 34.2568, and the decimal tail can be 0.0068.
[0047] Further, the decimal truncation condition includes that the decimal part of the initial settlement electricity is less than or equal to a preset truncation threshold.
[0048] Specifically, before the system performs electricity settlement, it can be detected whether the electricity in the electricity storage pool has accumulated to a certain threshold based on the decimal truncation condition, so as to ensure that the truncation operation is performed only when the decimal part is less than or equal to the preset truncation threshold.
[0049] The truncation threshold can effectively control the precision of the decimal part, avoid excessive truncation of the decimal part, and ensure the accuracy of the settlement. Meanwhile, the setting of the truncation threshold can make the decimal part have a consistent processing manner in different situations, improve the predictability of the system, and balance the accuracy and stability of the power settlement.
[0050] In step S220, if yes, a truncation part of the initial settlement power is determined based on the decimal tail to obtain the target settlement power, and the corresponding power is deducted from the power storage pool according to the truncation part.
[0051] Specifically, the truncation part of the initial settlement power is determined based on the last decimal, that is, all the numbers below the last decimal are truncated to obtain the target settlement power, and the corresponding power is deducted from the power storage pool according to the truncation part, so as to supplement the deducted part.
[0052] In step S230, if no, a supplement part of the initial settlement power is determined based on the decimal tail to obtain the target settlement power, and the corresponding power of the supplement part is stored in the power storage pool.
[0053] Specifically, the supplement part of the initial settlement power is determined based on the last decimal, that is, the last decimal and the values after the last decimal are supplemented to obtain the target settlement power. Meanwhile, the corresponding power of the supplement part is stored in the power storage pool for consumption in the next settlement.
[0054] Further, after step S110, the method further includes:
[0055] In step S240, when it is detected that the initial settlement power does not satisfy the decimal truncation condition, a part of the decimal tail for upward carry is obtained to obtain the supplement part.
[0056] In step S250, the corresponding power of the supplement part is stored in the power storage pool.
[0057] Specifically, referring to Figure 3 , Figure 3 An example flowchart of a power regulation method 300 for scanning code power consumption is shown, which is another embodiment of the present application. In order to avoid the phenomenon of less collection caused by "rounding down" and more collection caused by "rounding up", and in order to have a small error, the platform adopts 1 decimal place (error at decimal point 2, zero point zero) when calculating the power consumption, and presets a power storage pool for each user. Therefore, the first few scanning code power consumption of the user rod can be rounded up to prevent the user from being charged. The storage threshold can be adjusted according to the actual situation, and the present embodiment is not limited in this regard.
[0058] For example, if the storage threshold is set to 0.5, which means that the power meter corresponding to each user will collect 0.5 degrees of electricity through "rounding up", and then multiply the execution electricity price of 0.473 yuan / kWh, then each user can store up to 0.24 yuan. When settling the user's code scanning electricity quantity, if the decimal part of the settlement electricity quantity belongs to "rounding down", it is determined that the electricity quantity value in the user's electricity storage pool is less than the storage threshold, the settlement electricity quantity is rounded up, and the overcharged electricity quantity is stored in the user's electricity storage pool. When the user pool value is greater than the threshold value, and the "rounding down" value is less than the pool value, the corresponding value is deducted from the user pool; if the settlement electricity quantity "rounds up", the overcharged part is stored in the user's electricity storage pool.
[0059] For another example, if the fund pool threshold is set to 0, when the settlement electricity quantity is 34.25, the second decimal uses "rounding up", and the re-calculated settlement electricity fee is 34.3, which overcharges 0.05 and is stored in the user's electricity storage pool. When the settlement electricity quantity is 41.24, the second decimal uses "rounding down", and the re-calculated settlement electricity fee is 41.2, which undercharges 0.04 and is deducted from the fund pool, and the fund pool becomes 0.01.
[0060] For another example, if the decimal part is 0.55, "round up" is 0.6, the supplement part is 0.05, and 0.05 is stored in the electricity storage pool; if the decimal part is 0.44, "round down" is 0.4, the truncated part is 0.04, and 0.04 is deducted from the electricity storage pool.
[0061] Further, in step S220, the truncated part of the initial settlement electricity quantity is determined based on the decimal tail, and the truncated part includes:
[0062] Step A1, extracting the decimal tail to obtain the truncated part; and step A2, deleting the electricity quantity in the initial settlement electricity quantity according to the truncated part to obtain the target settlement electricity quantity.
[0063] Specifically, in the process of rounding, first, the part close to the tail after the decimal point of the initial settlement electricity quantity, i.e. the decimal tail, is extracted, and the integer value of the decimal tail is rounded to obtain the truncated part. According to the integer value obtained by the truncated part, the electricity quantity in the initial settlement electricity quantity is deleted correspondingly, and in the settlement process, the corresponding electricity quantity is deducted from the initial settlement electricity quantity. The final goal of settlement is to obtain new settlement electricity quantity. That is, according to the size of the decimal tail, the settlement electricity quantity is updated, and the result after rounding is accurately reflected.
[0064] Further, in step S230, the supplement part of the initial settlement electricity quantity is determined based on the decimal tail, and the supplement part includes:
[0065] Step B1, up-carrying the decimal tail to obtain the target settlement electric quantity; and step B2, obtaining the supplementary part of the up-carrying of the decimal tail.
[0066] Specifically, the decimal tail can be the second digit after the decimal point, i.e., the second digit of the decimal tail. The up-carrying represents that if the decimal tail is greater than or equal to 5, the first decimal is carried to the integer part. In this way, the target settlement electric quantity is obtained, in which the first decimal is carried to the integer part and the decimal tail becomes 0. The supplementary part refers to the additional electric quantity of the up-carrying, i.e., the value of the decimal tail carried to the integer part. Thus, by carrying according to the size of the decimal tail, the additional electric quantity (supplementary part) is obtained while ensuring that the settlement electric quantity accurately reflects the rounding result.
[0067] The embodiment realizes the rounding effect by taking different processing methods according to the size of the last decimal in the settlement electric quantity, and updates the electric quantity in the electric quantity storage pool according to the processing result, which can more accurately reflect the actual power consumption, helps to avoid settlement errors, improves the accuracy and reliability of electric quantity settlement, and further makes the electricity fee paid by the user more accurate.
[0068] Further, Figure 4 An example flowchart of an electric quantity regulation method 400 for scanning code power consumption is shown, which shows another embodiment of the present application. It can be understood that Figure 4 The method shown is a specific implementation of the creation process of the electric quantity storage pool in the foregoing step S110, and therefore the features described in the foregoing can be similarly applied herein. Figure 1 The features described in the foregoing can be similarly applied herein.
[0069] Step S410, obtaining a pre-created configuration template and personal information of the user;
[0070] Specifically, in creating the electric quantity storage pool corresponding to the user, the personal information of the user can be combined with the configuration template by accessing the pre-created configuration template, and the electric quantity storage pool adapted to the user can be generated.
[0071] By obtaining the personal information of the user, the system can generate the electric quantity storage pool according to the power consumption habits, historical data, etc. of the user, thereby realizing personalized service for each user. This helps to more accurately settle the electricity fee and meets the personalized needs of the user. By using the pre-created configuration template, the system can set the truncation threshold and other parameters according to the rules to ensure a certain accuracy in the electric quantity settlement process, which can effectively standardize the generation of the electric quantity storage pool and reduce errors caused by improper parameter setting.
[0072] Step S420, generating the electric quantity storage pool according to the personal information based on the configuration template.
[0073] Specifically, by using a pre-created configuration template, the system can generate an electricity storage pool according to personal information, which can be used to record the user's electricity consumption and settlement. The electricity storage pool can be updated according to the user's each time of scanning code for electricity, recording the electricity of each time of scanning code for electricity, settlement state and other information.
[0074] Through the generation of the electricity storage pool, the automatic management of electricity settlement can be realized, which helps the system to automatically calculate and settle electricity according to the configuration template, and reduces the work burden of users and operators.
[0075] Exemplarily, the pre-created configuration template containing relevant rules and parameters about electricity settlement can be obtained through system interface or database query and the like. The personal information of the user can include the user's electricity scene, historical electricity record, bill payment method, user identity, electricity habit, historical electricity data and the like.
[0076] The configuration template can include electricity calculation method, settlement period, cutoff threshold and the like, and the system performs corresponding initialization operation according to these rules. The electricity storage pool can be a database table or other data structure, which is used to store the user's electricity information and settlement state.
[0077] Further, the configuration template includes at least one of a user balance record table, a scene configuration table, a user initial settlement electricity table, and a user bill table.
[0078] Specifically, the user balance record table can contain historical balance, electricity scene and frequency and the like, which are used to calculate the balance; the scene configuration table can contain parameter settings of different electricity scenes, which are used to adjust the behavior of the electricity storage pool; the user initial settlement electricity table can contain initial information related to user settlement, which is used to initialize the storage pool; and the user bill table can contain the settled bill information, which is used to generate the balance in the electricity storage pool.
[0079] Exemplarily, the user balance record table (D METER BAL) can include an electricity meter identifier, an electricity meter barcode, an active total balance, a peak segment balance, a peak segment balance, a flat segment balance, a valley segment balance, and an update time; the scene configuration table (SM SCENE CONFIG) can include a user balance threshold field: at least one of an active total power threshold, a peak segment power threshold, a peak segment power threshold, a flat segment power threshold, and a valley segment power threshold; a user settlement power (copy power * multiplier) calculation logic, a power consumption with 1 decimal place reserved, and a subsequent calculation of electricity charges = settlement electricity charges * execution electricity price; the electricity bill table (S CHARGE REC, S CONSUME) can include a deduction power, an electricity price code, and an execution electricity price; the settlement power = meter reading power + deduction power (which can be positive or negative); the electricity price code (PRC CODE) is associated with the electricity price strategy table (S ELEC BLL CFG) by a foreign key; the power calculation can include the end of the electricity bill (electricity consumption details query, electricity monitoring, comprehensive operation and maintenance, and related power consumption), and the electricity information record table (S CHARGE REC) can include READING POWER SUM (P1 / P2 / P3 / P4); save the original meter reading power, and the existing POWER SUM (P1 / P2 / P3 / P4) is used to store the final settlement power after discounting the power, solving the data source problem of report statistics; the user balance query can query the electricity meter balance record information according to the user number and the electricity meter barcode, and display the list.
[0080] Specifically, the exemplary configuration template in the embodiment is as follows:
[0081]
[0082]
[0083]
[0084]
[0085] The embodiment of the application realizes personalized customization on the basis of effectively realizing automatic electricity settlement, real-time monitoring and updating by obtaining user personal information and a pre-created configuration template. Meanwhile, by combining the user's personal information and the configuration template, the system can be given flexibility and configurability, reducing operation cost and improving system maintainability.
[0086] Figure 5 is an exemplary structure block diagram of the device 500 for scanning code power consumption according to the power regulation method, device and storage medium of the embodiment of the application. As shown in Figure 5As shown in the above description, the device 500 of the present application can include a processor 501 and a memory 502, and the processor 501 and the memory 502 communicate with each other through a bus. The memory 502 stores program instructions for the power regulation method, device and storage medium for code scanning, and when the program instructions are executed by the processor 501, the method steps described above in conjunction with the drawings are implemented: in response to the code scanning settlement instruction of the user, the power storage pool and the initial settlement power of the user are obtained; and when it is detected that the initial settlement power meets the preset decimal truncation condition, the initial settlement power is regulated based on the preset storage threshold and the power storage pool to obtain the target settlement power.
[0087] According to the above description in conjunction with the drawings, those skilled in the art can also understand that the embodiments of the present application can also be implemented by software programs. Therefore, the present application also provides a computer readable storage medium. The computer readable storage medium stores computer readable instructions for power regulation of code scanning. The computer readable instructions are executed by one or more processors to implement the method steps of the present application in conjunction with the drawings. Figure 1 The power regulation method for code scanning described above.
[0088] From the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be implemented by software and the necessary general hardware platform, and of course, can also be implemented by hardware. Based on such understanding, the above technical solutions essentially or in the sense of contribution to the prior art can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, server, or network device, etc.) execute the method described in each embodiment or some part of the embodiment.
[0089] It should be noted that although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in that specific order, or that all of the shown operations must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can change the order of execution. Additionally or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps.
[0090] It should be understood that the terms "first", "second", "third", and "fourth" and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. The terms "including", "containing", and / or "comprising", and the like in the description and the claims are used in their open, non-limiting sense. The term "consisting essentially of, as used herein in the specification and in the claims, means including, but not limited to, the recited components.
[0091] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in this specification and the claims, the singular forms "a", "an" and "the" include plural referents unless the content clearly dictates otherwise. It should also be further understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items, as well as the lack of combinations when interpreted in the alternative.
[0092] While several embodiments of the present application have been shown and described herein, it is to be understood that all these embodiments are merely illustrative of, and not restrictive on, the present application. Numerous changes and modifications can be made by those skilled in the art without departing from the true spirit and scope of the present application. It is therefore intended that such changes and modifications be covered by the appended claims.
Claims
1. A power regulation method for barcode scanning, characterized in that, The method includes: In response to the user's QR code payment instruction, the system obtains the user's battery storage pool and initial payment amount; and When the initial settlement amount is detected to meet the preset decimal truncation condition, the initial settlement amount is adjusted based on the preset storage threshold and the amount storage pool to obtain the target settlement amount. The method of adjusting the initial settlement amount based on a preset storage threshold and the energy storage pool to obtain the target settlement amount includes: Determine the decimal portion of the initial calculated electricity amount and check whether the electricity amount in the electricity storage pool is greater than the storage threshold; If so, the truncated portion of the initial settlement electricity is determined based on the decimal part to obtain the target settlement electricity, and the corresponding electricity is deducted from the electricity storage pool according to the truncated portion; If not, then based on the decimal part, determine the supplementary part of the initial settlement electricity to obtain the target settlement electricity, and store the electricity corresponding to the supplementary part into the electricity storage pool.
2. The method as described in claim 1, characterized in that, The step of determining the truncated portion of the initial calculated electricity amount based on the decimal part includes: Extracting the decimal part to obtain the truncated portion; and Based on the truncated portion, the corresponding amount of electricity in the initial settlement amount is deleted to obtain the target settlement amount.
3. The method as described in claim 1, characterized in that, The step of determining the supplementary portion of the initial settlement electricity based on the decimal part includes: The decimal portion is rounded up to obtain the target settlement electricity amount; and Obtain the supplementary portion of the decimal part by carrying over to the next decimal place.
4. The method as described in claim 1, characterized in that, The decimal truncation condition includes that the decimal part of the initial calculated electricity is less than or equal to a preset truncation threshold.
5. The method as described in claim 1, characterized in that, The process of responding to the user's QR code payment instruction, after obtaining the user's battery storage pool and initial payment amount, further includes: When it is detected that the initial calculated electricity amount does not meet the decimal truncation condition, the portion of the decimal part that is carried over is obtained to obtain the supplementary portion; and The amount of electricity corresponding to the supplementary portion is stored in the electricity storage pool.
6. The method as described in claim 1, characterized in that, The process of creating the energy storage pool includes: Obtain the pre-created configuration template and the user's personal information; and Based on the configuration template, the power storage pool is generated according to the personal information.
7. The method as described in claim 6, characterized in that, The configuration template includes at least one of the following: user remaining balance record table, scenario configuration table, user initial settlement electricity table, and user bill table.
8. A terminal device, characterized in that, The terminal device includes a memory, a processor, and a power control program for scanning electricity stored in the memory and executable on the processor. When the power control program for scanning electricity is executed by the processor, it implements the steps of the power control method for scanning electricity as described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a power control program for barcode scanning power consumption, which, when executed by a processor, implements the steps of the power control method for barcode scanning power consumption as described in any one of claims 1-7.
Citation Information
Patent Citations
Electricity calendar data acquisition method and device, computer equipment and storage medium
CN112256779A
Building shared power consumption settlement efficiency evolution optimization method and system
CN117077823A