Compressor and fault playback method thereof, vehicle and computer readable storage medium
By recording operating data during normal compressor operation and combining it with fault events, the problem of storage space limitations in compressor fault playback is solved, enabling accurate judgment and efficient reproduction of fault data, and ensuring data integrity in the event of power failure.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2026-03-10
AI Technical Summary
In the existing technology, the non-volatile memory of the compressor has a small storage space and many types of faults, which means that fault playback only provides one frame of content, making it difficult to judge the changes in the operating state before the fault occurred, and the effect of problem reproduction and investigation is negligible.
The compressor records operating data during normal operation, forming a data queue arranged in time sequence. The target fault data is determined by combining the target fault event and multiple consecutive frames of operating data, and written into a non-volatile memory. The fault playback results are obtained by receiving diagnostic query commands from the host computer.
By accurately identifying fault data through continuous multi-frame playback, the possibility of problem reproduction and the efficiency of problem solving are improved, ensuring that target fault data is not lost when power is lost, and achieving accurate analysis of fault playback results.
Smart Images

Figure CN121640593A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic control technology, and in particular to compressors and their fault playback methods, vehicles, and computer-readable storage media. Background Technology
[0002] Various types of malfunctions may occur during the use of the compressor.
[0003] When a fault occurs, due to the limited storage space of the compressor's non-volatile memory (cost constraints) and the variety of fault types, related technologies can only arrange all fault occupancy in advance within the limited storage space. This may reduce the number of stored fault state attributes due to space limitations. Moreover, each fault playback usually only provides one frame of content (the state at the time of fault triggering). It is difficult for problem investigators to determine the changes in the compressor's operating state before the fault occurred based on just a momentary data.
[0004] Therefore, it is evident that the relevant technologies have minimal effect on problem reproduction and investigation, serving only an informational function. Summary of the Invention
[0005] The main objective of this application is to provide a compressor and its fault playback method, a vehicle, and a computer-readable storage medium, aiming to solve the technical problem of how to improve the possibility of reproducing problems after a product failure.
[0006] To achieve the above objectives, this application provides a method for replaying compressor faults. The compressor includes a non-volatile memory and a controller, the controller being connected to both the non-volatile memory and a host computer. The method includes the following steps performed by the controller:
[0007] Under normal operating conditions, the compressor's operating data is recorded according to a preset time period;
[0008] In the event of a target fault event in the compressor, target fault data is determined based on the target fault event and multiple consecutive frames of operating data, and the target fault data is written into the non-volatile memory.
[0009] The system receives a diagnostic query instruction sent by the host computer for the target fault event, retrieves the target fault data from the non-volatile memory according to the diagnostic query instruction, and sends the target fault data to the host computer to obtain the fault playback result.
[0010] In one embodiment, the step of recording the compressor's operating data according to a preset time period includes:
[0011] According to a preset time period, the operating data of the compressor at different times is recorded into the memory space to form a data queue arranged in time sequence;
[0012] If the number of frames of running data contained in the data queue reaches the preset maximum number of frames, delete the running data with the earliest recorded time in the data queue and add the running data with the current time to the data queue.
[0013] In one embodiment, prior to the step of determining the target fault data based on the target fault event and multiple consecutive frames of operational data, the method further includes:
[0014] All data in the data queue at the current moment are obtained as the running data for multiple consecutive frames.
[0015] In one embodiment, the step of determining the target fault data based on the target fault event and multiple consecutive frames of the operational data includes:
[0016] Determine the target fault number based on the target fault event;
[0017] The target fault number and the running data of multiple consecutive frames are integrated into target fault data.
[0018] In one embodiment, the step of writing the target fault data into the non-volatile memory includes at least one of the following:
[0019] If historical data including the target fault number exists in the non-volatile memory, the historical data is updated based on the target fault data;
[0020] If there is no historical data including the target fault number in the non-volatile memory and there is a blank memory block, the target fault data is written into the blank memory block;
[0021] If there is no historical data including the target fault number in the non-volatile memory and there is no blank memory block, erase the information in the designated memory block where the earliest data was written in the non-volatile memory, and write the target fault data into the designated memory block.
[0022] In one embodiment, prior to the step of writing the target fault data into the non-volatile memory, the method further includes:
[0023] Detect whether bad sectors exist in the non-volatile memory;
[0024] If bad sectors exist in the non-volatile memory, it is prohibited to write data to the memory block corresponding to the bad sectors in the non-volatile memory.
[0025] If there are no bad sectors in the non-volatile memory, all memory blocks in the non-volatile memory are used as data writing targets.
[0026] In one embodiment, the compressor further includes a delayed power-off module, one end of which is connected to an input power source, and the other end of which is connected to the controller and the non-volatile memory. After the step of writing the target fault data into the non-volatile memory, the method further includes:
[0027] In the event of a power outage at the input power source, the electrical parameters of the time-delay power-off module are adjusted to maintain the operating voltage unchanged for a preset duration.
[0028] In addition, to achieve the above objectives, this application also provides a compressor, the compressor comprising:
[0029] An electric motor is used to generate power;
[0030] A compression mechanism, connected to the motor, is used to compress the refrigerant under the drive of the motor;
[0031] Non-volatile memory, used to store data;
[0032] The controller is connected to the motor and the non-volatile memory respectively. The controller is used to control the motor to generate power and to implement the compressor fault playback method as described above.
[0033] In addition, to achieve the above objectives, this application also provides a vehicle that includes the compressor described above.
[0034] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the compressor fault playback method described above.
[0035] This application proposes a compressor and its fault playback method, a vehicle, and a computer-readable storage medium. The compressor includes a non-volatile memory and a controller, with the controller connected to both the non-volatile memory and a host computer. The method includes the following steps performed by the controller: recording the compressor's operating data according to a preset time period when the compressor is operating normally; determining target fault data based on the target fault event and multiple consecutive frames of operating data when a target fault event occurs in the compressor, and writing the target fault data into the non-volatile memory; receiving a diagnostic query command sent by the host computer for the target fault event, retrieving the target fault data from the non-volatile memory according to the diagnostic query command, and sending the target fault data to the host computer to obtain the fault playback result.
[0036] This application records operational data under normal operating conditions, providing a data source for the continuous multi-frame operational data needed after a target fault event occurs. By combining the target fault event and the continuous multi-frame operational data, the state changes of the compressor before the fault can be determined through the playback content of the continuous multi-frames, thereby accurately identifying the target fault data, improving the possibility of problem reproduction and the efficiency of problem solving. Writing the target fault data to non-volatile memory ensures that the target fault data will not be lost even if power is lost. When the user needs to know the specific nature of the target fault event through a diagnostic query command, the target fault data can be directly read from the non-volatile memory, and the fault playback result can be obtained by parsing the target fault data through the host computer, thus realizing problem reproduction. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only a part of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 A flowchart illustrating a compressor fault playback method provided in an embodiment of this application;
[0039] Figure 2 A detailed flowchart illustrating a portion of step S20 in a compressor fault playback method provided in this application embodiment;
[0040] Figure 3 A flowchart illustrating supplementary steps of a compressor fault playback method provided in this application embodiment;
[0041] Figure 4A schematic diagram of the circuit structure of a delayed power-off module involved in a compressor fault playback method provided in an embodiment of this application;
[0042] Figure 5 This is a schematic diagram of the structure of a compressor provided in an embodiment of this application. Detailed Implementation
[0043] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that the embodiments of this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the embodiments of this application with unnecessary detail.
[0044] It should be noted that although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0045] It should also be understood that references to "one embodiment" or "some embodiments" in the specification of embodiments of this application mean that one or more embodiments of this application include the specific features, structures, or characteristics described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0046] Various types of malfunctions may occur during the use of embedded products. Taking compressors as an example, compressors are products that combine mechanical parts, motors, and electronic controls. During operation, malfunctions such as pump body wear, broken teeth, lack of oil, bearing wear, motor insulation failure, damage to electronic control components, and deterioration of thermal conductivity may occur.
[0047] When a fault occurs, due to the limited non-volatile memory storage space of the compressor (cost constraints) and the variety of fault types, the relevant technologies can only arrange all fault occupancy in advance within the limited non-volatile memory space. This may reduce the number of stored fault state attributes due to space constraints. Moreover, each fault playback usually only provides one frame of content (the state at the time of fault triggering). It is difficult for problem investigators to determine the changes in the product's operating state before the fault occurred based on only a momentary data.
[0048] Therefore, it is evident that the relevant technologies have minimal impact on problem reproduction and investigation, serving only an informational function. Furthermore, the approach of these technologies is to allocate a fixed amount of space in non-volatile memory to all fault types, arranged sequentially. When hardware damage occurs in a certain area of the non-volatile memory (e.g., memory failure), this will prevent the fault types allocated to that address from correctly reporting fault information.
[0049] Based on this, embodiments of this application provide a compressor and its fault playback method, a vehicle, and a computer-readable storage medium. By recording operating data under normal operation, a data source can be provided for the continuous multi-frame operating data that needs to be obtained after a target fault event occurs. Combining the target fault event and the continuous multi-frame operating data, the state changes of the compressor before the fault can be determined by the playback content of the continuous multi-frames, thereby accurately identifying the target fault data, improving the possibility of problem reproduction and the efficiency of problem solving. Writing the target fault data into non-volatile memory can ensure that the target fault data will not be lost even if power is lost. When the user needs to know the specific nature of the target fault event through a diagnostic query command for the target fault event, the target fault data can be directly read from the non-volatile memory, and the fault playback result can be obtained by parsing the target fault data through the host computer, thus realizing problem reproduction.
[0050] The compressor and its fault playback method, vehicle, and computer-readable storage medium provided in this application are specifically described through the following embodiments. First, the fault playback method of the compressor in this application embodiment is described.
[0051] This application provides a method for replaying compressor faults. This method can be applied to compressors, which include non-volatile memory and a controller. The controller is connected to both the non-volatile memory and a host computer. (Refer to...) Figure 1 , Figure 1 A flowchart illustrating a compressor fault playback method provided in this application embodiment is shown below. Figure 1 As shown, the compressor fault playback method provided in this embodiment includes steps S10 to S30 executed by the controller.
[0052] Step S10: Under normal operating conditions, record the compressor's operating data according to a preset time cycle;
[0053] It should be noted that in this embodiment, the controller can be any type of processor, such as MCU (Microcontroller Unit), CPU (Central Processing Unit), etc. The specific length and time span of a data frame can also be defined according to the actual data transmission protocol. For example, a preset time period may include multiple data frames, or a data frame may include running data from multiple preset time periods, etc. This embodiment does not impose any restrictions on this. For ease of understanding, the running data within a preset time period will be regarded as a data frame in the following description. The preset time period can be a data recording period T set according to actual needs. The specific value of T can be 10ms, 100ms, 1s, etc., and this embodiment does not impose any restrictions on this. The running data may include predefined parameters used to characterize the compressor's operating status, such as time, speed, power, temperature, etc., and this embodiment does not impose any restrictions on this.
[0054] In some feasible embodiments, the step of recording the compressor's operating data according to a preset time period in step S10 above may specifically include:
[0055] Step S11: Record the compressor's operating data at different times into the memory space according to the preset time period to form a data queue arranged in time sequence;
[0056] As an example, in this embodiment, the controller records the compressor's operating data in a preset time period T as the current state information S(T). After the compressor has been running normally for a certain period of time, the memory will contain a data queue formed by multiple frames of data such as S(T), S(T+1), S(T+2), etc., arranged in time sequence. The operating data in the data queue is used to characterize the compressor's state information at different times.
[0057] Step S12: If the number of frames of running data contained in the data queue reaches the preset maximum number of frames, delete the running data with the earliest recorded time in the data queue and add the running data at the current time to the data queue.
[0058] It is understandable that in this embodiment, since the space in memory for storing data is limited, if the data in memory has reached the storage limit, and if the latest running data still needs to be recorded, the earliest running data written in memory needs to be deleted.
[0059] In this embodiment, the preset maximum number of frames x can be set according to actual needs. The specific value of x can be 4, 6, 10, etc., and this embodiment does not limit it.
[0060] As an example, in this embodiment, it is assumed that the data queue can accumulate and store a maximum of x frames of data. After the compressor has been running normally for a certain period of time, the data queue will store a maximum of x frames of running data, including S(T), S(T+1), ..., S(T+x-1), where S(T) is the earliest recorded running data in the data queue. If it is necessary to add the current running data S(T+x) to the data queue, S(T) in the data queue needs to be deleted, and then the current running data S(T+x) is added to the data queue, resulting in a new data queue containing running data S(T+1), ..., S(T+x-1), and S(T+x).
[0061] Step S20: In the event of a target fault event in the compressor, target fault data is determined based on the target fault event and multiple consecutive frames of operating data, and the target fault data is written into a non-volatile memory.
[0062] It should be noted that, in this embodiment, the target fault event can be regarded as an event caused by abnormality of certain parameters in the operating data, such as abnormal speed, abnormal power, abnormal temperature, etc., and this embodiment does not limit it; continuous multi-frame operating data refers to the operating data recorded during the normal operation of the compressor in a continuous series of preset time periods before the occurrence of the target fault event; the non-volatile memory can be electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), flash memory, etc., and this embodiment does not limit it.
[0063] It is understood that the specific method for detecting the target fault event of the compressor is not detailed in this embodiment. Any suitable fault detection mechanism can be applied to this embodiment. The focus of this embodiment is on how to determine the target fault data related to the target fault event based on the target fault event and continuous multi-frame operation data. As an example, parameters related to the target fault event can be queried from continuous multi-frame operation data according to the specific type of the target fault event. These related parameters are then integrated with the target fault event to obtain the target fault data. The target fault data is then written into non-volatile memory as the data source for fault playback. In addition, the storage space of non-volatile memory is also limited. Therefore, certain rules need to be followed when writing the target fault data into non-volatile memory.
[0064] In some feasible embodiments, prior to the step of determining the target fault data based on the target fault event and consecutive multi-frame operating data in step S20 above, the compressor fault playback method may further include:
[0065] Step S02: Obtain all data in the data queue at the current moment as continuous multi-frame running data.
[0066] In this embodiment, it can be understood that all the data stored in the data queue is the running data of multiple consecutive preset time periods before the occurrence of the target fault event. Generally speaking, the more data used for comparison and reference, the easier it is to analyze the cause of the target fault event. Therefore, the consecutive multiple frames of running data in this embodiment can be all the data in the data queue at the current moment. Of course, according to actual needs, two, three or more frames of running data can be selected sequentially from the data queue starting from the latest recorded running data (the latest recorded running data is also the one with the shortest time from the occurrence of the target fault event) as consecutive multiple frames of data. This embodiment does not limit this.
[0067] As an example, when the running data of multiple consecutive frames is represented by Flash(t) (t represents the time when the data of multiple consecutive frames is acquired), Flash(t) can include the state information S(t-x+1), S(t-x+2), ..., S(t) stored consecutively for x frames.
[0068] Step S30: Receive the diagnostic query instruction sent by the host computer for the target fault event, retrieve the target fault data from the non-volatile memory according to the diagnostic query instruction, and send the target fault data to the host computer to obtain the fault playback result.
[0069] It is understood that in this embodiment, the user can communicate with the compressor through the host computer. The diagnostic query command can be a command sent by the user through the host computer to query the cause of the target fault event. After receiving the command, the controller will read the target fault data related to the command from the non-volatile memory. By feeding back the target fault data to the host computer, the host computer can parse the target fault data and obtain the fault playback result.
[0070] In addition, in some feasible embodiments, the controller can also parse the target fault data to obtain the fault playback result, and directly send the fault feedback result to the host computer to display it to the user.
[0071] This embodiment provides a method for replaying compressor faults. By recording operating data during normal operation, a data source can be provided for the continuous multi-frame operating data needed after a target fault event occurs. Combining the target fault event and the continuous multi-frame operating data, the state changes of the compressor before the fault can be determined by the playback content of the continuous multi-frames, thereby accurately identifying the target fault data, improving the possibility of problem reproduction and the efficiency of problem solving. Writing the target fault data into non-volatile memory ensures that the target fault data will not be lost even if power is lost. When the user needs to know the specific nature of the target fault event through a diagnostic query command, the target fault data can be directly read from the non-volatile memory, and the fault playback result can be obtained by parsing the target fault data through the host computer, thus realizing problem reproduction.
[0072] Reference Figure 2 In some feasible embodiments, the step of determining the target fault data based on the target fault event and continuous multi-frame operation data in step S20 above may specifically include:
[0073] Step S21: Determine the target fault number based on the target fault event;
[0074] In this embodiment, the user can configure the corresponding target fault number for the specific type of the target fault event according to actual needs. For example, abnormal speed corresponds to fault number 1, abnormal power corresponds to fault number 2, abnormal temperature corresponds to fault number 3, etc. This embodiment does not impose any restrictions on this.
[0075] As an example, the correspondence between target fault events and target fault numbers can be pre-stored in memory using a preset lookup table. When a target fault event occurs in the compressor, the controller only needs to query the preset lookup table to find out the target fault number corresponding to the current target fault event.
[0076] Step S22: Integrate the target fault number and continuous multi-frame operation data into target fault data.
[0077] In this embodiment, the target fault data includes two parts: the target fault number and continuous multi-frame operation data.
[0078] As an example, multiple consecutive frames of data can be numbered according to the target fault number. As can be seen from the above embodiments, a set of target fault data can be composed of fault number 1 and Flash (1), or fault number 2 and Flash (2), or fault number 1 and Flash (3). This embodiment does not limit this.
[0079] In some feasible embodiments, the step of writing the target fault data into the non-volatile memory in step S20 above may specifically include at least one of the following:
[0080] Step S201: If historical data including the target fault number exists in the non-volatile memory, update the historical data based on the target fault data;
[0081] Step S202: If there is no historical data including the target fault number in the non-volatile memory and there is a blank memory block, write the target fault data into the blank memory block.
[0082] Step S203: If there is no historical data including the target fault number in the non-volatile memory and there is no blank memory block, erase the information in the specified memory block where the earliest data was written in the non-volatile memory, and write the target fault data into the specified memory block.
[0083] In this embodiment, the non-volatile memory can be considered to include a certain number of memory blocks, each of which can be used to store target fault data if it is not damaged.
[0084] As an example, storage blocks can be sorted according to the time when data was written to form a storage block queue, so as to quickly locate the specified storage block with the earliest data writing time when the content is full but new target fault data still needs to be written.
[0085] As an example, when writing target fault data into non-volatile memory, it is necessary to query whether there is historical data in non-volatile memory that matches the target fault number in the target fault data. Taking the target fault data to be stored as "fault number 1 + Flash(3)" as an example, if Block(1) in non-volatile memory has stored historical data "fault number 1 + Flash(1)", then the target fault data obtained at the current moment will replace the historical data in Block(1), so that the data stored in Block(1) becomes "fault number 1 + Flash(3)". At the same time, since the data of Block(1) is updated, its sorting with other storage blocks can also be adjusted, and Block(1) will be placed at the tail of the storage block queue (assuming that the content is full but new target fault data still needs to be written, the old data is erased and the new data is written from the head of the queue).
[0086] As an example, when writing target fault data to non-volatile memory, if there is no historical data with the same target fault number as the target fault data, it is necessary to check whether there is a blank storage block in the non-volatile memory to store the latest determined target fault data. If there is a blank storage block, the latest determined target fault data is directly written to the blank storage block. If there is no blank storage block, a storage logic similar to that used to record running data in memory space is adopted. First, the specified storage block with the earliest data writing time is located, it is cleared, and then the latest determined target fault data is written to the specified storage block.
[0087] Reference Figure 3 In some feasible embodiments, before the step of writing the target fault data into the non-volatile memory in step S20 above, the compressor fault playback method may further include:
[0088] Step S23: Detect whether there are bad sectors in the non-volatile memory;
[0089] Step S231: If bad sectors exist in the non-volatile memory, it is prohibited to write data to the memory block corresponding to the bad sector in the non-volatile memory.
[0090] Step S232: If there are no bad sectors in the non-volatile memory, use all storage blocks in the non-volatile memory as data writing targets.
[0091] In this embodiment, before writing the target fault data into the non-volatile memory, it is necessary to determine whether the storage blocks in the non-volatile memory are damaged (the presence of bad sectors indicates damage). If there are damaged storage blocks in the non-volatile memory, the target fault data cannot be written into the damaged storage blocks. Only by writing the target fault data into undamaged storage blocks can the controller be guaranteed to obtain the target fault data normally from the non-volatile memory when it receives a diagnostic query command.
[0092] As an example, a specific detection method could be to check whether there is a CRC (Cyclic Redundancy Check) error in all memory blocks in the non-volatile memory. If not, the memory block is considered undamaged; if so, a test message is rewritten to the memory block with the CRC error. After the writing is completed, the CRC of this memory block is checked again. If the check is correct again, it means that this hardware area is undamaged and can continue to be used. It may be the first error caused by other interference. If the check fails again, the memory block is considered damaged and will be abandoned in the future.
[0093] It is understood that the specific implementation method for determining whether there are damaged memory blocks in non-volatile memory provided in this embodiment can also be combined with the data writing rules provided in the above embodiment. That is, the bad sector detection of non-volatile memory can be performed either before writing the target fault data or during the writing of the target fault data.
[0094] This embodiment further defines the writing method of the target fault data, following the "best effort storage" strategy, which can ensure that all relevant data at the time of the most recent fault is recorded, thereby improving the reliability of fault playback and reducing the user's replacement cost of non-volatile memory.
[0095] In some feasible embodiments, the compressor further includes a delayed power-off module, one end of which is connected to the input power supply, and the other end of which is connected to the controller and a non-volatile memory. After the step of writing the target fault data into the non-volatile memory in step S20 above, the fault playback method of the compressor may further include:
[0096] Step S24: In the event of a power outage, adjust the electrical parameters of the delayed power-off module to maintain the operating voltage unchanged within a preset time.
[0097] Since power outages may occur during the writing of target fault data, potentially interrupting the writing process and causing data loss, thus affecting fault playback, this embodiment adds a delayed power-off module to the compressor. This ensures that even if power is lost during data writing, the electrical parameters (such as voltage and capacitance) of the delayed power-off module can be adjusted to maintain normal data writing for a preset duration. The preset duration can be 10ms, 100ms, etc., and can be set according to actual needs, as long as it allows for the complete writing of the target fault data to the non-volatile memory. This embodiment does not impose any limitations on this.
[0098] As an example, refer to Figure 4 , Figure 4 This is one implementation of a power-down delay module. After power input, the voltage is stepped down and stored in a switching power supply circuit to increase the input LDO (low dropout linear regulator) voltage before outputting the voltage required by the MCU (controller). In this circuit, VOUT1 outputs a relatively high voltage; for example, if VOUT2 outputs 3.3V, then VOUT1 outputs approximately 7V. The CP01 electrolytic capacitor needs a large capacitance, such as 47uF or higher. When the power input is interrupted, the voltage drop time of VOUT2 can be adjusted by changing the output voltage of VOUT1 and the capacitance of the CP01 electrolytic capacitor, so that VOUT2 can maintain its original state level for the required time (e.g., 10ms or 100ms) after power failure.
[0099] Furthermore, embodiments of this application also provide a compressor, with reference to... Figure 5 The compressor includes:
[0100] An electric motor is used to generate power;
[0101] The compression mechanism is connected to the motor and is used to compress the refrigerant under the drive of the motor.
[0102] Non-volatile memory, used to store data;
[0103] The controller is connected to the motor and a non-volatile memory. The controller is used to control the motor to generate power and to implement the compressor fault playback method provided in any of the above embodiments.
[0104] In some feasible embodiments, the compressor may further include a time-delay power-off module, one end of which is connected to the input power supply, and the other end of which is connected to the controller and a non-volatile memory.
[0105] The compressor proposed in this embodiment and the fault playback method for compressors proposed in the above embodiments belong to the same technical concept. Technical details not described in detail in this embodiment can be found in any of the above embodiments. Furthermore, this embodiment has the same beneficial effects as the fault playback method for compressors.
[0106] Furthermore, this application also provides a vehicle that includes the compressor provided in the above embodiments.
[0107] The vehicle proposed in this embodiment and the compressor proposed in the above embodiments belong to the same technical concept. Technical details not described in detail in this embodiment can be found in any of the above embodiments. Furthermore, this embodiment has the same beneficial effects as the fault playback method for the compressor.
[0108] Furthermore, this application also proposes a computer-readable storage medium for use in a computer. The computer-readable storage medium can be a non-volatile computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the compressor fault playback method provided in any of the embodiments described above.
[0109] Those skilled in the art will understand that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer-readable storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0110] The above describes some implementation methods of the embodiments of this application. However, the embodiments of this application are not limited to the above implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the embodiments of this application. All such equivalent modifications or substitutions are included within the scope defined by the claims of the embodiments of this application.
Claims
1. A method of fault playback of a compressor, characterized by, The compressor comprises a non-volatile memory and a controller connected with the non-volatile memory and an upper computer respectively, and the method comprises the following steps performed by the controller: In the case of normal operation of the compressor, recording operation data of the compressor according to a preset time period; In the case of occurrence of a target fault event of the compressor, determining target fault data according to the target fault event and continuous multiple frames of the operation data, and writing the target fault data into the non-volatile memory; Receiving a diagnostic query instruction sent by the upper computer for the target fault event, obtaining the target fault data from the non-volatile memory according to the diagnostic query instruction, and sending the target fault data to the upper computer to obtain a fault playback result.
2. The compressor fault playback method of claim 1, wherein, The step of recording the operation data of the compressor according to a preset time period comprises: According to a preset time period, recording the operation data of the compressor at different time points into a memory space to form a data queue arranged in time sequence; In the case that the number of frames of the operation data contained in the data queue reaches a preset maximum number of frames, deleting the operation data recorded at the earliest time point in the data queue, and adding the operation data at the current time point to the data queue.
3. The compressor fault playback method of claim 2, wherein, Before the step of determining target fault data according to the target fault event and continuous multiple frames of the operation data, the method further comprises: Obtaining all data in the data queue at the current time point as continuous multiple frames of the operation data.
4. The compressor fault playback method of claim 1, wherein, The step of determining target fault data according to the target fault event and continuous multiple frames of the operation data comprises: Determining a target fault serial number based on the target fault event; Integrating the target fault serial number and continuous multiple frames of the operation data into target fault data.
5. The compressor fault playback method of claim 4, wherein, The step of writing the target fault data into the non-volatile memory comprises at least one of the following: In the case that there is historical data including the target fault serial number in the non-volatile memory, updating the historical data based on the target fault data; In the case that there is no historical data including the target fault serial number in the non-volatile memory and there is a blank storage block, writing the target fault data into the blank storage block; In the case that there is no historical data including the target fault serial number in the non-volatile memory and there is no blank storage block, erasing information in a specified storage block in which data is written earliest in the non-volatile memory, and writing the target fault data into the specified storage block.
6. The compressor fault playback method according to any one of claims 1 to 5, characterized in that, Before the step of writing the target fault data into the non-volatile memory, the method further comprises: Detecting whether there is a bad area in the non-volatile memory; In the case that there is a bad area in the non-volatile memory, prohibiting the storage block corresponding to the bad area in the non-volatile memory from being used as a data writing object; In the case that there is no bad area in the non-volatile memory, using all storage blocks in the non-volatile memory as data writing objects.
7. The method of claim 1, wherein, The compressor further comprises a delay power-off module, one end of the delay power-off module is connected with an input power supply, the other end of the delay power-off module is connected with the controller and the non-volatile memory respectively, after the step of writing the target fault data into the non-volatile memory, the method further comprises: In the case of power failure of the input power supply, the electrical parameters of the delay power-off module are adjusted to maintain the working voltage unchanged within a preset time length.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the fault playback method of the compressor in any one of claims 1 to 7.
9. A compressor characterized by, The compressor comprises: a motor for generating power; a compression mechanism connected with the motor for compressing refrigerant under the drive of the motor; a non-volatile memory for storing data; a controller connected with the motor and the non-volatile memory respectively, the controller is used for controlling the motor to generate power, and is also used for implementing the fault playback method of the compressor in any one of claims 1 to 7.
10. A vehicle characterized by comprising: The vehicle comprises the compressor in claim 9.