CN113672284B - Instruction execution method, system, electronic equipment and storage medium - Google Patents

Instruction execution method, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN113672284B
CN113672284B CN202111237371.8A CN202111237371A CN113672284B CN 113672284 B CN113672284 B CN 113672284B CN 202111237371 A CN202111237371 A CN 202111237371A CN 113672284 B CN113672284 B CN 113672284B
Authority
CN
China
Prior art keywords
instruction
demand
instructions
executed
queue
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.)
Active
Application number
CN202111237371.8A
Other languages
Chinese (zh)
Other versions
CN113672284A (en
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.)
Beijing Zhongtian Xingkong Science & Technology Development Co ltd
Original Assignee
Beijing Zhongtian Xingkong Science & Technology Development 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 Beijing Zhongtian Xingkong Science & Technology Development Co ltd filed Critical Beijing Zhongtian Xingkong Science & Technology Development Co ltd
Priority to CN202111237371.8A priority Critical patent/CN113672284B/en
Publication of CN113672284A publication Critical patent/CN113672284A/en
Application granted granted Critical
Publication of CN113672284B publication Critical patent/CN113672284B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/30003Arrangements for executing specific machine instructions

Abstract

The invention provides an instruction execution method, an instruction execution system, electronic equipment and a storage medium, wherein the instruction execution method comprises the following steps: receiving a plurality of demand instructions sent by user equipment; updating the effective demand instruction to an instruction queue to be executed according to a preset sequencing rule; executing corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed; wherein the ordering rule at least comprises: the method comprises the steps that the requirement instructions with the same priority sent by the same user equipment are determined to be arranged according to the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment are determined to be arranged according to the corresponding receiving time sequence. By implementing the technical scheme of the invention, the instruction execution efficiency can be improved.

Description

