CN107103652B - Data storage method and device - Google Patents

Data storage method and device Download PDF

Info

Publication number
CN107103652B
CN107103652B CN201710147268.1A CN201710147268A CN107103652B CN 107103652 B CN107103652 B CN 107103652B CN 201710147268 A CN201710147268 A CN 201710147268A CN 107103652 B CN107103652 B CN 107103652B
Authority
CN
China
Prior art keywords
target
data
target operation
signal
buffer
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.)
Active
Application number
CN201710147268.1A
Other languages
Chinese (zh)
Other versions
CN107103652A (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN201710147268.1A priority Critical patent/CN107103652B/en
Publication of CN107103652A publication Critical patent/CN107103652A/en
Application granted granted Critical
Publication of CN107103652B publication Critical patent/CN107103652B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C3/00Registering or indicating the condition or the working of machines or other apparatus, other than vehicles

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention discloses a data storage method and device. Wherein, the method comprises the following steps: reading first data stored in a memory of target equipment, wherein the first data records the historical running state of the target equipment; detecting whether target equipment generates target operation parameters in an operation process, wherein the operation process is performed after first data is generated; after the target operation parameter is detected, updating the first data according to the target operation parameter; the updated first data is stored in a memory. The method and the device solve the technical problem that the key operation data of the target equipment in the operation process cannot be referred to when the performance of the target equipment is improved.

Description

Data storage method and device
Technical Field
The invention relates to the field of data storage, in particular to a data storage method and device.
Background
At present gas heating hanging stove product only produces basic operation data such as the on & off state, the operational mode of mouth through the memory record, and to some key operation data of unit do not carry out statistics record, if: the number of communication failures, the total number of times of ignition of the electric fire needle, the number of times that the ignition duration is greater than a preset value in nearly 200 times of ignition and the like in the operation process lead to the following problems:
problem 1: no actual operation data of the unit can be referred to in the after-sales problem analysis;
problem 2: the technical personnel do not refer to the actual operation data of the unit for product improvement and reliability improvement.
Thereby further analyzing the problems for the technology and the after-sales personnel and increasing the difficulty in improving the product performance.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a data storage method and a data storage device, which are used for at least solving the technical problem that key operation data of target equipment in an operation process cannot be referred to when the performance of the target equipment is improved.
According to an aspect of an embodiment of the present invention, there is provided a data storage method, including: reading first data stored in a memory of a target device, wherein the first data records the historical operating state of the target device; detecting whether the target equipment generates target operation parameters in an operation process, wherein the operation process occurs after the first data are generated; after the target operation parameter is detected, updating the first data according to the target operation parameter; storing the updated first data in the memory.
Further, updating the first data according to the target operating parameter includes: storing the detected target operation parameters in a buffer; judging whether the number of target operations indicated by the target operation parameters in the buffer reaches a first preset threshold value or not, wherein the target operations are executed by the target equipment; and when the number of the target operations executed by the target equipment reaches the first preset threshold value, updating the first data according to the target operation parameters stored in the buffer.
Further, updating the first data according to the target operating parameter stored in the buffer comprises: counting the number of the target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer; and updating the first data according to the number, wherein the updated first data records the target operation and the number of the target operations corresponding to the target operation and meeting the preset condition.
Further, after updating the first data according to the amount, the method further comprises: and clearing the target operation parameters stored in the buffer.
Further, after reading the first data stored in the memory of the target device, the method further comprises: receiving a first signal, wherein the first signal is used for indicating that the first data is displayed; and displaying the first data on a display screen of the target equipment according to the first signal.
Further, receiving the first signal includes: receiving a second signal generated by a preset key; judging whether the duration of the second signal is greater than a second preset threshold value or not; and when the duration of the second signal is greater than the second preset threshold, determining the second signal as the first signal.
Further, the first data includes a code number and a numerical value, and displaying the first data on the display screen of the target device according to the first signal includes: converting the first data into a code number and a numerical value, wherein the code number is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter; displaying the code at a first display position of the display screen; and displaying the numerical value in other display positions of the display screen except the first display position in a scientific counting method mode.
According to another aspect of the embodiments of the present invention, there is also provided a data storage device, including: the device comprises a reading unit, a storage unit and a processing unit, wherein the reading unit is used for reading first data stored in a memory of target equipment, and the first data records the historical running state of the target equipment; a detecting unit, configured to detect whether the target device generates a target operating parameter in an operating process, where the operating process occurs after the first data is generated; the updating unit is used for updating the first data according to the target operation parameters after the target operation parameters are detected; a storage unit, configured to store the updated first data in the memory.
Further, the update unit includes: the storage module is used for storing the detected target operation parameters in a buffer; a first judging module, configured to judge whether a number of target operations indicated by the target operation parameter in the cache reaches a first preset threshold, where the target operations are executed by the target device; and the updating module is used for updating the first data according to the target operation parameters stored in the buffer when the number of the target operations executed by the target equipment reaches the first preset threshold.
Further, the update module includes: the counting submodule is used for counting the number of the target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer; and the updating submodule is used for updating the first data according to the number, wherein the updated first data records the target operation and the number of the target operations corresponding to the target operation and meeting the preset condition.
Further, the update module further comprises: a clearing submodule, configured to clear the target operating parameter stored in the buffer after the first data is updated according to the amount.
Further, the apparatus further comprises: a receiving unit, configured to receive a first signal after reading first data stored in a memory of a target device, where the first signal is used to instruct display of the first data; and the display unit is used for displaying the first data on a display screen of the target equipment according to the first signal.
Further, the receiving unit includes: the receiving module is used for receiving a second signal generated by a preset key; the second judging module is used for judging whether the duration of the second signal is greater than a second preset threshold value or not; and the determining module is used for determining the second signal as the first signal when the duration of the second signal is greater than the second preset threshold.
Further, the first data includes a code number and a numerical value, and the display unit includes: the conversion module is used for converting the first data into a code number and a numerical value, wherein the code number is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter; the first display module is used for displaying the code at a first display position of the display screen; and the second display module is used for displaying the numerical value in other display positions of the display screen except the first display position in a scientific counting method mode.
In the embodiment of the invention, reading first data stored in a memory of target equipment is adopted, wherein the first data records the historical operating state of the target equipment; detecting whether the target equipment generates target operation parameters in an operation process, wherein the operation process occurs after the first data are generated; after the target operation parameter is detected, updating the first data according to the target operation parameter; the method for storing the updated first data in the memory achieves the purpose of storing the key operation data of the target device in the operation process by storing the target operation parameters generated by the target device in the operation process in the memory, thereby realizing the technical effect of improving the performance of the target device according to the key operation data and further solving the technical problem that the key operation data of the target device in the operation process cannot be referred to when the performance of the target device is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of an alternative method of storing data according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an alternative data storage device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided a method embodiment of a method of storing data, it being noted that the steps illustrated in the flowchart of the figure may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flow chart of an alternative data storage method according to an embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
step S102, reading first data stored in a memory of target equipment, wherein the first data records the historical running state of the target equipment;
step S104, detecting whether the target equipment generates target operation parameters in the operation process, wherein the operation process occurs after the first data is generated;
step S106, after the target operation parameter is detected, updating the first data according to the target operation parameter;
step S108, the updated first data is stored in the memory.
In the embodiment of the invention, the target device can be any device which comprises a memory, and when the data is stored by the method of the embodiment of the invention, no additional memory or memory unit or other storage devices are needed, so that the cost of the device is saved. The target device can also be provided with a storage device, and the storage of the key operation data of the target device is realized by the method of the embodiment of the invention by additionally arranging the corresponding storage device in the target device, so that the technical effect of improving the performance of the target device according to the key operation data is realized.
The first data of the target device is operation data stored in the memory before the last power-off of the target device, and the first data records the historical operation state of the target device before the last power-off of the target device. After the target device is powered off, the target device does not generate new operation data, and therefore, the first data stored in the memory is not changed.
After the target device is powered on, first data stored in a memory of the target device before the target device is powered off for the last time is read, in the operation process of the target device, the operation state of the target device is detected, and whether a target operation parameter is generated in the operation process of the target device is detected, wherein the target operation parameter can be any operation parameter which can be obtained, taking a gas heating wall-mounted furnace as the target device as an example, the target operation parameter can be the number of times of communication failure between a main board and an actuator (which can be used for judging whether communication is stable), or the total number of times of wall-mounted ignition of an electric fire needle (which can be used for judging whether the electric fire wall-mounted furnace has frequent ignition phenomena), or the number of times of ignition duration longer than a certain set value (which can be used for judging whether some factor hinders ignition), and the like.
After the target operation parameters generated by the target equipment in the operation process are detected, the first data are updated according to the detected target operation parameters to obtain updated first data, and the updated first data are stored in a memory of the target equipment. At this time, the first data stored in the memory is the updated first data, when it is detected again that the target device generates the target operation parameter in the operation process, the updated first data is updated again according to the newly detected target operation parameter, and the finally updated first data is stored in the memory again. Therefore, when the target operation parameter is generated in the operation process of the target device, the first data in the memory can be updated in real time according to the generated target operation parameter, and even if the target device is suddenly powered off in the operation process, the latest key operation data can be stored in the memory of the target device.
In the embodiment of the invention, reading first data stored in a memory of target equipment is adopted, wherein the first data records the historical running state of the target equipment; detecting whether target equipment generates target operation parameters in an operation process, wherein the operation process occurs after first data are generated; after the target operation parameter is detected, updating the first data according to the target operation parameter; the method for storing the updated first data in the memory achieves the purpose of storing the key operation data of the target equipment in the operation process by storing the target operation parameters generated by the target equipment in the operation process in the memory, thereby realizing the technical effect of improving the performance of the target equipment according to the key operation data and further solving the technical problem that the key operation data of the target equipment in the operation process cannot be referred to when the performance of the target equipment is improved.
Optionally, updating the first data according to the target operating parameter includes: storing the detected target operation parameters in a buffer; judging whether the number of target operations indicated by the target operation parameters in the buffer reaches a first preset threshold value or not, wherein the target operations are executed by target equipment; and when the number of target operations executed by the target equipment reaches a first preset threshold value, updating the first data according to the target operation parameters stored in the buffer.
As an optional implementation manner of the embodiment of the present invention, when the first data is updated according to the target operation parameter, a simplified process is performed on the target operation parameter, so that the first data stored in the memory occupies less storage space. Optionally, when it is detected that the target device generates the target operation parameter during the operation process, the detected target operation parameter is temporarily stored in a buffer of the target device without updating the first data, and at this time, it is determined whether the number of target operations indicated by the target operation parameter stored in the buffer reaches a first threshold set in advance, where the target operations are executed by the target device during the operation process, and the target operation parameter is generated by the target device during the execution of the target operations. And if the number of target operations indicated by the target operation parameters stored in the buffer does not reach the first threshold value, continuously detecting the target operation parameters, and temporarily storing the detected target operation parameters in the buffer of the target equipment when the target operation parameters are detected. If the number of target operations indicated by the target operation parameters stored in the buffer reaches a first threshold value, the first data is updated according to the target operation parameters stored in the buffer. Through the simplified processing, the first data are updated according to the number of the target operation parameters reaching the first threshold value, and the data of a certain number of the target operation parameters are summarized, so that the target operation data can be prevented from being recorded in a memory one by one, and the storage space in the memory is saved.
As an optional implementation manner of the embodiment of the present invention, when the first data is updated according to the target operation parameter stored in the buffer, the target data indicated by the target operation parameter stored in the buffer is counted according to a preset condition, so as to count the number of target operations meeting the preset condition, and then the first data is updated according to the number of target operations meeting the preset condition. The updated first data records the target operation and the number of the target operations meeting the preset condition. Namely: counting the number of target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer; and updating the first data according to the number, wherein the updated first data records the target operation and the number of the target operations corresponding to the target operation and meeting the preset condition.
Taking a gas heating wall-mounted boiler as an example, the number of times of ignition of the wall-mounted boiler for which the ignition duration is greater than a certain set value in the last 200 times of ignition is recorded in a memory of the gas heating wall-mounted boiler, and the number of times of ignition for which the ignition duration is greater than the certain set value every 20 times of ignition can be recorded. Where ignition is the target operation and 20 is the first threshold. When ignition of the wall-mounted furnace is detected, target operation data used for indicating the ignition time length are temporarily stored in a buffer of the wall-mounted furnace, whether the target operation data stored in the buffer reach a set threshold value 20 or not is judged, when the target operation data stored in the buffer reach the set threshold value 20, the ignition frequency (corresponding to the number of target operations meeting the condition) with the ignition time length being larger than a certain set value in the 20 ignition data temporarily stored in the buffer is counted, and the first data are updated according to the ignition frequency, so that the ignition frequency with the ignition time length being larger than a certain set threshold value in the last 20 ignition operations is recorded in the first data. And only 10 groups of data need to be recorded in the first data, so that the recording of the ignition times of which the ignition duration is greater than a certain set value in the last 200 ignitions can be completed. The storage space for storing the first data in the memory is greatly saved. Optionally, when 10 groups of data have been recorded in the memory, and 10 groups of data record the number of times of ignition with the duration greater than a certain set value in the last 200 times of ignition, the number of times of ignition with the duration greater than a certain set value in the last 20 times of ignition needs to be recorded again, a group of data with the earliest occurrence time recorded in the first data needs to be deleted first, and then the number of times of ignition with the duration greater than a certain set value in the last 20 times of ignition needs to be recorded in the first data.
Optionally, after updating the first data according to the quantity, the method further comprises: and clearing the target operation parameters stored in the buffer.
And after the target operation data stored in the buffer reaches a first preset threshold and the first data is updated according to the target operation data stored in the buffer, clearing the target operation data in the buffer to restart recording the next group of data.
It should be noted that, if the target device is powered off when the amount of the target operation data in the buffer has not reached the first preset threshold, the target operation data stored in the buffer will be discarded. And when the target equipment is powered on, storing the detected target operation data into the buffer again.
Optionally, after reading the first data stored in the memory of the target device, the method further comprises: receiving a first signal, wherein the first signal is used for indicating that first data are displayed; and displaying the first data on a display screen of the target device according to the first signal.
The first data stored in the memory may also be displayed on the display screen of the target device, and optionally, a first signal may be sent to the target device through a key provided on the target device to instruct the display of the first data in the memory on the display screen of the target device.
As an optional implementation manner of the embodiment of the present invention, in order to prevent the target device from accidentally touching the key of the target device and entering the viewing mode of the first data, the duration of the first signal may be set, and only when the duration of the second signal generated by the preset key is greater than the preset duration, the target device may be triggered to enter the viewing mode of the first data, so that the first data is displayed on the display screen. Namely: receiving a second signal generated by a preset key; judging whether the duration of the second signal is greater than a second preset threshold value or not; and when the duration of the second signal is greater than a second preset threshold, determining the second signal as the first signal.
Optionally, the first data includes a code number and a numerical value, and displaying the first data on the display screen of the target device according to the first signal includes: converting the first data into a code number and a numerical value, wherein the code number is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter; displaying a code number at a first display position of a display screen; and displaying the numerical value in other display positions except the first display position on the display screen in a scientific counting method mode.
As an optional implementation manner of the embodiment of the present invention, a display manner of the first data may also be simplified. Optionally, the operation data of the first data record is converted into a mode of code number and numerical value, wherein the code number represents the type of the target operation parameter, and the numerical value is the specific numerical value of the target operation parameter. And displaying the code number of the first data at a first display position of the display screen, and displaying the numerical value of the first data at other display positions of the display screen in a scientific counting method mode.
For example: only four-digit numerical nixie tube can display four digits on the display screen of the target device, the first data to be displayed is total ignition times 35500 times, the data type code 1 of the total ignition times is displayed on the first display position of the four-digit numerical nixie tube, and specific numerical values are displayed on the other three display positions, such as: 35500 can be displayed as 363 wherein data can be reduced in a rounded manner when the display position is insufficient to display all numbers. The total number of firings 35500 times is shown on the display screen as 1363.
Optionally, the first data includes a plurality of sub-data, and displaying the first data on the display screen of the target device according to the first signal includes: and displaying the plurality of subdata on the display screen of the target equipment one by one according to the first signal.
In order to avoid inconvenience of viewing the first data one by one when the data volume of the first data is too large, when the first data is displayed on the display screen of the target device according to the first signal, all the first data is displayed in a rolling mode from the first data of the first data, when the target device receives other signals for selecting data, the first data is stopped from being displayed in a rolling mode, and the previous data or the next data of the data currently displayed on the display screen is displayed according to the selection signal.
According to an embodiment of the present invention, an embodiment of an apparatus for storing data is further provided, and fig. 2 is a schematic diagram of an optional data storage apparatus according to an embodiment of the present invention, as shown in fig. 2, the apparatus includes:
a reading unit 210, configured to read first data stored in a memory of a target device, where the first data records a historical operating state of the target device;
a detecting unit 220, configured to detect whether a target device generates a target operation parameter during an operation process, where the operation process occurs after the first data is generated;
an updating unit 230 for updating the first data according to the target operation parameter after the target operation parameter is detected;
a storage unit 240 for storing the updated first data in a memory.
In the embodiment of the invention, the target device can be any device which comprises a memory, and when the data is stored by the method of the embodiment of the invention, no additional memory or memory unit or other storage devices are needed, so that the cost of the device is saved. The target device can also be provided with a storage device, and the storage of the key operation data of the target device is realized by the method of the embodiment of the invention by additionally arranging the corresponding storage device in the target device, so that the technical effect of improving the performance of the target device according to the key operation data is realized.
The first data of the target device is operation data stored in the memory before the last power-off of the target device, and the first data records the historical operation state of the target device before the last power-off of the target device. After the target device is powered off, the target device does not generate new operation data, and therefore, the first data stored in the memory is not changed.
After the target device is powered on, first data stored in a memory of the target device before the target device is powered off for the last time is read, in the operation process of the target device, the operation state of the target device is detected, and whether a target operation parameter is generated in the operation process of the target device is detected, wherein the target operation parameter can be set to be any available operation parameter, taking a gas heating wall-mounted furnace as the target device as an example, the target operation parameter can be set to be the number of times of communication failure between a main board and an actuator (which can be used for judging whether communication is stable), or the total number of times of ignition of an electric fire needle wall-mounted furnace (which can be used for judging whether a phenomenon of frequent ignition exists in the electric fire wall-mounted furnace), or the number of times of ignition duration longer than a certain set value (which can be used for judging whether a.
After the target operation parameters generated by the target equipment in the operation process are detected, the first data are updated according to the detected target operation parameters to obtain updated first data, and the updated first data are stored in a memory of the target equipment. At this time, the first data stored in the memory is the updated first data, when it is detected again that the target device generates the target operation parameter in the operation process, the updated first data is updated again according to the newly detected target operation parameter, and the finally updated first data is stored in the memory again. Therefore, when the target operation parameter is generated in the operation process of the target device, the first data in the memory can be updated in real time according to the generated target operation parameter, and even if the target device is suddenly powered off in the operation process, the latest key operation data can be stored in the memory of the target device.
In the embodiment of the invention, reading first data stored in a memory of target equipment is adopted, wherein the first data records the historical running state of the target equipment; detecting whether target equipment generates target operation parameters in an operation process, wherein the operation process occurs after first data are generated; after the target operation parameter is detected, updating the first data according to the target operation parameter; the method for storing the updated first data in the memory achieves the purpose of storing the key operation data of the target equipment in the operation process by storing the target operation parameters generated by the target equipment in the operation process in the memory, thereby realizing the technical effect of improving the performance of the target equipment according to the key operation data and further solving the technical problem that the key operation data of the target equipment in the operation process cannot be referred to when the performance of the target equipment is improved.
Optionally, the update unit includes: the storage module is used for storing the detected target operation parameters in a buffer; the first judgment module is used for judging whether the number of target operations indicated by the target operation parameters in the buffer reaches a first preset threshold value or not, and the target operations are executed by the target equipment; and the updating module is used for updating the first data according to the target operation parameters stored in the buffer when the number of target operations executed by the target equipment reaches a first preset threshold value.
As an optional implementation manner of the embodiment of the present invention, when the first data is updated according to the target operation parameter, a simplified process is performed on the target operation parameter, so that the first data stored in the memory occupies less storage space. Optionally, when it is detected that the target device generates the target operation parameter during the operation process, the detected target operation parameter is temporarily stored in a buffer of the target device without updating the first data, and at this time, it is determined whether the number of target operations indicated by the target operation parameter stored in the buffer reaches a first threshold set in advance, where the target operations are executed by the target device during the operation process, and the target operation parameter is generated by the target device during the execution of the target operations. And if the number of target operations indicated by the target operation parameters stored in the buffer does not reach the first threshold value, continuously detecting the target operation parameters, and temporarily storing the detected target operation parameters in the buffer of the target equipment when the target operation parameters are detected. If the number of target operations indicated by the target operation parameters stored in the buffer reaches a first threshold value, the first data is updated according to the target operation parameters stored in the buffer. Through the simplified processing, the first data are updated according to the number of the target operation parameters reaching the first threshold value, and the data of a certain number of the target operation parameters are summarized, so that the target operation data can be prevented from being recorded in a memory one by one, and the storage space in the memory is saved.
As an optional implementation manner of the embodiment of the present invention, when the first data is updated according to the target operation parameter stored in the buffer, the target data indicated by the target operation parameter stored in the buffer is counted according to a preset condition, so as to count the number of target operations meeting the preset condition, and then the first data is updated according to the number of target operations meeting the preset condition. The updated first data records the target operation and the number of the target operations meeting the preset condition. Namely, the update module includes: the counting submodule is used for counting the number of target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer; and the updating submodule is used for updating the first data according to the quantity, wherein the updated first data records the target operation and the quantity of the target operation corresponding to the target operation and meeting the preset condition.
Taking a gas heating wall-mounted boiler as an example, the number of times of ignition of the wall-mounted boiler for which the ignition duration is greater than a certain set value in the last 200 times of ignition is recorded in a memory of the gas heating wall-mounted boiler, and the number of times of ignition for which the ignition duration is greater than the certain set value every 20 times of ignition can be recorded. Where ignition is the target operation and 20 is the first threshold. When ignition of the wall-mounted furnace is detected, target operation data used for indicating the ignition time length are temporarily stored in a buffer of the wall-mounted furnace, whether the target operation data stored in the buffer reach a set threshold value 20 or not is judged, when the target operation data stored in the buffer reach the set threshold value 20, the ignition frequency (corresponding to the number of target operations meeting the condition) with the ignition time length being larger than a certain set value in the 20 ignition data temporarily stored in the buffer is counted, and the first data are updated according to the ignition frequency, so that the ignition frequency with the ignition time length being larger than a certain set threshold value in the last 20 ignition operations is recorded in the first data. And only 10 groups of data need to be recorded in the first data, so that the recording of the ignition times of which the ignition duration is greater than a certain set value in the last 200 ignitions can be completed. The storage space for storing the first data in the memory is greatly saved. Optionally, when 10 groups of data have been recorded in the memory, and 10 groups of data record the number of times of ignition with the duration greater than a certain set value in the last 200 times of ignition, the number of times of ignition with the duration greater than a certain set value in the last 20 times of ignition needs to be recorded again, a group of data with the earliest occurrence time recorded in the first data needs to be deleted first, and then the number of times of ignition with the duration greater than a certain set value in the last 20 times of ignition needs to be recorded in the first data.
Optionally, the update module further comprises: and the clearing submodule is used for clearing the target operation parameters stored in the buffer after the first data is updated according to the quantity.
And after the target operation data stored in the buffer reaches a first preset threshold and the first data is updated according to the target operation data stored in the buffer, clearing the target operation data in the buffer to restart recording the next group of data.
It should be noted that, if the target device is powered off when the amount of the target operation data in the buffer has not reached the first preset threshold, the target operation data stored in the buffer will be discarded. And when the target equipment is powered on, storing the detected target operation data into the buffer again.
Optionally, the apparatus further comprises: a receiving unit configured to receive a first signal after reading first data stored in a memory of a target device, wherein the first signal is used to instruct display of the first data; and the display unit is used for displaying the first data on the display screen of the target equipment according to the first signal.
The first data stored in the memory may also be displayed on the display screen of the target device, and optionally, a first signal may be sent to the target device through a key provided on the target device to instruct the display of the first data in the memory on the display screen of the target device.
As an optional implementation manner of the embodiment of the present invention, in order to prevent the target device from accidentally touching the key of the target device and entering the viewing mode of the first data, the duration of the first signal may be set, and only when the duration of the second signal generated by the preset key is greater than the preset duration, the target device may be triggered to enter the viewing mode of the first data, so that the first data is displayed on the display screen. Namely: the receiving unit includes: the receiving module is used for receiving a second signal generated by a preset key; the second judgment module is used for judging whether the duration of the second signal is greater than a second preset threshold value or not; and the determining module is used for determining the second signal as the first signal when the duration of the second signal is greater than a second preset threshold.
Optionally, the first data includes a code number and a numerical value, and the display unit includes: the conversion module is used for converting the first data into a code and a numerical value, wherein the code is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter; the first display module is used for displaying the code at a first display position of the display screen; and the second display module is used for displaying the numerical value in other display positions except the first display position on the display screen in a scientific counting method mode.
As an optional implementation manner of the embodiment of the present invention, a display manner of the first data may also be simplified. Optionally, the operation data of the first data record is converted into a mode of code number and numerical value, wherein the code number represents the type of the target operation parameter, and the numerical value is the specific numerical value of the target operation parameter. And displaying the code number of the first data at a first display position of the display screen, and displaying the numerical value of the first data at other display positions of the display screen in a scientific counting method mode.
For example: only four-digit numerical nixie tube can display four digits on the display screen of the target device, the first data to be displayed is total ignition times 35500 times, the data type code 1 of the total ignition times is displayed on the first display position of the four-digit numerical nixie tube, and specific numerical values are displayed on the other three display positions, such as: 35500 can be displayed as 363 wherein data can be reduced in a rounded manner when the display position is insufficient to display all numbers. The total number of firings 35500 times is shown on the display screen as 1363.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (6)

1. A method for storing data, comprising:
reading first data stored in a memory of a target device, wherein the first data records the historical operating state of the target device;
detecting whether the target equipment generates target operation parameters in an operation process, wherein the operation process occurs after the first data are generated;
after the target operation parameter is detected, updating the first data according to the target operation parameter;
storing the updated first data in the memory;
wherein updating the first data according to the target operating parameter comprises:
storing the detected target operation parameters in a buffer;
judging whether the number of target operations indicated by the target operation parameters in the buffer reaches a first preset threshold value or not, wherein the target operations are executed by the target equipment;
when the number of the target operations executed by the target equipment reaches the first preset threshold value, updating the first data according to the target operation parameters stored in the buffer;
wherein updating the first data according to the target operating parameter stored in the buffer comprises:
counting the number of the target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer;
updating the first data according to the number, wherein the updated first data records the target operation and the number of the target operations corresponding to the target operation and meeting the preset condition;
wherein after reading the first data stored in the memory of the target device, the method further comprises:
receiving a first signal, wherein the first signal is used for indicating that the first data is displayed;
displaying the first data on a display screen of the target device according to the first signal;
wherein the first data comprises a code number and a numerical value, and displaying the first data on a display screen of the target device according to the first signal comprises:
converting the first data into a code number and a numerical value, wherein the code number is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter;
displaying the code at a first display position of the display screen;
and displaying the numerical value in other display positions of the display screen except the first display position in a scientific counting method mode.
2. The method of claim 1, wherein after updating the first data according to the amount, the method further comprises:
and clearing the target operation parameters stored in the buffer.
3. The method of claim 1, wherein receiving the first signal comprises:
receiving a second signal generated by a preset key;
judging whether the duration of the second signal is greater than a second preset threshold value or not;
and when the duration of the second signal is greater than the second preset threshold, determining the second signal as the first signal.
4. An apparatus for processing data, comprising:
the device comprises a reading unit, a storage unit and a processing unit, wherein the reading unit is used for reading first data stored in a memory of target equipment, and the first data records the historical running state of the target equipment;
a detecting unit, configured to detect whether the target device generates a target operating parameter in an operating process, where the operating process occurs after the first data is generated;
the updating unit is used for updating the first data according to the target operation parameters after the target operation parameters are detected;
a storage unit configured to store the updated first data in the memory;
wherein the update unit includes:
the storage module is used for storing the detected target operation parameters in a buffer;
a first judging module, configured to judge whether a number of target operations indicated by the target operation parameter in the cache reaches a first preset threshold, where the target operations are executed by the target device;
the updating module is used for updating the first data according to the target operation parameters stored in the buffer when the number of the target operations executed by the target equipment reaches the first preset threshold;
wherein the update module comprises:
the counting submodule is used for counting the number of the target operations meeting preset conditions in the target operations indicated by the target operation parameters according to the target operation parameters stored in the buffer;
the updating submodule is used for updating the first data according to the number, wherein the updated first data records the target operation and the number of the target operations corresponding to the target operation and meeting the preset condition;
wherein the apparatus further comprises:
a receiving unit, configured to receive a first signal after reading first data stored in a memory of a target device, where the first signal is used to instruct display of the first data;
the display unit is used for displaying the first data on a display screen of the target equipment according to the first signal;
wherein the first data includes a code and a numerical value, the display unit includes:
the conversion module is used for converting the first data into a code number and a numerical value, wherein the code number is used for representing the type of the target operation parameter, and the numerical value is used for representing the numerical value of the target operation parameter;
the first display module is used for displaying the code at a first display position of the display screen;
and the second display module is used for displaying the numerical value in other display positions of the display screen except the first display position in a scientific counting method mode.
5. The apparatus of claim 4, wherein the update module further comprises:
a clearing submodule, configured to clear the target operating parameter stored in the buffer after the first data is updated according to the amount.
6. The apparatus of claim 4, wherein the receiving unit comprises:
the receiving module is used for receiving a second signal generated by a preset key;
the second judging module is used for judging whether the duration of the second signal is greater than a second preset threshold value or not;
and the determining module is used for determining the second signal as the first signal when the duration of the second signal is greater than the second preset threshold.
CN201710147268.1A 2017-03-13 2017-03-13 Data storage method and device Active CN107103652B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710147268.1A CN107103652B (en) 2017-03-13 2017-03-13 Data storage method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710147268.1A CN107103652B (en) 2017-03-13 2017-03-13 Data storage method and device

Publications (2)

Publication Number Publication Date
CN107103652A CN107103652A (en) 2017-08-29
CN107103652B true CN107103652B (en) 2020-06-16

Family

ID=59674799

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710147268.1A Active CN107103652B (en) 2017-03-13 2017-03-13 Data storage method and device

Country Status (1)

Country Link
CN (1) CN107103652B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833033B (en) * 2018-06-07 2021-03-02 Oppo广东移动通信有限公司 Method and device for determining radio frequency calibration parameters, storage medium and mobile terminal
CN109597840A (en) * 2018-12-06 2019-04-09 珠海格力电器股份有限公司 Data display method and system and energy management back-end platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010396A (en) * 2015-06-24 2017-01-12 富士通株式会社 Storage device, cache write control method, and cache write control program
CN106453667A (en) * 2016-12-20 2017-02-22 北京小米移动软件有限公司 Method and device for updating cached data

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100549896C (en) * 2005-02-03 2009-10-14 上海富申冷机有限公司 The intelligent energy-saving controller of commercial show freezer
US7627714B2 (en) * 2006-08-22 2009-12-01 International Business Machines Corporation Apparatus, system, and method for preventing write starvation in a partitioned cache of a storage controller
CN103034217B (en) * 2012-12-26 2015-01-28 东南大学 Monitoring control method of intelligent home gateway based on internet of things
CN103425122B (en) * 2013-08-13 2016-01-20 重庆长安汽车股份有限公司 The failure management method of new energy vehicle controller
US9411735B2 (en) * 2014-04-15 2016-08-09 International Business Machines Corporation Counter-based wide fetch management
CN104753933A (en) * 2015-03-19 2015-07-01 腾讯科技(深圳)有限公司 Data processing method and device, client side and server
CN105471969B (en) * 2015-11-17 2019-07-02 国家电网公司 Electric network data handles cloud platform system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017010396A (en) * 2015-06-24 2017-01-12 富士通株式会社 Storage device, cache write control method, and cache write control program
CN106453667A (en) * 2016-12-20 2017-02-22 北京小米移动软件有限公司 Method and device for updating cached data

Also Published As

Publication number Publication date
CN107103652A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
US8024297B2 (en) Data logging system and method thereof for heterogeneous data
CN106293803B (en) A kind of application control method and device
CN110995482B (en) Alarm analysis method and device, computer equipment and computer readable storage medium
CN107103652B (en) Data storage method and device
JP5245934B2 (en) Management device management program, management device, management device management method, and storage system
CN113516529B (en) Abnormal order determining method and device, storage medium and electronic equipment
CN110413430A (en) A kind of life-span prediction method of solid state hard disk, device and equipment
CN110247796A (en) Monitoring alarm method, apparatus and relevant device
CN104270605A (en) Method and device for processing video monitoring data
CN105893471B (en) Data processing method and electronic equipment
CN111367584B (en) Power supply adaptation method and device and computer readable storage medium
CN106657660A (en) Information prompting method and apparatus
CN108762568B (en) Broken line repairing method and device for touch screen and household appliance
CN106571971B (en) Method, device and system for detecting vacant website
CN110674168A (en) Cache key abnormity detection method, device, storage medium and terminal
CN106941569B (en) Display data processing method and device
CN103761194B (en) A kind of EMS memory management process and device
CN108197050A (en) A kind of device identification method, apparatus and system
CN110795744B (en) Abnormal information positioning method and system, electronic equipment and storage medium
CN111970675A (en) Early warning method and device and storage medium
CN115709666A (en) Battery replacement control method and device for charging cabinet
CN114650390A (en) Video playing method, event detection method, system and device and electronic equipment
CN106649069B (en) User behavior statistical method and system
CN114328563B (en) Data updating control method and device
CN113038248B (en) File processing method and device, video playing method and device and electronic device

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