CN117630443A - Metering mode switching method and device, computer equipment and storage medium - Google Patents

Metering mode switching method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN117630443A
CN117630443A CN202311643023.XA CN202311643023A CN117630443A CN 117630443 A CN117630443 A CN 117630443A CN 202311643023 A CN202311643023 A CN 202311643023A CN 117630443 A CN117630443 A CN 117630443A
Authority
CN
China
Prior art keywords
metering
target
data
scheme
mode
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311643023.XA
Other languages
Chinese (zh)
Inventor
沈亮
宦广东
邬西占
朱丹阳
程席
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Chint Instrument and Meter Co Ltd
Original Assignee
Zhejiang Chint Instrument and Meter Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Chint Instrument and Meter Co Ltd filed Critical Zhejiang Chint Instrument and Meter Co Ltd
Priority to CN202311643023.XA priority Critical patent/CN117630443A/en
Publication of CN117630443A publication Critical patent/CN117630443A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention relates to the technical field of electric energy meters, and discloses a metering mode switching method, a metering mode switching device, computer equipment and a storage medium, wherein the metering mode switching method comprises the following steps: detecting a switching instruction of a metering mode, and obtaining a corresponding command byte by using the switching instruction; acquiring a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects required by the target metering mode; switching a metering mode of the intelligent electric energy meter into a target metering mode, and executing metering operation according to a target metering scheme to obtain target metering data corresponding to a metering object; and updating the target data table by using the target metering data, and generating a settlement bill based on the updated target data table. The invention solves the problems that the metering object and the settlement data can not be adaptively updated according to the switching of the metering mode in the prior art, and solves the problem that the settlement data is lost after the metering object is modified.

Description