Instruction execution method, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of industrial control, and in particular, to an instruction execution method, system, electronic device, and storage medium.
Background
Multiple process segments of the production process can involve the execution of demand instructions for material transfer, and the response speed of the execution of the demand instructions can affect the speed of the whole production. The current instruction execution system can only receive one demand instruction at a time, and can only receive the next demand instruction after the current demand instruction is executed, so that the instruction execution efficiency is low, and the increasingly high process requirements are difficult to meet.
Disclosure of Invention
The invention solves the problem that the existing instruction execution efficiency is low.
To solve the above problem, the present invention provides an instruction execution method, including:
receiving a plurality of demand instructions sent by user equipment;
updating the effective demand instruction to an instruction queue to be executed according to a preset sequencing rule;
executing the corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed;
wherein the ordering rule at least comprises: the requirement instructions with the same priority sent by the same user equipment determine the arrangement sequence based on the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment determine the arrangement sequence based on the corresponding receiving time sequence.
Optionally, before updating the plurality of demand instructions to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further includes:
and if the user equipment information contained in the calibration demand instruction is matched with a preset user equipment information base and the material information contained in the calibration demand instruction is matched with a preset material information base, determining that the calibration demand instruction is an effective demand instruction.
Optionally, before the effective demand instruction is updated to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further includes:
and coding each effective demand instruction to obtain a corresponding transmission code, wherein the transmission code comprises a request time code, a material information code, a sampling quantity code, a sampling batch code and a temporary storage bit code, and the temporary storage bit code is used for distinguishing a plurality of demand instructions sent by the same user equipment.
Optionally, the determining, by the demand instructions with the same priority and sent by the same user equipment, an order of arrangement based on the corresponding sending time sequence includes:
and determining an arrangement sequence of the demand instructions with the same priority sent by the same user according to a preset coding sequence of the corresponding demand instructions, wherein the preset coding sequence of the demand instructions is determined by the corresponding user equipment according to the sending time sequence of the corresponding demand instructions.
Optionally, the updating the effective demand instruction to the instruction queue to be executed according to a preset sorting rule includes:
determining whether a same-level instruction exists in the instruction queue to be executed or not according to the priority of the instruction to be updated, wherein the instruction to be updated is the required instruction to be updated to the instruction queue to be executed, and the same-level instruction is the required instruction which is positioned in the instruction to be updated and has the same priority as the instruction to be updated;
when the same-level instructions exist in the instruction queue to be executed, sequentially judging the arrangement sequence between each same-level instruction and the instruction to be updated according to the arrangement sequence of the same-level instructions in the instruction queue to be executed so as to obtain the arrangement sequence of the instruction to be executed in the instruction queue to be executed;
when no instructions of the same level exist in the instruction queue to be executed, determining the arrangement sequence of the instructions to be executed in the instruction queue to be executed according to the priority of the demand instructions in the instruction queue to be executed and the priority of the instructions to be updated;
and updating the instructions to be executed to the instruction queue to be executed according to the arrangement sequence of the instructions to be executed in the instruction queue to be executed.
Optionally, when the order between each peer instruction and the instruction to be updated is sequentially determined, if the peer instruction whose order is located after the instruction to be updated is obtained, the determination is stopped, and the order of the instruction to be updated in the instruction queue to be executed is determined according to the order of the peer instruction located after the instruction to be updated in the instruction queue to be executed.
Optionally, before the executing the corresponding demand instruction according to the ordering order of the demand instructions in the to-be-executed instruction queue, the instruction executing method further includes:
receiving a queue-inserting instruction;
determining a corresponding to-be-inserted instruction and an inserted instruction according to the queue inserting instruction, wherein the to-be-inserted instruction is a demand instruction corresponding to the queue inserting instruction, and the inserted instruction is the demand instruction corresponding to a quasi-insertion position of the to-be-inserted instruction;
and if the priority of the instruction to be inserted is smaller than that of the inserted instruction, inserting the instruction to be inserted into the position of the inserted instruction after the priority of the instruction to be inserted is improved to be the same as that of the inserted instruction.
The present invention also provides an instruction execution system, comprising:
the receiving module is used for receiving a plurality of requirement instructions sent by user equipment;
the sequencing module is configured to update the valid demand instruction to an instruction queue to be executed according to a preset sequencing rule, where the sequencing rule at least includes: the requirement instructions with the same priority sent by the same user equipment are determined to be arranged in sequence based on the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment are determined to be arranged in sequence based on the corresponding receiving time sequence;
and the execution module is used for executing the corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed.
The present invention also provides an electronic device, comprising:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to perform the instruction execution method as described above.
The present invention also provides a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the instruction execution method as described above.
The instruction execution method, the instruction execution system, the electronic device and the storage medium provided by the invention can receive a plurality of demand instructions sent by user equipment, update effective demand instructions to an instruction queue to be executed according to a preset sequencing rule, and execute corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed. Therefore, the next demand instruction can be received without waiting for the completion of the execution of the demand instruction, and compared with the prior art, the efficiency of receiving the demand instruction is improved, and the overall efficiency of the execution of the demand instruction is further improved. In the technical scheme provided by the invention, the requirement instructions with the same priority sent by the same user equipment are sequenced based on the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment are sequenced according to the receiving time sequence, so that the probability of manually adjusting the instruction queue to be executed can be reduced, meanwhile, the sequence of different users is determined without sending time, the data quantity sent by the user equipment is reduced, meanwhile, effective sequencing can be carried out, and the instruction execution efficiency is improved. The efficiency of the instruction execution method is further improved.
Drawings
FIG. 1 is a flow chart of a method of instruction execution according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a demand instruction ordering according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating a demand instruction queue according to an embodiment of the present invention;
FIG. 4 is a block diagram of an instruction execution system according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present invention are shown in the drawings, it should be understood that the present invention may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and the embodiments of the present invention are illustrative only and are not intended to limit the scope of the present invention.
It should be understood that the various steps recited in the method embodiments of the present invention may be performed in a different order and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the invention is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description. It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in the present invention are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present invention are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
The solution of the invention is described below with reference to the attached drawings:
referring to fig. 1, an instruction execution method includes:
s101, receiving a plurality of demand instructions sent by user equipment;
s102, updating the effective demand instruction to an instruction queue to be executed according to a preset sequencing rule;
s103, executing the corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed.
Wherein the ordering rule at least comprises: the method comprises the steps that the requirement instructions with the same priority sent by the same user equipment are determined to be arranged according to the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment are determined to be arranged according to the corresponding receiving time sequence.
The demand instructions may be sent by one user equipment, may be sent by multiple user equipments, and illustratively, the demand instructions are sent by multiple user equipments, for example, the received demand instructions sent by the user equipments include a demand instruction a1, a demand instruction a2, a demand instruction A3, a demand instruction B1, and a demand instruction B2, where the demand instruction a1, the demand instruction a2, and the demand instruction A3 sent by the user equipment a, and the demand instruction B1 and the demand instruction B2 sent by the user equipment B. It can be appreciated that the instruction execution method in the embodiment of the present invention can receive corresponding demand instructions in multiple channels.
When the effective demand instructions are updated to the instruction queue to be executed according to the preset sorting rule, the effective demand instructions can be compared with the demand instructions in the instruction queue to be executed, and the positions of the effective demand instructions in the instruction queue to be executed are determined according to the sorting rule. Taking the above exemplary contents as an example, when a plurality of demand instructions sent by the user equipment are received, including demand instruction a1, demand instruction a2, demand instruction A3, demand instruction B1 and demand instruction B2, if there is no demand instruction in the instruction queue to be executed, demand instruction a1 may be taken as a first-ordered demand instruction, if the priorities of demand instruction a1, demand instruction a2 and demand instruction A3 are the same, since demand instruction a1, demand instruction a2 and demand instruction A3 are all sent by the user equipment a, the ordered sequence among demand instruction a1, demand instruction a2 and demand instruction A3 may be determined according to the sending time sequence of demand instruction a1, demand instruction a2 and demand instruction A3, assuming that the sending time of demand instruction a1 is earlier than the sending time of demand instruction a2, and the sending time of demand instruction a2 is earlier than the sending time of demand instruction A3, the demand instruction a1, the demand instruction a2, and the demand instruction A3 are ordered as demand instruction a1, demand instruction a2, and demand instruction A3, in that order. Assuming that the priority of the demand command B1 is the same as that of the demand command a1, since the demand command B1 and the demand command a1 are sent by different user devices, the commands may be sorted according to the receiving time between the demand command B1 and the demand command a1, if the receiving time of the demand command B1 is later than that of the demand command a1, the demand command B1 is arranged after the demand command a1, at this time, the demand command B1 may be compared with the demand command a2 to determine whether the demand command B1 is arranged after or before the demand command a2, and if the demand command B1 is arranged before the demand command a2, the demand command B1 is determined to be located between the demand command a1 and the demand command a 2. The effective demand instructions may be compared and ordered from the first to be executed instruction queue to the demand instructions, or may be compared and ordered from the last to be executed instruction queue.
The effective demand instruction in the plurality of demand instructions can be determined according to actual conditions.
The instruction execution method provided by the embodiment of the present invention can be executed by a server, a computer, or the like, which executes the instruction execution method, and specifically, a system in the server executes the instruction execution method as an example for description. The system can acquire a plurality of demand instructions sent by the same user equipment or a plurality of demand instructions sent by different user equipment, sequence effective demand instructions in the demand instructions to obtain an instruction queue to be executed, and sequentially execute the demand instructions based on the instruction queue to be executed.
By implementing the instruction implementation method provided by the embodiment of the invention, a plurality of demand instructions sent by user equipment can be received, effective demand instructions are updated to the instruction queue to be executed according to the preset sequencing rule, and corresponding demand instructions are executed according to the arrangement sequence of the demand instructions in the instruction queue to be executed. Therefore, the next demand instruction can be received without waiting for the completion of the execution of the demand instruction, and compared with the prior art, the efficiency of receiving the demand instruction is improved, and the overall efficiency of the execution of the demand instruction is further improved. In the embodiment of the present invention, since the order of the requirement instructions sent by the same ue is determined based on the sending time sequence, the ordering is not abnormal due to the communication abnormality between the system executing the method and the ue. For example, when the user equipment sequentially sends the first demand instruction and the second demand instruction, the system may not receive the first demand instruction due to communication reasons, receive the second demand instruction, and when the user equipment does not receive the acknowledgement information of the first demand instruction fed back by the system in a certain period of time, the first demand instruction is sent again, at this time, the second demand instruction actually received by the system is before the first demand instruction, but the same user equipment often sends the demand instructions in sequence according to the demand when sending the demand instructions, so if the demand instructions are sorted according to the receiving time, the probability that the instruction queue to be executed needs to be manually adjusted is higher, whereas the demand instructions with the same priority sent by the same user equipment are sorted based on the corresponding sending time sequence, so that the probability that the instruction queue to be executed needs to be manually adjusted can be reduced, the execution efficiency is improved. Meanwhile, a single user device cannot judge the sequence relation of the requirement instructions of the user device and other user devices by the user device, so that the sending sequence of the requirement instructions sent by a plurality of user devices cannot effectively express the sequence relation of the requirement instructions.
Illustratively, referring to fig. 2, in fig. 2, the server 201 receives demand instructions sent by the user devices 202, where there are M user devices 202, which are user device 1, user device 2, … …, and user device M, and each user device 202 sends corresponding demand instruction 1, demand instruction 2, demand instruction 3, … …, and demand instruction N. After receiving the demand instruction sent by the user equipment 202, the server updates the queue of the instruction to be executed with the demand instruction. The queue of the instruction to be executed before updating may be an empty queue or a queue in which ordered demand instructions have been stored.
Illustratively, according to the arrangement sequence of the demand instructions in the instruction queue to be executed, when the corresponding demand instructions are executed, the system executes the demand instructions arranged at the first position, and after the execution of the demand instructions arranged at the first position is completed, the completed demand instructions in the instruction queue to be executed are automatically cleared, the relevant data storage and archiving are performed on the demand instructions, and the demand instructions meeting the conditions are executed, wherein it can be known that a plurality of user equipment can simultaneously perform demand instruction transmission.
In an optional embodiment, before updating the plurality of demand instructions to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further includes:
and if the user equipment information contained in the calibration demand instruction is matched with a preset user equipment information base, and the material information contained in the calibration demand instruction is matched with a preset material information base, determining that the calibration demand instruction is an effective demand instruction.
As can be appreciated herein, the demand instructions include user equipment information and material information.
The system comprises a preset user equipment information base and a preset material information base, wherein the user equipment information base is used for showing whether corresponding user equipment is matched with user equipment of a system administration demand instruction or not, the material information base is used for showing whether corresponding material information is matched with corresponding user equipment or not, and when the corresponding user equipment is matched with the corresponding material information, effective demand instructions are sequenced and updated to a command queue to be executed, so that the system cannot cause process confusion or other abnormalities due to the fact that invalid instructions are executed.
The demand instruction may include user equipment information, receiving station information, demand date, demand quantity, demand batch, material information, and the like, wherein the material information may be represented by a material code, and the system determines the material information according to the material code.
When the system receives the demand instruction, whether to record or not can be selected, for example, only the demand instruction matched with the user equipment in the user equipment information base is recorded, and the demand instruction matched with the material information in the demand instruction matched with the user equipment in the user equipment information base is recorded as an effective instruction.
In an optional embodiment, before updating the valid demand instruction to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further includes:
and coding each effective demand instruction to obtain a corresponding transmission code, wherein the transmission code comprises a request time code, a material information code, a sampling quantity code, a sampling batch code and a temporary storage bit code, and the temporary storage bit code is used for distinguishing a plurality of demand instructions sent by the same user equipment. For example: the 1 st delivery of 1 vial of material is made by the 1 st device on day 01 of year 2020.
In an alternative embodiment, the determining the ranking order based on the corresponding transmission time sequence of the demand instructions with the same priority sent by the same user equipment includes:
the method comprises the steps that the requirement instructions with the same priority sent by the same user are determined to be arranged according to the preset coding sequence of the corresponding requirement instructions, wherein the preset coding sequence of the requirement instructions is determined by corresponding user equipment according to the sending time sequence of the corresponding requirement instructions.
In this embodiment, the user equipment generates the corresponding preset codes according to the sending time sequence, so that the instruction execution method can determine the sequence of the user equipment sending the demand instructions only through the codes, and determine the sequence of the corresponding demand instructions based on the sequence. Illustratively, the larger the preset encoding of the demand instructions, the later the ordering of the respective demand instructions. Therefore, the preset codes can be set to be small-capacity data so as to reduce the capacity of the preset codes, further reduce the transmitted data volume and improve the transmission efficiency.
In an optional embodiment, the rule further comprises:
and determining the sequencing order of the corresponding demand instructions according to the priority levels of the corresponding demand instructions. The higher the priority of the demand instruction, the earlier the ordering of the demand instruction.
In an optional embodiment, updating the valid demand instructions to the to-be-executed instruction queue according to a preset ordering rule includes:
determining whether a same-level instruction exists in an instruction queue to be executed or not according to the priority of the instruction to be updated, wherein the instruction to be updated is a demand instruction to be updated to the instruction queue to be executed, and the same-level instruction is a demand instruction which is positioned in the instruction to be updated and has the same priority as the instruction to be updated;
when the same-level instructions exist in the instruction queue to be executed, sequentially judging the arrangement sequence between each same-level instruction and the instruction to be updated according to the arrangement sequence of the same-level instructions in the instruction queue to be executed so as to obtain the arrangement sequence of the instruction to be executed in the instruction queue to be executed;
when no instructions of the same level exist in the instruction queue to be executed, determining the arrangement sequence of the instructions to be executed in the instruction queue to be executed according to the priority of the demand instructions in the instruction queue to be executed and the priority of the instructions to be updated;
and updating the instructions to be executed to the instruction queue to be executed according to the arrangement sequence of the instructions to be executed in the instruction queue to be executed.
In this embodiment, the peer instructions exist in the instruction queue to be executed, and the arrangement order between each peer instruction and the instruction to be updated is sequentially determined according to the arrangement order of the peer instructions in the instruction queue to be executed, so as to obtain the arrangement order of the instruction to be executed in the instruction queue to be executed.
When the instructions of the same level do not exist in the instruction queue to be executed, a previous-level demand instruction or a next-level demand instruction in the instruction queue to be executed can be obtained, wherein the previous-level demand instruction refers to a demand instruction which is higher than the priority of the instruction to be updated by one level, and the next-level demand instruction refers to a demand instruction which is lower than the priority of the instruction to be updated by one level. And determining the arrangement sequence of the execution instructions in the instruction queue to be executed according to the arrangement sequence of the first next-level demand instruction in all the next-level demand instructions or the arrangement sequence of the last-level demand instruction at the tail of the last line in the last-level demand instructions.
Illustratively, when the arrangement sequence between each peer instruction and the instruction to be updated is sequentially judged, if a peer instruction with the arrangement sequence after the instruction to be updated is obtained, the judgment is stopped, and the arrangement sequence of the instruction to be updated in the instruction queue to be executed is determined according to the arrangement sequence of the peer instruction after the instruction to be updated in the instruction queue to be executed. The arrangement sequence obtained for the first time is located at the arrangement position of the same-level instruction after the instruction to be updated, namely the arrangement position updated by the instruction to be updated, and other required instructions which are located in the instruction queue to be executed are sequentially arranged backwards.
In an optional implementation manner, before executing the corresponding demand instruction according to the arrangement order of the demand instructions in the to-be-executed instruction queue, the instruction execution method further includes:
receiving a queue-inserting instruction of any demand instruction;
determining an instruction to be inserted and an inserted instruction according to the queue inserting instruction, wherein the instruction to be inserted is a demand instruction corresponding to the queue inserting instruction, and the inserted instruction is a demand instruction corresponding to a to-be-inserted position of the instruction to be inserted;
and if the priority of the instruction to be inserted is smaller than that of the inserted instruction, the priority of the instruction to be inserted is raised to be the same as that of the inserted instruction, and then the instruction to be inserted is inserted into the inserted instruction.
In an optional embodiment, if the inserted instruction is a first demand instruction ordered in the to-be-executed instruction queue, the inserted instruction is modified to a second demand instruction ordered in the to-be-executed instruction queue.
Illustratively, ordering each demand instruction to obtain an instruction queue to be executed includes the following steps:
the user equipment 1 sends the demand instruction L1 for the first time, and if the queue of the to-be-executed instructions of the system has no queuing information before the demand instruction L1, L1 will queue the first position in the queue;
the user equipment 1 sends a demand instruction Ln for the Nth time, and the system automatically arranges the N demand instructions once according to a demand sending sequence;
the user equipment 1 to the user equipment M simultaneously send demand instructions, and the system queues the received demand instructions according to the sequence of the receiving time;
the queue of the demand instruction with high priority in the instruction queue to be executed is higher than the queue of the demand instruction with low priority in the instruction queue to be executed.
For example, when the queue of instructions to be executed needs to insert a demand instruction, the queue arranged at the first bit may be running, so the queue arranged at the first bit does not allow for insertion. The current demand queue position can carry out queue-inserting operation forwards or backwards, and the queue-inserting position can be selected by self. Queue requirements under the same priority can carry out queue-inserting operation, and queue-inserting positions are limited to the queues under the same priority. And (4) inserting the queue of the low priority into the queue of the high priority, wherein the required priority needs to be promoted first, otherwise, cross-level inserting cannot be carried out.
Illustratively, referring to fig. 3, queue 1, queue 2, queue 3, queue 4, queue 5, queue 6, queue 7, and queue X each represent the queue position of the corresponding demand instruction in the queue of instructions to be executed. The left to-be-executed instruction queue 301 is a to-be-executed instruction queue before queue insertion, and includes: the method comprises a demand instruction 1 of the user equipment 1, a demand instruction 2 of the user equipment 1, a demand instruction 3 of the user equipment 2, a demand instruction 1 of the user equipment 2, a demand instruction 2 of the user equipment 4, a demand instruction 3 of the user equipment 5, a demand instruction 3, … … of the user equipment 6 and a demand instruction N of the user equipment M, which are arranged in sequence, wherein the demand instruction N of the user equipment M can represent the nth instruction of the mth user equipment.
The right to-be-executed instruction queue 301 is the to-be-executed instruction queue after queue insertion, and specifically, the demand instruction 2 of the user equipment 4 is shifted up by 1 bit. The right to-be-executed instruction queue 301 includes: the demand instruction 1 of the user equipment 1, the demand instruction 2 of the user equipment 1, the demand instruction 3 of the user equipment 2, the demand instruction 2 of the user equipment 4, the demand instruction 1 of the user equipment 2, the demand instruction 3 of the user equipment 5, the demand instruction 3, … … of the user equipment 6, and the demand instruction N of the user equipment M are arranged in sequence. Among them, in fig. 3, queue 1, queue 2, queue 3, queue 4, queue 5, queue 6, queue 7, and queue X.
Referring to FIG. 4, an instruction execution system includes:
a receiving module 401, configured to receive a plurality of requirement instructions sent by user equipment;
a sorting module 402, configured to update an effective demand instruction to an instruction queue to be executed according to a preset sorting rule, where the sorting rule at least includes: the method comprises the steps that the requirement instructions with the same priority sent by the same user equipment are determined to be arranged according to corresponding sending time sequences, and the requirement instructions with the same priority sent by different user equipment are determined to be arranged according to corresponding receiving time sequences;
the execution module 403 is configured to execute the corresponding demand instructions according to the arrangement order of the demand instructions in the instruction queue to be executed.
In an optional implementation manner, the instruction execution system further includes a confirmation module, configured to determine that the demand instruction is an effective demand instruction if user equipment information included in the demand instruction matches a preset user equipment information base and material information included in the corresponding demand instruction matches a preset material information base.
In an optional implementation manner, the instruction execution system further includes an encoding module, configured to encode each valid demand instruction to obtain a corresponding transmission code, where the transmission code includes a request time code, a material information code, a sampling number code, a sampling batch code, and a temporary storage bit code, and the temporary storage bit code is used to distinguish multiple demand instructions sent by the same ue.
In an alternative embodiment, the determining the ordering order based on the corresponding transmission time sequence for the demand instructions with the same priority sent by the same user equipment includes:
the method comprises the steps that the requirement instructions with the same priority sent by the same user are determined to be arranged according to the preset coding sequence of the corresponding requirement instructions, wherein the preset coding sequence of the requirement instructions is determined by corresponding user equipment according to the sending time sequence of the corresponding requirement instructions.
In an alternative embodiment, the ordering rule further comprises:
and determining the sequencing order of the corresponding demand instructions according to the priority levels of the corresponding demand instructions.
In an alternative embodiment, the instruction execution system further comprises a queue insertion module to:
receiving a queue-inserting instruction;
determining a corresponding to-be-inserted instruction and an inserted instruction according to the queue inserting instruction, wherein the to-be-inserted instruction is a demand instruction corresponding to the corresponding queue inserting instruction, and the inserted instruction is a demand instruction corresponding to a to-be-inserted position of the to-be-inserted instruction;
and if the priority of the instruction to be inserted is smaller than that of the inserted instruction, the priority of the instruction to be inserted is raised to be the same as that of the inserted instruction, and then the instruction to be inserted is inserted into the inserted instruction.
In an alternative embodiment, the queue insertion module is further configured to: if the inserted instruction is a first requirement instruction in the queue of the instruction to be executed, the inserted instruction is modified into a second requirement instruction in the queue of the instruction to be executed. It is possible to prevent an insertion exception from being caused by the execution of the demand instruction that is ordered first in the to-be-executed instruction queue.
An exemplary embodiment of the present invention also provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program, when executed by the at least one processor, is for causing the electronic device to perform a method according to an embodiment of the invention.
Exemplary embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is operable to cause the computer to perform an instruction execution method according to an embodiment of the present invention.
Exemplary embodiments of the present invention also provide a computer program product comprising a computer program, wherein the computer program is adapted to cause a computer to perform the instruction execution method according to an embodiment of the present invention when executed by a processor of the computer.
An electronic device that can be a server or a client of the present invention, which is an example of a hardware device that can be applied to aspects of the present invention, will now be described. Electronic device is intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
The electronic device includes a computing unit that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) or a computer program loaded from a storage unit into a Random Access Memory (RAM). In the RAM, various programs and data required for the operation of the device can also be stored. The computing unit, the ROM, and the RAM are connected to each other by a bus. An input/output (I/O) interface is also connected to the bus.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Although the present invention has been disclosed above, the scope of the present invention is not limited thereto. Various changes and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are intended to be within the scope of the invention.

