Instruction scheduling method and device, computer equipment and storage medium

By dividing multiple instructions into instruction sequences of data dependencies and calculating the scheduling priority of the instruction sequence, the problem of low instruction scheduling efficiency in the prior art is solved, and faster and more efficient instruction scheduling is achieved.

CN119621151APending Publication Date: 2025-03-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311181740.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The prior art determines the scheduling order from the perspective of a single instruction in instruction scheduling, and does not consider the association relationship between instructions, resulting in low instruction scheduling efficiency.

Method used

By dividing multiple instructions into multiple instruction sequences based on data dependencies, the instructions in each instruction sequence have data dependencies, determine the characteristic information of the instruction sequence, and calculate the scheduling priority of the instruction sequence according to the instruction scheduling requirements to achieve faster instruction scheduling.

Benefits of technology

It improves the efficiency of instruction scheduling and can schedule multiple instructions faster, which is suitable for different scenario requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621151A_ABST
    Figure CN119621151A_ABST
Patent Text Reader

Abstract

The invention provides an instruction scheduling method and device, computer equipment and a storage medium, and belongs to the technical field of computers. The method comprises the steps that a plurality of instructions are divided into a plurality of instruction sequences based on a data dependency relationship, and the instructions in each instruction sequence have the data dependency relationship; for any instruction sequence, at least one piece of feature information of the instruction sequence is determined based on instructions in the instruction sequence, and each piece of feature information is used for reflecting information related to instruction scheduling from the corresponding dimension; based on an instruction scheduling demand and the at least one kind of feature information of the multiple instruction sequences, scheduling priorities of the multiple instruction sequences are determined, and the scheduling priorities are used for representing the scheduling sequence of the multiple instruction sequences; and scheduling a plurality of instructions in the plurality of instruction sequences based on the scheduling priorities of the plurality of instruction sequences. According to the technical scheme, multiple instructions can be scheduled more quickly, and the instruction scheduling efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an instruction scheduling method, apparatus, computer equipment and storage medium. Background Art

[0002] With the development of computer technology, it is becoming more and more common to use computer devices to process transactions. In the process of processing transactions, computer devices generally use their own processors to process multiple instructions triggered by users. Among them, instruction scheduling is the key part of the processor processing multiple instructions out of order.

[0003] At present, the commonly used method is to schedule multiple instructions in sequence according to their ages (existence time). That is, obtain the age of each instruction; when the instruction meets the execution condition, the older instruction (longer existence time) is preferentially scheduled for execution according to the order indicated by the age of the instruction.

[0004] However, in the above technical solution, the scheduling order of instructions is determined only from the perspective of a single instruction, and the relationship between instructions is not taken into consideration, which makes the scheduling between instructions relatively loose. For example, the execution of a certain instruction requires the results of two other instructions. If the scheduling timing of the two other instructions differs greatly, the instruction needs to wait for a long time before it can be scheduled, resulting in low efficiency in processing multiple instructions. Summary of the invention

[0005] The embodiments of the present application provide an instruction scheduling method, apparatus, computer device and storage medium, which can schedule multiple instructions more quickly and improve the scheduling efficiency of instructions. The technical solution is as follows:

[0006] On the one hand, an instruction scheduling method is provided, the method comprising:

[0007] Based on the data dependency, the plurality of instructions are divided into a plurality of instruction sequences, and the instructions in each instruction sequence have the data dependency relationship;

[0008] For any instruction sequence, based on the instructions in the instruction sequence, at least one feature information of the instruction sequence is determined, each feature information is used to reflect information related to instruction scheduling from a corresponding dimension;

[0009] Determine scheduling priorities of the multiple instruction sequences based on instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences, wherein the scheduling priorities are used to indicate a scheduling order of the multiple instruction sequences;

[0010] A plurality of instructions in the plurality of instruction sequences are scheduled based on scheduling priorities of the plurality of instruction sequences.

[0011] On the other hand, an instruction scheduling device is provided, the device comprising:

[0012] A partitioning module, configured to partition a plurality of instructions into a plurality of instruction sequences based on a data dependency relationship, wherein the instructions in each instruction sequence have the data dependency relationship;

[0013] A first determination module is used to determine, for any instruction sequence, at least one type of feature information of the instruction sequence based on the instructions in the instruction sequence, each type of feature information is used to reflect information related to instruction scheduling from a corresponding dimension;

[0014] A second determination module, configured to determine a scheduling priority of the plurality of instruction sequences based on an instruction scheduling requirement and at least one characteristic information of the plurality of instruction sequences, wherein the scheduling priority is used to indicate a scheduling order of the plurality of instruction sequences;

[0015] A scheduling module is used to schedule multiple instructions in the multiple instruction sequences based on the scheduling priorities of the multiple instruction sequences.

[0016] In some embodiments, the partitioning module is used to sequentially obtain instructions in the order of the multiple instructions in the program flow; if there is no predecessor instruction for the instruction, create a new instruction sequence based on the instruction, and the predecessor instruction is the instruction on which the instruction depends; if there is a predecessor instruction for the instruction, add the instruction to the instruction sequence to which the predecessor instruction belongs, and be located after the predecessor instruction.

[0017] In some embodiments, the apparatus further comprises:

[0018] The first processing module is used for recording the rewrite information of the instruction as the rewrite information of the instruction sequence to which the instruction belongs in a feature information table when there is no predecessor instruction for the instruction, the rewrite information is used to indicate the register that needs to be rewritten as indicated by the instruction, the rewrite information of the instruction sequence is a kind of feature information, and the feature information table is used to store the at least one feature information; when there is a predecessor instruction for the instruction, the rewrite information of the instruction sequence to which the instruction belongs in the feature information table is updated from the rewrite information of the predecessor instruction to the rewrite information of the instruction.

[0019] In some embodiments, the at least one characteristic information of the instruction sequence includes at least one of the following:

[0020] the number of branch instructions in the instruction sequence, the branch instructions being used to determine whether to perform a program flow jump based on data at a current position, the program flow referring to the execution order of the multiple instructions;

[0021] The confidence of the branch instruction in the instruction sequence, the confidence being used to indicate the prediction accuracy of the branch instruction during the instruction execution process;

[0022] the number of memory rewrite instructions in the instruction sequence;

[0023] a violation probability of a memory read instruction in the instruction sequence, wherein the violation probability is used to indicate a probability that the memory read instruction violates a data dependency during instruction execution;

[0024] A cache miss rate of the memory read instruction in the instruction sequence, wherein the cache miss rate is used to indicate a probability of failing to successfully obtain data of the memory read instruction from a specific cache level during the execution of the memory read instruction;

[0025] The instruction serial length of the instruction sequence, wherein the instruction serial length is used to indicate the number of instructions executed sequentially in the instruction sequence;

[0026] The instruction parallel width of the instruction sequence, the instruction parallel width is used to represent the number of instructions in the instruction sequence that depend on the same instruction to write data;

[0027] The delay of the instruction sequence, the delay is used to indicate the time required to execute the instructions of the instruction sequence;

[0028] The average age of the instruction sequence, the age of the instruction sequence is equal to the average age of all instructions in the instruction sequence, and the age of the instruction is used to indicate the order of the instruction among multiple instructions.

[0029] In some embodiments, the first determining module includes:

[0030] An acquisition unit, configured to acquire, for any instruction sequence, at least one feature information of each instruction in the instruction sequence;

[0031] The synthesis unit is used to synthesize the characteristic information of each instruction in the instruction sequence for any kind of characteristic information to obtain the characteristic information of the instruction sequence.

[0032] In some embodiments, the synthesis unit is used to, for any instruction in the instruction sequence, use the characteristic information of the instruction as the characteristic information of the instruction sequence when there is no predecessor instruction for the instruction; and to add the characteristic information of the instruction on the basis of the characteristic information of the instruction sequence to obtain the updated characteristic information of the instruction sequence when there is a predecessor instruction for the instruction.

[0033] In some embodiments, the second determination module is used to obtain, for any instruction sequence, characteristic information related to the instruction scheduling requirement from at least one characteristic information of the instruction sequence; and determine the scheduling priority of the instruction sequence based on the characteristic information related to the instruction scheduling requirement.

[0034] In some embodiments, each instruction sequence includes a variety of feature information;

[0035] The second determination module is used to obtain, for any instruction sequence, multiple feature information related to the instruction scheduling requirements from the multiple feature information of the instruction sequence; determine the weights of the multiple feature information based on the instruction scheduling requirements and the feature information, and the weights are used to indicate the degree of correlation between the corresponding feature information and the instruction scheduling requirements; and perform weighted summation of the multiple feature information based on the weights of the multiple feature information to obtain the scheduling priority of the instruction sequence.