Metering mode switching method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of electric energy meters, in particular to a metering mode switching method, a metering mode switching device, computer equipment and a storage medium.
Background
Along with the continuous development of national economy, electric power becomes the most important energy, so as to adapt to the social requirement, ensure that users use electricity safely, reasonably and conveniently, and the use scene of the electric energy meter tends to be diversified. For example, in areas with different economical strength, the electric energy meter needs to adopt two modes of prepayment and postpayment, and at present, the two modes are switched, generally, when the electric energy meter is installed, the electric energy meter is required to support the prepayment mode and the postpayment mode, and then the switching of the metering modes is realized through a remote command, because the electric charge metering mode is selected according to the situation of a user on site.
The electric energy meter is required to have a settlement function, namely, the electric energy meter stores current real-time data into a settlement bill according to a metering object at a specified time point. Because the settlement objects of the prepayment mode and the postpayment mode are different, the metering objects are required to be modified when the metering mode is modified, but the related metering objects are more, the communication effect of the electric energy meter is not ideal, the remote modification of the metering objects is difficult to realize, and the condition that the new bill and the old bill are inconsistent in length and the bill data are easy to be lost after the metering objects are modified occurs.
Disclosure of Invention
In view of the above, the embodiments of the present invention provide a method, an apparatus, a computer device, and a storage medium for switching metering modes, so as to solve the problems that in the prior art, metering objects and settlement data cannot be adaptively updated according to switching of metering modes, and the settlement data is missing after the metering objects are modified.
In a first aspect, an embodiment of the present invention provides a method for switching metering modes, where the method includes:
detecting a switching instruction of a metering mode, and obtaining a corresponding command byte by using the switching instruction;
acquiring a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects required by the target metering mode;
switching a metering mode of the intelligent electric energy meter into a target metering mode, and executing metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object;
and updating the target data table by utilizing the target metering data, and generating a settlement bill based on the updated target data table.
In an alternative embodiment of the present application, the obtaining the target metering pattern matching the command byte and the target metering scheme associated with the target metering pattern includes:
decomposing the command byte to obtain a first character segment and a second character segment;
and determining a target metering mode by using the first character segment, and matching a corresponding target metering scheme from a plurality of metering schemes by using the second character segment.
In an optional embodiment of the present application, the matching, using the second character segment, a corresponding target metering scheme from a plurality of metering schemes includes:
acquiring a plurality of preset command characters and a preset metering scheme corresponding to each preset command character;
and determining a preset command character hit by the second character segment from a plurality of preset command characters, and taking a preset metering scheme corresponding to the preset command character hit by the second character segment as a target metering scheme.
In an optional embodiment of the present application, the executing the metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object includes:
triggering a data acquisition instruction based on the target metering scheme;
constructing a data reading task according to the data acquisition instruction and the metering object in the target metering scheme;
and executing a data reading task to obtain corresponding target metering data.
In an optional embodiment of the present application, the updating the target data table with the target metering data and generating the settlement bill based on the updated target data table includes:
obtaining a pre-configured target data table, wherein the target data table comprises metering objects corresponding to the target metering scheme;
writing the target metering data into a storage area corresponding to the metering object to finish updating the target data table, wherein the storage area is positioned in the target data table;
and generating a settlement bill based on the updated target data table.
In an optional embodiment of the present application, the obtaining a pre-configured target data table includes:
acquiring historical bill data of the target data table;
copying historical bill data to a preset cache space, and emptying the target data table;
and loading the metering object of the target metering scheme to the emptied target data table.
In an optional embodiment of the present application, the method further comprises:
receiving a bill reading instruction, and acquiring a communication address of a target client according to the reading instruction;
determining whether the target client side has bill reading authority according to the communication address;
if the target client holds the bill reading permission, responding to the bill reading instruction, and sending the historical bill data stored in the preset cache space to the target client.
In a second aspect, an embodiment of the present invention provides a switching device for metering modes, where the device includes:
the detection module is used for detecting a switching instruction of the metering mode and obtaining a corresponding command byte by utilizing the switching instruction;
the matching module is used for acquiring a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects required by the target metering mode;
the execution module is used for switching the metering mode of the intelligent electric energy meter into a target metering mode, and executing metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object;
and the updating module is used for updating the target data table by utilizing the target metering data and generating a settlement bill based on the updated target data table.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including: the device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the metering mode switching method of the first aspect or any corresponding embodiment of the first aspect is executed.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to execute the method for switching metering modes according to the first aspect or any one of the embodiments corresponding thereto.
The method provided by the embodiment of the application has the following beneficial effects:
the method provided by the embodiment of the application obtains the corresponding command byte by detecting the switching instruction of the metering mode and utilizing the switching instruction; the method and the device realize the analysis of the switching instruction, obtain the sign command byte used for representing the target metering mode and the target metering scheme, and provide a basis for determining the target metering mode and the target metering scheme related to the target metering mode.
The method provided by the embodiment of the application further comprises the step of obtaining a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects needed by the target metering mode. The method and the device realize the respective correspondence of the target metering mode and the target metering scheme, and provide support for matching the subsequent character segments with preset command characters. The metering objects are switched locally, and the problem that the metering objects cannot be switched due to too many metering objects and poor communication effect in the remote transmission process of the metering objects is avoided.
According to the method provided by the embodiment of the application, the metering mode of the intelligent electric energy meter is switched to be the target metering mode, and metering operation is executed according to the target metering scheme, so that target metering data corresponding to the metering object is obtained. The process of detecting target metering data according to the metering objects in the target metering scheme is realized, data support is provided for generating a settlement bill later, and corresponding input information is provided for a target data table.
The method provided by the embodiment of the application further utilizes the target metering data to update the target data table, and generates a settlement bill based on the updated target data table. The method has the advantages that the pre-configuration process of the target data table is realized, redundancy of bill data is avoided, the problem of bill data missing caused by inconsistent lengths of new and old bills is avoided, the formation of a settlement bill corresponding to the target metering mode is ensured, the acquisition of the settlement bill by the master station system is facilitated, and the calculation of the cost or the analysis of the data by using the settlement bill is facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method of switching metering modes according to some embodiments of the invention;
FIG. 2 is a flow chart of another metering mode switching method according to some embodiments of the invention;
FIG. 3 is a block diagram of a switching device of metering modes according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
According to embodiments of the present invention, there are provided a method, apparatus, computer device and storage medium for switching metering modes, it being noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order different from that herein.
In this embodiment, a method for switching metering modes is provided, and fig. 1 is a flowchart of a method for switching metering modes according to an embodiment of the present invention, as shown in fig. 1, where the flowchart includes the following steps:
step S11, detecting a switching instruction of the metering mode, and obtaining a corresponding command byte by using the switching instruction.
In this embodiment of the present application, the metering mode may be a prepaid mode or a postpaid mode, which represents two metering modes adopted by the current intelligent electric energy meter, and the switching instruction may be sent by the master station through a function key or other input devices, and may be sent to the intelligent electric energy meter through various data transmission modes. The intelligent electric energy meter detects whether a switching instruction of a metering mode is received or not at all, and once the switching instruction of the metering mode is received, the switching instruction is analyzed immediately to obtain a corresponding command byte. The switching instruction contains a command byte necessary in the mode switching process, wherein the command byte is an 8-bit binary string, and can be used for representing a target metering mode to be switched into and a target metering scheme associated with the target metering mode.
It should be noted that, the intelligent electric energy meter is an intelligent terminal of the intelligent power grid, and besides having the metering function of the basic electric energy consumption of the traditional electric energy meter, the intelligent electric energy meter for adapting to the use of the intelligent power grid and new energy can also have the intelligent functions of bidirectional multi-rate metering function, user side reading function, bidirectional data communication function of various data transmission modes and the like. The prepayment mode of the electric energy meter refers to that corresponding usable electric quantity values are obtained through paying electricity purchase firstly, and then electricity is used; the post-payment mode of the electric energy meter refers to that enough electric quantity is paid in a preset time period to ensure power supply, the electric quantity is counted after the preset time period is finished, and the corresponding electric charge is settled according to the electric quantity value in the time period.
According to the method provided by the embodiment of the application, the switching instruction of the metering mode is detected, the corresponding command byte is obtained by utilizing the switching instruction, the analysis of the switching instruction is realized, the marking command byte used for representing the target metering mode and the target metering scheme is obtained, and a foundation is provided for determining the target metering mode and the target metering scheme related to the target metering mode.
Step S12, a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode are obtained, wherein the target metering scheme comprises metering objects needed by the target metering mode.
In this embodiment, as shown in fig. 2, the command byte is decomposed to obtain a first character segment and a second character segment, and the target metering mode can be directly determined by using the first character segment. In addition, a plurality of preset command characters and a preset metering scheme corresponding to each preset command character are obtained, then the preset command characters hit by the second character segment are determined from the plurality of preset command characters, and the preset metering scheme corresponding to the preset command characters hit by the second character segment is taken as a target metering scheme.
In the embodiment of the application, the target metering mode matched with the command byte and the target metering scheme associated with the target metering mode are obtained, and the method comprises the following steps of A1-A2:
and A1, decomposing the command byte to obtain a first character segment and a second character segment.
In this embodiment of the present application, by analyzing the switching instruction of the metering mode, a command byte corresponding to the switching instruction may be obtained, the command byte is decomposed into a high 4-bit character segment and a low 4-bit character segment, and the high 4-bit character segment and the low 4-bit character segment are respectively used as the first character segment and the second character segment, for example, if the command byte is "00000001", the command byte is divided into the high 4-bit character segment "0000" and the low 4-bit character segment "0001".
And A2, determining a target metering mode by using the first character segment, and matching a corresponding target metering scheme from a plurality of metering schemes by using the second character segment.
In the embodiment of the present application, the first character segment is used to indicate a target metering mode to be switched, where the metering mode may include: prepaid mode and postpaid mode, while the first character segment includes two cases: "0000" and "0001", specifically, "0000" character segment corresponds to prepaid mode switching command; the "0001" character segment corresponds to a post-paid mode switch command. The second character segment includes 15 cases of "0000-1111" character segments, each of which can match a corresponding metering scheme, each metering scheme including a plurality of metering objects. Metering objects in prepaid mode may include: the current residual capacity, the current residual amount, the recharging of the current month, the current month management, the current ladder capacity, the current screenshot capacity, the current residual electricity charge and the like; the metering object in post-pay mode may include: the current month cumulatively consumes the total electric quantity, the current month cumulatively consumes the electric quantity of the charge rate 1, the current cumulatively consumes the electric quantity of the charge rate 2, and the like.
In this embodiment of the present application, the matching of the corresponding target metering scheme from the multiple metering schemes by using the second character segment specifically includes the following steps: acquiring a plurality of preset command characters and a preset metering scheme corresponding to each preset command character; and determining a preset command character hit by the second character segment from a plurality of preset command characters, and taking a preset metering scheme corresponding to the preset command character hit by the second character segment as a target metering scheme.
In this embodiment of the present application, a plurality of preset command characters and a preset metering scheme corresponding to each preset command character are obtained, the preset command characters may be any one of "0000-1111" command characters, the second command characters are matched with the 15 preset command characters, and the preset metering scheme corresponding to the hit command characters is used as the target metering scheme. The corresponding situation of the preset command character and the metering scheme is shown in the following table:
TABLE 1 relationship between characters and metering schemes
According to the method provided by the embodiment of the application, the command byte is decomposed to obtain the first character segment and the second character segment, and the target metering mode can be directly determined by utilizing the first character segment. The method has the advantages that the respective correspondence of the target metering mode and the target metering scheme is realized, and support is provided for matching the subsequent character segments with preset command characters; acquiring a plurality of preset command characters and a preset metering scheme corresponding to each preset command character; and determining a preset command character hit by the second character segment from a plurality of preset command characters, and taking a preset metering scheme corresponding to the preset command character hit by the second character segment as a target metering scheme. The matching process realizes the determination of the target metering scheme, and the metering objects preset in the target metering scheme can be realized in the settlement process through the process, so that the switching of the metering objects is finished only locally, and the problem that the metering objects cannot be switched due to too many metering objects and poor communication effect in the remote transmission process of the metering objects is avoided.
And S13, switching the metering mode of the intelligent electric energy meter to be a target metering mode, and executing metering operation according to a target metering scheme to obtain target metering data corresponding to the metering object.
In the embodiment of the application, switching of the metering mode of the intelligent electric energy meter is completed according to the target metering mode corresponding to the first command character, then a data acquisition instruction is triggered based on the target metering scheme, a data reading task is constructed according to the data acquisition instruction and the metering object in the target metering scheme, and then the data reading task is executed to obtain corresponding target metering data.
In the embodiment of the application, the metering operation is executed according to the target metering scheme to obtain the target metering data corresponding to the metering object, which comprises the following steps of B1-B3:
and step B1, triggering a data acquisition instruction based on a target metering scheme.
In the embodiment of the application, the data acquisition instruction is triggered based on the target metering scheme, that is, the data acquisition instruction is constructed through a plurality of metering objects in the target metering scheme, for example, if metering objects such as the current residual capacity and the current residual amount exist in the target metering scheme, the data acquisition instruction for the residual capacity and the residual amount is constructed according to the metering objects, the data acquisition instruction is sent to a measuring unit corresponding to the intelligent electric energy meter, and the residual capacity data and the residual amount data are acquired in real time.
It should be noted that, the intelligent electric energy meter generally includes a plurality of units, such as a measurement unit, a communication unit, a processing unit, etc., and has main functions of data processing, data real-time acquisition, automatic control, information communication, etc. The measuring unit can comprise an electric energy metering device which is mainly used for recording and measuring the output quantity, the power supply quantity and the electric energy loss condition of electric energy, and the common electric energy metering device comprises an active or reactive electric energy meter, a metering transformer, a maximum demand meter, a multi-rate electric energy meter and the like.
And step B2, constructing a data reading task according to the data acquisition instruction and the metering object in the target metering scheme.
In this embodiment of the present application, a data reading task is constructed according to a data acquisition instruction and a metering object in a target metering scheme, where the reading task includes a command byte and a plurality of metering object related data to be acquired, and a reading task generating process may include: reading and analyzing the reading task configuration file, wherein the reading task configuration file comprises a data acquisition instruction and a target metering scheme, and generating a corresponding reading task according to the configuration file.
And step B3, executing a data reading task to obtain corresponding target metering data.
In the embodiment of the application, the current reading time is detected, and when the reading time reaches the preset reading time, the reading task can be combined with each meter of the acquisition unit to generate a plurality of reading task examples, wherein the reading task examples comprise data information such as numbers, data items, starting time, expiration time, states, priorities and the like. In addition, the reading task instance can be stored in a corresponding preset database so as to facilitate later access and acquisition of the historical reading task. Corresponding data items can be obtained according to the reading task instance, and the data items are counted and aggregated into target metering data.
According to the method provided by the embodiment of the application, switching of the metering mode of the intelligent electric energy meter is achieved through the corresponding condition of the first command character and the target metering mode, then the data acquisition instruction is triggered based on the target metering scheme, a data reading task is built according to the data acquisition instruction and the metering object in the target metering scheme, and then the data reading task is executed, so that corresponding target metering data is obtained. The process realizes the process of detecting target metering data according to metering objects in a target metering scheme, provides data support for generating a settlement bill later, and provides corresponding input information for a target data table.
And step S14, updating the target data table by utilizing the target metering data, and generating a settlement bill based on the updated target data table.
In the embodiment of the application, updating the target data table is mainly performed by acquiring a target data table which is pre-configured, wherein the target data table comprises a metering object corresponding to a target metering scheme, and then writing target metering data into a storage area corresponding to the metering object, so as to complete updating of the target data table, and the storage area is located in the target data table. And finally, generating a corresponding settlement bill based on the updated target data table.
In the embodiment of the application, the target data table is updated by using the target metering data, and a settlement bill is generated based on the updated target data table, which comprises the following steps C1-C3:
and step C1, acquiring a pre-configured target data table, wherein the target data table comprises metering objects corresponding to a target metering scheme.
In the embodiment of the application, the method for acquiring the pre-configured target data table comprises the following steps: acquiring historical bill data of a target data table; copying historical bill data to a preset cache space, and emptying a target data table; and loading the metering object of the target metering scheme into the emptied target data table.
In the embodiment of the present application, the specific process of obtaining the pre-configured target data table may include: firstly, in response to an access request to a target data table, under the condition that a preset cache space does not store the historical bill data, copying the historical bill data in the target data table to the preset cache space, determining N bill data stored in the preset cache space, determining the priority of each bill data according to the storage time of each bill data and the access times of the bill data in the preset cache space, inserting the historical bill data into a bill data list according to the corresponding priority, secondly, clearing all data information and metering objects in the target data table, and loading the metering objects corresponding to a target metering scheme into the cleared target data table, wherein each metering object in the target data table has a storage area for storing the corresponding metering data.
And step C2, writing the target metering data into a storage area corresponding to the metering object to finish updating the target data table, wherein the storage area is positioned in the target data table.
In this embodiment of the present application, the target metering data is classified according to the metering objects, and written into a storage area corresponding to the metering objects in the target data table, for example, if the metering objects stored in the current target data table are: the current residual quantity, the current residual amount and the recharging of the current month are respectively as follows: writing 20 degrees into a storage area corresponding to the current residual electric quantity when the current residual electric quantity is 20 degrees and the current residual electric quantity is 11.8 yuan and the charging value in the current month is 100 yuan; writing 11.8 elements into a storage area corresponding to the current residual amount; and writing 100 elements into a storage area corresponding to the recharging of the current month, and finishing updating the target data table after the target metering data writing is finished.
And step C3, generating a settlement bill based on the updated target data table.
In this embodiment of the present application, a corresponding settlement bill may be generated based on the updated target data table, and the metering object in the target data table and the target metering data under the metering object are taken as the settlement bill in the current time period, where the current time period may be one month, one quarter or one year.
In an embodiment of the present application, the method further comprises the following steps: receiving a bill reading instruction, and acquiring a communication address of a target client according to the reading instruction; determining whether the target client side has bill reading authority according to the communication address; if the target client holds the bill reading permission, responding to the bill reading instruction, and sending the historical bill data stored in the preset cache space to the target client.
In this embodiment of the present application, a reading instruction of a target client for a history bill is received, where the reading instruction carries a communication address of the target client, and determining whether the target client has a bill reading authority according to the communication address carried by the reading instruction may include: and acquiring a plurality of preset communication addresses with bill reading permission in a preset storage space, matching the communication address of the target client with the plurality of preset communication addresses, if the communication address of the target client hits a certain preset communication address, indicating that the target client has the bill reading permission, responding to the bill reading instruction, and sending the historical bill data stored in the preset cache space to the target client.
In this embodiment of the present application, if the communication address of the target client does not hit the preset communication address, it indicates that the target client does not hold the bill reading permission, or may send an acquisition request of the reading permission, if the returned request result is that the acquisition request is granted, and the bill reading permission of the target client is granted, updating the preset communication address is completed, so as to implement reading of the history bill by the target client.
According to the method provided by the embodiment of the application, firstly, the historical bill data of the target data table is obtained, then the historical bill data is copied to the preset buffer space, the target data table is emptied, and the metering object of the target metering scheme is loaded to the emptied target data table. The process realizes the pre-configuration process of the target data table, avoids the redundancy of bill data, and avoids the problem of bill data missing caused by inconsistent lengths of new and old bills. And secondly, writing the target metering data into a storage area corresponding to the metering object, wherein the storage area is positioned in the target data table. The process completes the updating of the target data table, and ensures the formation of a settlement bill corresponding to the target metering mode. And finally, generating a settlement bill based on the updated target data table. The generation of the settlement bill is realized, the acquisition of the settlement bill by the master station system is facilitated, and the calculation of the cost or the analysis of the data are carried out by using the settlement bill.
In this embodiment, a device for switching a metering mode is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a switching device for metering modes, as shown in fig. 3, including:
the detection module 31 is configured to detect a switching instruction of the metering mode, and obtain a corresponding command byte by using the switching instruction;
a matching module 32, configured to obtain a target metering pattern matched with the command byte and a target metering scheme associated with the target metering pattern, where the target metering scheme includes a metering object required by the target metering pattern;
the execution module 33 is configured to switch the metering mode of the intelligent electric energy meter to a target metering mode, and execute metering operation according to a target metering scheme to obtain target metering data corresponding to a metering object;
the updating module 34 is configured to update the target data table with the target metering data, and generate a settlement bill based on the updated target data table.
In an alternative embodiment of the present application, the apparatus further comprises: the storage module is used for receiving the bill reading instruction and acquiring the communication address of the target client according to the reading instruction; determining whether the target client side has bill reading authority according to the communication address; if the target client holds the bill reading permission, responding to the bill reading instruction, and sending the historical bill data stored in the preset cache space to the target client.
In an alternative embodiment of the present application, the matching module 32 is configured to decompose the command byte to obtain a first character segment and a second character segment; and determining a target metering mode by using the first character segment, and matching a corresponding target metering scheme from the plurality of metering schemes by using the second character segment.
In an optional embodiment of the present application, the matching module 32 is configured to obtain a plurality of preset command characters and a preset metering scheme corresponding to each preset command character; and determining a preset command character hit by the second character segment from a plurality of preset command characters, and taking a preset metering scheme corresponding to the preset command character hit by the second character segment as a target metering scheme.
In an alternative embodiment of the present application, the execution module 33 is configured to trigger the data acquisition instruction based on the target metering scheme; constructing a data reading task according to the data acquisition instruction and the metering object in the target metering scheme; and executing a data reading task to obtain corresponding target metering data.
In an optional embodiment of the present application, the updating module 34 is configured to obtain a pre-configured target data table, where the target data table includes a metering object corresponding to a target metering scheme; writing target metering data into a storage area corresponding to the metering object to finish updating the target data table, wherein the storage area is positioned in the target data table; and generating a settlement bill based on the updated target data table.
In an alternative embodiment of the present application, the update module 34 obtains historical billing data for the target data table; copying historical bill data to a preset cache space, and emptying a target data table; and loading the metering object of the target metering scheme into the emptied target data table.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 4, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system).
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform a method for implementing the embodiments described above.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. A method for switching metering modes, wherein the method is applied to an intelligent electric energy meter, the method comprising:
detecting a switching instruction of a metering mode, and obtaining a corresponding command byte by using the switching instruction;
acquiring a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects required by the target metering mode;
switching a metering mode of the intelligent electric energy meter into a target metering mode, and executing metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object;
and updating the target data table by utilizing the target metering data, and generating a settlement bill based on the updated target data table.
2. The method of claim 1, wherein the obtaining the target metering pattern that matches the command byte and the target metering scheme associated with the target metering pattern comprises:
decomposing the command byte to obtain a first character segment and a second character segment;
and determining a target metering mode by using the first character segment, and matching a corresponding target metering scheme from a plurality of metering schemes by using the second character segment.
3. The method of claim 2, wherein matching the corresponding target metering scheme from the plurality of metering schemes using the second character segment comprises:
acquiring a plurality of preset command characters and a preset metering scheme corresponding to each preset command character;
and determining a preset command character hit by the second character segment from a plurality of preset command characters, and taking a preset metering scheme corresponding to the preset command character hit by the second character segment as a target metering scheme.
4. The method according to claim 1, wherein the performing the metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object includes:
triggering a data acquisition instruction based on the target metering scheme;
constructing a data reading task according to the data acquisition instruction and the metering object in the target metering scheme;
and executing a data reading task to obtain corresponding target metering data.
5. The method of claim 1, wherein updating the target data table with the target metering data and generating a settlement bill based on the updated target data table comprises:
obtaining a pre-configured target data table, wherein the target data table comprises metering objects corresponding to the target metering scheme;
writing the target metering data into a storage area corresponding to the metering object to finish updating the target data table, wherein the storage area is positioned in the target data table;
and generating a settlement bill based on the updated target data table.
6. The method of claim 5, wherein the obtaining a pre-configured target data table comprises:
acquiring historical bill data of the target data table;
copying historical bill data to a preset cache space, and emptying the target data table;
and loading the metering object of the target metering scheme to the emptied target data table.
7. The method according to claim 1, wherein the method further comprises:
receiving a bill reading instruction, and acquiring a communication address of a target client according to the reading instruction;
determining whether the target client side has bill reading authority according to the communication address;
if the target client holds the bill reading permission, responding to the bill reading instruction, and sending the historical bill data stored in the preset cache space to the target client.
8. A metering mode switching device, the device comprising:
the detection module is used for detecting a switching instruction of the metering mode and obtaining a corresponding command byte by utilizing the switching instruction;
the matching module is used for acquiring a target metering mode matched with the command byte and a target metering scheme associated with the target metering mode, wherein the target metering scheme comprises metering objects required by the target metering mode;
the execution module is used for switching the metering mode of the intelligent electric energy meter into a target metering mode, and executing metering operation according to the target metering scheme to obtain target metering data corresponding to the metering object;
and the updating module is used for updating the target data table by utilizing the target metering data and generating a settlement bill based on the updated target data table.
9. A computer device, comprising:
a memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, cause the processor to perform the method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1 to 7.
CN202311643023.XA 2023-12-01 2023-12-01 Metering mode switching method and device, computer equipment and storage medium Pending CN117630443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311643023.XA CN117630443A (en) 2023-12-01 2023-12-01 Metering mode switching method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311643023.XA CN117630443A (en) 2023-12-01 2023-12-01 Metering mode switching method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117630443A true CN117630443A (en) 2024-03-01