Claims (10)

1. An instruction execution method, comprising:
receiving a plurality of demand instructions sent by user equipment;
according to a preset sequencing rule, the effective demand instruction is updated to an instruction queue to be executed, and the method comprises the following steps: judging whether the instruction queue to be executed has the same level instruction according to the priority of the instruction to be updated, and determining the arrangement sequence of the instruction to be updated in the instruction queue to be executed according to the judgment result;
executing the corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed;
wherein the ordering rule at least comprises: the requirement instructions with the same priority sent by the same user equipment determine the arrangement sequence based on the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment determine the arrangement sequence based on the corresponding receiving time sequence.
2. The instruction execution method according to claim 1, wherein before the plurality of demand instructions are updated to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further comprises:
and if the user equipment information contained in the calibration demand instruction is matched with a preset user equipment information base and the material information contained in the calibration demand instruction is matched with a preset material information base, determining that the calibration demand instruction is an effective demand instruction.
3. The instruction execution method according to claim 1, wherein before the valid demand instruction is updated to the instruction queue to be executed according to a preset ordering rule, the instruction execution method further comprises:
and coding each effective demand instruction to obtain a corresponding transmission code, wherein the transmission code comprises a request time code, a material information code, a sampling quantity code, a sampling batch code and a temporary storage bit code, and the temporary storage bit code is used for distinguishing a plurality of demand instructions sent by the same user equipment.
4. The instruction execution method of claim 1, wherein the determining an order of the demand instructions with the same priority based on the corresponding transmission time sequence, which are transmitted by the same user equipment, comprises:
and determining an arrangement sequence of the demand instructions with the same priority sent by the same user according to a preset coding sequence of the corresponding demand instructions, wherein the preset coding sequence of the demand instructions is determined by the corresponding user equipment according to the sending time sequence of the corresponding demand instructions.
5. The instruction execution method of claim 4, wherein the updating the valid demand instruction to the to-be-executed instruction queue according to the preset ordering rule comprises:
determining whether a same-level instruction exists in the instruction queue to be executed or not according to the priority of the instruction to be updated, wherein the instruction to be updated is the required instruction to be updated to the instruction queue to be executed, and the same-level instruction is the required instruction which is positioned in the instruction to be updated and has the same priority as the instruction to be updated;
when the same-level instructions exist in the instruction queue to be executed, sequentially judging the arrangement sequence between each same-level instruction and the instruction to be updated according to the arrangement sequence of the same-level instructions in the instruction queue to be executed so as to obtain the arrangement sequence of the instruction to be executed in the instruction queue to be executed;
when no instructions of the same level exist in the instruction queue to be executed, determining the arrangement sequence of the instructions to be executed in the instruction queue to be executed according to the priority of the demand instructions in the instruction queue to be executed and the priority of the instructions to be updated;
and updating the instructions to be executed to the instruction queue to be executed according to the arrangement sequence of the instructions to be executed in the instruction queue to be executed.
6. The instruction execution method of claim 5, wherein when the sequencing order between each peer instruction and the instruction to be updated is sequentially determined, if the peer instruction whose sequencing order is located after the instruction to be updated is obtained, the determination is stopped, and the sequencing order of the instruction to be updated in the instruction queue to be executed is determined according to the sequencing order of the peer instruction located after the instruction to be updated in the instruction queue to be executed.
7. The instruction execution method according to claim 1, wherein before executing the corresponding demand instruction according to the ordering of the demand instructions in the instruction queue to be executed, the instruction execution method further comprises:
receiving a queue-inserting instruction;
determining a corresponding to-be-inserted instruction and an inserted instruction according to the queue inserting instruction, wherein the to-be-inserted instruction is a demand instruction corresponding to the queue inserting instruction, and the inserted instruction is the demand instruction corresponding to a quasi-insertion position of the to-be-inserted instruction;
and if the priority of the instruction to be inserted is smaller than that of the inserted instruction, inserting the instruction to be inserted into the position of the inserted instruction after the priority of the instruction to be inserted is improved to be the same as that of the inserted instruction.
8. An instruction execution system, comprising:
the receiving module is used for receiving a plurality of requirement instructions sent by user equipment;
the sequencing module is used for updating the effective demand instruction to an instruction queue to be executed according to a preset sequencing rule, and comprises: judging whether the instruction queue to be executed has the same level instruction according to the priority of the instruction to be updated, and determining the arrangement sequence of the instruction to be updated in the instruction queue to be executed according to the judgment result, wherein the ordering rule at least comprises: the requirement instructions with the same priority sent by the same user equipment are determined to be arranged in sequence based on the corresponding sending time sequence, and the requirement instructions with the same priority sent by different user equipment are determined to be arranged in sequence based on the corresponding receiving time sequence;
and the execution module is used for executing the corresponding demand instructions according to the arrangement sequence of the demand instructions in the instruction queue to be executed.
9. An electronic device, comprising:
a processor; and
a memory for storing a program, wherein the program is stored in the memory,
wherein the program comprises instructions which, when executed by the processor, cause the processor to carry out the instruction execution method according to any one of claims 1-7.
10. A non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the instruction execution method of any one of claims 1-7.
CN202111237371.8A 2021-10-25 2021-10-25 Instruction execution method, system, electronic equipment and storage medium Active CN113672284B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111237371.8A CN113672284B (en) 2021-10-25 2021-10-25 Instruction execution method, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111237371.8A CN113672284B (en) 2021-10-25 2021-10-25 Instruction execution method, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113672284A CN113672284A (en) 2021-11-19
CN113672284B true CN113672284B (en) 2022-01-28