[0036] In some embodiments, the scheduling module is used to determine the scheduling priority of the instruction sequences to which the first instruction and the second instruction belong respectively, for a first instruction and a second instruction located in different instruction sequences, when both the first instruction and the second instruction meet the scheduling conditions; when the scheduling priority of the instruction sequence to which the first instruction belongs is higher than the scheduling priority of the instruction sequence to which the second instruction belongs, preferentially scheduling the first instruction to start execution; and during the execution of the first instruction, scheduling the second instruction to start execution.

[0037] In some embodiments, the apparatus further comprises:

[0038] The second processing module is used to remove the characteristic information of any instruction after scheduling the instruction based on the characteristic information of the instruction sequence to which the instruction belongs.

[0039] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the instruction scheduling method in the embodiment of the present application.

[0040] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the instruction scheduling method in the embodiment of the present application.

[0041] On the other hand, a computer program product is provided, including a computer program, which is stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the instruction scheduling method provided in the above-mentioned various aspects or various optional implementations of various aspects.

[0042] The embodiment of the present application provides an instruction scheduling method, which first divides multiple instructions of a source program into multiple instruction sequences according to data dependencies, so that the execution relationship between the instructions can be more clearly determined; then, an analysis is performed from the perspective of the instruction sequence, and at least one characteristic information of the instruction sequence is determined through the instructions in the instruction sequence, that is, the execution relationship between the instructions is considered, and the characteristic information of the instruction sequence is determined on this basis. Compared with a solution that determines the scheduling order of instructions only from the perspective of a single instruction, this solution can more comprehensively reflect the relationship between instructions; then, the scheduling priority of the instruction sequence is calculated through the instruction scheduling requirements and the characteristic information, so that through the scheduling priority, multiple instructions can be scheduled more quickly, thereby improving the scheduling efficiency of the instructions; and different scheduling priorities determined by different instruction scheduling requirements make the scheduling order of multiple instructions different, which can be suitable for different scenario requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0044] Figure 1 It is a schematic diagram of an implementation environment of an instruction scheduling method provided according to an embodiment of the present application;

[0045] Figure 2 is a flow chart of an instruction scheduling method provided according to an embodiment of the present application;

[0046] Figure 3 is a flow chart of another instruction scheduling method provided according to an embodiment of the present application;

[0047] Figure 4 is a schematic diagram of instruction scheduling provided according to an embodiment of the present application;

[0048] Figure 5 is a schematic diagram of updating feature information provided according to an embodiment of the present application;

[0049] Figure 6is a framework diagram of an instruction scheduling method provided according to an embodiment of the present application;

[0050] Figure 7 is a block diagram of an instruction scheduling device provided according to an embodiment of the present application;

[0051] Figure 8 is a block diagram of another instruction scheduling device provided according to an embodiment of the present application;

[0052] Fig. 9 is a structural block diagram of a terminal provided according to an embodiment of the present application;

[0053] Fig.10 It is a structural diagram of a server provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0055] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.

[0056] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.

[0057] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the instructions involved in this application are all obtained with full authorization.

[0058] The instruction scheduling method provided in the embodiment of the present application can be executed by a computer device. In some embodiments, the computer device is a terminal or a server. The following first takes the computer device as an example to introduce the implementation environment of the instruction scheduling method provided in the embodiment of the present application. Figure 1 Schematic diagram of an implementation environment of an instruction scheduling method provided according to an embodiment of the present application. Figure 1 The implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.

[0059] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal 101 is equipped with a processor. Schematically, the terminal 101 is a terminal used by a user. The terminal 101 can obtain multiple instructions from the server 102. Then, the terminal 101 executes the instruction scheduling method provided in the present application through the processor, and schedules the multiple instructions obtained from the server 102 to perform the operations indicated by the multiple instructions. The multiple instructions can be obtained by compiling the language of the machine learning model, and the embodiments of the present application are not limited to this.

[0060] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, the above terminal may be only one, or the above terminals may be dozens or hundreds, or more. The embodiment of the present application does not limit the number of terminals and device types.

[0061] In some embodiments, server 102 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data and artificial intelligence platforms. Server 102 can provide multiple instructions to terminal 101. Alternatively, server 102 executes the instruction scheduling method provided in the embodiment of the present application, which is not limited by the embodiment of the present application. In some embodiments, server 102 undertakes the main computing work and terminal 101 undertakes the secondary computing work; or, server 102 undertakes the secondary computing work and terminal 101 undertakes the main computing work; or, a distributed computing architecture is used between server 102 and terminal 101 for collaborative computing.

[0062] Figure 2 is a flowchart of an instruction scheduling method provided according to an embodiment of the present application, see Figure 2 In the present application, the execution by the terminal is used as an example for explanation. The instruction scheduling method comprises the following steps:

[0063] 201. The terminal divides the multiple instructions into multiple instruction sequences based on the data dependency relationship, and the instructions in each instruction sequence have a data dependency relationship.

[0064] In an embodiment of the present application, the data dependency relationship between instructions refers to the fact that the execution of one instruction depends on the result of another instruction. That is, in order for an instruction to be successfully executed, the execution result of another instruction needs to be provided for the instruction. Accordingly, the instruction can be executed only after the other instruction is executed. Initially, multiple instructions are disorganized. The terminal divides multiple instructions into multiple instruction sequences according to the data dependency relationship between the instructions. For any instruction sequence, multiple instructions in the instruction sequence will be called in sequence.

[0065] 202. For any instruction sequence, the terminal determines at least one characteristic information of the instruction sequence based on the instructions in the instruction sequence, and each characteristic information is used to reflect information related to instruction scheduling from a corresponding dimension.

[0066] In an embodiment of the present application, the characteristic information may be the number of target instructions in an instruction sequence, the execution time of an instruction sequence, or the age of an instruction sequence, etc., which is not limited in the embodiment of the present application. Among them, the target instruction may be a branch instruction (Branch), a memory rewrite instruction (Store) or other types of instructions, which is not limited in the embodiment of the present application. The age (age) of an instruction sequence is used to indicate the duration of the existence of the instruction sequence. The age may be the sum of the ages of multiple instructions in an instruction sequence, or the average age of multiple instructions in an instruction sequence, which is not limited in the embodiment of the present application. For any instruction sequence, the terminal may obtain at least one characteristic information of each instruction in the instruction sequence. Then, for any characteristic information, the terminal may synthesize the characteristic information of each instruction in the instruction sequence to obtain the characteristic information of the instruction sequence.

[0067] 203. The terminal determines scheduling priorities of the multiple instruction sequences based on the instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences, where the scheduling priorities are used to indicate the scheduling order of the multiple instruction sequences.

[0068] In the embodiment of the present application, the instruction scheduling requirement refers to the rule for scheduling multiple instructions. That is, the terminal can schedule multiple instructions based on the characteristic information indicated by the instruction scheduling requirement. Among them, the terminal calculates the scheduling priority of multiple instruction sequences based on the instruction scheduling requirement and at least one characteristic information of the multiple instruction sequences. The scheduling priority can reflect the order in which the multiple instruction sequences are scheduled.

[0069] 204. The terminal schedules multiple instructions in the multiple instruction sequences based on the scheduling priorities of the multiple instruction sequences.

[0070] In the embodiment of the present application, the terminal selects an instruction sequence with a higher scheduling priority from multiple instruction sequences and schedules the first instruction in the instruction sequence. When scheduling the first instruction in the instruction sequence, the terminal may continue to schedule the next instruction in the instruction sequence, or may schedule the first instruction in other instruction sequences, which is not limited in the embodiment of the present application.

[0071] The embodiment of the present application provides an instruction scheduling method, which first divides multiple instructions of a source program into multiple instruction sequences according to data dependencies, so that the execution relationship between the instructions can be more clearly determined; then, an analysis is performed from the perspective of the instruction sequence, and at least one characteristic information of the instruction sequence is determined through the instructions in the instruction sequence, that is, the execution relationship between the instructions is considered, and the characteristic information of the instruction sequence is determined on this basis. Compared with a solution that determines the scheduling order of instructions only from the perspective of a single instruction, this solution can more comprehensively reflect the relationship between instructions; then, the scheduling priority of the instruction sequence is calculated through the instruction scheduling requirements and the characteristic information, so that through the scheduling priority, multiple instructions can be scheduled more quickly, thereby improving the scheduling efficiency of the instructions; and different scheduling priorities determined by different instruction scheduling requirements make the scheduling order of multiple instructions different, which can be suitable for different scenario requirements.

