CN114691536A - Air conditioner test data storage method and device, electronic equipment and storage medium - Google Patents

Air conditioner test data storage method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114691536A
CN114691536A CN202210198889.3A CN202210198889A CN114691536A CN 114691536 A CN114691536 A CN 114691536A CN 202210198889 A CN202210198889 A CN 202210198889A CN 114691536 A CN114691536 A CN 114691536A
Authority
CN
China
Prior art keywords
target
air conditioner
instruction
chip
test 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.)
Pending
Application number
CN202210198889.3A
Other languages
Chinese (zh)
Inventor
陈伟杰
何嘉良
陈妃味
胡志娟
刘晖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TCL Air Conditioner Zhongshan Co Ltd
Original Assignee
TCL Air Conditioner Zhongshan 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 TCL Air Conditioner Zhongshan Co Ltd filed Critical TCL Air Conditioner Zhongshan Co Ltd
Priority to CN202210198889.3A priority Critical patent/CN114691536A/en
Publication of CN114691536A publication Critical patent/CN114691536A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management

Abstract

The application provides an air conditioner test data storage method, an air conditioner test data storage device, electronic equipment and a computer readable storage medium, wherein the air conditioner test data storage method comprises the following steps: acquiring a target instruction of the air conditioner; checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip; and writing a new user control instruction into the target chip according to the type of the target chip. Therefore, the air conditioner test data storage method is suitable for various air conditioners with different chip types, the target chip type can be identified through the target instruction, the new user control instruction for testing is written into the target chip according to the target chip type, when a worker tests the air conditioner, the worker does not need to manually classify the air conditioner according to the chip type, and then the test data are written into the target chip through different writing methods, so that the labor cost of background testing can be saved.

Description