Family

ID=78550973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111237371.8A Active CN113672284B (en) 2021-10-25 2021-10-25 Instruction execution method, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113672284B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114779320A (en) * 2022-04-18 2022-07-22 四川吉赛特科技有限公司 Grouping and priority processing method in intelligent well gun source driving
CN116112911A (en) * 2023-02-10 2023-05-12 迈普通信技术股份有限公司 AT instruction processing method, device, terminal equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123073A (en) * 2010-01-07 2011-07-13 华为技术有限公司 Packet reordering method and device
CN103019859A (en) * 2012-12-05 2013-04-03 北京普泽天玑数据技术有限公司 Method and system for calling service request
CN107562443A (en) * 2017-07-17 2018-01-09 上海卫星工程研究所 Satellite program control command maintaining method based on round-robin queue
CN113157424A (en) * 2021-05-11 2021-07-23 中国建设银行股份有限公司 Task scheduling method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8458091B2 (en) * 2010-07-26 2013-06-04 Accenture Global Services Limited System and method for prioritizing processing of payment instructions
CN105243033B (en) * 2015-09-28 2018-05-25 北京联想核芯科技有限公司 Data processing method and electronic equipment
CN110609758A (en) * 2019-08-30 2019-12-24 恒大智慧科技有限公司 Queue-based device operating method, computer device and readable storage medium
CN111143061B (en) * 2019-12-18 2024-02-23 海尔优家智能科技(北京)有限公司 Multi-device linkage control method, device and storage medium
CN112199180A (en) * 2020-10-21 2021-01-08 北京三快在线科技有限公司 Multitask scheduling method and device, electronic equipment and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102123073A (en) * 2010-01-07 2011-07-13 华为技术有限公司 Packet reordering method and device
CN103019859A (en) * 2012-12-05 2013-04-03 北京普泽天玑数据技术有限公司 Method and system for calling service request
CN107562443A (en) * 2017-07-17 2018-01-09 上海卫星工程研究所 Satellite program control command maintaining method based on round-robin queue
CN113157424A (en) * 2021-05-11 2021-07-23 中国建设银行股份有限公司 Task scheduling method and device