[0072] Figure 3 is a flowchart of another instruction scheduling method provided according to an embodiment of the present application, see Figure 3 In the present application, the execution by the terminal is used as an example for explanation. The instruction scheduling method comprises the following steps:

[0073] 301. The terminal divides the multiple instructions into multiple instruction sequences based on the data dependency relationship, and the instructions in each instruction sequence have a data dependency relationship.

[0074] In an embodiment of the present application, a terminal obtains multiple instructions. For any instruction, the instruction may be a branch instruction (Branch), a memory rewrite instruction (Store) or a memory read instruction (Load), and the embodiment of the present application does not limit this. Among them, the branch instruction is used to determine whether to perform a program flow jump according to the data at the current position. If the jump is made, the terminal will continue to execute the instruction of the memory address corresponding to the data at the next position indicated by the branch instruction. If the jump is not made, the terminal will continue to execute according to the original program flow. The program flow refers to the execution order of multiple instructions. The position refers to the register. For example, the instruction "Branch s3, s4" means to determine whether to perform a program flow jump according to the data in register s3; if the jump is made, the terminal will continue to execute the instruction of the memory address corresponding to the data in register s4; if the jump is not made, the terminal will continue to execute according to the original program flow. The memory rewrite instruction (Store) is used to store the data in the register into the memory. For example, the instruction "Store s3, s4" means to write the data in register s3 into the memory indicated by the memory address in register s4. Among them, the memory address is the data stored in register s4. The memory read instruction (Load) is used to read data from the memory and write it into the register. For example, the instruction "Load s1, s0" means writing the data in the memory address corresponding to the data in register s0 into register s1.

[0075] Each instruction corresponds to an instruction operand. The instruction operand corresponding to an instruction refers to the register operated when the instruction is executed. The register can be a register for instruction reading data or a register for instruction writing data, and the embodiment of the present application does not limit this. If the result data written after the execution of an instruction is the data read when another instruction is executed, it means that there is a data dependency relationship between the two instructions. The terminal determines the data dependency relationship between the instructions based on the instruction operands corresponding to the multiple instructions. Then, the terminal divides the multiple instructions into multiple instruction sequences based on the data dependency relationship between the instructions.

[0076] For example, the multiple instructions include instruction 1, instruction 2, and instruction 3. Instruction 1 is "Load s1, s0", which means writing the data in the memory address corresponding to the data in register s0 into register s1. Instruction 2 is "Add s3, s2 s1", which means adding the data in register s1 and the data in register s2, and storing the added sum in register s3. Instruction 3 is "Branch s3, s4", which means judging whether to perform a program flow jump based on the data in register s3. If a jump is performed, the instruction at the memory address corresponding to the data in register s4 continues to execute. It can be seen that the execution of instruction 2 requires the data in register s1, and the data in register s1 is obtained by instruction 1. Therefore, there is a data dependency relationship between instruction 2 and instruction 1. That is, the execution of instruction 2 depends on the data of instruction 1. Similarly, the execution of instruction 3 depends on the data of instruction 2.

[0077] In some embodiments, the process of dividing a plurality of instructions into a plurality of instruction sequences based on data dependency by the terminal includes: the terminal sequentially obtains the instructions in the order of the plurality of instructions in the program flow. That is, the terminal can sequentially obtain the instructions from the memory address in the order of the plurality of instructions in the program flow of the source program through the instruction fetch unit. Then, in the case where there is no previous instruction for the instruction, the terminal creates a new instruction sequence based on the instruction. In this case, the instruction is the first instruction of the instruction sequence. The previous instruction is the instruction on which the instruction depends. That is, the result data of the previous instruction is the data required for the execution of the instruction. In the case where there is a previous instruction for the instruction, the instruction is added to the instruction sequence to which the previous instruction belongs, and is located after the previous instruction. The scheme provided in the embodiment of the present application sequentially obtains the instructions in the order in which the instructions are created, and then, according to the data dependency between the instructions, the plurality of instructions are divided into a plurality of instruction sequences, so that the execution relationship between the instructions is more clearly determined, thereby facilitating the subsequent more comprehensive determination of the relationship between the instructions, so as to schedule a plurality of instructions more quickly.

[0078] For example, please refer to Table 1 below. Table 1 shows 6 instructions by way of example. Instruction 1 refers to writing the data in the memory address corresponding to the data in register s0 into register s1. Instruction 2 refers to adding the data in register s21 and the data in register s20, and storing the sum in register s22. Instruction 3 refers to adding the data in register s11 and the data in register s10, and storing the sum in register s12. Instruction 4 refers to adding the data in register s1 and the data in register s2, and storing the sum in register s3. Instruction 5 refers to multiplying the data in register s23 and the data in register s22, and storing the multiplied product in register s24. Instruction 6 refers to writing the data in register s3 into the memory indicated by the memory address in register s4. The memory address is the data stored in register s4.

[0079] Table 1

[0080] Command name Instruction content 1 Load s1, s0 2 Add s22, s21, s20 3 Add s12, s11, s10 4 Add s3, s2 s1 5 Mult s24, s23 s22 6 Store s3, s4

[0081] For instruction 1, since there is no previous sequence or instruction to rewrite the data in register s0, instruction 1 has no data dependency on other instructions. Therefore, the terminal creates a new instruction sequence for recording, and obtains "instruction sequence 0: instruction 1". Among them, "rewrite" means that the result data of the instruction is written into the register, that is, the register is rewritten.

[0082] For instruction 2, since there is no previous sequence or instruction to rewrite the data in register 21 or the data in register 20, the terminal creates a new instruction sequence for recording, and obtains "instruction sequence 1: instruction 2".

[0083] For instruction 3, since there is no previous sequence or instruction to rewrite the data in register 11 or the data in register 10, the terminal creates a new instruction sequence for recording, and obtains "instruction sequence 2: instruction 3".

[0084] For instruction 4, since instruction 1 rewrites the data in register s1, and there is no sequence or instruction to rewrite the data in register s2, the terminal adds instruction 4 to instruction sequence 0 to obtain "instruction sequence 0: instruction 1-instruction 4".

[0085] For instruction 5, since instruction 2 rewrites the data in register s22, and there is no sequence or instruction to rewrite the data in register s23, the terminal adds instruction 5 to instruction sequence 1 to obtain "instruction sequence 1: instruction 2-instruction 5".

[0086] For instruction 6, since instruction 4 rewrites the data in register s3, and there is no sequence or instruction to rewrite the data in register s4, the terminal adds instruction 6 to instruction sequence 0 to obtain "instruction sequence 0: instruction 1-instruction 4-instruction 6".

[0087] In summary, the terminal finally obtains three instruction sequences, namely "instruction sequence 0: instruction 1-instruction 4-instruction 6", "instruction sequence 1: instruction 2-instruction 5" and "instruction sequence 2: instruction 3".

[0088] In some embodiments, if the execution of an instruction depends on two other instructions, and these other two instructions are located in different instruction sequences, the terminal can add the instruction to the instruction sequence created earlier. Accordingly, when there is a first previous instruction and a second previous instruction for the instruction to be added, and the first previous instruction and the second previous instruction are respectively located in different instruction sequences, the terminal obtains the number of the instruction sequence where the first previous instruction is located and the number of the instruction sequence where the second previous instruction is located. Then, the terminal adds the instruction to be added to the instruction sequence with a smaller number. The size of the instruction sequence number is negatively correlated with the early or late creation of the instruction sequence. That is, the earlier the instruction sequence is created, the smaller the number of the instruction sequence.

[0089] In the process of constructing multiple instruction sequences, the terminal renames multiple instructions or instruction sequences. That is, the terminal adds a name ID (Identity Document) to each instruction or instruction sequence so that it can be recorded and processed through the name ID later to facilitate subsequent operations. The name ID can also be called a number. The name ID of the instruction can be the number of the instruction sequence in which the instruction is located.

[0090] Alternatively, the terminal may also add the instruction to an instruction sequence with a greater criticality. Accordingly, when there is a first preceding instruction and a second preceding instruction in the instruction to be added, and the first preceding instruction and the second preceding instruction are respectively located in different instruction sequences, the terminal obtains the criticality of the instruction sequence where the first preceding instruction is located and the criticality of the instruction sequence where the second preceding instruction is located. Then, the terminal adds the instruction to be added to the instruction sequence with a greater criticality. Among them, the terminal may determine the criticality of the instruction sequence based on the characteristic information of the instruction sequence. For example, the terminal determines the criticality of the instruction sequence based on the delay of the instruction sequence. The longer the delay of the instruction sequence, the greater the criticality of the instruction sequence.