Air conditioner test data storage method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of air conditioners, in particular to an air conditioner test data storage method and device, electronic equipment and a computer readable storage medium.
Background
After a user sends an instruction to the air conditioner, in order to solve the problem that the running state set by the user originally disappears after the air conditioner is powered off and needs to be reset after the air conditioner is powered on, the instruction sent by the user is usually memorized before the power off, and if the power off is suddenly carried out, the running can be automatically memorized according to the setting before the power off after the power on. Therefore, the power failure memory function of the air conditioner plays a key role in the comfort level of a user during use, and a worker needs to store test data in the air conditioner and test the data to ensure the power failure memory function of the air conditioner.
However, when the test data is stored in the air conditioner at present, due to the fact that the types of the air conditioner chips are different and the writing methods are different, workers need to manually classify the air conditioner to be capable of effectively writing the test data into the air conditioner, and therefore the method for storing the test data is high in labor cost and low in efficiency.
Disclosure of Invention
The application provides an air conditioner test data storage method and device, electronic equipment and a computer readable storage medium, and aims to solve the problems of high cost and low efficiency in storing test data when the air conditioner is tested for power failure memory at present.
In a first aspect, the present application provides an air conditioner test data storage method, including:
acquiring a target instruction of an air conditioner;
checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip;
and writing a new user control instruction into the target chip according to the type of the target chip.
In a possible implementation manner of the present application, the verifying the target chip in the air conditioner according to the target instruction to determine the target chip type of the target chip includes:
writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result corresponding to each preset chip address, wherein each preset chip address corresponds to different chip types;
determining a target chip address matched with the target instruction according to the corresponding reading result;
and setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner.
In a possible implementation manner of the present application, the obtaining a target instruction of an air conditioner includes:
after the air conditioner is powered on, acquiring an initial instruction of the air conditioner;
and if the target byte in the initial instruction is the same as the preset byte, judging that the initial instruction is the first user control instruction after the air conditioner is started, and setting the initial instruction as the target instruction.
In a possible implementation manner of the present application, the writing a new user control instruction into the target chip according to the type of the target chip includes:
if the type of the target chip is an analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received;
determining an idle target memory segment in a plurality of pre-divided memory segments of the target memory page;
and writing the new user control instruction into the target storage segment.
In one possible implementation manner of the present application, before the obtaining of the target instruction of the air conditioner, the method further includes:
acquiring a target area where an air conditioner is located;
inquiring the historical power-off times of the target area according to a preset time range and the current time;
and if the historical power failure times are larger than or equal to a preset time threshold value, executing the step of acquiring the target instruction of the air conditioner.
In a possible implementation manner of the present application, the acquiring a target instruction of an air conditioner includes:
after the air conditioner is powered on, responding to instruction input operation, and acquiring a first instruction and a second instruction which are input in sequence;
and if the input time interval between the first instruction and the second instruction is smaller than a preset interval threshold value and the instruction types of the first instruction and the second instruction are different, setting the second instruction as a target instruction.
In one possible implementation manner of the present application, before the obtaining of the target instruction of the air conditioner, the method further includes:
receiving a model reading instruction of an air conditioner, and reading a target model of the air conditioner;
and if the target model cannot be read, executing the step of acquiring the target instruction of the air conditioner.
In a second aspect, the present application provides an air conditioner test data storage device, comprising:
the acquisition unit is used for acquiring a target instruction of the air conditioner;
the determining unit is used for verifying a target chip in the air conditioner according to the target instruction and determining the type of the target chip;
and the writing unit is used for writing a new user control instruction into the target chip according to the type of the target chip.
In one possible implementation manner of the present application, the determining unit is further configured to:
writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result corresponding to each preset chip address, wherein each preset chip address corresponds to different chip types;
determining a target chip address matched with the target instruction according to the corresponding reading result;
and setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner.
In one possible implementation manner of the present application, the obtaining unit is further configured to:
after the air conditioner is powered on, acquiring an initial instruction of the air conditioner;
and if the target byte in the initial instruction is the same as the preset byte, judging that the initial instruction is the first user control instruction after the air conditioner is started, and setting the initial instruction as the target instruction.
In one possible implementation manner of the present application, the writing unit is further configured to:
if the type of the target chip is an analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received;
determining an idle target memory segment in a plurality of pre-divided memory segments of the target memory page;
and writing the new user control instruction into the target storage segment.
In one possible implementation manner of the present application, the obtaining unit is further configured to:
acquiring a target area where an air conditioner is located;
inquiring the historical power-off times of the target area according to a preset time range and the current time;
and if the historical power failure times are larger than or equal to a preset time threshold value, executing the step of acquiring the target instruction of the air conditioner.
In one possible implementation manner of the present application, the obtaining unit is further configured to:
after the air conditioner is powered on, responding to instruction input operation, and acquiring a first instruction and a second instruction which are input in sequence;
and if the input time interval between the first instruction and the second instruction is smaller than a preset interval threshold value and the instruction types of the first instruction and the second instruction are different, setting the second instruction as a target instruction.
In one possible implementation manner of the present application, the air conditioner test data storage device further includes a model reading unit, and the model reading unit is configured to:
receiving a model reading instruction of an air conditioner, and reading a target model of the air conditioner;
and if the target model cannot be read, executing the step of acquiring the target instruction of the air conditioner.
In a third aspect, the present application further provides an electronic device, where the electronic device includes a processor and a memory, where the memory stores a computer program, and the processor executes the steps in any one of the air conditioner test data storage methods provided in the present application when calling the computer program in the memory.
In a fourth aspect, the present application further provides a computer readable storage medium, on which a computer program is stored, the computer program being loaded by a processor to perform the steps of the air conditioner test data storage method.
In summary, the air conditioner test data storage method provided by the application comprises the following steps: acquiring a target instruction of an air conditioner; checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip; and writing a new user control instruction into the target chip according to the type of the target chip. Therefore, the air conditioner test data storage method is suitable for various air conditioners with different chip types, the target chip type can be identified through the target instruction, the new user control instruction for testing is written into the target chip according to the target chip type, when a worker tests the air conditioner, the worker does not need to manually classify the air conditioner according to the chip type, and then the test data are written into the target chip through different writing methods, so that the labor cost of background testing can be saved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of a method for storing test data of an air conditioner according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a method for storing test data of an air conditioner according to an embodiment of the present disclosure;
FIG. 3 is a schematic flowchart illustrating a process of writing a new user control command into a target memory segment when a target chip type is an analog chip provided in an embodiment of the present application;
fig. 4 is another schematic flow chart of a method for storing test data of an air conditioner when the power failure frequency of a target area is high and the power failure probability of the air conditioner is high in the embodiment of the application;
FIG. 5 is a flowchart illustrating a method for avoiding jitter according to a preset interval threshold according to an embodiment of the present application;
fig. 6 is a schematic flowchart of another method for storing test data of an air conditioner according to an embodiment of the present disclosure, in which when a target model of the air conditioner cannot be read, chip verification is performed;
FIG. 7 is a schematic structural diagram of an embodiment of an air conditioner test data storage device provided in an embodiment of the present application;
fig. 8 is a schematic structural diagram of an embodiment of an electronic device provided in the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, 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 application.
In the description of the embodiments of the present application, it should be understood that the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first", "second", may explicitly or implicitly include one or more of the described features. In the description of the embodiments of the present application, "a plurality" means two or more unless specifically defined otherwise.
The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known processes have not been described in detail so as not to obscure the description of the embodiments of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the embodiments herein.
The embodiment of the application provides an air conditioner test data storage method and device, electronic equipment and a computer readable storage medium. The air conditioner test data storage device can be integrated in electronic equipment, and the electronic equipment can be a server or a terminal and other equipment.
The execution main body of the air conditioner test data storage method in the embodiment of the present application may be the air conditioner test data storage device provided in the embodiment of the present application, or different types of electronic devices such as a server device, a physical host, or a User Equipment (UE) integrated with the air conditioner test data storage device, where the air conditioner test data storage device may be implemented in a hardware or software manner, and the UE may specifically be a terminal device such as a smart phone, a tablet computer, a notebook computer, a palm computer, a desktop computer, or a Personal Digital Assistant (PDA).
The electronic device may adopt a working mode of independent operation, or may also adopt a working mode of a device cluster.
Referring to fig. 1, fig. 1 is a schematic view of a scenario of an air conditioner test data storage system according to an embodiment of the present application. The air conditioner test data storage system may include an electronic device 100, and an air conditioner test data storage device is integrated in the electronic device 100. In addition, as shown in fig. 1, the air conditioner test data storage system may further include a memory 200 for target instructions, such as storing image data, video data.
It should be noted that the scenario diagram of the air conditioner test data storage system shown in fig. 1 is only an example, and the air conditioner test data storage system and the scenario described in the embodiment of the present application are for more clearly illustrating the technical solution of the embodiment of the present application, and do not form a limitation on the technical solution provided in the embodiment of the present application.
In the following, an air conditioner test data storage method provided by an embodiment of the present application is described, in the embodiment of the present application, an electronic device is used as an execution main body, and for simplicity and convenience of description, the execution main body will be omitted in subsequent method embodiments. The air conditioner test data storage method provided by the embodiment of the application comprises the following steps: acquiring a target instruction of an air conditioner; checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip; and writing a new user control instruction into the target chip according to the type of the target chip.
Referring to fig. 2, fig. 2 is a schematic flowchart of a method for storing test data of an air conditioner according to an embodiment of the present disclosure. It should be noted that, although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than that shown or described herein. The air conditioner test data storage method comprises the steps of 201-203, wherein:
201. and acquiring a target instruction of the air conditioner.
The target instruction may be a first user control instruction issued by a user after the air conditioner is turned on. The user can send out a user control instruction by taking a wireless signal or a wired signal as a medium through a remote controller, a control platform or control software APP and other devices. For example, when testing the air conditioner repaired before or after leaving the factory, the worker can send a user control instruction to the air conditioner through the unified test control platform by using Wifi, bluetooth and the like as media.
The user control command refers to a data command sent by a user for controlling the air conditioner. For example, the user control command may be a temperature adjustment command, an operation mode adjustment command, and the like issued by a user, which is not limited in this embodiment of the application. In the embodiment of the present application, the user control instruction refers to a test instruction sent by a worker during testing.
The format of the target command is determined according to a storage format in the air conditioner. For example, the instruction byte number of the target instruction may be determined according to the storage bit number of the storage format in the air conditioner, and assuming that the storage bit number in the air conditioner is 4 bits, that is, the storage format in the air conditioner is 0xabcd, the format of the target instruction is also 0xabcd, abcd may be used to refer to an operation parameter or a flag of the air conditioner, for example, a may be used to refer to a current windshield, b may be used to refer to a cooling/heating mode, c may be used to refer to whether the instruction is a first instruction after the air conditioner is turned on, and d may be used to refer to a set temperature.
In some embodiments, the electronic device may determine whether the command is a first user control command issued by a user after the air conditioner is turned on, through a specific byte in the user control command. At this time, the step "acquiring the target instruction of the air conditioner" may be performed by:
(1) and after the air conditioner is powered on, acquiring an initial instruction of the air conditioner.
The initial command may refer to a user control command currently received by the air conditioner. For example, the electronic device may monitor the air conditioner in real time, and after the air conditioner is powered on, obtain a user control instruction received by the air conditioner in real time to obtain an initial instruction of the air conditioner. It can be understood that the initial instruction may be a first user control instruction sent by a user after the air conditioner is turned on, or may not be the first user instruction sent by the user after the air conditioner is turned on.
(2) And if the target byte in the initial instruction is the same as the preset byte, judging that the initial instruction is the first user control instruction after the air conditioner is started, and setting the initial instruction as the target instruction.
The target byte is a byte in the user control instruction, which is used for representing whether the corresponding instruction is the first user control instruction after the air conditioner is started. If one instruction is the first user control instruction after the air conditioner is started, the target byte in the instruction is the same as the preset byte which is preset. For example, the first user control command after the air conditioner is turned on may be preset, where the nth byte is 1, and the nth byte is 0 for a command that is not the first user control command after the air conditioner is turned on. And then the electronic equipment monitors the air conditioner in real time, when the initial instruction is obtained, whether the nth byte in the initial instruction is 1 or not can be inquired, if the nth byte in the initial instruction is 1, the initial instruction is a first user control instruction after the air conditioner is started, and the initial instruction is set as a target instruction.
It should be noted that, for the above steps (1) to (2), the steps may be executed only within a preset time range after the air conditioner is turned on, and the operation data amount of a single air conditioner during the test is reduced while the target instruction is selected, so that even if a plurality of air conditioners are tested by the electronic device at the same time, no excessive data processing pressure is caused on the electronic device. For example, a time range of 20 minutes may be preset, in which the electronic device performs the step (1) to the step (2), that is, the electronic device performs the step (1) to the step (2) within 20 minutes after the air conditioner is turned on, so as to obtain the target instruction.
202. And checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip.
The target chip type may refer to one of a plurality of preset chip types, and the preset chip type refers to a possible type of the air conditioner chip.
For an air conditioner chip, possible types thereof may include:
if a new instruction needs to be written in, the independent EE chip can directly access and modify the stored instruction in a single byte without erasing the whole page.
A Microcontroller Unit (micro control Unit, hereinafter referred to as MCU) has an EE chip built therein: if a new command needs to be written and the stored command is full, the stored command needs to be erased to write the new command, and the erasure can be only erased according to pages, and the MCU operation is not influenced by the whole page erasure.
Flash (Flash) analog EE chip: with the MCU built-in EE chip, if a new instruction needs to be written and the memory is full, the stored instruction needs to be erased to write the new instruction, but the chip stops reading the stored instruction when the flash memory simulation EE chip is erased in a whole page, so that the air conditioner stops running, the interruption of a running program in the air conditioner is suspended, and the like.
Thus, the plurality of preset chip types may include: the device comprises an independent EE chip, an MCU built-in EE chip and a flash simulation EE chip, wherein the target chip type is one of the independent EE chip, the MCU built-in EE chip and the flash simulation EE chip.
In some embodiments, the target instruction may be written and read according to chip addresses corresponding to different preset chip types, a chip type in which writing is successful is determined, and the chip type is used as the target chip type. At this time, the step of "checking the target chip in the air conditioner according to the target instruction and determining the target chip type of the target chip" may be performed in the following manner:
and (I) writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result corresponding to each preset chip address, wherein each preset chip address corresponds to different chip types.
And (II) determining the target chip address matched with the target instruction according to the corresponding reading result.
And (III) setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner.
And the reading result corresponding to each preset chip address comprises a result when the target instruction is successfully written or a result when the target instruction is failed to be written. It will be appreciated that if the target instruction writes successfully, the corresponding read result should be data that matches the target instruction, and if the target instruction writes fails, the corresponding read result should be data that does not match the target instruction, which may be, for example, a string "none" or an empty string.
If the read result corresponding to one preset chip address is the result when the target instruction is successfully written, that is, the read result is matched with the target instruction, it indicates that the target chip address of the target chip is the same as the preset chip address, so that the preset chip address can be determined as the target chip address, and the chip type corresponding to the target chip address is set as the target chip type of the target chip. The following examples illustrate: for example, the preset chip types include: the electronic device comprises an independent EE chip, an MCU built-in EE chip and a flash simulation EE chip, wherein the type of a target chip is one of the independent EE chip, the MCU built-in EE chip and the flash simulation EE chip, and when a target instruction is a character string '0 x 123456', if the electronic device is as follows: after the independent EE chip, the MCU built-in EE chip and the flash memory simulation EE chip sequentially write and read the target instruction aiming at each preset chip address, the obtained reading results are respectively as follows: 0x123456, none, then the target chip address is the preset chip address corresponding to the independent EE chip, so the target chip type of the target chip in the air conditioner is: a stand-alone EE chip. For another example, the obtained reading results are: none, 0x123456, and when the checking sequence and the target instruction are not changed, the target chip address is a preset chip address corresponding to the flash memory simulation EE chip, so the target chip type of the target chip in the air conditioner is: the flash memory simulates an EE chip.
It should be noted that, in the embodiment of the present application, the writing and reading order of each preset chip address is not limited during verification. For example, the preset chip types include: the independent EE chip, the MCU built-in EE chip and the flash memory simulation EE chip, namely when the target chip type is one of the independent EE chip, the MCU built-in EE chip and the flash memory simulation EE chip, can be as follows: the independent EE chip, the MCU built-in EE chip and the flash memory simulation EE chip are verified in sequence, and the verification can also be carried out according to the following steps: the MCU is internally provided with an EE chip, a flash memory simulation EE chip, an independent EE chip and the like which are checked in different sequences.
203. And writing a new user control instruction into the target chip according to the type of the target chip.
In the embodiment of the present application, the purpose of obtaining the type of the target chip is to determine a writing method of a subsequent user control instruction, and differences of different types of air conditioner chips during writing have been described above, which is not described herein again.
To sum up, the air conditioner test data storage method provided by the embodiment of the application comprises the following steps: acquiring a target instruction of an air conditioner; checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip; and writing a new user control instruction into the target chip according to the type of the target chip. Therefore, the air conditioner test data storage method provided by the embodiment of the application is suitable for various air conditioners with different chip types, the target chip type can be identified through the target instruction, the new user control instruction for testing is written into the target chip according to the target chip type, when a worker tests the air conditioner, the air conditioner does not need to be manually classified according to the chip type, and then the test data is written into the target chip through different writing methods, so that the labor cost of background testing can be saved.
In some embodiments, if the chip type of the target chip in the air conditioner is the flash memory simulation EE chip, the storage space in the air conditioner may be divided into a plurality of storage pages, and each storage page is divided into a plurality of pre-divided storage segments, so that the maximum write-in frequency of the storage space is increased, more data may be stored in the storage space, the frequency of erasing the storage space in the air conditioner is reduced, on one hand, the frequency of stopping the CPU may be reduced, a series of problems such as flicker display, unstable fan rotation speed, communication packet loss and the like may be avoided, on the other hand, the frequency of erasing the storage space in the air conditioner may be reduced, and the life of the storage hardware in the air conditioner may be increased.
Referring to fig. 3, at this time, the step "writing a new user control command to the target chip according to the target chip type" includes:
301. and if the type of the target chip is the analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received.
In the embodiment of the present application, the analog chip refers to a flash memory analog EE chip.
In the embodiment of the application, the storage space in the air conditioner is pre-divided into a plurality of storage pages so as to increase the data volume which can be stored in the storage space at the same time. The number of the pre-divided memory pages may be determined according to the size of the storage space of the air conditioner and the size of the preset storage capacity in the memory pages. Assuming that the storage capacity size in each storage page is the same in both air conditioner a and air conditioner B, if the storage space of air conditioner a is larger than that of air conditioner B, the number of pre-divisions of air conditioner a may be larger than that of air conditioner B.
The target memory page is a memory page into which data can still be written among the memory pages divided in advance. And if the data stored in the storage page reaches the maximum storage capacity, the data cannot be continuously written into the storage page, at this moment, the storage page is called full write, and the storage page which is not full write in the pre-divided storage pages is the target storage page. There may be a plurality of target storage pages, or there may be only one target storage page, if the new user control command includes a plurality of pieces of data, the target storage pages may be a plurality of target storage pages, and if the new user control command includes only one piece of data, the target storage page is one target storage page. For convenience of understanding, the new user control command includes only one piece of data, and the target storage page has only one illustration, but is not to be construed as a limitation to the embodiment of the present application.
If a new user control instruction is received, the pre-divided storage pages comprise a plurality of unfilled storage pages, and the target storage page can be determined according to the page numbers of the unfilled storage pages. For example, an incompletely written memory page with the smallest page number can be used as a target memory page, and therefore, sequential writing of new user control commands can be realized without disturbing the sequence of storage in the memory space.
302. And determining a free target storage segment in a plurality of pre-divided storage segments of the target storage page.
In the embodiment of the application, in order to further increase the amount of data that can be stored in the storage space at the same time, after the storage space is pre-divided to obtain a plurality of storage pages, each storage page is further divided, each storage page is divided into a plurality of pre-divided storage segments, and each pre-divided storage segment is used for storing a segment of data. For example, when the number of storage bits in the air conditioner is 4 bits, that is, the storage format in the air conditioner is 0xabcd, each pre-divided storage segment is used for storing data with a format of 0 xabcd. The number of the pre-divided memory segments may be according to a preset memory capacity in the memory page, and assuming that for the air conditioner C, the preset memory capacity in the memory page is larger than the preset memory capacity in the air conditioner D, and the preset memory capacity in the memory page is larger than the preset memory capacity in the air conditioner D, the number of the pre-divided memory segments of each memory page in the air conditioner C may be larger than the number of the pre-divided memory segments of each memory page in the air conditioner D.
The target memory segment refers to a memory segment in which data is not written in a pre-divided memory segment of the target memory page. If there are multiple free pre-partitioned memory segments in the target memory page, one of them can be selected as the target memory segment.
The following examples illustrate: if the storage space is divided into n storage pages and each storage page is divided into m pre-divided storage segments, the total storage space of the air conditioner contains n m pre-divided storage segments, and when no data is stored in the storage space, if one piece of data is written in each time, n m pre-divided storage segments can be written in, so that the frequency of erasing the storage space in the air conditioner can be reduced, on one hand, the frequency of stopping the work of a CPU (central processing unit) can be reduced, a series of problems of display flicker, unstable rotating speed of a fan, communication packet loss and the like can be avoided, on the other hand, the frequency of erasing the storage space in the air conditioner can be reduced, and the service life of storage hardware in the air conditioner can be prolonged.
It can be understood that if no free memory segment exists in the target memory page, it indicates that data cannot be continuously written in the memory space of the air conditioner, and in order to ensure normal operation of the air conditioner, the memory pages other than the target memory page are erased.
303. And writing the new user control instruction into the target storage segment.
After the target memory segment is determined, new user control commands may be written to the target memory segment to update the operating parameters in the air conditioner. For example, the target command includes the current wind level, the cooling/heating mode, the dehumidifying/humidifying mode, and the set temperature after heating up, the air conditioner may change only the set temperature after writing, and the other operation parameters are not adjusted.
In other embodiments, it may be further configured that each time the air conditioner is turned off, the storage pages other than the target storage page are erased, so that when the air conditioner is turned on next time, enough idle storage segments exist in the storage space, and the erasing frequency is reduced in use.
In some embodiments, the staff member may also define automatic test logic for the electronic equipment, and write data into the target chip in the air conditioner for detection when the local power failure condition occurs frequently. Referring to fig. 4, at this time, before the step of "obtaining a target command of an air conditioner", the method further includes:
401. and acquiring a target area where the air conditioner is located.
The target zone is one of a plurality of pre-divided preset zones. The division of the preset area is not limited in the embodiment of the application, for example, each city may be divided into a preset area, and step 401 is to obtain the city where the air conditioner is located by the electronic device.
402. And inquiring the historical power-off times of the target area according to a preset time range and the current time.
The time range may be set according to the requirement of the actual scene, for example, one month may be set as the time range, or one week may also be set as the time range, which is not limited in the embodiment of the present application.
In executing step 402, the electronic device may determine a historical time range according to the current time and a preset time range, and then query the power-off number of the target area within the historical time range. For example, the time range is one month, and the current time is 2022 year 2 month 1 day, the historical time range at this time is 1 month 1 day 2022 year-2 month 1 day 2022 year, so the historical power outage count refers to the number of times the power was interrupted in the target area between 1 month 1 day 2022 year 1 month 1 day 2022 year.
403. And if the historical power failure times are larger than or equal to a preset time threshold value, executing the step of acquiring the target instruction of the air conditioner.
The frequency threshold is a preset value used for evaluating the magnitude of historical power failure frequency, and when the historical power failure frequency is larger than or equal to the frequency threshold, the situation that power failure frequently occurs in a target area due to the fact that the historical power failure frequency is too large is shown. For example, the average power failure frequency of the target area within several years may be set as a frequency threshold, and if the historical power failure frequency is greater than or equal to the frequency threshold, it indicates that the power failure frequency of the target area is higher than the average value within a preset time range, and the probability of power failure of the air conditioner is high, so that the air conditioner needs to be tested to avoid the condition that the power failure memory function fails due to power failure of the air conditioner.
In some embodiments, in order to perform anti-shake processing, i.e., the worker frequently sends instructions due to accident, only the last received instruction may be set as the target instruction. Referring to fig. 5, at this time, the step of "acquiring a target command of the air conditioner" includes:
501. after the air conditioner is powered on, the first instruction and the second instruction which are input in sequence are obtained in response to instruction input operation.
The first command and the second command have the same meaning as the initial command and also refer to a real-time command for controlling the operation of the air conditioner. For example, the first command and the second command may include different air conditioner operation parameters. Illustratively, the staff may send out 2 user control instructions through a remote controller, a test management platform, or an APP on a mobile phone, where each user control instruction is a first instruction and a second instruction, respectively. For example, when the worker presses a temperature-raising key on the remote controller, the user control instruction sent at this time is the first instruction. And then, the user presses the windshield adjusting key on the remote controller again, and the sent user control instruction is a second instruction.
The formats of the first command and the second command may also be determined according to a storage format in the air conditioner, and details are not repeated.
502. And if the input time interval between the first instruction and the second instruction is smaller than a preset interval threshold value and the instruction types of the first instruction and the second instruction are different, setting the second instruction as a target instruction.
The preset interval threshold is used for evaluating whether the first instruction is a user control instruction input by a worker accidentally. For example, the interval threshold may be set to 3 seconds, that is, if the worker inputs the first instruction and the second instruction by operating the remote controller, the test management platform, or the mobile phone APP within 3 seconds, it is indicated that the first instruction is an instruction accidentally input by the test management platform, and the second instruction may be set as the target instruction, so that the first instruction actively input by the non-worker is prevented from occupying a pre-divided storage segment and wasting storage resources.
In some embodiments, the model of the air conditioner may be read first, if the model of the air conditioner can be read, the model of the target chip in the air conditioner may be determined according to the obtained model, and when the model cannot be read, steps 201 to 203 may be performed again to reduce the amount of calculation. Referring to fig. 6, at this time, before the step of "obtaining a target command of an air conditioner", the method further includes:
601. and receiving a model reading instruction of the air conditioner, and reading the target model of the air conditioner.
At this time, it is understood that the target instruction may refer to the first user control instruction after the model read instruction.
Specifically, the electronic device may read a model identifier of the air conditioner from a storage space of the air conditioner, and if the model identifier can be read, the target model may be determined according to the model identifier.
602. And if the target model cannot be read, executing the step of acquiring the target instruction of the air conditioner.
The following is a detailed description of a flow of test data storage of an air conditioner during testing, and the following flow is only for exemplary purposes and should not be construed as limiting the embodiments of the present application:
(a) after the air conditioner is powered on and started, monitoring an initial instruction in real time, and determining a target instruction of which the target byte is the same as the preset byte from the initial instruction;
(b) writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result of each preset chip address;
(c) determining a target chip address matched with the target instruction according to the corresponding reading result from the preset chip addresses;
(d) setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner;
(e) determining different writing methods according to the type of the target chip:
(e1) if the type of the target chip is the analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received;
(e2.1) determining a free target memory segment among the plurality of pre-divided memory segments of the target memory page;
and (e2.2) if no free memory segment exists in the target memory page, indicating that the data cannot be continuously written in the memory space of the air conditioner, and erasing the memory pages except the target memory page in order to ensure the normal operation of the air conditioner.
(e3) And writing the new user control instruction into the target storage segment.
(f) And if a shutdown instruction sent by a worker is received, erasing the storage pages except the target storage page so as to reduce the erasing frequency of the air conditioner when the air conditioner is started next time.
In order to better implement the method for storing the test data of the air conditioner in the embodiment of the present application, on the basis of the method for storing the test data of the air conditioner, an embodiment of the present application further provides a device for storing the test data of the air conditioner, as shown in fig. 7, which is a schematic structural diagram of an embodiment of the device for storing the test data of the air conditioner in the embodiment of the present application, and the device 700 for storing the test data of the air conditioner includes:
an obtaining unit 701, configured to obtain a target instruction of an air conditioner;
a determining unit 702, configured to verify a target chip in the air conditioner according to the target instruction, and determine a target chip type of the target chip;
a writing unit 703, configured to write a new user control instruction into the target chip according to the type of the target chip.
In one possible implementation manner of the present application, the determining unit 702 is further configured to:
writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result corresponding to each preset chip address, wherein each preset chip address corresponds to different chip types;
determining a target chip address matched with the target instruction according to the corresponding reading result;
and setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner.
In one possible implementation manner of the present application, the obtaining unit 701 is further configured to:
after the air conditioner is powered on, acquiring an initial instruction of the air conditioner;
and if the target byte in the initial instruction is the same as the preset byte, judging that the initial instruction is the first user control instruction after the air conditioner is started, and setting the initial instruction as the target instruction.
In a possible implementation manner of the present application, the writing unit 703 is further configured to:
if the type of the target chip is an analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received;
determining an idle target memory segment in a plurality of pre-divided memory segments of the target memory page;
and writing the new user control instruction into the target storage segment.
In one possible implementation manner of the present application, the obtaining unit 701 is further configured to:
acquiring a target area where an air conditioner is located;
inquiring the historical power-off times of the target area according to a preset time range and the current time;
and if the historical power failure times are larger than or equal to a preset time threshold value, executing the step of acquiring the target instruction of the air conditioner.
In one possible implementation manner of the present application, the obtaining unit 701 is further configured to:
after the air conditioner is powered on, responding to instruction input operation, and acquiring a first instruction and a second instruction which are input in sequence;
and if the input time interval between the first instruction and the second instruction is smaller than a preset interval threshold value and the instruction types of the first instruction and the second instruction are different, setting the second instruction as a target instruction.
In one possible implementation manner of the present application, the air conditioner test data storage device 700 further includes a model reading unit 704, where the model reading unit 704 is configured to:
receiving a model reading instruction of an air conditioner, and reading a target model of the air conditioner;
and if the target model cannot be read, executing the step of acquiring the target instruction of the air conditioner.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
Since the air conditioner test data storage device can execute the steps in the air conditioner test data storage method in any embodiment corresponding to fig. 1 to 7, the beneficial effects that can be realized by the air conditioner test data storage method in any embodiment corresponding to fig. 1 to 7 can be realized, which are detailed in the foregoing description and are not repeated herein.
In addition, in order to better implement the method for storing the test data of the air conditioner in the embodiment of the present application, based on the method for storing the test data of the air conditioner, the embodiment of the present application further provides an electronic device, referring to fig. 8, fig. 8 shows a schematic structural diagram of the electronic device in the embodiment of the present application, specifically, the electronic device in the embodiment of the present application includes a processor 801, and when the processor 801 is used to execute a computer program stored in a memory 802, the steps of the method for storing the test data of the air conditioner in any embodiment corresponding to those in fig. 1 to 7 are implemented; alternatively, the processor 801 is configured to implement the functions of the units in the corresponding embodiment of fig. 7 when executing the computer program stored in the memory 802.
Illustratively, a computer program may be partitioned into one or more modules/units, which are stored in the memory 802 and executed by the processor 801 to implement the embodiments of the present application. One or more modules/units may be a series of computer program instruction segments capable of performing certain functions, the instruction segments being used to describe the execution of a computer program in a computer device.
The electronic device may include, but is not limited to, a processor 801, a memory 802. Those skilled in the art will appreciate that the illustration is merely an example of an electronic device and does not constitute a limitation of an electronic device, and may include more or less components than those illustrated, or combine some components, or different components, for example, an electronic device may further include an input output device, a network access device, a bus, etc., and the processor 801, the memory 802, the input output device, the network access device, etc., are connected via the bus.
The Processor 801 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor being the control center for the electronic device and the various interfaces and lines connecting the various parts of the overall electronic device.
The memory 802 may be used to store computer programs and/or modules, and the processor 801 may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory 802 and invoking data stored in the memory 802. The memory 802 may mainly include a program storage area and a target instruction area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the target instruction region may store data (such as audio data, video data, etc.) created according to the use of the electronic device, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the air conditioner test data storage device, the electronic device and the corresponding units thereof described above may refer to the description of the air conditioner test data storage method in any embodiment corresponding to fig. 1 to 4, and are not described herein again in detail.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
For this reason, an embodiment of the present application provides a computer-readable storage medium, where a plurality of instructions are stored, where the instructions can be loaded by a processor to execute steps in the method for storing test data of an air conditioner in any embodiment corresponding to fig. 1 to 7 in the present application, and specific operations may refer to descriptions of the method for storing test data of an air conditioner in any embodiment corresponding to fig. 1 to 7, which are not repeated herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in the method for storing the test data of the air conditioner in any embodiment corresponding to fig. 1 to 7 in the present application, the beneficial effects that can be achieved by the method for storing the test data of the air conditioner in any embodiment corresponding to fig. 1 to 7 in the present application can be achieved, which are described in detail in the foregoing description and will not be repeated herein.
The air conditioner test data storage method, the air conditioner test data storage device, the electronic device and the computer-readable storage medium provided by the embodiments of the present application are described in detail above, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the description of the embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An air conditioner test data storage method is characterized by comprising the following steps:
acquiring a target instruction of an air conditioner;
checking a target chip in the air conditioner according to the target instruction, and determining the type of the target chip;
and writing a new user control instruction into the target chip according to the type of the target chip.
2. The air conditioner test data storage method according to claim 1, wherein the verifying the target chip in the air conditioner according to the target instruction and determining the target chip type of the target chip comprises:
writing and reading the target instruction in sequence aiming at each preset chip address to obtain a reading result corresponding to each preset chip address, wherein each preset chip address corresponds to different chip types;
determining a target chip address matched with the target instruction according to the corresponding reading result;
and setting the chip type corresponding to the target chip address as the target chip type of the target chip in the air conditioner.
3. The air conditioner test data storage method according to claim 1, wherein the obtaining of the target command of the air conditioner comprises:
after the air conditioner is powered on, acquiring an initial instruction of the air conditioner;
and if the target byte in the initial instruction is the same as the preset byte, judging that the initial instruction is the first user control instruction after the air conditioner is started, and setting the initial instruction as the target instruction.
4. The air conditioner test data storage method according to claim 1, wherein the writing of a new user control command to the target chip according to the type of the target chip comprises:
if the type of the target chip is an analog chip, acquiring an incompletely written target storage page from a plurality of pre-divided storage pages when a new user control instruction is received;
determining an idle target memory segment in a plurality of pre-divided memory segments of the target memory page;
and writing the new user control instruction into the target storage segment.
5. The air conditioner test data storage method according to claim 1, wherein before the obtaining of the target command of the air conditioner, the method further comprises:
acquiring a target area where an air conditioner is located;
inquiring the historical power-off times of the target area according to a preset time range and the current time;
and if the historical power failure times are larger than or equal to a preset time threshold value, executing the step of acquiring the target instruction of the air conditioner.
6. The air conditioner test data storage method according to claim 1, wherein the obtaining of the target command of the air conditioner comprises:
after the air conditioner is powered on, responding to instruction input operation, and acquiring a first instruction and a second instruction which are input in sequence;
and if the input time interval between the first instruction and the second instruction is smaller than a preset interval threshold value and the instruction types of the first instruction and the second instruction are different, setting the second instruction as a target instruction.
7. The air conditioner test data storage method according to claim 1, wherein before the obtaining of the target command of the air conditioner, the method further comprises:
receiving a model reading instruction of an air conditioner, and reading a target model of the air conditioner;
and if the target model cannot be read, executing the step of acquiring the target instruction of the air conditioner.
8. An air conditioner test data storage control device, characterized by comprising:
the acquisition unit is used for acquiring a target instruction of the air conditioner;
the determining unit is used for verifying a target chip in the air conditioner according to the target instruction and determining the type of the target chip;
and the writing unit is used for writing a new user control instruction into the target chip according to the type of the target chip.
9. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the air conditioner test data storage method according to any one of claims 1 to 7 when calling the computer program in the memory.
10. A computer-readable storage medium, having a computer program stored thereon, which is loaded by a processor to perform the steps of the air conditioner test data storage method according to any one of claims 1 to 7.
CN202210198889.3A 2022-03-02 2022-03-02 Air conditioner test data storage method and device, electronic equipment and storage medium Pending CN114691536A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210198889.3A CN114691536A (en) 2022-03-02 2022-03-02 Air conditioner test data storage method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210198889.3A CN114691536A (en) 2022-03-02 2022-03-02 Air conditioner test data storage method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114691536A true CN114691536A (en) 2022-07-01

