CN110968179A - Data processing method and device, readable storage medium and lower computer - Google Patents

Data processing method and device, readable storage medium and lower computer Download PDF

Info

Publication number
CN110968179A
CN110968179A CN201911267148.0A CN201911267148A CN110968179A CN 110968179 A CN110968179 A CN 110968179A CN 201911267148 A CN201911267148 A CN 201911267148A CN 110968179 A CN110968179 A CN 110968179A
Authority
CN
China
Prior art keywords
power consumption
consumption command
current power
adjusting
data
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.)
Granted
Application number
CN201911267148.0A
Other languages
Chinese (zh)
Other versions
CN110968179B (en
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.)
Shenzhen Leineng Hybrid Integrated Circuit Co ltd
Original Assignee
Shenzhen Leineng Hybrid Integrated Circuit 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 Shenzhen Leineng Hybrid Integrated Circuit Co ltd filed Critical Shenzhen Leineng Hybrid Integrated Circuit Co ltd
Priority to CN201911267148.0A priority Critical patent/CN110968179B/en
Publication of CN110968179A publication Critical patent/CN110968179A/en
Application granted granted Critical
Publication of CN110968179B publication Critical patent/CN110968179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/28Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • G06F1/3206Monitoring of events, devices or parameters that trigger a change in power modality
    • G06F1/3212Monitoring battery levels, e.g. power saving mode being initiated when battery voltage goes below a certain level
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3058Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
    • G06F11/3062Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations where the monitored property is the power consumption
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the invention provides a data processing method, a data processing device, a readable storage medium and a lower computer, wherein the method comprises the following steps: before returning a current power consumption command to the upper computer, judging whether data in the current power consumption command overflows or not; after the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule; and returning the adjusted current power consumption command to the upper computer. The data overflow in the current power consumption command is monitored in the lower computer, and the data is adjusted after the data overflow, so that the accuracy of the upper computer for calculating the average power consumption of the lower computer is improved; and the upper computer calculates the average power consumption of the lower computer according to the previous calculation method, and does not need to set a corresponding rule to consider the data overflow condition in the current power consumption command.

Description