[0091] 302. For any instruction sequence, the terminal obtains at least one kind of characteristic information of each instruction in the instruction sequence, and each kind of characteristic information is used to reflect information related to instruction scheduling from a corresponding dimension.

[0092] In an embodiment of the present application, the characteristic information of the instruction is used to reflect information related to instruction scheduling from the corresponding dimension. The embodiment of the present application does not limit the specific content of at least one characteristic information. For any kind of characteristic information, the terminal can be represented in the form of "category identification + content", and the embodiment of the present application does not limit this. Among them, "category identification" is used to indicate the category of characteristic information. The following is an exemplary introduction of nine kinds of characteristic information, but it is by no means limited to this.

[0093] The first type is the number of branch instructions (Branch) in the instruction sequence. Among them, "the number of branch instructions" is a category of characteristic information. The number used to represent the "number of branch instructions" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Brach s3, s4". Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3". Based on the instruction sequence, the terminal obtains a characteristic information "Branch_number 1". "Branch_number" is used to represent the characteristic information of "the number of branch instructions"; "1" is used to represent the content of the number of branch instructions. That is, the number of branch instructions in the instruction sequence is 1.

[0094] The second type is the confidence of the branch instruction in the instruction sequence. The confidence is used to indicate the prediction accuracy of the branch instruction during the instruction execution process. Optionally, the terminal can predict the confidence of the branch instruction based on the historical execution record of the branch instruction. That is, the terminal executes the branch instruction to perform program flow transformation; then, the terminal records the historical execution results of the branch instruction; then, the terminal predicts the confidence of the branch instruction based on multiple historical execution results. The embodiment of the present application does not limit the calculation method of the confidence. Among them, "the confidence of the branch instruction" is a category of feature information. The number used to represent the "confidence of the branch instruction" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2s1" and instruction 3 "Brach s3, s4". According to the instruction sequence, the terminal obtains a feature information of "Branch_cm0.95". "Branch_cm" is used to represent the feature information of "the confidence of the branch instruction"; "0.95" is used to represent the content of the confidence of the branch instruction. That is, the number of branch instructions in the instruction sequence is 0.95 (95%).

[0095] The third type is the number of memory rewrite instructions (Store) in the instruction sequence. Among them, "the number of memory rewrite instructions" is a category of characteristic information. The number used to represent the "number of memory rewrite instructions" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Store s3, s4". Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3". Based on the instruction sequence, the terminal obtains a characteristic information of "Store_number1". "Store_number" is used to represent the characteristic information of "the number of memory rewrite instructions"; "1" is used to represent the content of the number of memory rewrite instructions. That is, the number of memory rewrite instructions in the instruction sequence is 1.

[0096] The fourth type is the violation probability of the memory read instruction (Load) in the instruction sequence. The violation probability is used to indicate the probability that the memory read instruction violates the data dependency during the instruction execution process. Among them, the "violation probability of the memory read instruction" is a category of characteristic information. The number used to represent the "violation probability of the memory read instruction" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Brach s3, s4". Accordingly, the terminal obtains a characteristic information "Load_vio 0.9" based on the instruction sequence. "Load_vio" is used to represent the characteristic information of "violation probability of memory read instruction"; "0.9" is used to represent the content of the violation probability of memory read instruction. That is, the violation probability of the memory read instruction in the instruction sequence is 0.9 (90%).

[0097] The fifth type is the cache miss rate of memory read instructions in the instruction sequence. The cache miss rate is used to indicate the probability of failing to successfully obtain the data of the memory read instruction from a specific cache level during the execution of the memory read instruction. Among them, the "cache miss rate of memory read instructions" is a category of feature information. The number used to represent the "cache miss rate of memory read instructions" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Brach s3, s4". Accordingly, the terminal obtains a feature information "Load_cachemiss0.9" based on the instruction sequence. "Load_cachemiss" is used to represent the feature information "cache miss rate of memory read instructions"; "0.9" is used to represent the content of the cache miss rate of memory read instructions. That is, the cache miss rate of memory read instructions in the instruction sequence is 0.9 (90%).

[0098] The sixth type is the instruction serial length of the instruction sequence. The instruction serial length is used to indicate the number of instructions executed sequentially in the instruction sequence. Among them, "instruction serial length" is a category of characteristic information. The number used to represent the "instruction serial length" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Brach s3, s4". Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3". Based on the instruction sequence, the terminal obtains a characteristic information called "Seriallength3". "Seriallength" is used to represent the characteristic information of "instruction serial length"; "3" is used to represent the content of the instruction serial length. That is, the instruction serial length of the instruction sequence is 3.

[0099] The seventh type is the instruction parallel width of the instruction sequence. The instruction parallel width is used to indicate the number of instructions in the instruction sequence that simultaneously depend on a certain instruction to write data. Among them, "instruction parallel width" is a category of characteristic information. The number used to represent the "instruction parallel width" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1", instruction 3 "Brach s3, s4" and instruction 4 "Store s3, s4". Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3 / instruction 4". That is, after instruction 2 is executed, instruction 3 and instruction 4 can be executed simultaneously. Based on the instruction sequence, the terminal obtains a characteristic information of "Parallelwidth 2". "Parallelwidth" is used to represent the characteristic information of "instruction parallel width"; "2" is used to represent the content of the instruction parallel width. That is, the instruction parallel width of the instruction sequence is 2.

[0100] The eighth type is the delay of the instruction sequence. Delay is used to indicate the time required to execute the instructions in the instruction sequence. Among them, "delay" is a category of characteristic information. The number used to represent "delay" is the content. For example, the delay of the Add instruction and the Store instruction is 1; the delay of the Load instruction is 4. The instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Store s3, s4". Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3". Based on the instruction sequence, the terminal obtains a characteristic information of "delay 6". "Delay" is used to represent the characteristic information of "delay"; "6" is used to represent the content of the delay. That is, the delay of the instruction sequence is equal to the delay of instruction 1 + the delay of instruction 2 + the delay of instruction 3 = 4+1+1=6.

[0101] Ninth, the average age of the instruction sequence. The average age of the instruction sequence is equal to the average age of all instructions in the instruction sequence. The age of the instruction is used to indicate the order of instructions in multiple instructions (program flow). Among them, "average age" is a category of characteristic information. The number used to represent the "average age" is the content. For example, the instruction sequence includes instruction 1 "Load s1, s0", instruction 2 "Add s3, s2 s1" and instruction 3 "Store s3, s4". The age of instruction 1 is 7, the age of instruction 2 is 4, and the age of instruction 3 is 1. Correspondingly, the instruction sequence is "instruction 1-instruction 2-instruction 3". Based on the instruction sequence, the terminal obtains a characteristic information of "average 4". "Average" is used to represent the characteristic information of "average age"; "4" is used to represent the content of the average age. That is, the average age of the instruction sequence is equal to (age of instruction 1 + age of instruction 2 + age of instruction 3) / 3=(7+4+1) / 3=4.

[0102] 303. For any type of characteristic information, the terminal synthesizes characteristic information of each instruction in the instruction sequence to obtain the characteristic information of the instruction sequence.

[0103] In an embodiment of the present application, for any instruction in an instruction sequence, if there is no previous instruction for the instruction, the terminal uses the characteristic information of the instruction as the characteristic information of the instruction sequence. In the case that there is a previous instruction for the instruction, on the basis of the characteristic information of the instruction sequence, the terminal adds the characteristic information of the instruction to obtain the characteristic information of the updated instruction sequence. That is, for any kind of characteristic information, the terminal sums the content of the characteristic information of each instruction in the instruction sequence to obtain the characteristic information of the instruction sequence. An embodiment of the present application provides a solution, for multiple instructions in an instruction sequence, the characteristic information of multiple instructions is added in sequence to obtain the characteristic information of the instruction sequence, so that the characteristic information of the instruction sequence can be determined more accurately on the basis of considering the execution relationship between the instructions, so as to more comprehensively reflect the relationship between the instructions, thereby facilitating the subsequent more accurate calculation of the scheduling order between the instructions.

[0104] In some embodiments, the terminal may record the characteristic information of the instruction sequence in a characteristic information table, so that when scheduling is performed later, the characteristic information of the instruction sequence may be directly queried in the characteristic information table, thereby performing scheduling based on the characteristic information of the instruction sequence.

[0105] For example, the characteristic information of the delay of the instruction sequence is used as an example to illustrate. Assume that the delay of the Add instruction and the Store instruction is 1; the delay of the Mult instruction is 3; and the delay of the Load instruction is 4.