Family

ID=82137044

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210198889.3A Pending CN114691536A (en) 2022-03-02 2022-03-02 Air conditioner test data storage method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114691536A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115718641A (en) * 2023-01-09 2023-02-28 苏州浪潮智能科技有限公司 Memory simulation method and device, storage medium and electronic device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115718641A (en) * 2023-01-09 2023-02-28 苏州浪潮智能科技有限公司 Memory simulation method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US10310930B2 (en) Solid state disk using method and apparatus
US9940021B2 (en) Method and system for memory management and memory storage device thereof
JP2007519083A (en) Internal maintenance schedule request for non-volatile memory systems
CN105354070A (en) Method for upgrading equipment firmware through I2C
US20060259814A1 (en) Method and system for optimizing testing of memory stores
WO2020034906A1 (en) Dehumidifying method and device for led display screen, led display screen, and storage medium
CN114691536A (en) Air conditioner test data storage method and device, electronic equipment and storage medium
CN115639971B (en) Data writing method, data writing device, electronic device, storage medium, and program product
CN111737051B (en) Trim data verification test method, device and system of SSD (solid State disk)
US10007449B2 (en) Memory management method, memory control circuit unit, and memory storage apparatus
US20070255937A1 (en) Basic input / output system (BIOS) set-value access method
CN110555009B (en) Processing method and device for Network File System (NFS) service
WO2017045500A1 (en) Storage array management method and apparatus
CN116257397A (en) Pressure testing method, pressure testing device, storage medium and pressure testing equipment
WO2019227769A1 (en) Method and apparatus for controlling storage device, and electronic device
CN114047884A (en) Data storage method and device, electronic equipment and storage medium
CN112466377A (en) SSD power-down recovery test method, system and controller
CN113626091A (en) Starting optimization method and device of solid state disk, computer equipment and storage medium
CN113218042A (en) Air conditioner outdoor unit parameter modification method and device, storage medium and air conditioning system
CN113467698A (en) Writing method and device based on file system, computer equipment and storage medium
CN108595193B (en) Firmware updating method of baseboard management controller for fan rotating speed control
CN117251116B (en) Erasing and writing method and device of nonvolatile memory
CN109271347B (en) Starting method, device and equipment for storage unit of distributed file system
JP2011210062A (en) Storing apparatus
CN113757935B (en) Data updating method and device, air conditioner and computer readable storage medium

Legal Events

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