Data processing method and device, readable storage medium and lower computer
Technical Field
The invention relates to the field of data processing, in particular to a data processing method, a data processing device, a readable storage medium and a lower computer.
Background
The PMBus protocol is a power management bus protocol; it defines many commands that control power supply, including READ _ EIN (0x86) and READ _ EOUT (0x87) commands. After receiving a power consumption reading request of the upper computer, the lower computer returns a READ _ EIN (0x86) or READ _ EOUT (0x87) command to the upper computer; READ _ EIN (0x86) and READ _ EOUT (0x87) commands include data that can be used to calculate the power consumption of the lower computer.
Currently, the upper computer on the user side calculates the average power consumption of the lower computer according to data in the READ _ EIN (0x86) or READ _ EOUT (0x87) command returned by the lower computer. However, since many clients are not familiar with the PMBus protocol, overflow of data in the READ _ EIN (0x86) or READ _ EOUT (0x87) command is not considered, and the power consumption calculated by the upper computer is not correct, and the power consumption deviates from a normal value by a large amount.
Disclosure of Invention
In view of this, the present invention provides a data processing method, an apparatus, a readable storage medium, and a lower computer, which are intended to improve the accuracy of calculating the average power consumption of the lower computer by an upper computer without considering data overflow of the upper computer.
In order to achieve the above object, the following solutions are proposed:
in a first aspect, a data processing method is provided, which is applied to a lower computer, and the data processing method includes:
before returning a current power consumption command to an upper computer, judging whether data in the current power consumption command overflows or not, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
if the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule;
and returning the adjusted current power consumption command to the upper computer.
Optionally, if the data in the current power consumption command overflows, the step of adjusting the data in the current power consumption command according to a preset rule includes:
when the turnover count in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to be a preset power accumulated value adjusting value, and adjusting the turnover count in the current power consumption command to be a preset turnover count adjusting value;
calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, and the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command;
and adjusting the sampling number in the current power consumption command to the sampling number adjustment value.
Optionally, the power accumulation value adjustment value and the rollover count adjustment value are both zero.
Optionally, if the data in the current power consumption command overflows, the step of adjusting the data in the current power consumption command according to a preset rule includes:
when the sampling number in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to the instantaneous power accumulated value in the previous power consumption command, adjusting the turnover count in the current power consumption command to the turnover count in the previous power consumption command, and adjusting the sampling number in the current power consumption command to a preset sampling number adjusting value.
Optionally, the sampling number adjustment value is zero.
Optionally, the data format of the instantaneous power accumulation value is a direct format.
In a second aspect, a data processing apparatus is provided, which is applied to a lower computer, the data processing apparatus including:
the overflow detection unit is used for judging whether data in the current power consumption command overflows or not before returning the current power consumption command to the upper computer, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
the data adjusting unit is used for adjusting the data in the current power consumption command according to a preset rule if the data in the current power consumption command overflows;
and the sending unit is used for returning the adjusted current power consumption command to the upper computer.
Optionally, the data adjusting unit is specifically configured to:
when the turnover count in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to be a preset power accumulated value adjusting value, and adjusting the turnover count in the current power consumption command to be a preset turnover count adjusting value;
calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, and the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command;
and adjusting the sampling number in the current power consumption command to the sampling number adjustment value.
Optionally, the power accumulation value adjustment value and the rollover count adjustment value are both zero.
Optionally, the data adjusting unit is specifically configured to:
when the sampling number in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to the instantaneous power accumulated value in the previous power consumption command, adjusting the turnover count in the current power consumption command to the turnover count in the previous power consumption command, and adjusting the sampling number in the current power consumption command to a preset sampling number adjusting value.
Optionally, the sampling number adjustment value is zero.
Optionally, the data format of the instantaneous power accumulation value is a direct format.
In a third aspect, a readable storage medium is provided, on which a program is stored, which when executed by a processor, performs the steps of the data processing method according to any one of the first aspect.
In a fourth aspect, a lower computer is provided that includes a memory and a processor;
the memory is used for storing programs;
the processor is configured to execute the program to implement the steps of the data processing method according to any one of the first aspect.
Compared with the prior art, the technical scheme of the invention has the following advantages:
the technical scheme provides a data processing method, a data processing device, a readable storage medium and a lower computer, wherein the method comprises the following steps: before returning a current power consumption command to the upper computer, judging whether data in the current power consumption command overflows or not; after the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule; and returning the adjusted current power consumption command to the upper computer. The data overflow in the current power consumption command is monitored in the lower computer, and the data is adjusted after the data overflow, so that the accuracy of the upper computer for calculating the average power consumption of the lower computer is improved; and the upper computer calculates the average power consumption of the lower computer according to the previous calculation method, and does not need to set a corresponding rule to consider the data overflow condition in the current power consumption command.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method applied to a lower computer according to an embodiment of the present invention;
fig. 2 is a flowchart of a data adjustment method for overflow of rollover count according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a logical structure of a data processing apparatus applied to a lower computer according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a lower computer according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The READ _ EIN (0x86) and READ _ EOUT (0x87) commands are both power consumption commands. The data in the power consumption command is independent of any device-specific averaging period, sampling frequency, or calculation algorithm. The power consumption command includes an instantaneous power accumulation value, a rollover count, and a number of samples. For example, the data in the READ _ EIN (0x86) command includes the instantaneous input power accumulation value, the rollover count of the instantaneous input power accumulation value, and the number of samples of the instantaneous input power. The READ _ EOUT (0x87) command includes the instantaneous output power accumulation value, the rollover count of the instantaneous output power accumulation value, and the number of samples of the instantaneous output power.
The embodiment provides a data processing method applied to a lower computer, and referring to fig. 1, the data processing method includes the steps of:
s11: before returning to the current power consumption command to the upper computer, judging whether data in the current power consumption command overflows or not, if so, executing step S12, and if not, executing step S14.
And after the lower computer receives the power consumption reading request of the upper computer, the power consumption command returned to the upper computer comprises an instantaneous power accumulated value, a turnover count and a sampling number. The current power consumption command to be returned to the upper computer is called a current power consumption command; the last power consumption command that has been returned to the upper computer is referred to as the previous power consumption command.
In this embodiment, it is determined whether data in the current power consumption command overflows, specifically, whether an overflow occurs in a rollover count and a sampling number included in the current power consumption command. The specific method for judging whether the rollover count overflows or not may be that, if the rollover count in the current power consumption command is smaller than the rollover count in the previous power consumption command, the rollover count is determined to overflow; or if the roll-over count in the current power consumption command is zero and the roll-over count in the previous power consumption command is not zero, determining that the roll-over count overflows. The method for determining whether the sampling number overflows is consistent with the method for determining the turnover counting, and the details are not repeated in this embodiment.
S12: and adjusting the data in the current power consumption command according to a preset rule.
And presetting corresponding rules for different data overflow conditions so as to adjust the data in the power consumption command.
S13: and returning the adjusted current power consumption command to the upper computer.
S14: and returning the current power consumption command to the upper computer.
After the data in the current power consumption command overflows, adjusting the data in the current power consumption command at the lower computer side; if the data in the current power consumption command does not overflow, the data in the current power consumption command does not need to be adjusted. The data overflow in the current power consumption command is monitored in the lower computer, and the data is adjusted after the data overflow, so that the accuracy of the upper computer for calculating the average power consumption of the lower computer is improved; and the upper computer calculates the average power consumption of the lower computer according to the previous calculation method, and the data overflow condition in the current power consumption command is not required to be considered by setting a corresponding rule.
The embodiment provides a data adjustment method for overflow of rollover count, and referring to fig. 2, the method includes the steps of:
s21: when the turnover count in the current power consumption command overflows, the instantaneous power accumulated value in the current power consumption command is adjusted to be a preset power accumulated value adjustment value, and the turnover count in the current power consumption command is adjusted to be a preset turnover count adjustment value.
In one embodiment, the preset power accumulation value adjustment value and the rollover count adjustment value are both zero.
S22: and calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, as well as the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command.
S23: and adjusting the sampling number in the current power consumption command to a sampling number adjustment value.
And the upper computer calculates the average power of the lower computer in the period from the generation of the previous power consumption command to the current power consumption command according to the data in the current power consumption command and the data in the previous power consumption command. And after the lower computer works stably, the current power of the lower computer is regarded as the average power of the lower computer. Therefore, when data in the current power consumption command is adjusted, the current power is used as the average power, and a sampling number adjustment value can be obtained by combining other data and a method for the upper computer to calculate the average power, so that the upper computer can calculate the average power more accurately after receiving the adjusted current power consumption command.
The embodiment provides a data adjustment method for overflow of a sampling number, which specifically comprises the following steps: when the sampling number in the current power consumption command overflows, the instantaneous power accumulated value in the current power consumption command is adjusted to the instantaneous power accumulated value in the previous power consumption command, the turnover count in the current power consumption command is adjusted to the turnover count in the previous power consumption command, and the sampling number in the current power consumption command is adjusted to a preset sampling number adjustment value. In a specific embodiment, the sample number adjustment value is set to zero.
The READ _ EIN (0x86) and READ _ EOUT (0x87) commands each include six data bytes. The READ _ EIN (0x86) command is described below.
The first two bytes of the READ _ EIN (0x86) command are the instantaneous input power accumulation Value (i.e., Accumulator _ Value). The Accumulator _ Value is obtained by continuously summing the sampled values of the instantaneous input power (i.e., the sampled product of the input voltage and the input current) by an Accumulator. The format of these two data bytes is either a linear data format or a direct format.
The third data byte of the READ EIN (0x86) command is the Rollover Count of the instantaneous input power accumulation value, i.e., the Rollover _ Count value of the accumulator. When the output value of the accumulator is inverted from the maximum value to zero, the Rollover _ Count value is incremented by 1. The value of Rollover _ Count also flips to zero after increasing to a maximum value. The byte is an unsigned integer.
The last three data bytes of the READ EIN (0x86) command are the number of samples of the instantaneous input power (i.e., Sample Count). The Sample _ Count also flips to zero after increasing to the maximum value. The three data bytes are a 24-bit unsigned integer.
The following describes a data processing method applied to a lower computer according to the present invention by way of example.
The data format of Accumulator _ Value in the READ _ EIN (0x86) command returned by the lower computer to the upper computer is a direct format. In the direct format, m is 1, b is 0, and R is 1.
When the upper computer does not consider the data overflow condition, the average input power of the lower computer is calculated by using the following formula:
Figure BDA0002313180670000071
wherein, Average _ Power represents the Average input Power, Current _ Energy _ Count represents the Current Energy Count, Last _ Energy _ Count represents the previous Energy Count, Current _ Sample _ Count represents the number of samples in the Current READ _ EIN (0x86) command, and Last _ Sample _ Count represents the number of samples in the previous READ _ EIN (0x86) command.
When the data format of Accumulator _ Value is the direct format, the calculation formula of the energy count is as follows: energy _ Count _ rollback _ Count _ Maximum _ Direct _ Format _ Value (m, b, R) + Accumulator _ Value
Wherein, Maximum _ Direct _ Format _ Value (m, b, R) (m × Ymax + b) × 10R(ii) a Ymax represents the maximum Value of Accumulator _ Value, and Ymax is 215-1 ═ 32767; the communication parties of m, b and R have preset values, and communication transmission is not needed; energy _ Count represents an Energy Count. Maximum _ Direct _ Format _ Value (m, b, R) ═ 1 × 32767+0 × 10 ═ 327670.
The upper computer calculates Energy _ Count according to data in the Current READ _ EIN (0x86) command and expresses the Energy _ Count by Current _ Energy _ Count; the Energy _ Count obtained by the upper computer according to data calculation in the previous READ _ EIN (0x86) command is represented by Last _ Energy _ Count. After the upper computer calculates the Average _ Power, the upper computer assigns the stored Last _ Energy _ Count to Current _ Energy _ Count for the next calculation of the Average _ Power.
After the instantaneous input power of the lower computer is obtained through sampling, the instantaneous input power is divided by 10 and then input into an Accumulator for accumulation, and Accumulator _ Value is obtained. After receiving a READ _ EIN (0x86) command sent by the lower computer, the upper computer also needs to convert the Value of Accumulator _ Value to obtain a Value in watt. The specific conversion process is (Accumulator _ Value × m + b) × 10R10 × Accumulator _ Value. For example, when the upper computer first receives the data Accumulator _ Value of 34, the rolover _ Count of 0, and the Sample _ Count of 1 in the READ _ EIN (0x86) command sent by the lower computer, the upper computer calculates the Current _ Energy _ Count of 0 × 327670+34 × 10 of 340.
Before the upper computer receives the READ _ EIN (0x86) command sent by the lower computer first, both the Last _ Energy _ Count and the Last _ Sample _ Count are initial values, and the initial values are zero. Therefore, the upper computer calculates Average _ Power ═ (340-0)/(1-0) ═ 340.
And randomly recording the READ _ EIN (0x86) command sent by the lower computer twice continuously through an experiment. The Accumulator _ Value of the previous READ _ EIN (0x86) command is 0x3658 (i.e., 13912), the rolover _ Count is 3, the Sample _ Count is 3618, the Accumulator _ Value of the current READ _ EIN (0x86) command is 0x7F38 (i.e., 32568), the rolover _ Count is 3, and the Sample _ Count is 4166. The upper computer calculates:
Average_Power=(3×327670+32568×10–(3×327670+13912×10))/(4166-3618)=(1308690-1122130)/548=186560/548=340.4379562
therefore, for the upper computer, the average power of the lower computer is calculated correctly according to the calculation method, and the problem of data overflow is not required to be considered.
The following illustrates a data processing method applied to a lower computer according to the present invention, which performs a data adjustment process when data overflow is detected.
The instantaneous input power of the lower computer is 240W all the time, namely the average power is 240W. In the previous READ _ EIN (0x86) command, Accumulator _ Value is 32732, rolover _ Count is 255, and Sample _ Count is 352475; in the current READ _ EIN (0x86) command, Accumulator _ Value is 0, rolover _ Count is 0, and Sample _ Count is 352477. Judging that the overflow is generated by the Rollover _ Count. At this time, the Accumulator _ Value is held at 0 and the rolover _ Count is held at 0, and the lower computer performs the following operation according to the following equation:
Figure BDA0002313180670000081
the Current _ Sample _ Count Value- ((Last _ Accumulator _ Value +327670 × Last _ rolover _ Count)/Average _ Power) 352475- (32732 × 10+327670 × 255)/240-2962 is calculated.
And the upper computer calculates according to the data in the adjusted current READ _ EIN (0x86) command: average _ Power ═ (0 × 327670+0 × 10- (255 × 327670+32732 × 10))/(2960-.
As can be seen from the above calculation, when the overflow occurs in the Rollover _ Count, the average power calculated by the upper computer is still correct after the data in the current READ _ EIN (0x86) command is adjusted according to the above rule.
The inventor finds that the average power of the lower computer is smaller when the Sample _ Count overflows in the process of implementing the invention. When the Sample _ Count overflows, the lower computer adjusts the Value of Accumulator _ Value in the current READ _ EIN (0x86) command to the Value of Accumulator _ Value in the previous READ _ EIN (0x86) command; and adjusting the value of the Rollover _ Count in the current READ _ EIN (0x86) command to the value of the Rollover _ Count in the previous READ _ EIN (0x86) command; and adjusting the value of Sample _ Count in the current READ _ EIN (0x86) command to zero. Thus, the upper computer calculates according to the data in the adjusted current READ _ EIN (0x86) command: average _ Power ═ 0. The average power of the lower computer is relatively low, so that the upper computer calculates to obtain 0, and the error caused by the calculation is relatively small; therefore, the problem of data overflow is not needed to be considered when the upper computer calculates the power of the lower computer, and the calculation resources of the lower computer are saved.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
The present embodiment provides a data processing apparatus applied to a lower computer, and referring to fig. 3, the data processing apparatus includes: an overflow detecting unit 31, a data adjusting unit 32, and a transmitting unit 33.
And the overflow detection unit 31 is configured to determine whether data in the current power consumption command overflows before returning the current power consumption command to the upper computer, where the data in the current power consumption command includes an instantaneous power accumulated value, a rollover count, and a sampling number.
And the data adjusting unit 32 is configured to adjust the data in the current power consumption command according to a preset rule if the data in the current power consumption command overflows.
And the sending unit 33 is used for returning the adjusted current power consumption command to the upper computer.
In an embodiment, the data adjusting unit 32 is specifically configured to: when the turnover count in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to be a preset power accumulated value adjustment value, and adjusting the turnover count in the current power consumption command to be a preset turnover count adjustment value; calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, and the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command; and adjusting the sampling number in the current power consumption command to a sampling number adjustment value. And/or the presence of a gas in the gas,
when the sampling number in the current power consumption command overflows, the instantaneous power accumulated value in the current power consumption command is adjusted to the instantaneous power accumulated value in the previous power consumption command, the turnover count in the current power consumption command is adjusted to the turnover count in the previous power consumption command, and the sampling number in the current power consumption command is adjusted to a preset sampling number adjustment value.
The power accumulation value adjustment value, the rollover count adjustment value and the sampling number adjustment value can all be zero. The data format of the instantaneous power accumulation value may be a direct format.
Referring to fig. 4, a lower computer according to an embodiment of the present invention is provided. The hardware structure of the lower computer can include: at least one processor 41, at least one communication interface 42, at least one memory 43 and at least one communication bus 44; and the processor 41, the communication interface 42 and the memory 43 complete the communication with each other through the communication bus 44.
Processor 41 may be, in some embodiments, a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), one or more Integrated circuits configured to implement embodiments of the present invention, or the like.
The communication interface 42 may include a standard wired interface, a wireless interface (e.g., WI-FI interface). Are commonly used to establish communication links between a host computer and other electronic devices or systems.
The memory 43 includes at least one type of readable storage medium. The readable storage medium may be an NVM (non-volatile memory) such as flash memory, hard disk, multimedia card, card-type memory, etc. The readable storage medium may also be a high-speed RAM (random access memory) memory. The readable storage medium may in some embodiments be an internal storage unit of the lower computer, for example a hard disk of the lower computer. In other embodiments, the readable storage medium may also be an external storage device of the lower computer, such as a plug-in hard disk (hdd), a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the lower computer.
Wherein the memory 43 stores a computer program, and the processor 41 may call the computer program stored in the memory 43, the computer program being configured to:
before returning a current power consumption command to an upper computer, judging whether data in the current power consumption command overflows or not, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
if the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule;
and returning the adjusted current power consumption command to the upper computer.
The refinement function and the extension function of the program may be referred to as described above.
FIG. 4 shows only a lower computer having components 41-44, but it is to be understood that not all of the shown components are required and that more or fewer components may alternatively be implemented.
Optionally, the lower computer may further comprise a user interface, which may comprise an input unit (such as a keyboard), a voice input device (such as a device with voice recognition functionality comprising a microphone) and/or a voice output device (such as a sound, a headset, etc.). Optionally, the user interface may also include a standard wired interface and/or a wireless interface.
Optionally, the lower computer may further include a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display device can be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) display, and the like. The display is used for displaying information processed in the lower computer and for displaying a visual user interface.
Optionally, the lower computer further comprises a touch sensor. The area provided by the touch sensor for the user to perform touch operation is referred to as a touch area. Further, the touch sensor may be a resistive touch sensor, a capacitive touch sensor, or the like. The touch sensor may include not only a contact type touch sensor but also a proximity type touch sensor. Further, the touch sensor may be a single sensor, or may be a plurality of sensors arranged in an array, for example. The user can input identification information or start a program by touching the touch area.
The area of the display of the lower computer may be the same as or different from the area of the touch sensor. Optionally, the display is stacked with the touch sensor to form a touch display screen. The device detects touch operation triggered by a user based on the touch display screen.
The lower computer may also include RF (Radio Frequency) circuitry, sensors, and audio circuitry, etc., which are not at least as cumbersome herein.
An embodiment of the present invention further provides a readable storage medium, where the readable storage medium may store a program adapted to be executed by a processor, where the program is configured to:
before returning a current power consumption command to an upper computer, judging whether data in the current power consumption command overflows or not, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
if the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule;
and returning the adjusted current power consumption command to the upper computer.
The refinement function and the extension function of the program may be referred to as described above.
The above-described apparatus embodiments are merely illustrative, in which the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In the present specification, the emphasis points of the embodiments are different from those of the other embodiments, and the same and similar parts among the embodiments may be referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method is applied to a lower computer, and comprises the following steps:
before returning a current power consumption command to an upper computer, judging whether data in the current power consumption command overflows or not, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
if the data in the current power consumption command overflows, adjusting the data in the current power consumption command according to a preset rule;
and returning the adjusted current power consumption command to the upper computer.
2. The data processing method of claim 1, wherein if the data in the current power consumption command overflows, the step of adjusting the data in the current power consumption command according to a preset rule comprises:
when the turnover count in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to be a preset power accumulated value adjusting value, and adjusting the turnover count in the current power consumption command to be a preset turnover count adjusting value;
calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, and the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command;
and adjusting the sampling number in the current power consumption command to the sampling number adjustment value.
3. The data processing method of claim 2, wherein the power accumulation value adjustment value and the rollover count adjustment value are both zero.
4. The data processing method of claim 1, wherein if the data in the current power consumption command overflows, the step of adjusting the data in the current power consumption command according to a preset rule comprises:
when the sampling number in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to the instantaneous power accumulated value in the previous power consumption command, adjusting the turnover count in the current power consumption command to the turnover count in the previous power consumption command, and adjusting the sampling number in the current power consumption command to a preset sampling number adjusting value.
5. The data processing method of claim 4, wherein the sample number adjustment value is zero.
6. The data processing method according to any one of claims 1 to 5, wherein the data format of the instantaneous power accumulation value is a direct format.
7. A data processing apparatus, which is applied to a lower computer, the data processing apparatus comprising:
the overflow detection unit is used for judging whether data in the current power consumption command overflows or not before returning the current power consumption command to the upper computer, wherein the data of the current power consumption command comprises an instantaneous power accumulated value, a turnover count and a sampling number;
the data adjusting unit is used for adjusting the data in the current power consumption command according to a preset rule if the data in the current power consumption command overflows;
and the sending unit is used for returning the adjusted current power consumption command to the upper computer.
8. The data processing apparatus according to claim 7, wherein the data adjusting unit is specifically configured to:
when the turnover count in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to be a preset power accumulated value adjusting value, and adjusting the turnover count in the current power consumption command to be a preset turnover count adjusting value;
calculating to obtain a sampling number adjusting value according to the power accumulated value adjusting value, the turnover count adjusting value and the average power of the lower computer, and the instantaneous power accumulated value, the turnover count and the sampling number in the previous power consumption command;
adjusting the sampling number in the current power consumption command to the sampling number adjustment value;
and/or the data adjusting unit is specifically configured to:
when the sampling number in the current power consumption command overflows, adjusting the instantaneous power accumulated value in the current power consumption command to the instantaneous power accumulated value in the previous power consumption command, adjusting the turnover count in the current power consumption command to the turnover count in the previous power consumption command, and adjusting the sampling number in the current power consumption command to a preset sampling number adjusting value.
9. A readable storage medium on which a program is stored, wherein the program, when executed by a processor, performs the steps of the data processing method according to any one of claims 1 to 6.
10. A lower computer comprising a memory and a processor;
the memory is used for storing programs;
it is characterized in that the preparation method is characterized in that,
the processor, configured to execute the program, and implement the steps of the data processing method according to any one of claims 1 to 6.
CN201911267148.0A 2019-12-11 2019-12-11 Data processing method and device, readable storage medium and lower computer Active CN110968179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911267148.0A CN110968179B (en) 2019-12-11 2019-12-11 Data processing method and device, readable storage medium and lower computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911267148.0A CN110968179B (en) 2019-12-11 2019-12-11 Data processing method and device, readable storage medium and lower computer