[0106] When instruction sequence 0 is established according to instruction 1, the terminal calculates the delay of instruction sequence 0 as 4 according to the delay of the Load instruction as 4, and records the characteristic information of the delay into the corresponding table item of the characteristic information table. "Table item" refers to the position in the characteristic information table, which is similar to the subtable of the characteristic information table. Different instruction sequences correspond to different table items.

[0107] When instruction sequence 1 is established according to instruction 2, the terminal calculates the delay of instruction sequence 1 as 1 according to the delay of the Add instruction being 1, and records the characteristic information of the delay into the corresponding table entry of the characteristic information table.

[0108] When instruction sequence 2 is established according to instruction 3, the terminal calculates the delay of instruction sequence 2 as 1 according to the delay of the Add instruction being 1, and records the characteristic information of the delay into the corresponding table entry of the characteristic information table.

[0109] When instruction 4 is added to instruction sequence 0, the terminal calculates the delay of instruction sequence 0 as 5 based on the delay of the Add instruction being 1, and updates the delay of instruction sequence 0 in the corresponding table entry.

[0110] When instruction 5 is added to instruction sequence 1, the terminal calculates the delay of instruction sequence 1 as 4 based on the delay of the Mult instruction as 3, and updates the delay of instruction sequence 1 in the corresponding table entry.

[0111] When instruction 6 is added to instruction sequence 0, the terminal calculates the cumulative delay of instruction sequence 0 as 6 based on the delay of the Store instruction being 1, and updates the delay of instruction sequence 0 in the corresponding table entry.

[0112] The characteristic information table status is shown in Table 2 below.

[0113] Table 2

[0114] The number of the instruction sequence Is it effective? Rewrite information Delay Instruction sequence 0 1 s3 6 Instruction sequence 1 1 s24 4 Instruction sequence 2 1 s12 1

[0115] It can be seen from Table 2 that the delay of instruction sequence 0 is 6; the delay of instruction sequence 1 is 4; and the delay of instruction sequence 2 is 1. The feature information table can also record whether the instruction sequence is valid. "1" is used to indicate that the instruction sequence is valid, that is, the instruction sequence can be executed subsequently. After all instructions in the instruction sequence are executed, the terminal can update "1" to "0" so that the instruction sequence is not repeatedly executed subsequently. Among them, "1" and "0" can be replaced by other numerical values, and the embodiments of the present application are not limited to this. The feature information table can also record the rewrite information of the instruction sequence. The rewrite information is used to indicate the register that the instruction sequence ultimately needs to rewrite.

[0116] In some embodiments, when there is no previous instruction for the instruction, the terminal records the rewrite information of the instruction as the rewrite information of the instruction sequence to which the instruction belongs in the feature information table. The rewrite information is used to indicate the register indicated by the instruction that needs to be rewritten. The rewrite information of the instruction sequence is a kind of feature information, and the feature information table is used to store at least one kind of feature information. When there is a previous instruction for the instruction, the terminal updates the rewrite information of the instruction sequence to which the instruction belongs in the feature information table from the rewrite information of the previous instruction to the rewrite information of the instruction.

[0117] For example, in the process of creating an instruction sequence, for instruction 1, the terminal records register s1 rewritten by instruction 1 as the rewrite information of instruction sequence 0 in the feature information table. For instruction 2, the terminal records register s22 rewritten by instruction 2 as the rewrite information of instruction sequence 1 in the feature information table. For instruction 3, the terminal records register s12 rewritten by instruction 3 as the rewrite information of instruction sequence 2 in the feature information table. For instruction 4, instruction 4 depends on instruction 1; the terminal updates the rewrite information of instruction sequence 0 to which instruction 4 belongs in the feature information table from the rewrite information of instruction 1 (register s1) to the rewrite information of instruction 4 (register s3). For instruction 5, instruction 5 depends on instruction 2; the terminal updates the rewrite information of instruction sequence 1 to which instruction 5 belongs in the feature information table from the rewrite information of instruction 2 (register s22) to the rewrite information of instruction 5 (register s24). Regarding instruction 6, instruction 6 depends on instruction 4; since instruction 6 does not rewrite the register, the terminal keeps the rewrite information of instruction sequence 0 unchanged, which is still the rewrite information of instruction 4 (register s3).

[0118] Similarly, for other characteristic information, the terminal can also use a similar solution to the above to calculate and record it in the characteristic information table. For example, for the instruction number feature, the terminal accumulates the number of instructions of the corresponding type for each sequence according to the decoded instruction type. Or, for the age of the instruction sequence, the terminal records an accumulated age sum according to the order corresponding to each instruction, and records the number of sequence instructions, so that the average age can be calculated, that is, the age of the instruction sequence.

[0119] 304. The terminal determines scheduling priorities of the multiple instruction sequences based on the instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences, where the scheduling priorities are used to indicate the scheduling order of the multiple instruction sequences.

[0120] In an embodiment of the present application, for any instruction sequence, the terminal obtains characteristic information related to the instruction scheduling requirement from at least one characteristic information of the instruction sequence. Then, the terminal determines the scheduling priority of the instruction sequence based on the characteristic information related to the instruction scheduling requirement. Among them, the instruction scheduling requirement refers to the rule for scheduling multiple instructions. The embodiment of the present application does not limit the instruction scheduling requirement. The instruction scheduling requirement can be a requirement for the speed of instruction execution, or a requirement for the accuracy of instruction execution, which is not limited by the embodiment of the present application.

[0121] In the case where the instruction scheduling requirement is a requirement for the speed of instruction execution, the terminal determines that the characteristic information related to the instruction scheduling requirement is the delay of the instruction sequence. Then, the terminal determines the scheduling priority of multiple instruction sequences based on the delays of multiple instruction sequences. The scheduling priority is positively correlated with the delay of the instruction sequence. That is, the longer the delay of the instruction sequence, the higher the priority of the instruction sequence, and the earlier it will be called later.

[0122] Optionally, characteristic information such as the age, parallel width, and serial length of the instruction sequence are all related to the instruction execution speed. On the basis of obtaining the delay of the instruction sequence, the terminal can also obtain at least one of the characteristic information such as the age, parallel width, and serial length of the instruction sequence to determine the scheduling priority of the instruction sequence, which is not limited in the embodiments of the present application.

[0123] In the case where the instruction scheduling requirement is a requirement for instruction execution accuracy, the terminal determines that the characteristic information related to the instruction scheduling requirement is at least one of the characteristic information such as the number of branch instructions in the instruction sequence, the confidence of the branch instructions, the number of memory rewrite instructions, the violation probability of memory read instructions, and the cache miss rate of memory read instructions, to determine the scheduling priority of the instruction sequence, and the embodiments of the present application do not limit this.

[0124] Optionally, characteristic information related to instruction scheduling requirements may also be customized by the user, which is not limited in this embodiment of the present application.

[0125] In some embodiments, each instruction sequence includes multiple feature information. Accordingly, the process of determining the scheduling priority of multiple instruction sequences based on the instruction scheduling requirement and at least one feature information of the multiple instruction sequences by the terminal includes: for any instruction sequence, the terminal obtains multiple feature information related to the instruction scheduling requirement from the multiple feature information of the instruction sequence. The terminal determines the weight of the multiple feature information based on the instruction scheduling requirement and the feature information. The weight is used to indicate the degree of correlation between the corresponding feature information and the instruction scheduling requirement. The terminal performs weighted summation on the multiple feature information based on the weights of the multiple feature information to obtain the scheduling priority of the instruction sequence. The scheme provided in the embodiment of the present application performs weighted summation on the multiple feature information according to the degree of correlation between the feature information and the instruction scheduling requirement. Compared with the scheme of determining the scheduling order of the instruction only from the perspective of a single instruction, the feature information obtained by the scheme is richer, so that the relationship between the instructions can be more comprehensively reflected, and then the scheduling priority of the instruction sequence can be more accurately calculated, that is, the criticality of the instruction can be more accurately determined, which is conducive to the subsequent scheduling priority, and multiple instructions can be scheduled more quickly, and the scheduling efficiency of the instruction can be improved.

[0126] 305. The terminal schedules multiple instructions in the multiple instruction sequences based on the scheduling priorities of the multiple instruction sequences.

[0127] In the embodiment of the present application, the terminal selects an instruction sequence with a higher scheduling priority from multiple instruction sequences and schedules the first instruction in the instruction sequence. When scheduling the first instruction in the instruction sequence, the terminal can continue to schedule the next instruction in the instruction sequence; or, the terminal can also schedule the first instruction in other instruction sequences; or, the terminal can also call the next instruction in the instruction sequence and the first instruction in other instruction sequences at the same time, which is not limited in the embodiment of the present application.

[0128] In some embodiments, after the terminal schedules the first instruction in a certain instruction sequence, the terminal executes the instruction accordingly. In the process of executing the instruction, since the instruction has not been executed, the terminal cannot immediately call the next instruction in the instruction sequence. In this case, the terminal can call the first instruction in other instruction sequences. That is, the terminal can process multiple instruction sequences in parallel. Accordingly, the process of scheduling multiple instructions in multiple instruction sequences based on the scheduling priorities of multiple instruction sequences includes: for the first instruction and the second instruction located in different instruction sequences, when both the first instruction and the second instruction meet the scheduling conditions, the terminal determines the scheduling priorities of the instruction sequences to which the first instruction and the second instruction belong. When the scheduling priority of the instruction sequence to which the first instruction belongs is higher than the scheduling priority of the instruction sequence to which the second instruction belongs, the terminal preferentially schedules the first instruction to start execution. Then, in the process of executing the first instruction, the terminal schedules the second instruction to start execution. Among them, the first instruction and the second instruction are any two instructions located in different instruction sequences. The role of "first" and "second" is to facilitate the distinction between the two instructions and has no practical significance. The solution provided in the embodiment of the present application can process two or even more instruction sequences in parallel, can improve the calling efficiency of multiple instructions, and thus improve the performance of the processor.

[0129] For example, instruction 1, instruction 4, and instruction 6 are located in instruction sequence 0; instruction 2 and instruction 5 are located in instruction sequence 1; and instruction 3 is located in instruction sequence 2. Figure 4 is a schematic diagram of an instruction scheduling provided according to an embodiment of the present application. Figure 4 , assuming that all instructions are in the instruction queue, the terminal can query the feature information table according to the serial number corresponding to the instruction, so as to obtain the characteristic delays of the three instruction sequences as 6, 4, and 1 respectively. If at this time the first instructions of the three instruction sequences have already met the scheduling conditions, that is, instruction 1 of instruction sequence 0, instruction 2 of instruction sequence 1, and instruction 3 of instruction sequence 2 have already met the scheduling conditions, then the terminal determines that the delay of instruction sequence 1 is the largest based on the delays of the three instruction sequences, that is, instruction sequence 1 has the highest scheduling priority. Then, the terminal prioritizes the first instruction in instruction sequence 1. If an instruction does not meet the scheduling conditions, it is skipped and does not participate in the priority sorting. The scheduling conditions refer to all conditions that must be met for an instruction to be scheduled, including but not limited to: the previous instructions of the instruction have been executed and the hardware resources required for the execution of the instruction have been prepared, etc. The embodiments of the present application do not limit this.

[0130] In some embodiments, after scheduling any instruction, the terminal removes the characteristic information of the instruction based on the characteristic information of the instruction sequence to which the instruction belongs. The solution provided in the embodiment of the present application updates the characteristic information of the characteristic sequence based on the characteristic information of the instruction after scheduling any instruction, so that the scheduling priority of the instruction sequence can be recalculated on the basis of eliminating the influence of the characteristic information of the instruction, thereby more accurately determining the relationship between the instructions and scheduling multiple instructions faster.

[0131] For example, Figure 5 is a schematic diagram of updating feature information provided according to an embodiment of the present application. Figure 5 After scheduling the instruction, the terminal removes the characteristic information of the instruction from the characteristic information of the instruction sequence. Taking the above 6 instructions as an example, if the terminal schedules instruction 2 for transmission according to the scheduling result, the delay of instruction sequence 1 where instruction 2 is located needs to be updated. That is, instruction 2 is an Add instruction with a delay of 1, and the delay of instruction sequence 1 in the characteristic information table is 4. Then the terminal subtracts the delay of instruction 2 from the delay of instruction sequence 1, and the cumulative delay after updating is 3.

[0132] In order to more clearly describe the instruction scheduling method provided in the embodiment of the present application, the instruction scheduling method is further described below in conjunction with the accompanying drawings. Figure 6 is a framework diagram of an instruction scheduling method provided according to an embodiment of the present application. Figure 6 , the terminal obtains the source program from the front end through the instruction fetch unit, and decodes it through the decoding unit to obtain multiple instructions. The terminal can predict multiple instructions and obtain branch prediction information (Branch predict info). The branch prediction information includes feature information such as the number of branch instructions and the confidence of branch instructions. The terminal can also obtain prediction information such as the cache miss rate of memory read instructions and the violation probability of memory read instructions in multiple instructions based on the memory information corresponding to the multiple instructions, which is conducive to the subsequent calculation of the feature information of the instruction sequence. Then, the terminal renames the multiple instructions. The renamed instructions all carry the number of the corresponding instruction sequence. Then, the terminal records the number of the instruction sequence carried by the instruction in the instruction queue through dispatch. The terminal calculates the feature information (character) of multiple instruction sequences (Sequence) and stores it in the feature information table. The feature information table can also be called a sequence feature table (SequenceCharacter table). Then, the terminal determines the scheduling priority of multiple instruction sequences based on the instruction scheduling requirements and at least one feature information of multiple instruction sequences in the feature information table. Then, the terminal selects an instruction for scheduling based on the scheduling priority of multiple instruction sequences. The scheduled instructions are executed in the functional unit pool to realize their own functions.

[0133] The embodiment of the present application provides an instruction scheduling method, which first divides multiple instructions of a source program into multiple instruction sequences according to data dependencies, so that the execution relationship between the instructions can be more clearly determined; then, an analysis is performed from the perspective of the instruction sequence, and at least one characteristic information of the instruction sequence is determined through the instructions in the instruction sequence, that is, the execution relationship between the instructions is considered, and the characteristic information of the instruction sequence is determined on this basis. Compared with a solution that determines the scheduling order of instructions only from the perspective of a single instruction, this solution can more comprehensively reflect the relationship between instructions; then, the scheduling priority of the instruction sequence is calculated through the instruction scheduling requirements and the characteristic information, so that through the scheduling priority, multiple instructions can be scheduled more quickly, thereby improving the scheduling efficiency of the instructions; and different scheduling priorities determined by different instruction scheduling requirements make the scheduling order of multiple instructions different, which can be suitable for different scenario requirements.

[0134] Figure 7 is a block diagram of an instruction scheduling device provided according to an embodiment of the present application. The instruction scheduling device is used to execute the steps of the above instruction scheduling method. Figure 7 The instruction scheduling device includes: a division module 701, a first determination module 702, a second determination module 703 and a scheduling module 704.

[0135] A division module 701 is used to divide multiple instructions into multiple instruction sequences based on data dependency, and the instructions in each instruction sequence have data dependency;

[0136] A first determining module 702 is used to determine, for any instruction sequence, at least one type of feature information of the instruction sequence based on the instructions in the instruction sequence, each type of feature information is used to reflect information related to instruction scheduling from a corresponding dimension;

[0137] A second determining module 703, configured to determine a scheduling priority of the plurality of instruction sequences based on the instruction scheduling requirement and at least one characteristic information of the plurality of instruction sequences, wherein the scheduling priority is used to indicate a scheduling order of the plurality of instruction sequences;

[0138] The scheduling module 704 is used to schedule multiple instructions in the multiple instruction sequences based on the scheduling priorities of the multiple instruction sequences.

[0139] In some embodiments, Figure 8 is a block diagram of another instruction scheduling device provided according to an embodiment of the present application, see Figure 8, a division module 701 is used to sequentially obtain instructions according to the order of multiple instructions in the program flow; when there is no predecessor instruction for the instruction, a new instruction sequence is created based on the instruction, and the predecessor instruction is the instruction that the instruction depends on; when there is a predecessor instruction for the instruction, the instruction is added to the instruction sequence to which the predecessor instruction belongs, and is located after the predecessor instruction.

[0140] In some embodiments, see Figure 8 , the device further comprises:

[0141] The first processing module 705 is used to record the rewrite information of the instruction as the rewrite information of the instruction sequence to which the instruction belongs in the feature information table when there is no predecessor instruction for the instruction, the rewrite information is used to indicate the register that needs to be rewritten as indicated by the instruction, the rewrite information of the instruction sequence is a kind of feature information, and the feature information table is used to store at least one kind of feature information; when there is a predecessor instruction for the instruction, the rewrite information of the instruction sequence to which the instruction belongs in the feature information table is updated from the rewrite information of the predecessor instruction to the rewrite information of the instruction.