Family

ID=90028410

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311643023.XA Pending CN117630443A (en) 2023-12-01 2023-12-01 Metering mode switching method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117630443A (en)

Similar Documents

Publication Publication Date Title
CN110949173A (en) Charging method and device
CN110490585A (en) Two dimensional code charging method, device, multi-connected machine household cost allocation equipment and storage medium
CN117630443A (en) Metering mode switching method and device, computer equipment and storage medium
CN112965919B (en) Electric energy meter data minute freezing method, storage medium and equipment
CN110348983A (en) Transaction Information management method and device, electronic equipment and non-transient storage media
CN110969493A (en) Bill amount determining method and device, electronic equipment and storage medium
CN104715421A (en) Method and device for processing electric charge data
CN116993467B (en) Leasing account generation method, leasing account generation system, computer equipment and medium
CN111222926A (en) Invoicing method and device
CN111144961A (en) Billing method and device based on cloud billing equipment
CN110300000A (en) Charging mode variation, device, electronic equipment and readable storage medium storing program for executing
EP4250214A1 (en) Systems and methods of determining data of energy utilities
CN117196543B (en) Multi-purpose ammeter recharging management method and system based on fund pool
JP2020520029A5 (en)
EP4250216A1 (en) Systems and methods of utility data triangulation to verify data accuracy
CN210691468U (en) Remote prepayment smart electric meter
CN107945398A (en) Charging accounting method and system
CN116757760B (en) Method, system, terminal and storage medium for checking electric charge of business user
CN115309342A (en) Data storage method and device and electric energy meter
CN112686689A (en) Intelligent charging system
CN105873005A (en) Traffic processing method and application server
CN117831202A (en) Method, system, device and medium for realizing postpaid collection of energy supply service
CN116664121A (en) Mobile payment processing method for charging pile
CN117372106A (en) Method, device and storage medium for determining electric quantity cost
CN115511617A (en) Data processing method and device, computer equipment and computer readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination