CN113703844A - Instruction issuing method, system and device and computer readable storage medium - Google Patents

Instruction issuing method, system and device and computer readable storage medium Download PDF

Info

Publication number
CN113703844A
CN113703844A CN202110853430.8A CN202110853430A CN113703844A CN 113703844 A CN113703844 A CN 113703844A CN 202110853430 A CN202110853430 A CN 202110853430A CN 113703844 A CN113703844 A CN 113703844A
Authority
CN
China
Prior art keywords
instruction
issuing
instructions
state
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110853430.8A
Other languages
Chinese (zh)
Inventor
鲁鹏飞
鲁霖
徐朝海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamenshi C Chip Co ltd
Original Assignee
Xiamenshi C Chip Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamenshi C Chip Co ltd filed Critical Xiamenshi C Chip Co ltd
Priority to CN202110853430.8A priority Critical patent/CN113703844A/en
Publication of CN113703844A publication Critical patent/CN113703844A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline, look ahead
    • G06F9/3836Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • G06F9/30047Prefetch instructions; cache control instructions

Abstract

The application relates to a method, a system, a device and a computer readable storage medium for issuing instructions, belonging to the technical field of communication, wherein the method comprises the following steps: responding to an instruction issuing request of the user terminal, continuously generating an instruction corresponding to the instruction issuing request and instruction information of each instruction, and storing the instruction information and the instruction information into a first buffer; sequencing all the instructions in the first buffer according to the instruction generation time of all the instructions; issuing the instructions in the first buffer according to the sequence, and setting the instruction state as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received. The method and the device can reduce the occurrence of unsynchronized final state and software state of the equipment.

Description

Instruction issuing method, system and device and computer readable storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a system, an apparatus, and a computer-readable storage medium for issuing an instruction.
Background
With the rapid development of wireless communication networks, in order to realize the intelligentization of equipment management and achieve the remote control of equipment, command issuing is a very important business function. Currently, instruction issuing usually has multiple forms of single-device single instruction, single-device multiple instruction, multiple-device single instruction and multiple-device multiple instruction.
When software operation generates a plurality of instructions, the instructions are generally issued to the equipment one by one in real time, and the equipment sequentially performs corresponding operations according to the issuing sequence of each instruction, so that the equipment is effectively controlled.
For the related technologies, the inventor thinks that because the speed of processing the instructions by the device is slow and each instruction needs time to be issued, when a plurality of instructions are issued to the device at the same time, the pressure of processing the instructions by the device is increased, which easily causes the device to execute only the last instruction, but the middle change process has no response, thereby possibly causing the final state of the device and the software state to be asynchronous.
Disclosure of Invention
In order to reduce the occurrence of unsynchronized final state and software state of equipment, the application provides a method, a system, a device and a computer readable storage medium for issuing instructions.
In a first aspect, the present application provides an instruction issuing method, which adopts the following technical scheme:
an instruction issuing method comprises the following steps,
an instruction generating step, responding to an instruction issuing request of a user terminal, continuously generating an instruction corresponding to the instruction issuing request and instruction information of each instruction, and storing the instruction information into a first buffer, wherein the instruction information comprises instruction generating time;
the instruction sorting step is used for sorting the instructions in the first buffer according to the instruction generation time of the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time; and the number of the first and second groups,
an instruction issuing step, namely setting an instruction state, issuing the instructions in the first buffer according to the ordering, and setting the instruction state as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
By adopting the technical scheme, after the instructions are generated, all the instructions are stored in the first buffer, and the instructions are sequenced according to the instruction generation time of all the instructions; after finishing sequencing, starting to issue the first instruction in the first buffer, setting the instruction state as an issuing waiting state, changing the instruction state into an issuing completion state after receiving an issuing success response signal, and issuing the next instruction according to the sequencing; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state until the successful issuing response signal is received and then the next instruction is issued, and the like, so that the next instruction is issued after the previous instruction is successfully issued, the pressure of the equipment for processing the instruction is reduced, the equipment can respond to the middle change process, and the condition that the final state of the equipment is not synchronous with the software state is reduced.
Optionally, before the step of ordering the instructions, the method further comprises,
and an instruction adding step, namely storing the instructions and the instruction information of each instruction into a second buffer before the instructions and the instruction information of each instruction are stored into a first buffer, and then adding the instructions in the second buffer into the first buffer according to a preset time period.
Optionally, the instruction generating step further comprises before the step of generating the instruction,
an instruction issuing request obtaining step of obtaining the instruction issuing request initiated by the user terminal and a target device state associated with the instruction issuing request, wherein the instruction issuing request is used for requesting to issue an instruction to a target device; and the number of the first and second groups,
a target equipment state judgment step, namely judging whether the target equipment is in an online state or not according to the target equipment state, and if the target equipment is in the online state, agreeing to the instruction issuing request; and if the command is in an off-line state, rejecting the command issuing request.
By adopting the technical scheme, whether the target equipment associated with the instruction issuing request is on line is judged according to the state of the target equipment, and then the instruction issuing request is selected to be approved or rejected, so that the condition that the instruction issuing fails due to the fact that the target equipment is off line is reduced.
Optionally, the step of adding the instruction further comprises,
an instruction deduplication request obtaining step, namely obtaining an instruction deduplication request, wherein the instruction deduplication request is used for requesting deduplication of an instruction in a first cache; and the number of the first and second groups,
an instruction deduplication step, which is used for responding to an instruction deduplication request, judging whether repeated instructions exist in the first buffer, if so, reserving any one of the repeated instructions, and removing other instructions in the repeated instructions; if there are no repeat instructions, then no removal is performed.
By adopting the technical scheme, when the instruction needs to be deduplicated, the instruction in the first buffer is deduplicated in response to the instruction deduplication request, so that the situation that the total execution time of the same instruction is too long due to repeated instruction execution is avoided to a certain extent, and the pressure of the equipment for processing the instruction is reduced.
Optionally, the instruction information further includes an instruction priority; the step of ordering the instructions may be followed by the step of,
a priority ordering request obtaining step, namely obtaining a priority ordering request which is used for requesting to order the priority of the instructions in the first buffer; and the number of the first and second groups,
and an instruction priority ordering step, in response to a priority ordering request, carrying out priority ordering on the instructions in the first buffer according to the instruction priority of each instruction, wherein the instruction with the higher instruction priority is arranged before the instruction with the lower instruction priority.
By adopting the technical scheme, when the instructions need to be subjected to priority ordering, the instructions in the first buffer are subjected to priority ordering according to the instruction priority of each instruction in response to the priority ordering request, and then are issued according to the ordering, so that the equipment performs priority execution on the instructions with higher instruction priority when executing the instructions, and the equipment requirements are met conveniently.
Optionally, the step of ordering the instructions further comprises,
and removing invalid instructions, namely reserving any instruction and removing the invalid other instructions as invalid instructions if the other instructions after the instruction are invalidated by any instruction in the first register.
By adopting the technical scheme, the invalid instruction is removed, so that the invalid instruction is prevented from being sent to a certain extent, and the condition that the equipment cannot respond to a subsequent instruction after executing a certain instruction is reduced.
Optionally, the step of issuing the instruction further comprises,
when the response signal of successful delivery is not received, the instruction state keeps a delivery waiting state, and when the duration of the instruction state keeping the delivery waiting state exceeds the preset duration, the instruction delivery failure is judged, and the instruction is delivered again.
By adopting the technical scheme, after the sequencing is finished, the first instruction in the first buffer is issued, the instruction state is set to be an issuing waiting state, after a response signal of successful issuing is received, the instruction state is changed to be an issuing completion state, and the next instruction is issued according to the sequencing; if the successful issuing response signal is not received, the issuing waiting state is kept, if the duration of the instruction state keeping the issuing waiting state exceeds the preset duration, the instruction issuing failure is judged, the instruction is issued again, and the like, so that the condition that the instruction issuing failure is caused by reasons such as network instability and the like is reduced, the waiting time is too long, and the instruction issuing stability is improved.
In a second aspect, the present application provides an instruction issuing system, which adopts the following technical scheme:
an instruction issuing system, the instruction issuing system comprises,
the instruction generating module is used for responding to an instruction issuing request of the user terminal, continuously generating instructions corresponding to the instruction issuing request and instruction information of each instruction, and storing the instructions and the instruction information into the first buffer, wherein the instruction information comprises instruction generating time;
the instruction sequencing module is used for sequencing all instructions in the first buffer according to the instruction generation time of all the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time; and the number of the first and second groups,
the instruction issuing module is used for issuing the instructions in the first buffer according to the sequence and setting the instruction state as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
By adopting the technical scheme, the instruction generating module is used for generating the instruction corresponding to the instruction issuing request, all the instructions are stored in the first buffer, and the instruction sequencing module is used for sequencing all the instructions according to the instruction generating time of all the instructions; after finishing sequencing, starting to issue a first instruction in the first buffer through an instruction issuing module, setting the instruction state as an issuing waiting state, changing the instruction state into an issuing completion state after receiving an issuing success response signal, and issuing the next instruction according to the sequencing; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state until the successful issuing response signal is received and then the next instruction is issued, and the like, so that the next instruction is issued after the previous instruction is successfully issued, the pressure of the equipment for processing the instruction is reduced, the equipment can respond to the middle change process, and the condition that the final state of the equipment is not synchronous with the software state is reduced.
In a third aspect, the present application provides an instruction issuing apparatus, which adopts the following technical scheme:
an instruction issuing apparatus comprising a computer-readable storage medium and a processor, the computer-readable storage medium storing a computer program that can be loaded by the processor and performs the method according to any one of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium storing a computer program capable of being loaded by a processor and performing a method as in any one of the first aspects.
In summary, the present application includes at least one of the following beneficial technical effects: after the generation of the instructions is finished, storing each instruction into a first buffer, and sequencing each instruction according to the instruction generation time of each instruction; after finishing sequencing, starting to issue the first instruction in the first buffer, setting the instruction state as an issuing waiting state, changing the instruction state into an issuing completion state after receiving an issuing success response signal, and issuing the next instruction according to the sequencing; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state until the successful issuing response signal is received and then the next instruction is issued, and the like, so that the next instruction is issued after the previous instruction is successfully issued, the pressure of the equipment for processing the instruction is reduced, the equipment can respond to the middle change process, and the condition that the final state of the equipment is not synchronous with the software state is reduced.
Drawings
Fig. 1 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
Fig. 4 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
FIG. 5 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
FIG. 6 is a flowchart illustrating an instruction issuing method according to an embodiment of the present application.
Fig. 7 is a schematic structural diagram of an instruction issuing system according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to fig. 1-7 and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The embodiment of the application discloses an instruction issuing method.
Referring to fig. 1 and 2, an instruction issuing method includes,
and an instruction generating step, responding to an instruction issuing request of the user terminal, continuously generating an instruction corresponding to the instruction issuing request and instruction information of each instruction, and storing the instruction information into the first buffer, wherein the instruction information comprises instruction generating time.
And an instruction sequencing step, sequencing the instructions in the first buffer according to the instruction generation time of the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time.
An instruction issuing step, namely setting an instruction state, issuing the instructions in the first buffer according to the sequence, and setting the instruction state of the instructions as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
As an implementation manner of the instruction issuing step, by setting a flag bit, the instruction state can be judged according to the value of the flag bit, and when the value of the flag bit is 1, the corresponding instruction state is an issuing completion state, which represents that the instruction issuing is completed; when the value of the flag bit is 0, the corresponding instruction state is an issuing waiting state, which represents that the instruction is not issued; in addition, when the command is successfully issued, the successfully issued response signal is received by the callback function and the technologies of wireless communication such as Bluetooth, WIFI and the like, and the value of the flag bit is changed to be 1; and when the value of the flag bit is 1, issuing the next instruction in the first buffer according to the sequence, changing the value of the flag bit to be 0 until receiving a response signal of successful issuing, changing the value of the flag bit to be 1, and so on.
In the above embodiment, after the instructions are generated, the instructions are stored in the first buffer, and the instructions are sequenced according to the instruction generation time of the instructions; after finishing sequencing, starting to issue the first instruction in the first buffer, setting the instruction state of the instruction as an issuing waiting state, changing the instruction state of the instruction into an issuing completion state after receiving an issuing success response signal, and issuing the next instruction according to the sequencing; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state until the successful issuing response signal is received and then the next instruction is issued, and the like, so that the next instruction is issued after the previous instruction is successfully issued, the pressure of the equipment for processing the instruction is reduced, the equipment can respond to the middle change process, and the condition that the final state of the equipment is not synchronous with the software state is reduced.
As a further embodiment of the instruction issuing method, referring to fig. 3 and 4, the instruction sorting step further includes,
and an instruction adding step, namely storing the instructions and the instruction information of each instruction into a second buffer before storing the instructions and the instruction information of each instruction into the first buffer, and then adding the instructions in the second buffer into the first buffer according to a preset time period.
As an implementation manner of the instruction adding step, the instruction in the second buffer is added into the first buffer according to a preset time period, wherein the preset time period can be manually set according to the requirement of a user; for example, if the preset time period is set to ten minutes, the instructions stored in the second buffer are divided according to the preset time period of ten minutes, and the instructions in each preset time period of ten minutes are added into the first buffer.
As a further embodiment of the instruction issuing method, referring to fig. 3 and 5, the instruction adding step further includes,
an instruction deduplication request obtaining step, namely obtaining an instruction deduplication request, wherein the instruction deduplication request is used for requesting deduplication of an instruction in a first cache;
an instruction deduplication step, which is used for responding to an instruction deduplication request, judging whether a repeated instruction exists in the first buffer, if so, reserving any one of the repeated instructions, and removing other instructions in the repeated instructions; if there are no repeat instructions, then no removal is performed.
As an embodiment of the repeat instruction, the repeat instruction is identical instructions, for example, the respective instructions in the first buffer are respectively ordered as: the method comprises the steps of turning on a lamp, adjusting the color to be red and turning off the lamp, wherein the steps of adjusting the color to be red and adjusting the color to be red are completely the same instruction, the instructions can be determined to be repeated instructions, and any instruction of adjusting the color to be red can be removed.
In the above embodiment, when the instruction needs to be deduplicated, the instruction in the first buffer is deduplicated in response to the instruction deduplication request, so that the situation that the total execution time of the same instruction is too long due to repeated execution of repeated instructions is avoided to a certain extent, and the pressure of the device for processing the instruction is reduced.
It should be noted that the instruction deduplication request obtaining step and the instruction deduplication step are executed according to user requirements, and when an instruction issued to the target device needs to be deduplicated, the instruction issuing request can be received, and the instruction deduplication step is executed; when the instruction deduplication is required, the instruction deduplication request obtaining step and the instruction deduplication step can be executed after the instruction adding step or after the instruction sorting step.
As a further implementation mode of the instruction issuing method, the instruction information also comprises an instruction priority, the instruction sorting step also comprises the following steps,
a priority ordering request acquiring step, namely acquiring a priority ordering request which is used for requesting to perform priority ordering on the instructions in the first buffer;
and an instruction priority ordering step, in response to a priority ordering request, carrying out priority ordering on the instructions in the first buffer according to the instruction priority of each instruction, wherein the instruction with the higher instruction priority is arranged before the instruction with the lower instruction priority.
As one embodiment of instruction priority, the instruction priority includes high priority, medium priority, and low priority.
In the above embodiment, when the instructions need to be prioritized, the instructions in the first buffer are prioritized according to the instruction priority of each instruction in response to the priority ordering request, and then issued according to the order, so that the device executes the instructions with higher instruction priority in priority, thereby meeting the device requirements.
It should be noted that the priority ordering request obtaining step and the instruction priority ordering step are executed according to user requirements, and when an instruction issued to a target device needs to be subjected to instruction priority ordering, the priority ordering request can be received, and the instruction priority ordering step is executed; in addition, when instruction priority ordering and instruction deduplication are required simultaneously, if the instruction deduplication request obtaining step and the instruction deduplication step are executed after instruction ordering, the priority ordering request obtaining step and the instruction priority ordering step may be executed either before the instruction deduplication request obtaining step or after the instruction deduplication step.
As a further implementation mode of the instruction issuing method, the instruction sorting step further comprises the following steps,
and an invalid instruction removing step, namely if any instruction in the first register enables other instructions after the instruction to be invalid, reserving the instruction and removing the invalid instruction as an invalid instruction.
As an implementation of the invalid instruction, the invalid instruction is an instruction that the device cannot perform a corresponding operation; for example, the instructions in the first register are ordered as follows: the device can determine that the command for adjusting the color to be green is an invalid command, so that the command for turning off the light is reserved, and the command for adjusting the color to be green is removed as the invalid command.
In the above embodiment, the invalid instruction is removed, so that the sending of the invalid instruction is avoided to a certain extent, and the occurrence of the situation that the device cannot respond to the subsequent instruction after executing a certain instruction is reduced.
It should be noted that if instruction prioritization is required, the invalid instruction removal step must be performed after the instruction prioritization step.
As a further embodiment of the instruction issuing method, referring to fig. 3 and 6, the instruction generating step further includes,
an instruction issuing request acquisition step, namely acquiring an instruction issuing request initiated by a user terminal and a target equipment state associated with the instruction issuing request, wherein the instruction issuing request is used for requesting to issue an instruction to target equipment;
a target equipment state judgment step, namely judging whether the target equipment is in an online state or not according to the target equipment state, and if the target equipment is in the online state, agreeing to an instruction issuing request; if the state is an off-line state, the command issuing request is refused.
As an embodiment of the target device status, the target device status includes an online status and an offline status.
In the above embodiment, whether the target device associated with the instruction issuing request is online is determined according to the state of the target device, and then the instruction issuing request is optionally approved or rejected, thereby reducing the occurrence of instruction issuing failure caused by offline of the target device.
As a further implementation manner of the instruction issuing method, the instruction issuing step further includes that when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state, and when the duration of the instruction state keeping the issuing waiting state exceeds the preset duration, the instruction issuing is judged to fail, and the instruction is issued again.
As an implementation of the preset duration, the preset duration may be manually set according to the situation or experience; for example, the preset time length is set to five minutes, if the time length for keeping the instruction state in the issuing waiting state exceeds five minutes, the instruction issuing is judged to fail, and the instruction is issued again.
In the above embodiment, the instructions in the first buffer are issued, the instruction state is set to be an issuing waiting state, after receiving the issuing success response signal, the instruction state is changed to be an issuing completion state, and the next instruction is issued according to the sequence; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state, if the duration of the instruction state keeping the issuing waiting state exceeds the preset duration, the instruction issuing failure is judged, the instruction is issued again, and the like, so that the condition that the instruction issuing failure is caused by reasons such as network instability and the like is reduced, the waiting time is too long, and the instruction issuing stability is improved.
The embodiment of the application also discloses an instruction issuing system.
Referring to fig. 7, the instruction issuing system includes,
and the instruction generating module is used for responding to an instruction issuing request of the user terminal, continuously generating instructions corresponding to the instruction issuing request and instruction information of each instruction, and storing the instructions and the instruction information into the first buffer, wherein the instruction information comprises instruction generating time.
And the instruction sequencing module is used for sequencing the instructions in the first buffer according to the instruction generation time of the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time.
The instruction issuing module is used for issuing the instructions in the first buffer according to the sequence and setting the instruction state of the instructions as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
In the above embodiment, the instruction generating module is used to generate the instruction corresponding to the instruction issuing request, and store each instruction into the first buffer, and the instruction sorting module is used to sort each instruction according to the instruction generating time of each instruction; after finishing sequencing, starting to issue a first instruction in the first buffer by an instruction issuing module, setting the instruction state of the instruction as an issuing waiting state, changing the instruction state of the instruction into an issuing finishing state after receiving an issuing success response signal, and issuing the next instruction according to the sequencing; if the successful issuing response signal is not received, the instruction state is kept to be the issuing waiting state until the successful issuing response signal is received and then the next instruction is issued, and the like, so that the next instruction is issued after the previous instruction is successfully issued, the pressure of the equipment for processing the instruction is reduced, the equipment can respond to the middle change process, and the condition that the final state of the equipment is not synchronous with the software state is reduced.
As a further embodiment of the instruction issuing system, the instruction issuing system further comprises,
and the instruction adding module is used for storing the instructions and the instruction information of each instruction to the second buffer, and then adding the instructions in the second buffer to the first buffer according to a preset time period.
In the above embodiment, the instruction generation module is used to generate the instructions and the instruction information of each instruction, and then the instruction adding module stores the instructions and the instruction information of each instruction into the second buffer first, and then adds the instructions in the second buffer into the first buffer according to the preset time period.
As a further embodiment of the instruction issuing system, the instruction issuing system further comprises,
the system comprises an instruction issuing request acquisition module, an instruction issuing request acquisition module and a target device state acquisition module, wherein the instruction issuing request acquisition module is used for acquiring an instruction issuing request initiated by a user terminal and a target device state associated with the instruction issuing request;
the target equipment state judgment module is used for judging whether the target equipment is in an online state or not according to the state of the target equipment, and if the target equipment is in the online state, the target equipment agrees to the instruction issuing request; if the state is an off-line state, the command issuing request is refused.
In the above embodiment, the instruction issuing request acquisition module is used to acquire the instruction issuing request initiated by the user terminal and the target device state associated with the instruction issuing request, and then the target device state judgment module is used to judge whether the target device associated with each instruction issuing request is online, so as to select to approve or reject the instruction issuing request according to the online state of the target device, thereby reducing the occurrence of instruction issuing failure caused by offline of the target device.
As a further embodiment of the instruction issuing system, the instruction issuing system further comprises,
the instruction deduplication request acquisition module is used for acquiring an instruction deduplication request, and the instruction deduplication request is used for requesting deduplication of an instruction in the first cache;
the instruction duplication removing module is used for responding to the instruction duplication removing request, judging whether repeated instructions exist in the first buffer, if so, reserving any one of the repeated instructions and removing other instructions in the repeated instructions; if there are no repeat instructions, then no removal is performed.
In the above embodiment, the instruction deduplication request acquiring module is used to acquire the instruction deduplication request, and the instruction deduplication module responds to the instruction deduplication request to deduplicate the instruction in the first buffer, so that the situation that the total execution time of the same instruction is too long due to repeated execution of repeated instructions is avoided to a certain extent, and the pressure of the device for processing the instruction is reduced.
As a further embodiment of the instruction issuing system, the instruction issuing system further comprises,
the priority ordering request acquisition module is used for acquiring a priority ordering request which is used for requesting to order the priority of the instructions in the first buffer;
and the instruction priority ordering module is used for responding to the priority ordering request and carrying out priority ordering on the instructions in the first buffer according to the instruction priority of each instruction, wherein the instruction with high instruction priority is arranged before the instruction with low instruction priority.
In the above embodiment, the priority ordering request obtaining module is used to obtain the priority ordering request, the instruction priority ordering module responds to the priority ordering request, and the instructions in the first buffer are prioritized according to the instruction priority of each instruction, so that the device executes the instructions with higher instruction priority in a priority manner, which is convenient for meeting the device requirements.
As a further embodiment of the instruction issuing system, the instruction issuing system further comprises,
the invalid instruction removing module is used for judging whether an invalid instruction exists in the first cache and removing the invalid instruction; if any instruction in the first register invalidates other instructions ordered after the instruction, the instruction is retained and the invalidated other instructions are removed as invalid instructions.
In the embodiment, the invalid instruction is removed by the invalid instruction removing module, so that the sending of the invalid instruction is avoided to a certain extent, and the condition that the equipment cannot respond to a subsequent instruction after executing a certain instruction is reduced.
The instruction issuing system can realize any one of the instruction issuing methods, and the specific working process of the instruction issuing system can refer to the corresponding process in the embodiment of the method.
The method is applied to software which needs to issue instructions to the equipment continuously and in a short time, not only can reduce the processing pressure of the equipment, but also can ensure that the final state of the equipment is synchronous with the software, and does not lack an intermediate change process.
The embodiment of the application also discloses an instruction issuing device, which comprises a computer readable storage medium and a processor, wherein the computer readable storage medium stores a computer program which can be loaded by the processor and can execute any one of the instruction issuing methods, and the computer can be a personal computer, a server and the like.
The embodiment of the application also discloses a computer readable storage medium, which stores a computer program capable of being loaded by a processor and executing any one of the methods such as an instruction issuing method.
The computer-readable storage medium includes, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The foregoing is a preferred embodiment of the present application and is not intended to limit the scope of the application in any way, and any features disclosed in this specification (including the abstract and drawings) may be replaced by alternative features serving equivalent or similar purposes, unless expressly stated otherwise. That is, unless expressly stated otherwise, each feature is only an example of a generic series of equivalent or similar features.

Claims (10)

1. An instruction issuing method is characterized in that: the instruction issuing method comprises the following steps of,
an instruction generating step, responding to an instruction issuing request of a user terminal, continuously generating an instruction corresponding to the instruction issuing request and instruction information of each instruction, and storing the instruction information into a first buffer, wherein the instruction information comprises instruction generating time;
the instruction sorting step is used for sorting the instructions in the first buffer according to the instruction generation time of the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time; and the number of the first and second groups,
an instruction issuing step, namely setting an instruction state, issuing the instructions in the first buffer according to the ordering, and setting the instruction state as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
2. The instruction issuing method according to claim 1, wherein: the step of ordering the instructions may be preceded by the step of,
and an instruction adding step, namely storing the instructions and the instruction information of each instruction into a second buffer before the instructions and the instruction information of each instruction are stored into a first buffer, and then adding the instructions in the second buffer into the first buffer according to a preset time period.
3. The instruction issuing method according to claim 2, wherein: the step of generating the instructions may be preceded by the step of,
an instruction issuing request obtaining step of obtaining the instruction issuing request initiated by the user terminal and a target device state associated with the instruction issuing request, wherein the instruction issuing request is used for requesting to issue an instruction to a target device; and the number of the first and second groups,
a target equipment state judgment step, namely judging whether the target equipment is in an online state or not according to the target equipment state, and if the target equipment is in the online state, agreeing to the instruction issuing request; and if the command is in an off-line state, rejecting the command issuing request.
4. The instruction issuing method according to claim 2, wherein: the step of adding the instruction may be followed by the step of adding the instruction,
an instruction deduplication request obtaining step, namely obtaining an instruction deduplication request, wherein the instruction deduplication request is used for requesting deduplication of an instruction in a first cache; and the number of the first and second groups,
an instruction deduplication step, which is used for responding to an instruction deduplication request, judging whether repeated instructions exist in the first buffer, if so, reserving any one of the repeated instructions, and removing other instructions in the repeated instructions; if there are no repeat instructions, then no removal is performed.
5. The instruction issuing method according to claim 2, wherein: the instruction information further comprises an instruction priority; the step of ordering the instructions may be followed by the step of,
a priority ordering request obtaining step, namely obtaining a priority ordering request which is used for requesting to order the priority of the instructions in the first buffer; and the number of the first and second groups,
and an instruction priority ordering step, in response to a priority ordering request, carrying out priority ordering on the instructions in the first buffer according to the instruction priority of each instruction, wherein the instruction with the higher instruction priority is arranged before the instruction with the lower instruction priority.
6. The instruction issuing method according to claim 2, wherein: the step of ordering the instructions may be followed by the step of,
and removing invalid instructions, namely reserving any instruction and removing the invalid other instructions as invalid instructions if the other instructions after the instruction are invalidated by any instruction in the first register.
7. An instruction issuing method according to any one of claims 1 to 6, characterised in that: the step of issuing the instruction may further comprise,
when the response signal of successful delivery is not received, the instruction state keeps a delivery waiting state, and when the duration of the instruction state keeping the delivery waiting state exceeds the preset duration, the instruction delivery failure is judged, and the instruction is delivered again.
8. An instruction issuing system, characterized in that: the instruction issuing system comprises a command issuing system and a command issuing system,
the instruction generating module is used for responding to an instruction issuing request of the user terminal, continuously generating instructions corresponding to the instruction issuing request and instruction information of each instruction, and storing the instructions and the instruction information into the first buffer, wherein the instruction information comprises instruction generating time;
the instruction sequencing module is used for sequencing all instructions in the first buffer according to the instruction generation time of all the instructions, wherein the instruction with the early instruction generation time is arranged before the instruction with the late instruction generation time; and the number of the first and second groups,
the instruction issuing module is used for issuing the instructions in the first buffer according to the sequence and setting the instruction state as an issuing waiting state; when a response signal of successful delivery is received, changing the instruction state into a delivery completion state, and delivering the next instruction in the first buffer according to the sequence; and when the successful issuing response signal is not received, the instruction state keeps an issuing waiting state until the successful issuing response signal is received.
9. An instruction issuing device is characterized in that: comprising a computer readable storage medium and a processor, the computer readable storage medium storing a computer program which can be loaded by the processor and which performs the method according to any of claims 1 to 8.
10. A computer-readable storage medium characterized by: a computer program which can be loaded by a processor and which performs the method according to any one of claims 1 to 8.
CN202110853430.8A 2021-07-27 2021-07-27 Instruction issuing method, system and device and computer readable storage medium Pending CN113703844A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110853430.8A CN113703844A (en) 2021-07-27 2021-07-27 Instruction issuing method, system and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110853430.8A CN113703844A (en) 2021-07-27 2021-07-27 Instruction issuing method, system and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN113703844A true CN113703844A (en) 2021-11-26

Family

ID=78650615

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110853430.8A Pending CN113703844A (en) 2021-07-27 2021-07-27 Instruction issuing method, system and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113703844A (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6427204B1 (en) * 1999-06-25 2002-07-30 International Business Machines Corporation Method for just in-time delivery of instructions in a data processing system
US20080306740A1 (en) * 2007-06-07 2008-12-11 Mckesson Automation Inc. Remotely and interactively controlling semi-automatic devices
CN101470625A (en) * 2007-12-25 2009-07-01 新奥特(北京)视频技术有限公司 Multitask execution method in large software
CN106845625A (en) * 2016-12-22 2017-06-13 北京光年无限科技有限公司 A kind of interactive output intent and robot for robot
WO2017166713A1 (en) * 2016-03-30 2017-10-05 乐视控股(北京)有限公司 Service request processing method and device
CN107885094A (en) * 2017-12-21 2018-04-06 深圳乐美尚科技有限公司 A kind of novel intelligent home control mode and control system
WO2018152734A1 (en) * 2017-02-23 2018-08-30 华为技术有限公司 Method and device for clearing application task list of terminal, and terminal
US20180322431A1 (en) * 2017-05-05 2018-11-08 Walmart Apollo, Llc Predicting realistic time of arrival for queue priority adjustment
CN109708156A (en) * 2018-10-25 2019-05-03 青岛海尔智能技术研发有限公司 Control method and gas-cooker for gas-cooker
CN109725540A (en) * 2018-12-10 2019-05-07 深圳绿米联创科技有限公司 A kind of apparatus control method, device, electronic equipment and storage medium
CN109921967A (en) * 2019-03-08 2019-06-21 美的智慧家居科技有限公司 Command processing method and system, gateway and computer readable storage medium
CN111935255A (en) * 2020-07-30 2020-11-13 腾讯科技(深圳)有限公司 Information processing method, device and storage medium
US20200372099A1 (en) * 2013-07-15 2020-11-26 Texas Instruments Incorporated Method and Apparatus for Sorting of Regions in a Vector
WO2021036512A1 (en) * 2019-08-26 2021-03-04 珠海格力电器股份有限公司 Method and apparatus for controlling smart home device
CN112583862A (en) * 2019-09-27 2021-03-30 北京国双科技有限公司 Data concurrent processing method and device, storage medium and equipment
CN112666877A (en) * 2021-02-01 2021-04-16 亚特智物联技术(广东)有限公司 Control system of Internet of things
CN112766663A (en) * 2020-12-31 2021-05-07 北京云迹科技有限公司 Robot scheduling method and device

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6427204B1 (en) * 1999-06-25 2002-07-30 International Business Machines Corporation Method for just in-time delivery of instructions in a data processing system
US20080306740A1 (en) * 2007-06-07 2008-12-11 Mckesson Automation Inc. Remotely and interactively controlling semi-automatic devices
CN101470625A (en) * 2007-12-25 2009-07-01 新奥特(北京)视频技术有限公司 Multitask execution method in large software
US20200372099A1 (en) * 2013-07-15 2020-11-26 Texas Instruments Incorporated Method and Apparatus for Sorting of Regions in a Vector
WO2017166713A1 (en) * 2016-03-30 2017-10-05 乐视控股(北京)有限公司 Service request processing method and device
CN106845625A (en) * 2016-12-22 2017-06-13 北京光年无限科技有限公司 A kind of interactive output intent and robot for robot
WO2018152734A1 (en) * 2017-02-23 2018-08-30 华为技术有限公司 Method and device for clearing application task list of terminal, and terminal
US20180322431A1 (en) * 2017-05-05 2018-11-08 Walmart Apollo, Llc Predicting realistic time of arrival for queue priority adjustment
CN107885094A (en) * 2017-12-21 2018-04-06 深圳乐美尚科技有限公司 A kind of novel intelligent home control mode and control system
CN109708156A (en) * 2018-10-25 2019-05-03 青岛海尔智能技术研发有限公司 Control method and gas-cooker for gas-cooker
CN109725540A (en) * 2018-12-10 2019-05-07 深圳绿米联创科技有限公司 A kind of apparatus control method, device, electronic equipment and storage medium
CN109921967A (en) * 2019-03-08 2019-06-21 美的智慧家居科技有限公司 Command processing method and system, gateway and computer readable storage medium
WO2021036512A1 (en) * 2019-08-26 2021-03-04 珠海格力电器股份有限公司 Method and apparatus for controlling smart home device
CN112583862A (en) * 2019-09-27 2021-03-30 北京国双科技有限公司 Data concurrent processing method and device, storage medium and equipment
CN111935255A (en) * 2020-07-30 2020-11-13 腾讯科技(深圳)有限公司 Information processing method, device and storage medium
CN112766663A (en) * 2020-12-31 2021-05-07 北京云迹科技有限公司 Robot scheduling method and device
CN112666877A (en) * 2021-02-01 2021-04-16 亚特智物联技术(广东)有限公司 Control system of Internet of things

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵蓓;赵海涛;王西点;常玲;徐晶;: "基于动态优先权的无线参数下发方法", 电信工程技术与标准化, no. 11 *

Similar Documents

Publication Publication Date Title
CN108776897B (en) Data processing method, device, server and computer readable storage medium
CN108804465B (en) Method and system for data migration of distributed cache database
CN107273542B (en) High-concurrency data synchronization method and system
CN107153643B (en) Data table connection method and device
CN110119387A (en) A kind of file delet method, device, equipment and readable storage medium storing program for executing
CN113419824A (en) Data processing method, device, system and computer storage medium
CN110162387A (en) Thread scheduling method, device, computer equipment and computer readable storage medium
CN108875035B (en) Data storage method of distributed file system and related equipment
CN115086298A (en) File transmission method and device
CN110784524A (en) Cloud mobile phone file uploading keep-alive method, device and system
CN113703844A (en) Instruction issuing method, system and device and computer readable storage medium
CN106911777A (en) A kind of data processing method and server
CN112650449B (en) Method and system for releasing cache space, electronic device and storage medium
CN107526632B (en) Process pool expansion method and device
CN109949129A (en) A kind of order processing system and method for high concurrent
CN113253938B (en) Data processing method, device, equipment, storage medium and computer program product
CN112261097B (en) Object positioning method for distributed storage system and electronic equipment
CN111669423B (en) Batch processing method and system of network isolation space based on user mode protocol stack
CN107959710B (en) Collaborative modeling method based on cloud platform, modeling control server and client
CN113485648B (en) Storage resource control system based on cloud platform
CN112714181A (en) Data transmission method and device
CN111857583B (en) Distributed storage volume updating method, system, equipment and computer medium
CN110597829B (en) Method, device and equipment for generating primary key
CN103279339A (en) Code on-line system and method
CN111666338B (en) Data replication method, control node and electronic equipment

Legal Events

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