Instruction transmission processing method, system, equipment and product
By introducing an instruction cache queue in the Internet of Things system and performing instruction compression processing, the problem of confusing remote instructions received by terminal devices is solved, and the stable and orderly transmission and efficient execution of instructions are achieved.
Patent Information
- Application Number
- CN202411942643.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-03-14
AI Technical Summary
In the Internet of Things technology, remote instructions received by terminal devices are prone to confusion in sequence due to frequent issuance of clients or multiple users issuance of instructions at the same time. Especially when the network is unstable, the user may repeatedly send instructions, resulting in the server being unable to process it.
The instruction cache queue is used to receive instructions sent by the client and compress them according to the instruction type and dependencies to ensure the order of instructions in the cache queue, and retry processing when the network is unstable.
It realizes stable and orderly transmission of instructions, improves the efficiency of instruction issuance and execution, and avoids execution failures caused by inconsistent instruction order and network instability.
Smart Images

Figure CN119629210A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an instruction transmission processing method, system, device and product. Background Art
[0002] With the development of Internet of Things (IOT) technology, more and more terminal devices can be controlled through Internet.
[0003] IoT technology not only meets the needs of industrialization, but also penetrates into people's daily lives, providing users with more convenience. For example, users can remotely control smart locks, smart electricity meters, smart water meters, smart cameras, etc. In actual applications, the remote commands received by the terminal device are forwarded by the server. When users frequently send commands, or multiple users send commands at the same time, it is easy for the server to issue commands in a disordered order. Especially when the network is unstable and the user's commands cannot be responded to in time, the user may repeatedly send various commands in a short period of time, causing the server to be unable to process. Therefore, a solution is needed to achieve stable and orderly transmission of commands. Summary of the invention
[0004] The present disclosure provides an instruction transmission processing method, system, device and product.
[0005] According to the first aspect of the present disclosure, a method for processing instruction transmission is provided. The method is applied to a server, and the method specifically includes: receiving at least one first instruction sent by a client; determining a second instruction stored at the end of a cache queue; compressing the first instruction and the second instruction according to the instruction type and instruction dependency relationship between the first instruction and the second instruction; updating the cache queue according to the compression result, and sending the instructions in the updated cache queue to a terminal device in sequence.
[0006] According to at least one embodiment of the present disclosure, the first instruction and the second instruction are compressed according to their instruction types and instruction dependencies, including: judging the instruction dependency according to the instruction types of the first instruction and the second instruction having an adjacent relationship; if the instruction dependency is a merging relationship, merging the first instruction and the second instruction into one instruction; if the instruction dependency is a cancelling relationship, cancelling the first instruction and the second instruction.
[0007] According to at least one embodiment of the present disclosure, the instruction dependency is judged based on the instruction types of a first instruction and a second instruction having an adjacent relationship, including: if the instruction types of the first instruction and the second instruction are the same, then the instruction dependency is a merging relationship; if the instruction types of the first instruction and the second instruction have opposite functions, then the instruction dependency is a canceling relationship.
[0008] According to at least one embodiment of the present disclosure, receiving at least one first instruction sent by a client includes: determining whether there is a second instruction at the end of the cache queue; if so, determining the instruction type of the second instruction; determining the instruction type of the first instruction; based on the instruction type, determining whether the first instruction and the second instruction are compliant; if compliant, receiving the first instruction.
[0009] According to at least one embodiment of the present disclosure, if the instruction dependency is a mutually exclusive relationship, the first instruction is determined to be non-compliant, and the first instruction is deleted or discarded.
[0010] According to at least one embodiment of the present disclosure, receiving at least one first instruction sent by a client includes: determining whether there is a second instruction at the end of a cache queue; if there is no second instruction at the end of the cache queue, receiving the first instruction.
[0011] According to at least one embodiment of the present disclosure, the instructions in the updated cache queue are sent to the terminal device in sequence, including: sending the third instruction at the head of the cache queue to the terminal device; when the third instruction does not need to be executed, or when the execution success information fed back by the bus is received, the third instruction is cleared from the cache queue; when the execution failure or execution timeout information of the third instruction fed back by the bus is received, the third instruction is repeatedly executed according to the retry rule; if the number of retries exceeds the number threshold, the third instruction is cleared from the cache queue.
[0012] According to at least one embodiment of the present disclosure, in response to a delete request for the third instruction issued by the client, the third instruction is cleared from the head of the cache queue.
[0013] According to a second aspect of the present disclosure, there is provided an instruction transmission processing method, which is applied to a terminal device, and the method comprises: in response to a second instruction and at least one first instruction sent adjacently by a client corresponding to the control terminal device, executing an instruction compressed from the second instruction and at least one first instruction, wherein the compression method of the second instruction and the first instruction is determined based on the instruction type and instruction dependency relationship between the first instruction and the second instruction.
[0014] According to a third aspect of the present disclosure, a method for processing instruction transmission is provided, which is applied to a client, and the method includes: sending at least one first instruction for operating a terminal device to a server; wherein, after receiving the first instruction, the server compresses the first instruction and the second instruction according to the instruction type and instruction dependency relationship between the second instruction at the end of the cache queue and the first instruction, and updates the cache queue according to the compression result; and sends the instructions in the updated cache queue to the terminal device in sequence.
[0015] According to a fourth aspect of the present disclosure, an instruction transmission and processing system is provided, the system comprising: an instruction receiver, for receiving at least one first instruction sent by a client; determining the second instruction last stored in a cache queue; compressing the first instruction and the second instruction according to their instruction types and instruction dependencies; a cache queue, for storing instructions compressed by the instruction receiver in the order in which they are received; and an instruction sender, for sending the instructions in the updated cache queue to a terminal device in sequence.
[0016] According to at least one embodiment of the present disclosure, the instruction result processor is used to receive the instruction execution result sent by the terminal device, and notify the instruction issuer to issue the next instruction in the cache queue.
[0017] According to at least one embodiment of the present disclosure, the exception handler is used to execute a retry task for an instruction that fails to be sent or times out by an instruction issuer.
[0018] According to at least one embodiment of the present disclosure, the event bus is used to establish a communication connection between an instruction receiver, an instruction issuer, an instruction result processor, and an exception processor.
[0019] According to the fifth aspect of the present disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the method of the first aspect, or the second aspect, or the third aspect of any embodiment of the present disclosure.
[0020] According to the sixth aspect of the present disclosure, a readable storage medium is provided, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement the method of the first aspect, or the second aspect, or the third aspect of any embodiment of the present disclosure.
[0021] According to a seventh aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method of the first aspect, or the second aspect, or the third aspect of any one embodiment of the present disclosure is implemented.
[0022] In the solution provided by the present disclosure, after receiving at least one first instruction sent by the client, the server does not directly store it in the cache queue of the instruction. When it is determined that the second instruction is stored at the tail of the cache queue, the first instruction and the second instruction are compressed according to the instruction type and instruction dependency of the first instruction and the second instruction; ensuring that each new instruction stored in the cache queue is a compliant and necessary instruction. Then, the cache queue is updated according to the compression result of the instruction, and the instructions in the updated cache queue are sent to the terminal device in sequence. In the above manner, the instructions of the client are not sent directly to the terminal device, but the received instructions are compressed by the instruction receiver and then stored in the cache queue, ensuring that the instructions sent to the terminal device in sequence are continuous and stable, and the instruction sending and execution efficiency is higher, which is also more conducive to instruction maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0024] Figure 1 This is a schematic diagram of the structure of the instruction transmission and processing system proposed in the present disclosure.
[0025] Figure 2 The figure shows an overall flow chart of an instruction transmission processing method according to an embodiment of the present disclosure.
[0026] Figure 3 A schematic diagram of an instruction dependency relationship provided by the present disclosure.
[0027] Figure 4 A schematic diagram of the second instruction position in the cache queue exemplified in the present disclosure.
[0028] Figure 5 A schematic diagram of merge deletion for illustrating the present disclosure.
[0029] Figure 6 A schematic diagram of offset deletion exemplifying the present disclosure.
[0030] Figure 7 A schematic diagram of merge deletion for illustrating the present disclosure.
[0031] Figure 8 A schematic diagram of performing cancellation for exemplifying the present disclosure.
[0032] Fig. 9 , 10 A flowchart of instruction verification provided by the present disclosure.
[0033] Fig.11 A schematic diagram of the cache queue workflow provided for the present disclosure.
[0034] Fig.12 A schematic diagram of the instruction issuance workflow provided in the present disclosure.
[0035] Fig.13 A schematic diagram of the instruction result processor workflow for illustrating the present disclosure.
[0036] Fig.14 A schematic diagram of a display interface for illustrating the present disclosure.
[0037] Fig.15 The present invention is a block diagram showing the structure of an instruction transmission processing device according to an embodiment of the present invention.
[0038] Fig.16 The present invention is a block diagram showing the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0040] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0041] With the development of Internet of Things (IOT) technology, it has been widely used not only in industry, but also in people's daily life. For example, in the leasing business, smart terminal devices are widely used, which can help improve business processing efficiency. For example, install smart door locks to improve the efficiency of showing, and in subsequent management, realize the automatic management of tenant rights based on the lease contract and bill. Install smart water and electricity meters, which can automatically generate water and electricity bills, and tenants can pay online. After arrears, water and electricity will be automatically cut off, and water and electricity will be automatically turned on after payment, which effectively improves management efficiency and reduces management costs and workload. In order to ensure normal operation, these smart terminals need to support remote command reception functions. For example, adding, modifying, extending, freezing, unfreezing, and deleting smart lock passwords. Turning water and electricity meters on and off, etc.
[0042] The above intelligent terminal devices all have the function of issuing commands. For example, smart locks have commands for adding, modifying, extending, freezing, unfreezing, and deleting passwords. Water and electricity meters have commands for power on, power off, water on, and water off. There are many problems in the process of issuing commands.
[0043] The command delivery fails due to some reasons, for example, the client sends commands at a high frequency that exceeds the upper limit of the downstream server's processing speed, or a downstream server failure causes the failure of command reception or delivery.
[0044] The command execution timeout may occur due to some reasons, such as network fluctuations causing command loss, problems with the terminal device itself causing execution interruption, or the server sending commands at a high frequency exceeding the upper limit of the terminal device's processing speed.
[0045] There is also the problem of illegal instructions, for example, the user sends an illegal instruction through the client and the execution fails. If the password is not sent successfully, the instruction deletion is initiated.
[0046] There is also the problem of retry exceptions. In the scenario of command loss or command execution failure, a retry will be initiated. If you simply initiate a command retry, it may produce uncontrollable results. For example, if a password of a password lock is frozen and unfrozen, the final state of the password should be unfrozen. However, the freeze command failed to execute and the unfreeze command was successful. If you simply retry the freeze command, the opposite result will be produced.
[0047] To this end, the present disclosure proposes an instruction transmission processing method. Aiming at the existing problems, an instruction cache queue is introduced to strictly ensure the first-in-first-out principle of instructions and execute them in the order of instructions in the queue.
[0048] When the instruction fails to be issued or times out, the system will automatically initiate a retry. Only after the retry succeeds will the next instruction be executed. The above measures solve the problem of instruction failure and the disordered order caused by simple retry. The instruction queue adds instruction compliance verification to ensure that the instructions in the queue comply with the functional principle of the intelligent terminal device, avoiding the problem of illegal instruction issuance leading to execution failure or incorrect execution. A new problem arises after the introduction of the instruction cache queue. If a large number of instructions are accumulated, the execution cycle of the instructions will be lengthened. Here, the instruction compression technology solution is introduced to control the number of instructions in each queue to a constant order of magnitude. Through the above solution, it is ensured that the instructions in the instruction issuance process are sorted according to the queue, and the issuance and retry are in order. The client can issue instructions at any time as needed. These instructions can be pre-issued and cached in the cache queue. Even if the terminal device cannot execute them at this time, it can ensure that the instructions will not be lost. In addition, it can also perform limited retries, timeout retries, and multiple failure elimination mechanisms for instructions that have been issued or failed to execute, which can improve the stability of the entire cache queue. The instruction compression technology compresses the number of instructions and ensures the speed of execution of the overall queue instructions. Queue management is adopted for a large number of instructions, which makes it easy to create a visual management interface and manually troubleshoot instruction-related faults.
[0049] Figure 1 This is a schematic diagram of the structure of the instruction transmission processing system proposed in the present disclosure. Figure 1 It can be seen that the instruction transmission processing system proposed in the present disclosure includes an instruction receiver 1, a cache queue 2, an event bus 3, an instruction issuer 4, an instruction result processor 5 and an exception processor 6. For ease of understanding, in the following and subsequent disclosed solutions, an example will be given in which the terminal device is a smart lock.
[0050] Specifically, the instruction receiver 1 is used to receive at least one first instruction sent by the client; determine the second instruction last stored in the cache queue; and compress the first instruction and the second instruction according to the instruction type and instruction dependency relationship between the first instruction and the second instruction. The client mentioned here can be a user's mobile phone, computer or other client device. The instructions sent can be various instructions for adding, modifying, freezing, postponing, unfreezing and deleting passwords for smart locks. After verifying that the first instruction is legal, put the first instruction into the cache queue, compress the first instruction and the second instruction already stored in the cache queue, and notify the instruction issuer to issue the instruction.
[0051] Specifically, the smart lock supports 6 types of remote management commands, as follows.
[0052] Add password: specify the password id to add a new password, set the password initial value and validity period.
[0053] Change password: Specify the password ID to reset the password value.
[0054] Extend password: Specify the password ID to change the validity period of the password.
[0055] Freeze password: Specify a password ID to make the password unavailable.
[0056] Unfreeze password: Specify the password ID to make the password available again, which is the opposite instruction of freezing.
[0057] Delete password: Specify the password id to delete this password.
[0058] Cache queue 2 is used to store the instructions compressed and processed by the instruction receiver in the order of receiving. The instructions are stored in the order of issuing the instructions, and the upstream is connected to the instruction receiver, and the downstream is connected to the instruction issuer.
[0059] The instruction sender 4 is used to send the instructions in the updated cache queue to the terminal device in sequence.
[0060] The instruction result processor 5 is used to receive the instruction execution result sent by the terminal device, and to notify the instruction sender to send the next instruction in the cache queue.
[0061] The exception handler 6 is used to execute a retry task for the instruction that fails to be sent or times out by the instruction sender.
[0062] The event bus 3 is used to establish communication connections between the instruction receiver, the instruction issuer, the instruction result processor, and the exception processor.
[0063] Explanation of terms.
[0064] For the convenience of description and to make the technical solutions of the specific implementation methods of the present disclosure easier to understand, before describing the instruction transmission processing method implemented by the present disclosure, the technical terms involved in the specific implementation methods of the present disclosure are explained as follows.
[0065] The Internet of Things (IoT) is a broad concept that represents a network of physical devices and objects that are connected and communicated through the Internet. It refers to the real-time collection of various information (such as sound, light, heat, electricity, mechanics, chemistry, biology, location, etc.) of any object or process that needs to be monitored, connected, and interacted through various devices and technologies such as information sensors, radio frequency identification (RFID) technology, global positioning system, infrared sensor, laser scanner, etc., and through various possible network access, to achieve ubiquitous connection between objects and objects, objects and people, so as to realize intelligent perception, identification and management of objects and processes.
[0066] Figure 2 FIG. 1 is a schematic diagram showing the overall flow of an instruction transmission processing method according to an embodiment of the present disclosure. Figure 2 The method shown includes steps 201 to 204. The method may be executed by an electronic device such as a server (local server or cloud server).
[0067] Specifically, Figure 2 The method shown includes: Step 201: receiving at least one first instruction sent by a client.
[0068] When a user needs to remotely control or wirelessly control a terminal device, the user will send a command to the corresponding terminal device (for example, a smart lock) through the client. When sending, the client cannot send it directly to the terminal device and needs to go through the server. When the network connecting the client and the server is unstable, or the network connecting the server and the terminal device is unstable, the terminal device will not be able to respond to the command in time after the user sends the command.
[0069] Therefore, it is possible that the user sends multiple identical instructions at a high frequency through the client, and may also try to send many irrelevant instructions. This can easily lead to instruction accumulation in the server. In subsequent steps, it will be considered to compress at least one first instruction received, thereby reducing the instruction storage burden of the cache queue.
[0070] It should be noted that when the client sends the first instruction, each instruction has its unique identifier, through which not only different instructions can be distinguished, but also the terminal device to which the instruction needs to be sent can be known.
[0071] Step 202: Determine the second instruction stored at the tail of the cache queue.
[0072] There are multiple instructions stored in the cache queue of the server. These instructions are stored in the order in which they are received. Here, an instruction at the end of the cache queue is called the second instruction. The instruction type corresponding to the instruction can be known according to the unique identifier carried by the second instruction.
[0073] It should be noted that the second instruction mentioned here is the last instruction stored in the cache queue. The tail position mentioned here can be understood as the position of the second instruction, which may be the last position in the cache queue, or the second to last position or the third to last position in the cache queue.
[0074] In order to facilitate the management of instructions in the cache queue, the number of instructions that the cache queue can store is limited. For example, Figure 1 The queues shown are limited to storing 6 instructions in each queue.
[0075] Step 203: compress the first instruction and the second instruction according to the instruction type and instruction dependency relationship between the first instruction and the second instruction.
[0076] The server stores the command dependencies. For example, Figure 3 A schematic diagram of an instruction dependency relationship provided by the present disclosure. Figure 3 The dependency relationship between various instructions of the smart lock is shown in Figure 1. The number 0 indicates that the dependency relationship is mutually exclusive, which means that two mutually exclusive instructions cannot be adjacent; the number 1 indicates a legal dependency relationship (that is, two instructions are allowed to be stored adjacently in the cache queue and executed sequentially), such as an offset relationship; the number 2 indicates a legal dependency relationship, such as a merge relationship.
[0077] Specifically, when the second instruction is an add instruction, if the first instruction received is also an add instruction, it is considered non-compliant. If the first instruction received is a modify instruction, a freeze instruction, a delete instruction, or a thaw instruction, it is considered compliant, where the thaw instruction is an instruction that can be added but does not need to be executed because there is no freeze instruction before the thaw instruction.
[0078] When the second instruction is a modification instruction, if the first instruction received is an add instruction, it is considered non-compliant. If the first instruction received is a modification instruction, a freeze instruction, a delete instruction, or a thaw instruction, it is considered compliant, where the thaw instruction is an instruction that can be added but does not need to be executed because there is no freeze instruction before the thaw instruction.
[0079] When the second instruction is a freeze instruction, if the first instruction received is an add instruction or a modify instruction, it is considered non-compliant, because the freeze action has been executed before the first instruction, and no addition or modification is allowed. It needs to be unfrozen before modification can be performed. If the first instruction received is a freeze instruction, an unfreeze instruction, or a delete instruction, they are all considered compliant. Among them, the freeze instruction is an instruction that can be added to the cache queue but does not need to be executed. Because the second instruction is also a freeze instruction, only one needs to be executed.
[0080] When the second instruction is a thaw instruction, if the first instruction received is an add instruction, it is considered non-compliant. If the first instruction received is a modify instruction, freeze instruction, delete instruction, or thaw instruction, it is considered compliant, where the thaw instruction is an instruction that can be added but does not need to be executed because there is no freeze instruction before the thaw instruction.
[0081] When the second instruction is a delete instruction, if the first instruction received is an add instruction and the delete instruction is considered to be compliant, the delete instruction can be added to the cache queue but does not need to be executed, because the second instruction is also a delete instruction, only one needs to be executed.
[0082] Step 204: the cache queue is updated according to the compression result, and the instructions in the updated cache queue are sent to the terminal device in sequence.
[0083] When the server sends instructions to the terminal, it sends them in the order of the instructions in the updated queue. That is, according to the first-in-first-out processing rule of the stack, the instructions stored in the cache queue first are sent first, and the instructions stored in the cache queue later are sent later. After the previous instruction is executed (including successful execution or failed execution), the next instruction will be taken out of the queue and sent to the corresponding terminal device to continue executing the next instruction.
[0084] By compressing the instructions sent by the client in the above manner, it is possible to effectively prevent non-compliant erroneous instructions from being mixed into the cache queue, control the number of instructions in the cache queue, and prevent erroneous instructions from being sent to the terminal device. The cache queue is used to achieve efficient management of instructions and to send valid instructions in sequence, thereby improving the efficiency and success rate of instruction execution.
[0085] In one or more embodiments of the present application, the first instruction and the second instruction are compressed according to the instruction type and instruction dependency of the first instruction and the second instruction, including: judging the instruction dependency according to the instruction types of the first instruction and the second instruction having an adjacent relationship; if the instruction dependency is a merging relationship, merging the first instruction and the second instruction into one instruction; if the instruction dependency is a cancelling relationship, cancelling the first instruction and the second instruction.
[0086] The second instruction here refers to the last instruction stored in the cache queue. The first instruction is the instruction that the client is sending to the server. It is necessary to determine through subsequent steps whether the first instruction can be written into the cache queue after the second instruction. The second instruction may be at the last position in the cache queue, the second to last position, or the first position in the cache queue. Figure 4 A schematic diagram of the second instruction position in the cache queue for illustrating the present disclosure. Figure 4 As can be seen in , the cache queue can store a total of 5 instructions. The left side of the cache queue is the dequeue direction, and the right side is the enqueue direction. When the second instruction is in position 1, it happens to be the tail of the cache queue. If the first instruction is to be stored in the cache queue, the instruction at the head of the cache queue must be executed and dequeued, and then the other instructions including the second instruction must be shifted left as a whole, and then the first instruction must be written to the position after the second instruction. In this way, the first instruction and the second instruction are stored adjacently in the cache queue. When the second instruction is in position 2, it is in the penultimate position of the cache queue, and the last position happens to be free. After the first instruction passes the verification, it can be stored in the last position after the second instruction. When the second instruction is in position 3, position 3 is the head position of the cache queue. After the first instruction passes the verification, it can be stored in the second position after the second instruction.
[0087] In actual applications, before compressing the first instruction and the second instruction, it is necessary to determine whether they can be compressed. Specifically, after receiving the first instruction sent by the client, it is necessary to determine the instruction type corresponding to the first instruction and the instruction type of the second instruction last written in the cache queue. Then, the dependency relationship between the adjacent first instruction and the second instruction is determined based on the instruction type.
[0088] The command type mentioned here refers to the command content that the terminal device can accept. Different terminal devices support different command types. The following will take the smart lock as an example to illustrate.
[0089] For example, the command types of smart locks include: add command, modify command, freeze command, unfreeze command, and delete command. The dependency relationship between adjacent commands is as follows: Figure 3As shown, in simple terms, it can be divided into compliance and non-compliance. Compliance allows the first instruction to be stored after the second instruction, while non-compliance does not allow the first instruction to be stored after the second instruction.
[0090] If the first instruction and the second instruction are compliant (that is, the first instruction is verified to be qualified), the dependency relationship is further determined based on the instruction type of the first instruction and the instruction type of the second instruction. It includes a merging relationship and an offsetting relationship. Among them, the merging relationship is that two adjacent instructions can be merged into one instruction (of course, if multiple identical first instructions sent by the client are received at the same time, multiple adjacent instructions are merged into one instruction). The offsetting relationship is that the adjacent second instruction and the first instruction have opposite functions, for example, the second instruction is a freezing instruction and the first instruction is a thawing instruction. This may be due to the user sending two opposite instructions in succession through a mistaken operation of the client, or after sending a freezing, wanting to cancel the operation, but because the instruction cannot be withdrawn, it can only send a thawing instruction immediately afterwards. In this case, the terminal device (smart door lock) does not need to perform any action, and the two instructions can be directly offset in the cache queue.
[0091] It should be noted that the merging and offsetting mentioned here may be to actually delete the instructions that need to be merged or offset in the cache queue. Figure 5 A schematic diagram of the merge deletion for illustrating the present disclosure. Figure 5 As can be seen in the figure, the client has sent three freeze instructions in succession. Since the three instructions are of the same instruction type, the three instructions can be directly merged into one instruction, that is, two redundant freeze instructions are deleted from the cache queue, and only one freeze instruction is retained. Figure 6 A schematic diagram of offset deletion for illustrating the present disclosure. Figure 6 As can be seen in the figure, the client has sent a freeze command and a thaw command successively. Since the command types and functions of these two commands are opposite, these two commands can be deleted from the cache queue at the same time. By deleting in the cache queue in the above manner, redundant commands can be prevented from occupying too much storage space of the cache queue, thereby improving space utilization.
[0092] The merging and offsetting mentioned here can also be to establish an execution follow-up relationship for the merging instruction. Figure 7 A schematic diagram of performing a merge is provided for exemplifying the present disclosure. Figure 7 As can be seen in the figure, the client has sent three freeze instructions in succession. Since the three instructions are of the same instruction type, the three instructions can be established into a merged follow-up relationship. That is, as long as one of the instructions is executed successfully, the other instructions with a merged follow-up relationship do not need to be executed and will be successfully followed and removed from the cache queue. When the instructions are not executed, the three instructions are stored in the cache queue at the same time.
[0093] When executing the offset instruction, the execution logic is offset execution, that is, the first instruction and the second instruction that offset each other may not be executed. Figure 8 A schematic diagram of performing offsetting for the present disclosure. Figure 8 As can be seen in the figure, the client has sent freeze and unfreeze instructions in succession. Since the instruction types and functions of these two instructions are opposite, the two instructions can be set up to offset the execution relationship, that is, neither of them needs to be actually executed. When they need to be executed, they are directly removed from the cache queue at the same time. By merging or offsetting the instructions by executing logical compression, they are not actually deleted from the instruction queue, which can facilitate the query of historical issues.
[0094] Through the above method, the instructions can be effectively compressed before being executed, avoiding too many redundant instructions from being sent repeatedly and executed incorrectly, thereby effectively improving the efficiency of instruction execution.
[0095] In one or more embodiments of the present application, the instruction dependency is determined based on the instruction types of a first instruction and a second instruction that have an adjacent relationship, including: if the instruction types of the first instruction and the second instruction are the same, then the instruction dependency is a merging relationship; if the instruction types of the first instruction and the second instruction have opposite functions, then the instruction dependency is a canceling relationship.
[0096] The same type of instructions mentioned here can be understood as the same type of instructions sent repeatedly by the user through the client. This instruction can be a repeated freeze instruction, a repeated modify instruction, etc. The opposite function of the instruction type mentioned here means that the effects that can be achieved by two adjacent instructions are opposite. For example, the freeze instruction and the thaw instruction have opposite functions. When determining the dependency relationship, it can be achieved by looking up a table. For example, if the smart terminal device is a smart lock, then you can find Figure 3 The table shown can show the dependencies between different instructions.
[0097] In the above manner, after receiving the first instruction sent by the client, the instruction type of the instruction can be directly determined by instruction identification, etc. Further, the dependency relationship between adjacent instructions can be determined based on the instruction type, providing a basis for subsequent instruction compression and improving the work efficiency of instruction compression.
[0098] In one or more embodiments of the present disclosure, receiving at least one first instruction sent by a client includes: determining whether there is a second instruction at the end of the cache queue; if so, determining the instruction type of the second instruction; determining the instruction type of the first instruction; determining whether the first instruction and the second instruction are compliant according to the instruction type; if compliant, receiving the first instruction. If the instruction dependency is a mutually exclusive relationship, determining that the first instruction is not compliant, and deleting or discarding the first instruction.
[0099] like Fig. 9 , 10 A flow chart of instruction checking provided by the present disclosure. Fig. 9 As can be seen in FIG, after receiving the first instruction, step 901 is executed to verify the first instruction. If the verification fails, step 902 is executed to return an error message to the user. In this case, the user may have sent an illegal instruction that cannot be executed. After the verification passes, step 903 is executed to receive the first instruction, and step 904 is executed to save the first instruction in the cache queue, wait in the queue, and step 905 is executed to issue and execute the instructions in sequence.
[0100] For the verification process Fig.10 As shown. First, execute step 101 to determine whether the second instruction at the end of the queue is stored, that is, whether the cache queue is empty. If it is empty, execute step 102 to verify. If there is a second instruction at the end of the queue, execute step 103 to determine whether the instruction type of the newly received first instruction is an add instruction. If it is an add instruction, further execute step 105 to determine whether the instruction type of the second instruction at the end of the queue is a delete instruction. If the second instruction is a delete instruction, the first instruction verification result is compliant, and the first instruction can be added to the cache queue after the second instruction.
[0101] If the instruction type of the first instruction is not an add instruction, step 104 is executed to determine whether passwordID is empty. If it is empty, step 106 is further executed to determine whether there is an add instruction in the cache queue. If not, the verification result is that the first instruction is non-compliant. If there is an add instruction, step 107 is further executed to determine whether the second instruction at the end of the queue is a delete instruction. If it is not a delete instruction, the first instruction verification result is non-compliant as in step 115. If it is a delete instruction, the subsequent judgment action is further performed according to the instruction type corresponding to the first instruction. Specifically, as in step 108, when the first instruction is a thawing instruction, step 109 is executed to determine whether the second instruction at the end of the queue is a freezing instruction. If it is a freezing instruction, the first instruction verification is compliant at this time. If the second instruction is not a freezing instruction, then if step 115 fails to pass the verification, that is, the verification is non-compliant. If step 110, when the first instruction is a modification instruction, step 111 is executed to determine whether the second instruction at the end of the queue is a freezing instruction. If it is a freezing instruction, then if step 115 fails to pass the verification, that is, the first instruction verification result is non-compliant; if it is not a freezing instruction, the verification is compliant, and the first instruction is allowed to be added to the cache queue. If the first instruction in step 112 is a freeze instruction, then step 113 is executed to determine whether the second instruction at the end of the queue is a freeze instruction. If the second instruction is a freeze instruction, then step 115 fails to pass the verification, that is, the verification result of the first instruction is non-compliant; if the second instruction is not a freeze instruction, the verification result of the first instruction is compliant. If the first instruction in step 114 is a delete instruction, there is no need to consider the instruction type of the second instruction, and it is directly added to the cache queue, because the cache queue is not empty at this time, and the deletion task of the previously stored content can be executed.
[0102] In one or more embodiments of the present disclosure, receiving at least one first instruction sent by a client includes: determining whether there is a second instruction at the end of a cache queue; if there is no second instruction at the end of the cache queue, receiving the first instruction.
[0103] In actual applications, if there is no second instruction at the end of the cache queue, that is, the cache queue is empty, any instruction can be written into the cache queue. That is, in this case, there is no restriction on the adjacent queue (that is, the second queue), and the first instruction of any instruction type is allowed to be stored in the cache queue.
[0104] Based on the above method, when there is no instruction in the cache queue, the first instruction can be received without restriction and stored in the cache queue. In this case, there are relatively few instructions, and the corresponding task can be executed without complicated operations.
[0105] For ease of understanding, the following describes the instruction processing flow of the cache queue through a specific embodiment. Fig.11 A schematic diagram of the cache queue workflow provided by the present disclosure. Fig.11 As can be seen in the figure, after the user sends the instruction to the server through the client, the user can see the execution status of the instruction through the client. The server stores the newly received instructions in the cache queue and sends the instructions in the order in which they are arranged. If the instruction fails to be sent, it will retry until the task is terminated after multiple failures. Of course, some instructions do not need to be retried if they fail to be sent. In the case of a failure to send, you can further use manual deletion or delete invalid instructions.
[0106] If the command is successfully issued, the command will be executed, and the corresponding execution result may be success or failure, and the command will be removed from the cache queue. If the execution is successful, a prompt message of successful execution will be displayed on the client, and if the execution fails, a prompt message of failed execution will be displayed on the client.
[0107] In the case of execution failure, some instructions need to be sent repeatedly for repeated attempts. After failure, the instructions will be sent repeatedly. If the number of repetitions exceeds the threshold and still fails, an execution result of multiple failed delivery will be displayed on the user's client, and the instruction will be removed from the cache queue. Of course, some instructions do not need to be sent repeatedly, even if the execution fails.
[0108] Some instructions that have been executed, failed to be issued, and waiting to be issued can be deleted. The deletion method can be set by the program (for example, automatic deletion after waiting timeout). In addition, it can also be deleted manually by the user.
[0109] Instructions in the queue and instructions being executed can also be deleted or removed from the queue according to the compression processing mode of the instructions or the following execution mode.
[0110] In one or more embodiments of the present disclosure, the instructions in the updated cache queue are sent to the terminal device in sequence, including: sending the third instruction at the head of the cache queue to the terminal device; when the third instruction does not need to be executed, or when the execution success information fed back by the bus is received, the third instruction is cleared from the cache queue; when the execution failure or execution timeout information of the third instruction is received from the bus feedback, the third instruction is repeatedly executed according to the retry rule; if the number of retries exceeds the number threshold, the third instruction is cleared from the cache queue.
[0111] After completing the update of the instruction queue, the instruction issuer can issue the instructions in the order of the instructions in the cache queue. When issuing instructions, the issued instructions can be roughly divided into normal issuing instructions, timeout retry instructions, and failure retry instructions. Fig.12A schematic diagram of the workflow of issuing instructions provided in the present disclosure. Fig.12 It can be seen that when executing step 1201 to issue a timeout retry instruction, executing step 1202 to query the head instruction in the current queue, if the retry instruction is being executed as in step 1203, then executing step 1204 to retry the issuance again, and executing step 1205 to count the number of issuances. If the number of retries as described in step 1206 is greater than the number threshold, then executing steps 1207 and 1208 to notify the relevant modules through the bus that multiple timeout retries have failed.
[0112] When executing step 1209 to issue a failed retry instruction, executing step 1210 to query the head instruction in the current queue, if the instruction status is failed to issue as queried in step 1211, then continuing to issue the instruction in step 1212, and executing step 1213 to count the number of failed issuances. Executing step 1206 to determine if the number of retries exceeds the number threshold, executing steps 1207 and 1208 to notify the relevant modules through the bus that the multiple failed retries still fail.
[0113] If the normal instruction is received in step 1214, and the current head of the queue instruction is queuing in step 1215, step 1216 will be executed to queue and wait for the task to be issued. If it is executable, the instruction is issued in step 1217. If the issuance fails, step 1218 is executed to determine whether the number of issuance failures exceeds the number threshold. If it does not exceed the number threshold, step 1219 will be executed to start the "failure retry delay task" and retry the issuance later. If the issuance is successful and is being executed in step 1220, step 1221 will be executed to start the "timeout retry delay task" and retry the issuance later.
[0114] After executing the above instructions, the instruction result processor can update the status of the cache queue. Fig.13 The schematic diagram of the instruction result processor workflow illustrated in the present disclosure. After receiving the instruction execution result in step 1301, execute step 1302 to further send a result message to the relevant module (e.g., application layer) through the bus, and execute step 1303 to remove the instructions that have been executed, and remove the instructions that have not been successful after the retry exceeds the number of thresholds. Further execute step 1304 to determine whether the removal task is successfully executed. If the removal fails, execute step 1305 to record it in the error management log. If the removal is successful, execute step 1306 to update the status of each instruction in the queue change queue to "removed queue". And execute step 1307 to send a message to the bus that the cache queue has been updated. The instruction issuer can continue to execute step 1308 to issue another instruction.
[0115] When the instruction result processor cannot delete certain instructions, they can be deleted manually. For example, instructions that are being executed. Specifically, in response to a deletion request for a third instruction issued by the client, the third instruction is cleared from the head of the cache queue. The third instruction at the head of the queue is the instruction currently being executed in the instruction queue. Normally, the instruction will be deleted by the instruction result processor only after the execution result is obtained. If the user wants to terminate the current instruction execution action, for example, an instruction has been issued for a long time and still does not receive a response from the terminal device, at this time, the user can manually delete the executing instruction through the client.
[0116] In addition, in the disclosed solution, a visual display interface can also be created based on the cache queue, so that users can directly understand the instruction execution status of each terminal device through the client. Fig.14 The following is a schematic diagram of a display interface for illustrating the present disclosure. Fig.14 You can see detailed information of each instruction, such as the name of the terminal device, the ID of the terminal device, the identity information of the person who issued the instruction, the instruction type of the instruction, the instruction execution status, the number of retries, whether it is executable, etc. Through this visual interface, users can intuitively understand the execution status of each instruction, and users can also delete and terminate instructions based on the content of the visual interface. Improve the efficiency of instruction management.
[0117] Based on the same idea, the present disclosure also proposes an instruction transmission processing method, which is applied to a terminal device. The method includes: in response to a second instruction and at least one first instruction sent adjacently by a client corresponding to the control terminal device, executing an instruction compressed from the second instruction and at least one first instruction, wherein the compression method of the second instruction and the first instruction is determined based on the instruction type and instruction dependency relationship between the first instruction and the second instruction.
[0118] When the terminal device executes the instruction, the instruction executed is the instruction obtained by compressing the first instruction and the second instruction. When compressing the first instruction and the second instruction, it is necessary to determine how to compress the first instruction and the second instruction according to the instruction type and instruction dependency relationship of the first instruction and the second instruction. For compression methods, please refer to Figures 1 to 14 The various implementations described above will not be repeated here. It should be noted that the terminal device (such as a smart lock) mentioned here is controlled by a client (such as a mobile phone or a computer).
[0119] Based on the same idea, the present disclosure also proposes an instruction transmission processing method, which is applied to a client, and the method specifically includes: sending at least one first instruction for operating a terminal device to a server; wherein, after receiving the first instruction, the server compresses the first instruction and the second instruction according to the instruction type and instruction dependency of the second instruction at the end of the cache queue and the first instruction, and updates the cache queue according to the compression result; and sends the instructions in the updated cache queue to the terminal device in sequence.
[0120] In actual applications, users can send instructions to control terminal devices through the client. These instructions need to be processed by the server and sent to the corresponding terminal device. Therefore, the server can compress the first instruction and the second instruction sent by the client, without the need for the user to manually compress them, and without the need for the user to worry about whether there will be a problem of instruction accumulation. The server can directly compress the multiple instructions sent by the client effectively, thereby making the instructions received by the terminal device simpler, and ultimately enabling the instructions to be executed efficiently and smoothly.
[0121] Based on any of the above implementations, the present disclosure also provides an instruction transmission processing device.
[0122] Fig.15 The present invention is a block diagram showing the structure of an instruction transmission processing device according to an embodiment of the present invention.
[0123] like Fig.15 As shown, the instruction transmission processing device includes: a receiving module 111, which is used to receive at least one first instruction sent by a client. A determining module 112, which is used to determine the second instruction stored at the end of the cache queue. A compression module 113, which is used to compress the first instruction and the second instruction according to the instruction type and instruction dependency relationship of the first instruction and the second instruction. An updating module 114, which is used to update the cache queue according to the compression result, and send the instructions in the updated cache queue to the terminal device in sequence.
[0124] The compression module 113 is used to determine the instruction dependency relationship according to the instruction types of the first instruction and the second instruction having an adjacent relationship; if the instruction dependency relationship is a merging relationship, the first instruction and the second instruction are merged into one instruction; if the instruction dependency relationship is a cancelling relationship, the first instruction and the second instruction are canceled.
[0125] The compression module 113 is used to: if the instruction types of the first instruction and the second instruction are the same, then the instruction dependency relationship is a merging relationship; if the instruction types of the first instruction and the second instruction have opposite functions, then the instruction dependency relationship is a canceling relationship.
[0126] The receiving module 111 is used to determine whether there is a second instruction at the end of the cache queue; if so, determine the instruction type of the second instruction; determine the instruction type of the first instruction; based on the instruction type, determine whether the first instruction and the second instruction are compliant; if compliant, receive the first instruction.
[0127] The receiving module 111 is configured to determine that the first instruction is non-compliant if the instruction dependency is a mutually exclusive relationship, and delete or discard the first instruction.
[0128] The receiving module 111 is used to determine whether there is a second instruction at the end of the cache queue; if there is no second instruction at the end of the cache queue, the first instruction is received.
[0129] The update module 114 is used to send the third instruction at the head of the cache queue to the terminal device; when the third instruction does not need to be executed, or when the execution success information fed back by the bus is received, the third instruction is cleared from the cache queue; when the execution failure or execution timeout information of the third instruction fed back by the bus is received, the third instruction is repeatedly executed according to the retry rule; if the number of retries exceeds the number threshold, the third instruction is cleared from the cache queue.
[0130] Optionally, a deletion module 115 is further included, which is used to clear the third instruction from the head of the cache queue in response to a deletion request for the third instruction issued by the client.
[0131] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, which will not be repeated here.
[0132] The execution subject of the instruction transmission processing method in the specific implementation manner of the present disclosure may be an electronic device such as a server (including a local server or a cloud server).
[0133] Therefore, based on any one of the above embodiments, the present disclosure further provides an electronic device, which can execute the instruction transmission processing method of any one of the embodiments described above in the present disclosure.
[0134] Fig.16 It is a schematic block diagram of the structure of an electronic device 1000 according to an embodiment of the present disclosure.
[0135] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.
[0136] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0137] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use in an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.
[0138] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0139] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0140] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0141] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0142] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0143] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0144] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0145] In addition, 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 the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0146] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A command transmission processing method, characterized in that: Applied to a server, the method comprises: receiving at least one first instruction sent by a client; Determine the second instruction stored at the tail of the cache queue; compressing the first instruction and the second instruction according to instruction types and instruction dependencies of the first instruction and the second instruction; The cache queue is updated according to the compression result, and the instructions in the cache queue after the update are sent to the terminal device in sequence.
2. The method according to claim 1, characterized in that The compressing the first instruction and the second instruction according to the instruction type and the instruction dependency relationship of the first instruction and the second instruction includes: Determining an instruction dependency relationship according to instruction types of the first instruction and the second instruction that have an adjacent relationship; If the instruction dependency relationship is a merge relationship, merging the first instruction and the second instruction into one instruction; If the instruction dependency relationship is a cancellation relationship, the first instruction and the second instruction are cancelled.
3. The method according to claim 2, characterized in that The determining the instruction dependency relationship according to the instruction types of the first instruction and the second instruction having an adjacent relationship includes: If the first instruction and the second instruction are of the same instruction type, the instruction dependency relationship is a merge relationship; If the instruction types and functions of the first instruction and the second instruction are opposite, then the instruction dependency relationship is a cancellation relationship.
4. The method according to claim 1, characterized in that: The receiving at least one first instruction sent by the client includes: Determine whether there is a second instruction at the tail of the cache queue; If so, determining the instruction type of the second instruction; determining an instruction type of the first instruction; According to the instruction type, determining whether the first instruction and the second instruction are compliant; If compliant, the first instruction is received.
5. The method according to claim 4, characterized in that Also includes: If the instruction dependency is a mutually exclusive relationship, it is determined that the first instruction is non-compliant, and the first instruction is deleted or discarded.
6. The method according to claim 1, characterized in that The receiving at least one first instruction sent by the client includes: Determine whether there is a second instruction at the tail of the cache queue; If the second instruction does not exist at the tail of the cache queue, the first instruction is received.
7. The method according to claim 1, characterized in that The step of sending the updated instructions in the cache queue to the terminal device in sequence includes: Sending the third instruction at the head of the cache queue to the terminal device; When the third instruction does not need to be executed, or execution success information fed back by the bus is received, the third instruction is cleared from the cache queue; When receiving the information of the execution failure or execution timeout of the third instruction fed back by the bus, the third instruction is repeatedly executed according to the retry rule; if the number of retries exceeds the number threshold, the third instruction is cleared from the cache queue.
8. A command transmission processing method, characterized in that: Applied to a terminal device, the method comprises: In response to a second instruction and at least one first instruction sent adjacently by a client corresponding to the terminal device, the second instruction and at least one compressed instruction of the first instruction are executed, wherein the compression method of the second instruction and the first instruction is determined based on the instruction type and instruction dependency of the first instruction and the second instruction.
9. An instruction transmission processing system, characterized in that: The system comprises: An instruction receiver, configured to receive at least one first instruction sent by a client; determine the second instruction last stored in the cache queue; and compress the first instruction and the second instruction according to the instruction types and instruction dependencies of the first instruction and the second instruction; A cache queue, used to store the instructions compressed and processed by the instruction receiver in the order of receipt; The instruction sender is used to send the updated instructions in the cache queue to the terminal device in sequence.
10. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instruction stored in the memory, so that the processor executes the method according to any one of claims 1 to 7, or executes the method according to claim 8.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented, or the method according to claim 8 is performed.