Also Published As

Publication number Publication date
CN113672284A (en) 2021-11-19

Similar Documents

Publication Publication Date Title
CN113672284B (en) Instruction execution method, system, electronic equipment and storage medium
CN109862101B (en) Cross-platform application starting method and device, computer equipment and storage medium
US10001987B2 (en) Method for updating a firmware file of an input/output module
CN111835467B (en) Message sending method, device, computer equipment and storage medium
CN111447248A (en) File transmission method and device
CN112822260B (en) File transmission method and device, electronic equipment and storage medium
CN110502364A (en) Across the cloud back-up restoring method of big data sandbox cluster under a kind of OpenStack platform
CN112887196B (en) Message sending method, system, device, equipment and readable storage medium
CN110912805B (en) Message reading state synchronization method, terminal, server and system
CN112565319A (en) Transmission control method, network management server, base station and storage medium
CN110008187B (en) File transmission scheduling method, device, equipment and computer readable storage medium
CN110413398B (en) Task scheduling method and device, computer equipment and storage medium
CN113347238A (en) Message partitioning method, system, device and storage medium based on block chain
CN112910987A (en) Message pushing method, system, device, equipment and storage medium
CN112969198A (en) Data transmission method, terminal and storage medium
US10949645B2 (en) Method, apparatus, and storage medium for data verification
CN107391388B (en) Method and equipment for storing data based on instant messaging
CN114840238A (en) Software upgrading method and device, electronic equipment and computer readable storage medium
CN112148387A (en) Method and device for preloading feedback information, computer equipment and storage medium
CN112559179A (en) Job processing method and device
CN112184027A (en) Task progress updating method and device and storage medium
CN110971697A (en) Redis single instance protection processing method and device, computer equipment and storage medium
CN110677497A (en) Network medium distribution method and device
CN113961868B (en) Logistics transport adjusting method and system based on block chain and storage medium
CN111432357B (en) Information processing method and system and computing 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
GR01 Patent grant
GR01 Patent grant