Publications (2)

Publication Number Publication Date
CN110968179A true CN110968179A (en) 2020-04-07
CN110968179B CN110968179B (en) 2021-04-23

Family

ID=70033806

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911267148.0A Active CN110968179B (en) 2019-12-11 2019-12-11 Data processing method and device, readable storage medium and lower computer

Country Status (1)

Country Link
CN (1) CN110968179B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217618A (en) * 2008-01-11 2008-07-09 南京图格科技发展有限公司 A real-time collection method of STB working status
CN103389963A (en) * 2012-05-09 2013-11-13 北京兆易创新科技股份有限公司 Embedded system controller
US9356729B2 (en) * 2013-04-10 2016-05-31 Realtek Semiconductor Corp. Communication device and method for configuring data transmission
CN108917978A (en) * 2018-08-31 2018-11-30 国网江苏省电力有限公司徐州供电分公司 A kind of electric equipment operation temperature measurement system based on tunable fiber F-P filter
CN110320440A (en) * 2018-03-30 2019-10-11 田喜桂 A kind of terminal area power monitoring system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101217618A (en) * 2008-01-11 2008-07-09 南京图格科技发展有限公司 A real-time collection method of STB working status
CN103389963A (en) * 2012-05-09 2013-11-13 北京兆易创新科技股份有限公司 Embedded system controller
US9356729B2 (en) * 2013-04-10 2016-05-31 Realtek Semiconductor Corp. Communication device and method for configuring data transmission
CN110320440A (en) * 2018-03-30 2019-10-11 田喜桂 A kind of terminal area power monitoring system
CN108917978A (en) * 2018-08-31 2018-11-30 国网江苏省电力有限公司徐州供电分公司 A kind of electric equipment operation temperature measurement system based on tunable fiber F-P filter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王晓东: "智能电能表过载运行时计量性能异常分析和改进策略", 《电测与仪表》 *