[0142] In some embodiments, see Figure 8 , at least one characteristic information of the instruction sequence includes at least one of the following:

[0143] The number of branch instructions in the instruction sequence. Branch instructions are used to determine whether to perform a program flow jump based on the data at the current location. Program flow refers to the execution order of multiple instructions;

[0144] The confidence of the branch instruction in the instruction sequence, the confidence is used to indicate the prediction accuracy of the branch instruction during the instruction execution process;

[0145] The number of memory-overwrite instructions in the instruction sequence;

[0146] The violation probability of the memory read instruction in the instruction sequence, the violation probability is used to indicate the probability that the memory read instruction violates the data dependency during the instruction execution;

[0147] a cache miss rate of a memory read instruction in the instruction sequence, wherein the cache miss rate is used to indicate a probability of failing to successfully obtain data of the memory read instruction from a specific cache level during the execution of the memory read instruction;

[0148] The instruction serial length of the instruction sequence, the instruction serial length is used to indicate the number of instructions executed sequentially in the instruction sequence;

[0149] The instruction parallel width of the instruction sequence, which is used to indicate the number of instructions in the instruction sequence that depend on the same instruction to write data;

[0150] The delay of the instruction sequence is used to indicate the time required to execute the instructions of the instruction sequence;

[0151] The average age of an instruction sequence. The age of an instruction sequence is equal to the average age of all instructions in the instruction sequence. The age of an instruction is used to indicate the order of multiple instructions.

[0152] In some embodiments, see Figure 8 , the first determining module 702 includes:

[0153] An acquisition unit 7021 is used to acquire at least one feature information of each instruction in any instruction sequence;

[0154] The synthesis unit 7022 is used to synthesize the characteristic information of each instruction in the instruction sequence for any kind of characteristic information to obtain the characteristic information of the instruction sequence.

[0155] In some embodiments, see Figure 8 The synthesis unit 7022 is used for, for any instruction in the instruction sequence, when there is no previous instruction for the instruction, using the characteristic information of the instruction as the characteristic information of the instruction sequence; when there is a previous instruction for the instruction, adding the characteristic information of the instruction on the basis of the characteristic information of the instruction sequence to obtain the characteristic information of the updated instruction sequence.

[0156] In some embodiments, see Figure 8 The second determination module 703 is used to obtain characteristic information related to instruction scheduling requirements from at least one characteristic information of the instruction sequence for any instruction sequence; and determine the scheduling priority of the instruction sequence based on the characteristic information related to the instruction scheduling requirements.

[0157] In some embodiments, see Figure 8 ,Each instruction sequence includes a variety of feature information;

[0158] The second determination module 703 is used to obtain, for any instruction sequence, multiple feature information related to the instruction scheduling requirements from the multiple feature information of the instruction sequence; determine the weights of the multiple feature information based on the instruction scheduling requirements and the feature information, where the weights are used to indicate the degree of correlation between the corresponding feature information and the instruction scheduling requirements; and perform weighted summation of the multiple feature information based on the weights of the multiple feature information to obtain the scheduling priority of the instruction sequence.

[0159] In some embodiments, see Figure 8The scheduling module 704 is used to determine the scheduling priorities of the instruction sequences to which the first instruction and the second instruction belong respectively, for the first instruction and the second instruction located in different instruction sequences, when both the first instruction and the second instruction meet the scheduling conditions; when the scheduling priority of the instruction sequence to which the first instruction belongs is higher than the scheduling priority of the instruction sequence to which the second instruction belongs, the first instruction is scheduled to start execution first; and during the execution of the first instruction, the second instruction is scheduled to start execution.

[0160] In some embodiments, see Figure 8 , the device further comprises:

[0161] The second processing module 706 is used to remove the characteristic information of the instruction after scheduling any instruction based on the characteristic information of the instruction sequence to which the instruction belongs.

[0162] An embodiment of the present application provides an instruction scheduling device, which first divides multiple instructions of a source program into multiple instruction sequences according to data dependencies, so that the execution relationship between the instructions can be more clearly determined; then, an analysis is performed from the perspective of the instruction sequence, and at least one characteristic information of the instruction sequence is determined through the instructions in the instruction sequence, that is, the execution relationship between the instructions is taken into consideration, and the characteristic information of the instruction sequence is determined on this basis. Compared with a solution that determines the scheduling order of instructions only from the perspective of a single instruction, this solution can more comprehensively reflect the relationship between instructions; then, the scheduling priority of the instruction sequence is calculated through the instruction scheduling requirements and the characteristic information, so that through the scheduling priority, multiple instructions can be scheduled more quickly, thereby improving the scheduling efficiency of the instructions; and different scheduling priorities determined by different instruction scheduling requirements make the scheduling order of multiple instructions different, which can be suitable for different scenario requirements.

[0163] It should be noted that the instruction scheduling device provided in the above embodiment only uses the division of the above functional modules as an example when running an application program. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the instruction scheduling device provided in the above embodiment and the instruction scheduling method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0164] In the embodiments of the present application, the computer device can be configured as a terminal or a server. When the computer device is configured as a terminal, the terminal can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. When the computer device is configured as a server, the server can be used as the execution subject to implement the technical solution provided in the embodiments of the present application. The technical solution provided in the present application can also be implemented through interaction between the terminal and the server. The embodiments of the present application are not limited to this.

[0165] Fig. 9 This is a block diagram of a terminal 900 provided according to an embodiment of the present application. The terminal 900 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer or a desktop computer. The terminal 900 may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.

[0166] Typically, the terminal 900 includes a processor 901 and a memory 902 .

[0167] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0168] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one computer program, which is used to be executed by the processor 901 to implement the instruction scheduling method provided in the method embodiment of the present application.

[0169] In some embodiments, the terminal 900 may further optionally include: a peripheral device interface 903 and at least one peripheral device. The processor 901, the memory 902 and the peripheral device interface 903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 903 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907 and a power supply 908.

[0170] The peripheral device interface 903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 901 and the memory 902. In some embodiments, the processor 901, the memory 902, and the peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 901, the memory 902, and the peripheral device interface 903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.

[0171] The radio frequency circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 904 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. In some embodiments, the radio frequency circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 904 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0172] The display screen 905 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 905 is a touch display screen, the display screen 905 also has the ability to collect touch signals on the surface or above the surface of the display screen 905. The touch signal can be input to the processor 901 as a control signal for processing. At this time, the display screen 905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 905 can be one, set on the front panel of the terminal 900; in other embodiments, the display screen 905 can be at least two, respectively set on different surfaces of the terminal 900 or in a folding design; in other embodiments, the display screen 905 can be a flexible display screen, set on the curved surface or folding surface of the terminal 900. Even, the display screen 905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 905 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).

[0173] The camera assembly 906 is used to capture images or videos. In some embodiments, the camera assembly 906 includes a front camera and a rear camera. Typically, the front camera is disposed on the front panel of the terminal, and the rear camera is disposed on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the background blur function by synthesizing the main camera and the depth of field camera, the panoramic shooting and VR (Virtual Reality) shooting function or other synthetic shooting functions by synthesizing the main camera and the wide-angle camera. In some embodiments, the camera assembly 906 may also include a flash. The flash may be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0174] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 901 for processing, or input them into the radio frequency circuit 904 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal 900. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 901 or the radio frequency circuit 904 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 907 may also include a headphone jack.

[0175] The power supply 908 is used to power various components in the terminal 900. The power supply 908 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 908 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0176] In some embodiments, the terminal 900 further includes one or more sensors 909 . The one or more sensors 909 include, but are not limited to: an acceleration sensor 910 , a gyroscope sensor 911 , a pressure sensor 912 , an optical sensor 913 , and a proximity sensor 914 .

[0177] The acceleration sensor 910 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 900. For example, the acceleration sensor 910 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 901 can control the display screen 905 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 910. The acceleration sensor 910 can also be used to collect motion data of games or users.

[0178] The gyro sensor 911 can detect the body direction and rotation angle of the terminal 900, and the gyro sensor 911 can cooperate with the acceleration sensor 910 to collect the user's 3D actions on the terminal 900. The processor 901 can implement the following functions based on the data collected by the gyro sensor 911: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0179] The pressure sensor 912 can be set on the side frame of the terminal 900 and / or the lower layer of the display screen 905. When the pressure sensor 912 is set on the side frame of the terminal 900, it can detect the user's holding signal of the terminal 900, and the processor 901 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 912. When the pressure sensor 912 is set on the lower layer of the display screen 905, the processor 901 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 905. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.

[0180] The optical sensor 913 is used to collect the ambient light intensity. In one embodiment, the processor 901 can control the display brightness of the display screen 905 according to the ambient light intensity collected by the optical sensor 913. Specifically, when the ambient light intensity is high, the display brightness of the display screen 905 is increased; when the ambient light intensity is low, the display brightness of the display screen 905 is reduced. In another embodiment, the processor 901 can also dynamically adjust the shooting parameters of the camera assembly 906 according to the ambient light intensity collected by the optical sensor 913.

[0181] The proximity sensor 914, also called a distance sensor, is usually arranged on the front panel of the terminal 900. The proximity sensor 914 is used to collect the distance between the user and the front of the terminal 900. In one embodiment, when the proximity sensor 914 detects that the distance between the user and the front of the terminal 900 is gradually decreasing, the processor 901 controls the display screen 905 to switch from the screen-on state to the screen-off state; when the proximity sensor 914 detects that the distance between the user and the front of the terminal 900 is gradually increasing, the processor 901 controls the display screen 905 to switch from the screen-off state to the screen-on state.

[0182] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.

[0183] Fig.10It is a structural diagram of a server provided according to an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1001 and one or more memories 1002, wherein the memory 1002 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 1001 to implement the instruction scheduling method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be repeated here.

[0184] The embodiment of the present application also provides a computer-readable storage medium, in which at least one computer program is stored, and the at least one computer program is loaded and executed by a processor of a computer device to implement the operation performed by the computer device in the instruction scheduling method of the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0185] The embodiment of the present application also provides a computer program product, including a computer program, which is stored in a computer-readable storage medium. The processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the instruction scheduling method provided in the above various optional implementations.

[0186] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0187] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. An instruction scheduling method, characterized in that: The method comprises: Based on the data dependency, the plurality of instructions are divided into a plurality of instruction sequences, and the instructions in each instruction sequence have the data dependency relationship; For any instruction sequence, based on the instructions in the instruction sequence, at least one feature information of the instruction sequence is determined, each feature information is used to reflect information related to instruction scheduling from a corresponding dimension; Determine scheduling priorities of the multiple instruction sequences based on instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences, wherein the scheduling priorities are used to indicate a scheduling order of the multiple instruction sequences; A plurality of instructions in the plurality of instruction sequences are scheduled based on scheduling priorities of the plurality of instruction sequences.

2. The method according to claim 1, characterized in that The method of dividing the plurality of instructions into a plurality of instruction sequences based on the data dependency relationship includes: fetching instructions sequentially according to the order of the plurality of instructions described in the program flow; In the case where there is no previous instruction for the instruction, creating a new instruction sequence based on the instruction, wherein the previous instruction is the instruction on which the instruction depends; In the case that there is a previous instruction for the instruction, the instruction is added to the instruction sequence to which the previous instruction belongs and is located after the previous instruction.

3. The method according to claim 2, characterized in that The method further comprises: In the case where there is no previous instruction for the instruction, rewriting information of the instruction is recorded in a characteristic information table as rewriting information of an instruction sequence to which the instruction belongs, wherein the rewriting information is used to indicate a register that needs to be rewritten as indicated by the instruction, the rewriting information of the instruction sequence is a kind of characteristic information, and the characteristic information table is used to store the at least one characteristic information; In the case where the instruction has a predecessor instruction, the rewrite information of the instruction sequence to which the instruction belongs in the characteristic information table is updated from the rewrite information of the predecessor instruction to the rewrite information of the instruction.

4. The method according to claim 1, characterized in that The at least one characteristic information of the instruction sequence includes at least one of the following: the number of branch instructions in the instruction sequence, the branch instructions being used to determine whether to perform a program flow jump based on data at a current position, the program flow referring to the execution order of the multiple instructions; The confidence of the branch instruction in the instruction sequence, the confidence being used to indicate the prediction accuracy of the branch instruction during the instruction execution process; the number of memory rewrite instructions in the instruction sequence; a violation probability of a memory read instruction in the instruction sequence, wherein the violation probability is used to indicate a probability that the memory read instruction violates a data dependency during instruction execution; A cache miss rate of the memory read instruction in the instruction sequence, wherein the cache miss rate is used to indicate a probability of failing to successfully obtain data of the memory read instruction from a specific cache level during the execution of the memory read instruction; The instruction serial length of the instruction sequence, wherein the instruction serial length is used to indicate the number of instructions executed sequentially in the instruction sequence; The instruction parallel width of the instruction sequence, the instruction parallel width is used to represent the number of instructions in the instruction sequence that depend on the same instruction to write data; The delay of the instruction sequence, the delay is used to indicate the time required to execute the instructions of the instruction sequence; The average age of the instruction sequence, the age of the instruction sequence is equal to the average age of all instructions in the instruction sequence, and the age of the instruction is used to indicate the order among the multiple instructions.

5. The method according to claim 1, characterized in that The step of determining, for any instruction sequence, at least one feature information of the instruction sequence based on instructions in the instruction sequence includes: For any instruction sequence, obtaining at least one feature information of each instruction in the instruction sequence; For any type of characteristic information, the characteristic information of each instruction in the instruction sequence is synthesized to obtain the characteristic information of the instruction sequence.

6. The method according to claim 5, characterized in that For any type of characteristic information, synthesizing the characteristic information of each instruction in the instruction sequence to obtain the characteristic information of the instruction sequence includes: For any instruction in the instruction sequence, when there is no previous instruction for the instruction, using the characteristic information of the instruction as the characteristic information of the instruction sequence; In the case that the instruction has a previous instruction, the characteristic information of the instruction is added to the characteristic information of the instruction sequence to obtain the updated characteristic information of the instruction sequence.

7. The method according to claim 1, characterized in that The determining the scheduling priorities of the multiple instruction sequences based on the instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences includes: For any instruction sequence, acquiring characteristic information related to the instruction scheduling requirement from at least one characteristic information of the instruction sequence; Based on the characteristic information related to the instruction scheduling requirement, a scheduling priority of the instruction sequence is determined.

8. The method according to claim 1, characterized in that Each instruction sequence includes a variety of feature information; The determining the scheduling priorities of the multiple instruction sequences based on the instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences includes: For any instruction sequence, obtaining a plurality of characteristic information related to the instruction scheduling requirement from the plurality of characteristic information of the instruction sequence; Based on the instruction scheduling requirement and the characteristic information, determining weights of the multiple characteristic information, the weights being used to indicate a degree of correlation between the corresponding characteristic information and the instruction scheduling requirement; Based on the weights of the multiple feature information, a weighted sum is performed on the multiple feature information to obtain the scheduling priority of the instruction sequence.

9. The method according to claim 1, characterized in that: The step of scheduling the plurality of instructions in the plurality of instruction sequences based on the scheduling priorities of the plurality of instruction sequences comprises: For a first instruction and a second instruction located in different instruction sequences, when both the first instruction and the second instruction meet a scheduling condition, determining the scheduling priorities of the instruction sequences to which the first instruction and the second instruction belong respectively; When the scheduling priority of the instruction sequence to which the first instruction belongs is higher than the scheduling priority of the instruction sequence to which the second instruction belongs, the first instruction is preferentially scheduled to start execution; During the execution of the first instruction, the second instruction is scheduled to start execution.

10. The method according to claim 1, characterized in that The method further comprises: After scheduling any instruction, the characteristic information of the instruction is removed based on the characteristic information of the instruction sequence to which the instruction belongs.

11. An instruction scheduling device, characterized in that: The device comprises: A partitioning module, used for partitioning a plurality of instructions into a plurality of instruction sequences based on data dependency, wherein the instructions in each instruction sequence have the data dependency relationship; A first determination module is used to determine, for any instruction sequence, at least one type of feature information of the instruction sequence based on the instructions in the instruction sequence, each type of feature information is used to reflect information related to instruction scheduling from a corresponding dimension; A second determination module, configured to determine the scheduling priorities of the multiple instruction sequences based on the instruction scheduling requirements and at least one characteristic information of the multiple instruction sequences, wherein the scheduling priorities are used to represent the scheduling order of the multiple instruction sequences; A scheduling module is used to schedule multiple instructions in the multiple instruction sequences based on the scheduling priorities of the multiple instruction sequences.

12. A computer device, characterized in that: The computer device includes a processor and a memory, the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor and executes the instruction scheduling method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and the at least one computer program is used to execute the instruction scheduling method according to any one of claims 1 to 10.

14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the instruction scheduling method according to any one of claims 1 to 10 is implemented.