Display control method, device and equipment of electric energy meter
By receiving multiple display requests, selecting the target display task according to priority, querying the matching display configuration record using the preset display configuration information set, and obtaining and refreshing the original protocol data to the display screen, the problem of the single display mode of the energy meter is solved, and the effect of personalized and diversified display and good scalability is achieved.
Patent Information
- Application Number
- CN202611300547.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-06
AI Technical Summary
Existing electricity meters have a single display method, which cannot achieve personalized and diversified display, and traditional display methods cannot be expanded.
By receiving multiple display requests, the target display task is selected according to priority, and the matching target display configuration record is queried using a preset set of display configuration information. The original protocol data is then obtained and refreshed to the display screen.
It enables personalized and diversified displays for electricity meters, ensures that key information is displayed first, has concise and universal code, good scalability, and solves the problem of limited display methods.
Smart Images

Figure CN123048092A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electricity meter technology, and more specifically, to a display control method, device, and equipment for an electricity meter. Background Technology
[0002] Currently, with the development of smart grids, the requirements for electricity meter displays are becoming increasingly stringent. Traditional display methods for electricity meters can no longer meet the needs of new business development, so it is necessary to improve the display methods.
[0003] In existing technologies, traditional electricity meters use segment LCD displays with fixed content and fixed display positions. When content needs to be displayed, the corresponding segment display unit can be turned on or off by controlling it.
[0004] However, in the existing technology, due to the fixed display content and display position, it is not easy to expand the display and cannot provide personalized and diversified display, so the display mode of the electricity meter is relatively simple. Summary of the Invention
[0005] The purpose of this application is to provide a display control method, device, and equipment for electricity meters to solve the above-mentioned problems existing in the prior art and to realize personalized and diversified display of electricity meters.
[0006] Firstly, a display control method for an electricity meter is provided, which may include: Receive display requests from at least one trigger source; If it is determined that multiple display requests exist at the same time, then a target display task is selected according to the preset priority corresponding to each display request; Based on the data identifiers included in the target display task, a matching target display configuration record is queried from a preset set of display configuration information; based on the target display configuration record, the original protocol data is obtained; The original protocol data is refreshed and displayed on the display screen of the electricity meter.
[0007] Secondly, a display control device for an electricity meter is provided, the device including: A receiving module is used to receive display requests from at least one triggering source; The selection module is used to select a target display task according to the preset priority corresponding to each display request if it is determined that multiple display requests exist at the same time. The query module is used to query a matching target display configuration record in a preset display configuration information set based on the data identifier carried by the target display task; and to obtain the original protocol data based on the target display configuration record. The display module is used to refresh the original protocol data to the display screen of the electricity meter for display.
[0008] Thirdly, an electricity meter is provided, which includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; When a processor executes a program stored in memory, it implements any of the steps described in the first aspect above.
[0009] Fourthly, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when executed by a processor, the computer program implements the steps of any of the methods described in the first aspect above.
[0010] This application provides a display control method, apparatus, and device for an electricity meter, which receives display requests from at least one trigger source. If multiple display requests exist simultaneously, a target display task is selected based on the preset priority of each request. According to the data identifier included in the target display task, a matching target display configuration record is queried from a preset display configuration information set. Based on the target display configuration record, the original protocol data is obtained. The original protocol data is then refreshed onto the electricity meter's display screen for display. Compared to the existing technology where traditional segment LCD displays for electricity meters do not require interstitial display, this application, through priority, can handle multiple display tasks (such as rotating displays and interstitial displays), ensuring that key information is displayed first. Compared to the existing technology where traditional electricity meters rely on directly searching for data from set display objects and then writing a processing function for each object, resulting in numerous and complex functions, this application, through a preset display configuration information set and target display configuration record, can find and accurately display the required data within the same type of data. The code is concise, universal, and highly scalable, solving the technical problem of the relatively limited display methods of electricity meters. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a display control method for an electricity meter provided in an embodiment of this application; Figure 2A flowchart illustrating another display control method for an electricity meter provided in an embodiment of this application; Figure 3 A flowchart illustrating another display control method for an electricity meter provided in an embodiment of this application; Figure 4 A flowchart of a display scheduling algorithm provided in an embodiment of this application; Figure 5 A schematic diagram of the structure of a display control device for an electricity meter provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electricity meter provided in an embodiment of this application. Detailed Implementation
[0013] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. Unless otherwise defined, the technical or scientific terms used in this application should have the ordinary meaning understood by those skilled in the art. The words "first," "second," and similar terms used in this application do not indicate any order, quantity, or importance, but are only used to distinguish different components. The words "comprising" or "including," etc., mean that the element or object preceding the word covers the element or object listed after the word and its equivalents, but do not exclude other elements or objects. The words "connected," "coupled," or "connected," etc., are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up," "down," "left," "right," etc., are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0014] The display control method for electricity meters provided in this application embodiment can be applied to electricity meters, terminal devices, display control devices or equipment for electricity meters, or other devices or equipment capable of executing this embodiment, and there are no limitations on this application. In this embodiment, the electricity meter is used as the executing subject for description.
[0015] The terminal can be a user equipment (UE) such as a mobile phone, smartphone, laptop computer, digital broadcast receiver, personal digital assistant (PDA), or tablet computer (PAD), handheld device, in-vehicle device, wearable device, computing device, or other processing device connected to a wireless modem, mobile station (MS), or mobile terminal. This terminal has the ability to communicate with one or more core networks via a radio access network (RAN).
[0016] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0017] Figure 1 This is a flowchart illustrating a display control method for an electricity meter provided in an embodiment of this application. Figure 1 As shown, this method is applied to electricity meters; it may include: Step S101: Receive a display request from at least one trigger source.
[0018] For example, the triggering source includes any one or more of the following: periodic display triggered by a timer, user operation triggered by a physical button, connection event triggered by the Bluetooth protocol stack, and remote command triggered by the communication interface; the display request includes interstitial display task request and / or display rotation task request.
[0019] In this step, the default display mode of the electricity meter is the screen-off rotating display mode. After power-on, the electricity meter receives a display request from at least one trigger source; the display request contains at least the data identifier corresponding to the data to be displayed. For example, the display request includes receiving a screen insertion display task request and a rotating display task request. The screen-off rotating display mode refers to the normal display state of the electricity meter when there is no special operation: the screen is lit, and the page list automatically cycles through pages at preset time intervals. It can be interrupted by any high-priority task and automatically resumes after the interruption. The display task corresponding to the rotating display task request is the screen-off rotating display task, which is a resident task in the priority queue and is used to enter the screen-off rotating display mode.
[0020] Step S102: If it is determined that there are multiple display requests at the same time, then select the target display task according to the preset priority corresponding to each display request.
[0021] For example, if the electricity meter determines that it has received multiple display requests at the same time, it compares the preset priorities of each display request and selects the display request with the highest priority as the target display task to be executed. During the task execution, if a higher priority display request appears, the current display task is paused, the state context of the current display task is saved, and the higher priority display task is executed.
[0022] Step S103: Based on the data identifiers included in the target display task, query the matching target display configuration record in the preset display configuration information set, and obtain the original protocol data based on the target display configuration record.
[0023] For example, the electricity meter pre-stores a set of display configuration information, which contains multiple display configuration records. Each display configuration record contains at least a data source identifier. Based on the data identifier included in the target display task, the electricity meter queries the preset set of display configuration information for a matching target display configuration record. After finding the target display configuration record, the electricity meter determines the storage address of the data corresponding to that data identifier in the electricity meter's storage area based on the data source identifier in the target display configuration record, and reads the original protocol data from the storage address.
[0024] Step S104: Refresh the original protocol data to the display screen of the electricity meter for display.
[0025] For example, the electricity meter converts the read raw protocol data into model data for display on the meter's display screen according to the display attributes in the target display configuration record. Each pixel data point in the model data is sequentially written to the corresponding area in a preset display buffer, and the written content of the display buffer is refreshed to the display screen for display. The display screen can be any of the following: LCD screen, OLED screen, and e-ink screen, etc., with no limitation on the type of display screen. For example, the display screen is a dot-matrix LCD screen, and the model data is the dot-matrix LCD pixel model data.
[0026] The method provided in this application embodiment receives display requests from at least one trigger source. If it is determined that multiple display requests exist at the same time, a target display task is selected according to the preset priority corresponding to each display request. Based on the data identifier included in the target display task, a matching target display configuration record is queried in a preset display configuration information set, and the original protocol data is obtained based on the target display configuration record. The original protocol data is then refreshed to the display screen of the energy meter for display. In this solution, compared with the traditional segment code LCD display of the energy meter in the prior art which does not have the requirement for interstitial display, this application can handle multiple display tasks (such as rotary display and interstitial display) through priority, ensuring that key information is displayed first. Compared with the traditional energy meter in the prior art which relies on directly searching for data by setting display objects and then writing a processing function for each object, resulting in numerous functions and complex processing, this application can find the required data in the same type of data and display it accurately through the preset display configuration information set and target display configuration record. The code is concise, universal, and has good scalability, solving the technical problem of the relatively single display method of the energy meter.
[0027] Figure 2 A flowchart illustrating a display control method for an electricity meter provided in this application. Figure 2 ,like Figure 2 As shown, in this embodiment... Figure 1 Based on the embodiments, the method is described in detail below, and the method includes: Step S201: Receive a display request from at least one trigger source.
[0028] In one example, the triggering source includes any one or more of the following: periodic display triggered by a timer, user operation triggered by a physical button, connection event triggered by the Bluetooth protocol stack, and remote command triggered by the communication interface; the display request includes interstitial display task request and / or display task request; the interstitial display task request includes any one or more of the following: Bluetooth connection information interstitial request triggered by a Bluetooth connection event, QR code interstitial request triggered by a long press of a physical button, and communication viewing interstitial request triggered by a remote viewing command received by the communication interface; wherein, the Bluetooth connection event is an event reported by the Bluetooth protocol stack to the application layer when the external Bluetooth host and the energy meter complete pairing authentication and establish a communication link; the physical button long press event is an event determined and reported by the button scanning program when the physical button is continuously pressed for more than a preset duration threshold.
[0029] For example, Table 1 shows the data storage system framework of an electricity meter based on an object-oriented protocol. As shown in Table 1, the display control method of the electricity meter adopts hierarchical decoupling, and the vertical segmentation based on the data flow direction is as follows: display control task arbitrator, protocol data converter, display transaction processor, and display rendering driver. Table 1 is as follows: Table 1
[0030] The display control arbiter, as the core component, primarily functions to abstract display content requirements, resulting in a display information management structure (see Table 2 below). Multiple display information management structures are combined to form a two-dimensional display list. The master data unit identifier and slave data unit identifier within the display information management structure determine the source of the original protocol data. A wildcard data matching algorithm is used to find the required original protocol data within the same type of data and display it accurately. For example, the display of "Day 1 positive active power rate 2 energy" and "Day 2 positive active power rate 1 energy" must match the data content and the Chinese character prompt display, relying on the wildcard data matching algorithm. The screen sequence number identifies whether the current data is displayed on multiple screens and the screen sequence number. The display data selection indicates whether the data is ordinary data or record data, which is used to call different interfaces to obtain data. The display data unit indicates the unit attribute of the data. The display data format indicates the format in which the data content is displayed. The display Chinese character string indicates the Chinese name of the currently displayed data. Table 2 is as follows: Table 2
[0031] In this step, a display request is received from at least one trigger source; the display request contains at least the data identifier corresponding to the data to be displayed. The trigger source includes any one or more of the following: periodic scrolling triggered by a timer, user operation triggered by a physical button, connection event triggered by the Bluetooth protocol stack, and remote command triggered by the communication interface; the display request includes interstitial display task requests and / or scrolling display task requests; the interstitial display task request includes any one or more of the following: Bluetooth connection information interstitial request triggered by a Bluetooth connection event, QR code interstitial request triggered by a long press of a physical button, and communication viewing interstitial request triggered by a remote viewing command received from the communication interface; the display task corresponding to the QR code interstitial request is a QR code interstitial display task, the display task corresponding to the communication viewing interstitial request is a communication viewing interstitial display task, and the display task corresponding to the Bluetooth connection information interstitial request is a Bluetooth connection interstitial display task. The Bluetooth connection event is an event reported by the Bluetooth protocol stack to the application layer when the external Bluetooth host and the energy meter complete pairing authentication and establish a communication link; the physical button long press event is an event determined and reported by the button scanning program when the physical button is continuously pressed for more than a preset duration threshold.
[0032] Step S202: If it is determined that there are multiple display requests at the same time, then select the target display task according to the preset priority corresponding to each display request.
[0033] In one example, after step S202, the method further includes: if there is a currently running display task, pausing the current display task and saving the state context of the current display task; when the target display task is detected to have finished executing, resuming the paused current display task according to the saved state context.
[0034] In one example, the state context includes the display mode, the display page number, and the displayed duration. When the target display task is detected to have been completed, the paused current display task is resumed according to the saved state context. This includes: if the target display task is detected to have been completed, the paused current display task is resumed from the state when it was paused, based on the display mode, the display page number, and the displayed duration in the state context.
[0035] For example, the display arbitrator includes a display scheduler. The display scheduler structure is shown in Table 3 below. The display scheduler structure includes display mode, display start timestamp, display object list, display object sequence number, display object priority, display duration, most recent display object sequence number, most recent display object priority, display buffer, and display position information. The display scheduler is mainly responsible for adjudicating and scheduling display tasks. Display tasks include button polling display tasks, screen-off polling display tasks, short-press page turning operation display tasks, communication viewing interstitial display tasks, Bluetooth connection interstitial display tasks, and preset duration long-press button QR code interstitial display tasks. The highest level display mode includes the preset duration long-press button QR code display corresponding to the QR code interstitial display mode and the Bluetooth connection information interstitial display mode; the second highest level display mode includes the short-press page turning operation display corresponding to the button page turning mode; the intermediate level display mode includes the remote page turning mode corresponding to the page turning command received from remote communication, and the general interstitial display mode corresponding to the remote communication viewing specific data command. Both page turning commands and viewing specific data commands belong to remote viewing commands; the lowest level display mode includes the screen-off polling mode. Key-based page turning mode is a secondary priority request, with an immediate system response (milliseconds) to jump to the previous or next page. After the key is released, the system resets the "no-operation timeout timer" and remains on the current page waiting for the user's next key press. If no subsequent key press occurs within a set time (e.g., 30 seconds), the system automatically enters the `RUNDISPLAY` state and resumes automatic page rotation from the current page. Remote page turning mode, upon receiving a command, immediately jumps to the specified page in the rotation. It does not remain permanently after jumping; after a few seconds without new commands, the system automatically enters the `RUNDISPLAY` state and resumes automatic page rotation from this page. Communication page turning mode has higher priority than local timed screen-off rotation mode, but lower priority than on-site personnel pressing keys. General interstitial display mode directly and forcibly inserts specific data. It automatically ends after a fixed display time (e.g., 10 seconds) and returns to the previous rotation state. Preset-duration long-press key QR code display refers to a physical key being continuously pressed for more than a preset duration (long-press detection), for example, more than 3 seconds. Table 3 is as follows: Table 3
[0036] The scheduling algorithm of the explicit scheduler adopts a scheduling model that combines priority, state machine, and mutual exclusion mechanism. The main components of the scheduling model include: 1) The priority queue is implemented using a circular array with five priority levels: highest for Bluetooth connection / QR code, second highest for button operation, middle for remote communication, lowest for always-on display, and lowest for background refresh, ensuring that critical information is displayed first. Button operations include short-press page turning, where the system responds immediately when the user triggers the page turning key (up or down), and the screen switches to the specified page. Always-on display is driven by an internal timer, automatically cycling through the page list at preset time intervals. Background refresh refers to background data and status updates.
[0037] 2) The state machine enumerates and defines 7 states (IDLE (idle state), RUNDISPLAY (normal operation display state, i.e., carousel operation state), PAGING (page turning operation state in button page turning mode and remote page turning mode), PLUGIN (interstitial screen display state in general interstitial screen display mode), BLE_CONNECT (Bluetooth connection interstitial screen display state in Bluetooth connection information interstitial screen display mode), QR_CODE (QR code display state in QR code interstitial screen display mode), and BACKLIGHT_CTRL (backlight control state)). A state context saving mechanism is adopted. When the target display task of the interstitial screen is completed, the previous display mode and display object content are restored, and the switching is seamless, avoiding the user from having to flip the page again. The backlight control state is not an independent display request, but is usually triggered by other display tasks (such as turning on the backlight when pressing a button and turning off the backlight after a timeout). The idle state is an empty state when there is no display task. It is not entered by a request and is the default background state when the system has no display task.
[0038] 3) The mutual exclusion mechanism uses double buffering of the display buffer and semaphore mutex lock to ensure that the current display task does not conflict with the target display task of the interstitial screen.
[0039] In this step, if the electricity meter determines that it has received multiple display requests at the same time, it compares the preset priorities of each display request and selects the display request with the highest priority as the target display task to be executed. During task execution, if a higher priority display request appears, the current display task is paused, the state context of the current display task is saved, and the higher priority display task is executed.
[0040] Step S203: Based on the data identifier carried by the target display task, query the matching target display configuration record in the preset display configuration information set.
[0041] In one example, the display configuration information set is a two-dimensional display list, and each row in the two-dimensional display list corresponds to a display configuration record. The display configuration record includes at least a master data unit identifier and a slave data unit identifier. The data identifiers included in the target display task include a master identifier and a slave identifier. Step S203 includes: traversing the two-dimensional display list and matching the master identifier and slave identifier with the master data unit identifier and slave data unit identifier of each display configuration record in the two-dimensional display list, respectively, to obtain the matched target display configuration record.
[0042] For example, the display configuration information set is a two-dimensional display list. Each row in the two-dimensional display list corresponds to a display configuration record, and the display configuration record includes at least a master data unit identifier and a slave data unit identifier. The data identifier carried by the target display task includes a master identifier and a slave identifier. The two-dimensional display list is traversed, and the master identifier is matched with the master data unit identifier of each display configuration record in the two-dimensional display list to obtain a master matching result. Similarly, the slave identifier is matched with both the master data unit identifier and the slave data unit identifier of each display configuration record in the two-dimensional display list to obtain a slave matching result. If the master matching result indicates a match with a master data unit identifier, and the slave matching result indicates a match with a slave data unit identifier, and the matched master data unit identifier and slave data unit identifier belong to the same display configuration record, then the matched target display configuration record is obtained. Adding display items simply requires filling the two-dimensional display list according to the display information management structure.
[0043] Step S204: Based on the target display configuration record, obtain the corresponding original protocol data.
[0044] In one example, the master data unit identifier contains a first wildcard and / or the slave data unit identifier contains a second wildcard; step S204 includes: if the master identifier matches a master data unit identifier containing the first wildcard, and the slave identifier matches a slave data unit identifier containing the second wildcard, then determine the first data based on the index value represented by the first wildcard; determine the second data based on the index value represented by the second wildcard; determine the Chinese character string to be displayed based on the index values represented by the first and second wildcards. The first and second data are determined to be the original protocol data; wherein, the Chinese character string to be displayed is the Chinese prompt of the original protocol data.
[0045] For example, the master data unit identifier contains a first wildcard and / or the slave data unit identifier contains a second wildcard. If it is determined that the master identifier matches a master data unit identifier containing the first wildcard, and the slave identifier matches a slave data unit identifier containing the second wildcard, then the index value represented by the first wildcard and the index value represented by the second wildcard are determined. First data is located based on the index value represented by the first wildcard. Second data is located based on the index value represented by the second wildcard. A Chinese character string is determined to be displayed based on the index values represented by the first and second wildcards. Since both the first and second data are determined to be original protocol data, the displayed Chinese character string is the Chinese prompt for the original protocol data.
[0046] For example, Figure 3 A flowchart illustrating another display control method for an electricity meter provided in this application embodiment is shown below. Figure 3 As shown, the process includes: starting the display task and scanning the list of display objects; finding the matching display information management structure from the two-dimensional display list; determining whether the display object is record-type data; if not, directly obtaining the precise data source and Chinese character prompts; if it is record-type data, determining whether the data identifier contains a second wildcard: if it contains a second wildcard and the second wildcard is AA (representing a rate wildcard), obtaining the data rate index; if it contains a second wildcard and the second wildcard is not AA (representing an upper N-fold wildcard), obtaining the upper N-fold index of the data; if it does not contain a second wildcard, directly determining whether the master data identifier has a first wildcard; determining whether the master data identifier contains a first wildcard: if it contains a first wildcard and the wildcard is FF, obtaining the master data rate index; if it contains a first wildcard and the wildcard is not FF, obtaining the upper N-fold index of the master data; if it does not contain a first wildcard, directly obtaining the precise data source and the matching Chinese character prompts; obtaining the precise data source and the matching Chinese character prompts.
[0047] Step S205: Refresh the original protocol data to the display screen of the electricity meter for display.
[0048] In one example, the target display task carries display position parameters; step S205 includes: converting the original protocol data into modulo data for display; determining the starting coordinate position of the modulo data on the display screen according to the display position parameters carried by the target display task; the display position parameters include the starting row coordinates and the starting column coordinates; writing each pixel data in the modulo data into the corresponding area of the preset display buffer according to the starting coordinate position; and refreshing the written content of the display buffer to the display screen for display.
[0049] For example, the main function of the protocol data converter is to convert raw protocol data such as decimal display, time display, date display, Bluetooth MAC display, and communication address display. It also calls the display transaction processor to convert the raw protocol data into modulo data. Optionally, it can call the conversion interface function to convert the raw protocol data into dot-matrix LCD pixel modulo data.
[0050] The main functions of the display transaction processor are display position processing, font processing, and QR code processing. Display position processing mainly involves generating a new LCD data buffer from the original font data according to the LCD coordinates on the screen. The original font data is a raw byte array stored in the font library that describes the "black / white" state of all pixels of a character (number, Chinese character, colon, etc.) or graphic (logo, QR code dot matrix) on a standard small canvas. Font processing mainly involves processing numbers, Chinese characters, and graphics to obtain the font data. QR code processing mainly involves generating QR codes for displaying the content to be displayed.
[0051] The main functions of the display driver are to refresh the buffer to the LCD, clear the screen, and control the LCD backlight. It is the lowest level of processing function. The display driver can display the data content that needs to be displayed on the screen.
[0052] In this step, the target display task carries display position parameters. The electricity meter converts the raw protocol data into modulo data for display; the raw protocol data is machine-readable binary value, which must be formatted into a human-readable character sequence by a protocol data converter before the display transaction processor can use each character in the character sequence as an index to retrieve the corresponding character pattern raw data from the character library, and generate the modulo data through position processing, character library processing, etc.
[0053] Based on the display position parameters carried by the target display task, the starting coordinate position of the modulated data on the display screen is determined; the display position parameters include the starting row coordinates and the starting column coordinates. According to the starting coordinate position, each pixel data point in the modulated data is sequentially written into the storage unit corresponding to each pixel point on the display screen in a preset display buffer; the modulated data of numerical data is written into the first coordinate area, the modulated data of Chinese character prompts is written into the second coordinate area, and the modulated data of display units is written into the third coordinate area. The content written in the display buffer is refreshed to the display screen for display. The method provided in this application embodiment receives a display request from at least one trigger source; the display request at least includes a data identifier corresponding to the data to be displayed. If it is determined that multiple display requests exist at the same time, a target display task is selected according to the preset priority corresponding to each display request. Based on the data identifier carried by the target display task, a matching target display configuration record is queried in a preset display configuration information set. Based on the target display configuration record, the corresponding original protocol data is obtained. The original protocol data is refreshed to the display screen of the electricity meter for display. In this solution, compared to the traditional segment LCD display of electricity meters in the prior art which does not require interstitial display, the display control task arbitrator provided in this application, through a priority + state machine + mutual exclusion scheduling model, can handle multiple display tasks (rotating display and interstitial display), ensuring that key information is displayed first and can be restored to the previous display state after display is completed. Compared to the traditional electricity meter in the prior art which relies on directly searching for data by setting display objects and then writing a processing function for each type of object, resulting in numerous functions and complex processing, this application, through a preset set of display configuration information and target display configuration records, can find the required data in the same type of data and display it accurately. The code is concise, universal, and has good scalability, solving the technical problem of the relatively single display method of electricity meters.
[0054] In one example, according to Figure 4 The explanation further clarifies the use of double buffering and semaphore mutexes to ensure that the current display task does not conflict with the target display task of the interstitial screen.
[0055] Figure 4 A flowchart of an explicit scheduling algorithm provided in this application embodiment is shown below. Figure 4 As shown, the scheduling algorithm includes: 1: Display task start; 2: Detect if a button is pressed and held for more than 3 seconds. If so, enter the QR code interstitial display mode for processing. 3: If no button is detected, check for Bluetooth connection messages; if Bluetooth connection messages are received, proceed to Bluetooth connection interstitial display processing. 4: If there is no Bluetooth connection message, check if there is a communication page turning operation message. If so, proceed to the communication page turning interstitial display processing. 5: If there is no communication page turning operation message, check if there is a communication display viewing message. If so, enter the communication viewing interstitial display processing. 6: If none of the above applies, the system will enter the always-on display mode for processing. 7: Perform priority processing and select the highest priority task from the priority queue; 8: Perform priority processing and select the highest priority task from the priority queue; 9: Refresh the display content to the LCD device.
[0056] In one embodiment, taking the display of the positive active power rate of 3% for the previous day as an example, the display control process of the energy meter is explained as follows: 1) Start the display task and set the display object: the master data identifier is frozen from the previous day, and the slave data identifier is positive active power rate 3 electricity; this display object serves as the starting page for this round-robin display task; 2) If there are no other special operations, submit a display request for the screen-off display task to the display control task arbiter; set the LCD screen to enter the screen-off display mode; the display list starts from the starting page determined in 1) and automatically cycles through the pages at preset time intervals; 3) The display control task arbiter compares the priorities of all currently pending display tasks and confirms that there are no higher priority display tasks (such as Bluetooth screen insertion, button page turning, etc.). The screen-off display mode has the highest priority, and the screen-off display task obtains screen control and starts executing the screen-off display mode. The screen first displays the "Previous Day's Positive Active Tariff Rate 3 Energy" page set in 1), and then automatically cycles through the pages at preset time intervals.
[0057] 4) Locate the two-dimensional display list and find the display information management structure (i.e., the target display configuration record) that matches the display object; 5) Based on whether wildcards are present in the master data identifier and slave data identifier in the display information management structure, find the data and Chinese character prompts; 6) The retrieved data content is converted into LCD-usable image data according to the display format through the protocol data converter and display transaction processor. At the same time, the Chinese character prompts and display units also obtain the image data. 7) Fill the modulus data into the LCD display buffer, and the display transaction processor automatically sets the display position parameters; the display position parameters are preset fixed coordinate constants, or results automatically calculated based on the string length.
[0058] 8) Refresh the contents of the LCD display buffer to the LCD screen.
[0059] In one embodiment, taking the display of Bluetooth connection information on the interstitial screen as an example, the display control process of the energy meter is illustrated as follows: 1) Start displaying the task; 2) If no other special operation is performed, the LCD screen will enter the always-on display mode; 3) When a user connects to the energy meter via Bluetooth using a Bluetooth host, the energy meter receives a Bluetooth connection request. 4) After successful connection, the LCD screen will be set to enter the Bluetooth connection information interstitial display mode based on the Bluetooth connection information interstitial display request. 5) After priority comparison, the Bluetooth connection information interstitial display mode has a higher priority than the screen-off display mode, and the Bluetooth connection information interstitial display mode is entered. 6) Perform Bluetooth connection interstitial display task: Convert Bluetooth connection information into LCD-usable model data through protocol data converter and display transaction processor; Bluetooth connection information refers to several key credential data that the energy meter needs to display on the screen to the on-site maintenance personnel as soon as the external host (such as mobile phone, handheld maintenance terminal) successfully pairs with the energy meter via Bluetooth. For example, Bluetooth connection information includes the Bluetooth MAC address of the peer host (mobile phone / handheld device), the Bluetooth name or MAC address of the local energy meter, connection status prompts, and communication rate or signal strength after connection.
[0060] 7) Fill the LCD display buffer with the sampled data, and the display transaction processor automatically sets the display position parameters; 8) Refresh the contents of the LCD display buffer to the LCD screen; 9) After the Bluetooth connection information is displayed, the energy meter will remove the Bluetooth connection plug-in display task from the priority queue and restore the previous display mode and content.
[0061] In one embodiment, taking the long press to display QR code information as an example, the display control process of the electricity meter is explained as follows: 1) Start displaying the task; 2) Without any other special operation, the LCD screen enters the always-on display mode; 3) When the user presses and holds the button for more than 3 seconds, the display shows that the task has detected that the button has been pressed and held for 3 seconds. The energy meter receives the QR code insertion request and sets the LCD screen to enter the QR code insertion display mode based on the QR code insertion request. 4) After priority comparison, the QR code interstitial display mode has a higher priority than the always-on display mode, so the QR code interstitial display mode is entered. 5) Execute QR code interstitial display task: Through the display transaction processor, generate QR code model data for the required display content information; the required display content information is a structured string containing key operating parameters such as meter number, power consumption, and time, which is read from the internal storage area in real time and dynamically spliced after the energy meter is triggered by long-pressing the button. 6) Fill the LCD display buffer with the QR code image data and automatically set the display position parameters; 7) Refresh the contents of the LCD display buffer to the LCD screen; 8) The LCD screen displays a QR code, which users can scan with their mobile phones to view relevant information about the electricity meter; 9) After the QR code content is displayed, the electricity meter will remove the QR code interstitial display task from the priority queue and restore the previous display mode and content.
[0062] Corresponding to the above method, embodiments of this application also provide a display control device for an electricity meter, such as... Figure 5 As shown, the device includes: The receiving module 41 is used to receive a display request from at least one triggering source; the display request includes at least a data identifier corresponding to the data to be displayed; The selection module 42 is used to select a target display task according to the preset priority of each display request if it is determined that there are multiple display requests at the same time. The query module 43 is used to query a matching target display configuration record in a preset display configuration information set based on the data identifier carried by the target display task, and obtain the corresponding original protocol data based on the target display configuration record; Display module 44 is used to refresh the original protocol data to the display screen of the electricity meter for display.
[0063] The functions of each functional unit of the display control device for the electricity meter provided in the above embodiments of this application can be implemented through the above-described method steps. Therefore, the specific working process and beneficial effects of each unit in the display control device for the electricity meter provided in the embodiments of this application will not be repeated here.
[0064] This application also provides an electricity meter, such as... Figure 6 As shown, it includes a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540.
[0065] Memory 530 is used to store computer programs; The processor 510 performs the above steps when executing the program stored in the memory 530.
[0066] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0067] The communication interface is used for communication between the aforementioned electricity meter and other devices.
[0068] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0069] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0070] The implementation methods and beneficial effects of the various components of the energy meter in the above embodiments for solving the problem can be found in [reference needed]. Figure 1 The steps in the illustrated embodiments are used to implement the electricity meter. Therefore, the specific working process and beneficial effects of the electricity meter provided in this application will not be repeated here.
[0071] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to perform the display control method of the electricity meter described in any of the above embodiments.
[0072] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the display control method of the electricity meter described in any of the above embodiments.
[0073] Those skilled in the art will understand that the embodiments in this application can be provided as methods, systems, or computer program products. Therefore, the embodiments in this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the embodiments in this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0074] This application describes embodiments of methods, apparatus (systems), and computer program products according to embodiments of this application with reference to flowchart illustrations and / or block diagrams. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0075] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0076] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0077] Although preferred embodiments have been described in this application, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of this application.
[0078] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims in this application and their equivalents, then this application also intends to include these modifications and variations.
Claims
1. A display control method of an electric energy meter, characterized by, Applied to electricity meters; the method includes: Receive display requests from at least one trigger source; If it is determined that multiple display requests exist at the same time, then a target display task is selected according to the preset priority corresponding to each display request; Based on the data identifiers included in the target display task, a matching target display configuration record is queried from a preset set of display configuration information; based on the target display configuration record, the original protocol data is obtained; The original protocol data is refreshed and displayed on the display screen of the electricity meter.
2. The method of claim 1, wherein, The display configuration information set is a two-dimensional display list, and each row in the two-dimensional display list corresponds to a display configuration record. The display configuration record includes at least a master data unit identifier and a slave data unit identifier. The data identifiers included in the target display task include a master identifier and a slave identifier. Based on the data identifiers included in the target display task, a matching target display configuration record is queried from a preset set of display configuration information, including: Traverse the two-dimensional display list, and match the master identifier and the slave identifier with the master data unit identifier and slave data unit identifier of each display configuration record in the two-dimensional display list to obtain the matched target display configuration record.
3. The method of claim 2, wherein, The master data unit identifier contains a first wildcard and / or the slave data unit identifier contains a second wildcard; according to the target display configuration record, the original protocol data is obtained, including: If the primary identifier matches the primary data unit identifier containing the first wildcard, and the secondary identifier matches the secondary data unit identifier containing the second wildcard, then the first data is determined according to the index value represented by the first wildcard; and the second data is determined according to the index value represented by the second wildcard. The Chinese character string to be displayed is determined based on the index value represented by the first wildcard and the index value represented by the second wildcard. The first data and the second data are determined to be the original protocol data; wherein, the displayed Chinese character string is the Chinese prompt character of the original protocol data.
4. The method of claim 1, wherein, After selecting the target display task step according to the preset priority corresponding to each display request, the method further includes: If there is a currently running display task, then pause the current display task and save the state context of the current display task; Once the target display task is detected to have been completed, the currently paused display task is resumed based on the saved state context.
5. The method of claim 4, wherein, The status context includes the display mode, the display page number, and the displayed duration; Once the target display task is detected to have completed, the currently paused display task is resumed according to the saved state context, including: If the target display task is detected to have been completed, the currently paused display task will resume execution from the state when it was paused, based on the display mode, the display page number, and the displayed duration in the state context.
6. The method of claim 1, wherein, The triggering source includes any one or more of the following: Periodic display triggered by timers, user operations triggered by physical buttons, connection events triggered by the Bluetooth protocol stack, and remote commands triggered by the communication interface; The display request includes an interstitial display task request and / or a carousel display task request; the interstitial display task request includes any one or more of the following: a Bluetooth connection information interstitial request triggered by a Bluetooth connection event, a QR code interstitial request triggered by a long press of a physical button, and a communication viewing interstitial request triggered by a remote viewing command received from the communication interface. The Bluetooth connection event is an event reported by the Bluetooth protocol stack to the application layer when the external Bluetooth host and the energy meter complete pairing authentication and establish a communication link; the physical button long press event is an event determined and reported by the button scanning program when the physical button is continuously pressed for more than a preset duration threshold.
7. The method as described in claim 1, characterized in that, The target display task carries display position parameters; refreshing the original protocol data to the display screen of the electricity meter for display includes: The original protocol data is converted into modulo data for display. Based on the display position parameters carried by the target display task, the starting coordinate position of the model data on the display screen is determined; the display position parameters include the starting row coordinates and the starting column coordinates. According to the starting coordinate position, each pixel data in the modulus data is sequentially written into the corresponding area of the preset display buffer; The content written to the display buffer is refreshed to the display screen for display.
8. A display control device for an electricity meter, characterized in that, Applied to electricity meters; the device includes: A receiving module is used to receive display requests from at least one triggering source; The selection module is used to select a target display task according to the preset priority corresponding to each display request if it is determined that multiple display requests exist at the same time. The query module is used to query a matching target display configuration record in a preset display configuration information set based on the data identifier carried by the target display task; and to obtain the original protocol data based on the target display configuration record. The display module is used to refresh the original protocol data to the display screen of the electricity meter for display.
9. An electricity meter, characterized in that, The electricity meter includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus. Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.