Also Published As

Publication number Publication date
CN110968179B (en) 2021-04-23

Similar Documents

Publication Publication Date Title
US8441377B2 (en) Method of dynamically adjusting long-press delay time, electronic device, and computer-readable medium
US9256321B2 (en) Touch device, processor and touch signal accessing method thereof
US9460334B2 (en) Control method for fingerprint recognition apparatus
US8169413B2 (en) Method for operating touch input device and portable terminal using the same
US10127370B2 (en) Computing device chording authentication and control
US20120054752A1 (en) Electronic device having operation mode dynamic adjusting mechanism and method of the same
CN111816178A (en) Voice equipment control method, device and equipment
WO2019007248A1 (en) Recommendation method and apparatus, device, and storage medium
CN111400126A (en) Network service abnormal data detection method, device, equipment and medium
CN110968179B (en) Data processing method and device, readable storage medium and lower computer
WO2016184191A1 (en) Reset calibration determining method, apparatus and terminal
CN104714675A (en) Gesture recognition method and device
TWI502427B (en) Touch device and measuring voltage dynamic adjustment method thereof
CN104898838A (en) Incoming call responding method and apparatus for handheld device
WO2021092806A1 (en) Screen parameter adjustment method and apparatus, and terminal device
CN104423612A (en) Key-identifying method, device and electronic equipment
CN114444333B (en) Ecological water level analysis method and device, electronic equipment and storage medium
US9065448B2 (en) Capacitive switch having high accuracy
CN113126814B (en) Key non-response correction method and device, terminal equipment and storage medium
CN113126813B (en) Correction method and device for key misjudgment, terminal equipment and storage medium
CN108459766A (en) A kind of control method of detection device, detection device and computer readable storage medium
CN115904103A (en) Control method of terminal touch screen, terminal equipment and storage medium
CN108700963B (en) Touch chip, touch detection method and device and terminal equipment
US20180314388A1 (en) Method of processing sensing signals and related processor
CN111340174A (en) Adjusting method, device, equipment and medium of cost sensitive neural network

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
GR01 Patent grant
GR01 Patent grant