Instruction execution method and device, laundry equipment and computer readable storage medium
By implementing instruction execution methods in smart home appliances, obtaining and executing instructions to be executed co-zero, the problem of repeated triggering of instructions is solved, operation stability and user experience are improved, and the accuracy and efficiency of instruction execution are ensured.
Patent Information
- Application Number
- CN202411304919.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-29
AI Technical Summary
Among smart home appliances, especially washing machines, the problems of repeated triggering of instructions, fewer triggers or random triggers are prone to, and the existing technology has not effectively solved it.
Provide an instruction execution method, by obtaining and executing instructions to be executed, the corresponding data position will be zero after completion, avoiding subsequent repeated execution, and using the acquisition module and processing module to obtain and execute instructions, and ignore it when the data bit is detected to be zero. Previous instructions ensure smooth execution of the instructions.
It effectively avoids the problem of repeated execution of instructions, improves the operation stability and user experience of smart home appliances, and ensures the accuracy and efficiency of instruction execution.
Smart Images

Figure CN119041159A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electrical appliance technology, and in particular to an instruction execution method, device, laundry appliance, and computer-readable storage medium. Background Art
[0002] With the gradual penetration of network technology in the smart home industry, the human-computer interaction mode of smart home appliances has also changed to provide users with more and more convenient operation experience. With the development of intelligent home appliances, more and more IoT home appliances are appearing in the traditional home appliance industry. For example, most of the communication in washing machines uses Uart communication, but as the functions of washing machines increase, it is easy to cause under-triggering, over-triggering or random triggering. In the prior art, there is no effective way to solve this problem. Summary of the invention
[0003] The present application provides an instruction execution method, which can effectively avoid the problem of repeated program triggering.
[0004] In a first aspect, the present application provides an instruction execution method, the method comprising:
[0005] Get the first instruction to be executed;
[0006] Executing the first instruction to be executed;
[0007] If the first instruction to be executed is completed, the data value of the corresponding data bit in the first instruction to be executed is set to zero;
[0008] If a second instruction to be executed is obtained, the second instruction to be executed is obtained after the first instruction to be executed;
[0009] When executing the second instruction to be executed, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, the second instruction to be executed is executed without executing the first instruction to be executed.
[0010] In some embodiments of the present application, obtaining the first instruction to be executed includes:
[0011] Receive command data sent by the target device;
[0012] If the amount of the received instruction data meets the target data amount threshold, a receiving interrupt is triggered, and the received instruction data is stored;
[0013] If the storage of the received instruction data is complete, continue to receive other instruction data until the instruction data is completely received, thereby obtaining the first instruction to be executed.
[0014] In some embodiments of the present application, obtaining the first instruction to be executed includes:
[0015] Determining a target instruction type of the first instruction to be executed;
[0016] A target receiving function corresponding to the target instruction type is called to obtain the first instruction to be executed.
[0017] In some embodiments of the present application, after obtaining the first instruction to be executed, the method further includes:
[0018] If no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered;
[0019] If the second instruction to be executed is obtained, the idle interrupt flag is cleared.
[0020] In some embodiments of the present application, if no other instructions to be executed are received within the target time period, triggering an idle interrupt flag includes:
[0021] If a clear command is received, the pending command is cleared;
[0022] If no clear command is received and no other pending commands are received within the target time period, the idle interrupt flag is triggered.
[0023] In some embodiments of the present application, the step of setting the data value of the corresponding data bit in the first to-be-executed instruction to zero includes:
[0024] Determine each data bit corresponding to the first instruction to be executed;
[0025] Determine a target data bit from each of the data bits according to the arrangement order information corresponding to each of the data bits; the target data bit is the last data bit in the arrangement order among the data bits;
[0026] The data value of the target data bit is set to zero.
[0027] In some embodiments of the present application, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, executing the second instruction to be executed instead of executing the first instruction to be executed includes:
[0028] If it is detected that the data value of the target data bit in the first instruction to be executed is zero, the data of each data bit corresponding to the first instruction to be executed before the target data bit is ignored according to the arrangement order information, so that the first instruction to be executed is not executed when the second instruction to be executed is executed.
[0029] In a second aspect, the present application further provides an instruction execution device, the device comprising:
[0030] An acquisition module, used for acquiring a first instruction to be executed;
[0031] A processing module, configured to execute the first instruction to be executed;
[0032] The processing module is further configured to reset the data value of the corresponding data bit in the first instruction to be executed to zero if the first instruction to be executed is completed;
[0033] The acquisition module is further configured to acquire a second instruction to be executed, and the second instruction to be executed is acquired after the first instruction to be executed;
[0034] The processing module is further configured to execute the second instruction to be executed but not the first instruction to be executed if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero when executing the second instruction to be executed.
[0035] In a third aspect, the present application also provides a laundry device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the instruction execution methods.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the instruction execution methods.
[0037] The instruction execution method provided in the present application can reset the data corresponding to the first instruction to be executed to zero after completing the execution of the first instruction to be executed, so that when the second instruction to be executed is subsequently received, at the same time when the second instruction to be executed is executed, if it is detected that the first instruction to be executed is reset to zero, the first instruction to be executed will not be executed again, thereby solving the problem of repeated execution of instructions. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 is a schematic diagram of a scenario of an instruction execution system provided in an embodiment of the present application;
[0040] Figure 2 This is a flowchart of an embodiment of the instruction execution method in the embodiment of the present application;
[0041] Figure 3 It is a schematic diagram of a functional module of the instruction execution device in the embodiment of the present application;
[0042] Figure 4 It is a schematic diagram of the structure of the washing machine in the embodiment of the present application. DETAILED DESCRIPTION
[0043] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0044] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.
[0045] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.
[0046] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.
[0047] The present application provides an instruction execution method, apparatus, device and storage medium, which are described in detail below.
[0048] See also Figure 1 , Figure 1 1 is a schematic diagram of a scenario of an instruction execution system provided in an embodiment of the present application, and the instruction execution system may include a washing machine 100 and a control device 200. Figure 1 The washing machine 100 in the embodiment can obtain the relevant control logic stored in the washing machine 100 to execute the instruction execution method in the present application.
[0049] In the embodiment of the present application, the washing machine 100 includes but is not limited to a drum washing machine, a pulsator washing machine, etc. The control device 200 may include but is not limited to a mobile phone, a computer, a server, and other devices.
[0050] In the embodiment of the present application, communication between the washing machine 100 and the control device 200 can be achieved through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc.
[0051] It should be noted that Figure 1 The scenario diagram of the instruction execution system shown is merely an example. The instruction execution system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the instruction execution system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.
[0052] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of the instruction execution method in the embodiment of the present application. The instruction execution method may include the following steps 201 to 204:
[0053] 201. Obtain a first instruction to be executed.
[0054] In the embodiment of the present application, the first instruction to be executed can be any instruction to control the washing machine, which is conducive to executing the rinsing mode, the dehydration mode, the drying mode, etc., and the specific embodiment of the present application is not limited. Among them, the first instruction to be executed can be sent through a mobile phone, an Internet of Things control system, and other devices. In addition, the method for obtaining the first instruction to be executed can be any data receiving method, and the specific embodiment of the present application is not limited.
[0055] 202. Execute a first instruction to be executed.
[0056] After the washing machine obtains the first instruction to be executed, it can execute it. Specifically, the embodiment of the present application is not limited.
[0057] 203. If the first instruction to be executed is completed, set the data value of the corresponding data bit in the first instruction to be executed to zero.
[0058] When the washing machine executes the first instruction to be executed, it is necessary to store the acquired first instruction to be executed in the cache inside the washing machine, so that the processor inside the washing machine can execute the corresponding action from the instruction stored in the cache. Therefore, in the embodiment of the present application, after the washing machine completes the execution of the first instruction to be executed, the data position corresponding to the first instruction to be executed in the cache can be set to zero. The purpose of doing so is to avoid reading the first instruction to be executed again when executing other commands later.
[0059] 204. If a second instruction to be executed is obtained, the second instruction to be executed is obtained after the first instruction to be executed.
[0060] In an embodiment of the present application, the second instruction to be executed may be the same as or different from the first instruction to be executed, and the specific embodiment of the present application is not limited thereto.
[0061] 205. When executing the second instruction to be executed, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, the second instruction to be executed is executed instead of the first instruction to be executed.
[0062] According to the above steps, when executing the second instruction to be executed, if it is detected that the data value of the data bit corresponding to the first instruction to be executed is zero, it means that the first instruction to be executed has been completed and does not need to be executed again.
[0063] The instruction execution method provided in the present application can reset the data corresponding to the first instruction to be executed to zero after completing the execution of the first instruction to be executed, so that when the second instruction to be executed is subsequently received, at the same time when the second instruction to be executed is executed, if it is detected that the first instruction to be executed is reset to zero, the first instruction to be executed will not be executed again, thereby solving the problem of repeated execution of instructions.
[0064] In order to better implement the embodiment of the present application, in one embodiment of the present application, obtaining a first instruction to be executed includes:
[0065] Receive the instruction data sent by the target device; if the data volume of the received instruction data meets the target data volume threshold, trigger a receive interrupt and store the received instruction data; if the storage of the received instruction data is completed, continue to receive other instruction data until the instruction data reception is completed, and obtain the first instruction to be executed.
[0066] The above embodiment provides a solution for obtaining the first instruction to be executed. However, data is usually transmitted in real time during the transmission process. For example, when a user operates a mobile phone to instruct the washing machine to start and perform a rinsing task. In this scenario, the network may fluctuate, and the time it takes to send an instruction may not be instantaneous. For example, when the instruction is halfway transmitted, due to network fluctuations, the instruction will be in a state of temporarily interrupted transmission. In this case, the washing machine is still in a communication state and has been occupying communication resources.
[0067] Therefore, in order to prevent the washing machine from occupying communication resources all the time, a scheme for intermittently receiving instruction data can be set up. As shown above, when the data volume of the instruction data meets the target data volume threshold, a receiving interrupt is triggered, and the received data is stored in the cache. The receiving interrupt can be understood as temporarily stopping receiving. At this time, no matter network fluctuations or other abnormal situations, it will not affect the washing machine's occupation of communication resources. If the network is restored, after the instruction data is sent to the washing machine, and a certain amount of data is accumulated, the washing machine can receive the data and put it into the cache. In this way, the cycle is repeated to complete the reception of all instruction data corresponding to the first instruction to be executed.
[0068] In order to better implement the embodiment of the present application, in one embodiment of the present application, obtaining a first instruction to be executed includes:
[0069] Determine the target instruction type of the first instruction to be executed; call the target receiving function corresponding to the target instruction type to obtain the first instruction to be executed.
[0070] In actual situations, instructions may include different types. For example, instructions to be executed sent by different terminals may be encoded in different encoding methods. In other words, the first instructions to be executed may be of different instruction types. Therefore, in order to enable smooth parsing of the first instructions to be executed upon receipt, different types of receiving functions may be set in the embodiments of the present application so that any type of first instructions to be executed can be parsed.
[0071] For example: if the instruction type of the first instruction to be executed is A, function 1 can be used as the target receiving function for receiving; if the instruction type of the first instruction to be executed is B, function 2 can be used as the target receiving function for receiving; if the instruction type of the first instruction to be executed is C, function 3 can be used as the target receiving function for receiving, etc. The embodiment of the present application does not limit the instruction type and function type.
[0072] In order to better implement the embodiment of the present application, in one embodiment of the present application, after obtaining the first instruction to be executed, the method further includes:
[0073] If no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered; if the second instruction to be executed is obtained, the idle interrupt flag is cleared.
[0074] The above embodiment provides a method of receiving data of instructions to be executed by using an interrupt. In actual application scenarios, when users issue instructions to be executed, the interval is usually long. For example: issue a rinsing task at 10 o'clock, and then issue a drying task at 10:40. Therefore, in order to avoid treating the second instruction to be executed as the first instruction to be executed, the embodiment of the present application can set an idle interrupt flag to stop receiving the storage of instruction data. When the interval between the last instruction data and the next instruction data exceeds a certain threshold, the two instruction data can be regarded as belonging to different instructions. In this way, when the time difference between the arrival time of one instruction data and the arrival time of the last instruction data exceeds the target time threshold, the washing machine can set the data value corresponding to the last instruction data to zero. At the same time, the idle interrupt flag can also assist in timing. Once the instruction data meets the storage condition in the manner of the above embodiment, the time when the idle interrupt flag is triggered can be used as the time to stop receiving the last instruction data. In this way, when the next instruction data arrives, the arrival time is subtracted from the time when the idle interrupt flag is triggered to obtain the time difference.
[0075] In order to better implement the embodiment of the present application, in one embodiment of the present application, if no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered, including:
[0076] If a clear instruction is received, the pending instruction is cleared; if no clear instruction is received and no other pending instructions are received within the target time period, the idle interrupt flag is triggered.
[0077] The above embodiment provides a solution for setting the instruction data to zero. In actual scenarios, a cache clearing mechanism can be set for the laundry device, such as timed clearing. When the instruction data left in the cache is cleared, if a new instruction to be executed is obtained at this time, it will not be executed repeatedly. In this way, there is no need to trigger the idle interrupt flag. If there is no timed clearing, the idle interrupt flag can be triggered according to the given conditions in the manner of the above embodiment.
[0078] In order to better implement the embodiment of the present application, in one embodiment of the present application, setting the data value of the corresponding data bit in the first to-be-executed instruction to zero includes:
[0079] Determine the corresponding data bits in the first instruction to be executed; determine the target data bit from each data bit according to the arrangement order information corresponding to each data bit; the target data bit is the last data bit in the arrangement order among the data bits; and set the data value of the target data bit to zero.
[0080] The above embodiment provides a method for setting all data bits corresponding to the first instruction to be executed to zero. This method requires determining all data bits corresponding to the first instruction to be executed, and there are many steps to be processed in the actual process. Data is written into the cache in a sequential order, so the last bit of the first instruction to be executed can be set to zero. In this case, only one bit of data is set to zero, rather than all the data bits.
[0081] At this time, if it is detected that the data value of the target data bit in the first instruction to be executed is zero, then according to the arrangement order information, the data of each data bit corresponding to the first instruction to be executed before the target data bit is ignored, so that the first instruction to be executed is not executed when the second instruction to be executed is executed. In this way, the effect of setting all data positions to zero is achieved with only one data bit being zero.
[0082] In order to better implement the instruction execution method in the embodiment of the present application, in addition to the instruction execution method, the embodiment of the present application also provides an instruction execution device, such as Figure 3 As shown, the device 300 includes:
[0083] An acquisition module 301 is used to acquire a first instruction to be executed;
[0084] The processing module 302 is used to execute a first instruction to be executed;
[0085] The processing module 302 is further configured to set the data value of the corresponding data bit in the first instruction to be executed to zero if the execution of the first instruction to be executed is completed;
[0086] The acquisition module 301 is further used for acquiring a second instruction to be executed, and the second instruction to be executed is acquired after the first instruction to be executed;
[0087] The processing module 302 is further configured to execute the second instruction to be executed but not the first instruction to be executed if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero when executing the second instruction to be executed.
[0088] In the instruction execution device provided by the present application, the acquisition module 301 can acquire the first instruction to be executed. At the same time, the processing module 302 can be used for the execution of the instruction and the zeroing operation of the relevant data bits. After the execution of the first instruction to be executed is completed, the data corresponding to the first instruction to be executed is set to zero, so that when the second instruction to be executed is received later, at the same time when the second instruction to be executed is executed, if it is detected that the first instruction to be executed is set to zero, the first instruction to be executed will not be executed again, thereby solving the problem of repeated execution of instructions.
[0089] In some embodiments of the present application, the acquisition module 301 is specifically used to:
[0090] Receive command data sent by the target device;
[0091] If the amount of the received instruction data meets the target data amount threshold, a receiving interrupt is triggered and the received instruction data is stored;
[0092] If the received instruction data has been completely stored, other instruction data will continue to be received until the instruction data is completely received, thereby obtaining a first instruction to be executed.
[0093] In some embodiments of the present application, the acquisition module 301 is further used to:
[0094] Determine a target instruction type of a first instruction to be executed;
[0095] Call the target receiving function corresponding to the target instruction type to obtain the first instruction to be executed.
[0096] In some embodiments of the present application, the processing module 302 is specifically used to:
[0097] If no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered;
[0098] If the second instruction to be executed is obtained, the idle interrupt flag is cleared.
[0099] In some embodiments of the present application, the processing module 302 is further configured to:
[0100] If a clear command is received, the pending command is cleared;
[0101] If no clear command is received and no other pending commands are received within the target time period, the idle interrupt flag is triggered.
[0102] In some embodiments of the present application, the processing module 302 is further configured to:
[0103] Determine each data bit corresponding to the first instruction to be executed;
[0104] According to the arrangement order information corresponding to each data bit, a target data bit is determined from each data bit; the target data bit is the last data bit in the arrangement order among each data bit;
[0105] Set the data value of the target data bit to zero.
[0106] In some embodiments of the present application, the processing module 302 is further configured to:
[0107] If it is detected that the data value of the target data bit in the first instruction to be executed is zero, the data of each data bit corresponding to the first instruction to be executed before the target data bit is ignored according to the arrangement order information, so that the first instruction to be executed is not executed when the second instruction to be executed is executed.
[0108] The present application also provides a washing machine, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the instruction execution methods in the present application. The washing machine integrates any one of the instruction execution methods provided in the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the washing machine involved in the embodiment of the present application, specifically:
[0109] The washing machine may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 4 The structure of the washing machine shown in the figure does not constitute a limitation on the washing machine, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0110] in:
[0111] The processor 401 is the control center of the washing machine. It uses various interfaces and lines to connect various parts of the entire washing machine. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, it executes various functions of the washing machine and processes data, thereby monitoring the washing machine as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0112] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the washing machine, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0113] The washing machine also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0114] The washing machine may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.
[0115] Although not shown, the washing machine may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the washing machine will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:
[0116] Get the first instruction to be executed;
[0117] Execute the first pending instruction;
[0118] If the first instruction to be executed is completed, the data value of the corresponding data bit in the first instruction to be executed is set to zero;
[0119] If a second instruction to be executed is obtained, the second instruction to be executed is obtained after the first instruction to be executed;
[0120] When executing the second instruction to be executed, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, the second instruction to be executed is executed without executing the first instruction to be executed.
[0121] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0122] To this end, an embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any instruction execution method provided in the embodiment of the present application. For example, the computer program is loaded by a processor to execute the following steps:
[0123] Get the first instruction to be executed;
[0124] Execute the first pending instruction;
[0125] If the first instruction to be executed is completed, the data value of the corresponding data bit in the first instruction to be executed is set to zero;
[0126] If a second instruction to be executed is obtained, the second instruction to be executed is obtained after the first instruction to be executed;
[0127] When executing the second instruction to be executed, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, the second instruction to be executed is executed without executing the first instruction to be executed.
[0128] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.
[0129] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.
[0130] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0131] The above is a detailed introduction to an instruction execution method and device provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for executing an instruction, characterized in that: The method comprises: Get the first instruction to be executed; Executing the first instruction to be executed; If the first instruction to be executed is completed, the data value of the corresponding data bit in the first instruction to be executed is set to zero; If a second instruction to be executed is obtained, the second instruction to be executed is obtained after the first instruction to be executed; When executing the second instruction to be executed, if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, the second instruction to be executed is executed without executing the first instruction to be executed.
2. The instruction execution method according to claim 1, characterized in that: The obtaining of the first instruction to be executed includes: Receive command data sent by the target device; If the amount of the received instruction data meets the target data amount threshold, a receiving interrupt is triggered, and the received instruction data is stored; If the storage of the received instruction data is complete, continue to receive other instruction data until the instruction data is completely received, thereby obtaining the first instruction to be executed.
3. The instruction execution method according to claim 1, characterized in that: The obtaining of the first instruction to be executed includes: Determining a target instruction type of the first instruction to be executed; A target receiving function corresponding to the target instruction type is called to obtain the first instruction to be executed.
4. The instruction execution method according to claim 1, characterized in that: After obtaining the first instruction to be executed, the method further includes: If no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered; If the second instruction to be executed is obtained, the idle interrupt flag is cleared.
5. The instruction execution method according to claim 4, characterized in that: If no other instructions to be executed are received within the target time period, the idle interrupt flag is triggered, including: If a clear command is received, the pending command is cleared; If no clear command is received and no other pending commands are received within the target time period, the idle interrupt flag is triggered.
6. The instruction execution method according to claim 1, characterized in that: The step of setting the data value of the corresponding data bit in the first to-be-executed instruction to zero includes: Determine each data bit corresponding to the first instruction to be executed; Determine a target data bit from each of the data bits according to the arrangement order information corresponding to each of the data bits; the target data bit is the last data bit in the arrangement order among the data bits; The data value of the target data bit is set to zero.
7. The instruction execution method according to claim 6, characterized in that: If it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero, executing the second instruction to be executed instead of executing the first instruction to be executed, comprises: If it is detected that the data value of the target data bit in the first instruction to be executed is zero, the data of each data bit corresponding to the first instruction to be executed before the target data bit is ignored according to the arrangement order information, so that the first instruction to be executed is not executed when the second instruction to be executed is executed.
8. An instruction execution device, characterized in that: The device comprises: An acquisition module, used for acquiring a first instruction to be executed; A processing module, configured to execute the first instruction to be executed; The processing module is further configured to reset the data value of the corresponding data bit in the first instruction to be executed to zero if the first instruction to be executed is completed; The acquisition module is further configured to acquire a second instruction to be executed, and the second instruction to be executed is acquired after the first instruction to be executed; The processing module is further configured to execute the second instruction to be executed but not the first instruction to be executed if it is detected that the data value of the corresponding data bit in the first instruction to be executed is zero when executing the second instruction to be executed.
9. A laundry device, characterized in that: The laundry device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the instruction execution method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the instruction execution method according to any one of claims 1 to 7.
