Nothing Special   »   [go: up one dir, main page]

CN113312167B - Service control method and device, electronic equipment and computer readable medium - Google Patents

Service control method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113312167B
CN113312167B CN202110878555.6A CN202110878555A CN113312167B CN 113312167 B CN113312167 B CN 113312167B CN 202110878555 A CN202110878555 A CN 202110878555A CN 113312167 B CN113312167 B CN 113312167B
Authority
CN
China
Prior art keywords
executed
service
execution
time
execution time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110878555.6A
Other languages
Chinese (zh)
Other versions
CN113312167A (en
Inventor
鲁明明
林飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Power Great Wall Internetworking Safety Technology Research Institute Beijing Co ltd
Original Assignee
China Power Great Wall Internetworking Safety Technology Research Institute Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Power Great Wall Internetworking Safety Technology Research Institute Beijing Co ltd filed Critical China Power Great Wall Internetworking Safety Technology Research Institute Beijing Co ltd
Priority to CN202110878555.6A priority Critical patent/CN113312167B/en
Publication of CN113312167A publication Critical patent/CN113312167A/en
Application granted granted Critical
Publication of CN113312167B publication Critical patent/CN113312167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a service control method and device, electronic equipment and a computer readable medium, which are applied to the technical field of network shooting ranges. The method comprises the following steps: acquiring a service to be executed input by external equipment, wherein the service to be executed comprises a plurality of steps to be executed; acquiring the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed; determining an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed; and processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result. Through the execution sequence of the to-be-executed service, the steps to be executed in the to-be-executed service are sequentially controlled and executed, so that the quick jump to a certain execution step in the to-be-executed service can be realized, the execution efficiency of the to-be-executed service is improved, the execution accuracy of the to-be-executed service is ensured, and the idle occupancy rate of a disk is reduced.

Description

Service control method and device, electronic equipment and computer readable medium
Technical Field
The application relates to the technical field of network shooting ranges, in particular to a service control method and device, electronic equipment and a computer readable medium.
Background
In a network shooting range cloud platform debugging environment, when a tester uses certain applications to research certain specific services, the specific services need to be repeatedly executed for many times, or when specific steps in certain services are researched, the specific steps need to be repeatedly executed, but in an actual debugging process, the execution efficiency of the services is low.
When a jump to a specific step of the service is required, the service can be executed to the specific step by adopting a snapshot saving mode or a manual operation mode. However, the snapshot saving method needs to occupy a large amount of disk storage space; and the manual operation mode is adopted, and especially when the manual operation of a plurality of fixed point positions is required, misoperation is easily caused, so that the test result is inaccurate.
Disclosure of Invention
Therefore, the application provides a service control method and device, an electronic device, and a computer readable medium, which can improve the efficiency of service execution.
In order to achieve the above object, a first aspect of the present application provides a service control method, including: acquiring a service to be executed input by external equipment, wherein the service to be executed comprises a plurality of steps to be executed; acquiring the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed; determining an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed; and processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result.
In some implementations, the step to be executed includes an initial step to be executed and a plurality of remaining steps to be executed, and the time to be executed includes a first execution time and a second execution time; determining an execution sequence of the to-be-executed service according to the scheduled execution time and the to-be-executed time corresponding to each to-be-executed step, wherein the execution sequence comprises the following steps: acquiring a first execution time corresponding to the initial step to be executed and a second execution time corresponding to each remaining step to be executed; determining a wake-up time sequence according to the scheduled execution time, the first execution time and each second execution time, wherein the wake-up time sequence is used for waking up each remaining step to be executed; and determining an execution sequence of the service to be executed according to the wakeup time sequence and the first execution time.
In some implementations, the wake-up time sequence includes a plurality of wake-up times, the wake-up times corresponding to the remaining steps to be performed; determining a wakeup time sequence according to the scheduled execution time, the first execution time and each second execution time, wherein the determining comprises: determining the difference value of the execution time of each residual step to be executed relative to the initial step to be executed according to the first execution time and each second execution time; determining the awakening time corresponding to each remaining step to be executed according to each execution time difference value, the first execution time and the scheduled execution time; and determining a wake-up time sequence according to the respective wake-up times.
In some specific implementations, the obtaining of the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed includes: and reading the preset configuration file, and determining the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed.
In some specific implementations, processing each step to be executed according to an execution sequence of a service to be executed to obtain an execution result includes: inputting the execution sequence of the service to be executed and each step to be executed into the virtual machine, so that the virtual machine automatically executes each step to be executed according to the execution sequence of the service to be executed and generates an execution result; and obtaining the execution result fed back by the virtual machine.
In some specific implementations, before obtaining the service to be executed input by the external device, the method further includes: acquiring any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment; and determining the processing mode of the service to be executed according to any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment.
In some implementations, the device types of the external device include any one or more of a mouse, a keyboard, and a voice-activated device.
In order to achieve the above object, a second aspect of the present application provides a traffic control apparatus, including: the first acquisition module is used for acquiring a service to be executed input by external equipment, wherein the service to be executed comprises a plurality of steps to be executed; the second acquisition module is used for acquiring the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed; the execution sequence determining module is used for determining the execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed; and the service execution module is used for processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result.
In some implementations, the step to be performed includes an initial step to be performed and a plurality of remaining steps to be performed; an execution sequence determination module comprising: the execution time acquisition submodule is used for acquiring a first execution time corresponding to the initial step to be executed and a second execution time corresponding to each remaining step to be executed; a wake-up time sequence determining sub-module, configured to determine a wake-up time sequence according to the scheduled execution time, the first execution time, and each of the second execution times, where the wake-up time sequence is used to wake up each of the remaining steps to be executed; and the execution sequence determining submodule is used for determining the execution sequence of the service to be executed according to the awakening time sequence and the first execution time.
In order to achieve the above object, a third aspect of the present application provides an electronic apparatus comprising: one or more processors; a memory, on which one or more programs are stored, which, when executed by the one or more processors, cause the one or more processors to implement any one of the traffic control methods in the embodiments of the present application.
In order to achieve the above object, a fourth aspect of the present application provides a computer-readable medium storing a computer program, which when executed by a processor implements any one of the traffic control methods in the embodiments of the present application.
According to the service control method and device, the electronic device and the computer readable medium, the scheduling and adjusting of the to-be-executed time corresponding to different to-be-executed steps are realized by acquiring the to-be-executed service input by the external device, wherein the to-be-executed service comprises a plurality of to-be-executed steps, and then acquiring the scheduled execution time of the to-be-executed service and the to-be-executed time corresponding to each to-be-executed step; the method comprises the steps of determining an execution sequence of the to-be-executed service according to a scheduled execution time and to-be-executed time corresponding to each to-be-executed step, processing each to-be-executed step according to the execution sequence of the to-be-executed service to obtain an execution result, sequentially controlling and executing each to-be-executed step in the to-be-executed service through the execution sequence of the to-be-executed service, realizing fast jump to a certain execution step in the to-be-executed service, improving the execution efficiency of the to-be-executed service, ensuring the execution accuracy of the to-be-executed service, and reducing the idle occupancy rate of a disk.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the principles of the application. The above and other features and advantages will become more apparent to those skilled in the art by describing in detail exemplary embodiments with reference to the attached drawings.
In the drawings.
Fig. 1 shows a flowchart of a service control method according to an embodiment of the present application.
Fig. 2 shows a flowchart of a service control method according to a second embodiment of the present application.
Fig. 3 shows a block diagram of a service control apparatus according to a third embodiment of the present application.
Fig. 4 shows a block diagram of a service control system according to a fourth embodiment of the present application.
Fig. 5 is a flowchart illustrating a working method of a service control system according to a fifth embodiment of the present application.
Fig. 6 is a schematic diagram illustrating time difference values between service processing signaling provided in the fifth embodiment of the present application.
Fig. 7 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the service control method and apparatus provided in accordance with the sixth embodiment of the present application.
Detailed Description
The following detailed description of embodiments of the present application will be made with reference to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present application, are given by way of illustration and explanation only, and are not intended to limit the present application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
In some applications of the NCR, in order to implement some services, it is often necessary to repeatedly resume performing some steps, or to jump to some specific steps before starting to perform subsequent steps. The general method is to implement the execution or jump of the above steps by means of snapshot saving or manual operation. However, the snapshot saving method needs to occupy a large amount of disk storage space; and the manual operation mode is adopted, and especially when the manual operation of a plurality of fixed point positions is required, misoperation is easily caused, so that the test result is inaccurate.
Fig. 1 shows a flowchart of a service control method according to an embodiment of the present application. The service control method is applicable to a service control apparatus, and as shown in fig. 1, the service control method may include the following steps.
Step S101, obtaining the service to be executed input by the external equipment.
The service to be executed comprises a plurality of steps to be executed. Each step to be executed corresponds to a different execution time.
In some specific implementations, before obtaining the service to be executed input by the external device, the method further includes: acquiring any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment; and determining the processing mode of the service to be executed according to any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment.
The device type of the external device comprises any one or more of a mouse, a keyboard and a voice control device.
For example, an execution instruction of a service to be executed, which is input by any one or more of a mouse, a keyboard, and a voice control device, is obtained, and a processing mode of the service to be executed is determined by the execution instruction. The executing instructions may include: execution time (e.g., nanosecond-level time information), instruction type, and instruction data. The instruction types include: any one or more of mouse movement, mouse button, keyboard input and audio information.
For example, if the command type is a keyboard input, the corresponding command data includes a number corresponding to a key of the keyboard, and/or a state of the key (e.g., pressing the key or lifting the key). If the command type is mouse movement, the corresponding command data includes an absolute position of the mouse. If the command type is a mouse button, the corresponding command data comprises: the number of the mouse button (for example, mouse wheel, left mouse button or right mouse button, etc.) and the state of the mouse button (for example, any one or more of mouse wheel action, left mouse button lifting, right mouse button lifting, left mouse button pressing and right mouse button pressing).
And step S102, acquiring the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed.
If it is necessary to directly jump to a certain step to be executed, the time to be executed corresponding to the step to be executed and the scheduled execution time of the service to be executed (i.e., the execution time corresponding to the initial execution step of the service to be executed) need to be obtained, and then the step to be executed is determined to be executed at the corresponding time.
And step S103, determining an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed.
The execution sequence of the service to be executed comprises the execution time and the execution sequence corresponding to the plurality of steps to be executed, and each step to be executed can be executed in sequence through the execution sequence of the service to be executed, so that the service to be executed can be executed smoothly.
And step S104, processing each step to be executed according to the execution sequence of the service to be executed, and obtaining an execution result.
The execution result includes that the execution of the service to be executed is completed, or a certain step to be executed in the service to be executed needs to be executed repeatedly, and the execution result corresponding to the step to be executed is executed repeatedly.
For example, the 3 rd to 5 th to-be-executed steps in the to-be-executed service need to be repeatedly executed for 2 times, the 3 rd to 5 th to-be-executed steps can be repeatedly executed through the execution sequence of the to-be-executed service, and after the 5 th to-be-executed step is executed, the 3 rd to-be-executed step in the next period is quickly skipped to be executed according to the execution sequence of the to-be-executed service to be executed, so that the execution speed of the repeated steps is increased, and the execution efficiency of the to-be-executed step is improved.
In some specific implementations, processing each step to be executed according to an execution sequence of a service to be executed to obtain an execution result includes: inputting the execution sequence of the service to be executed and each step to be executed into the virtual machine, so that the virtual machine automatically executes each step to be executed according to the execution sequence of the service to be executed and generates an execution result; and obtaining the execution result fed back by the virtual machine.
The virtual machine can quickly and accurately execute each step to be executed in the service to be executed according to the execution sequence of the service to be executed, accelerate the processing speed of the service to be executed and simultaneously ensure the execution accuracy of the service to be executed.
In the embodiment, by acquiring a service to be executed, which includes a plurality of steps to be executed, input by an external device, and acquiring a scheduled execution time of the service to be executed and a time to be executed corresponding to each step to be executed, arrangement and adjustment of the times to be executed corresponding to different steps to be executed are realized; the method comprises the steps of determining an execution sequence of the to-be-executed service according to a scheduled execution time and to-be-executed time corresponding to each to-be-executed step, processing each to-be-executed step according to the execution sequence of the to-be-executed service to obtain an execution result, sequentially controlling and executing each to-be-executed step in the to-be-executed service through the execution sequence of the to-be-executed service, realizing fast jump to a certain execution step in the to-be-executed service, improving the execution efficiency of the to-be-executed service, ensuring the execution accuracy of the to-be-executed service, and reducing the idle occupancy rate of a disk.
Fig. 2 shows a flowchart of a service control method according to a second embodiment of the present application. The service control method can be applied to a service control device. As shown in fig. 2, the service control method includes the following steps:
step S201, a to-be-executed service input by an external device is acquired.
Step S201 in this embodiment is the same as step S101 in the first embodiment, and is not described herein again.
Step S202, obtaining the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed.
Wherein, the step to be executed includes an initial step to be executed and a plurality of remaining steps to be executed, and the time to be executed includes: a first execution time and a second execution time.
In some specific implementations, the obtaining of the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed includes: and reading the preset configuration file, and determining the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed.
The scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed can be accurately and quickly acquired by reading the preset configuration file, and the accuracy of each execution time is ensured.
Step S203, a first execution time corresponding to the initial step to be executed and a second execution time corresponding to each remaining step to be executed are obtained.
The remaining steps to be executed are other steps to be executed in the service to be executed except the initial step to be executed, for example, the service to be executed includes 5 steps to be executed, that is, the service to be executed includes the initial step to be executed and 4 remaining steps to be executed. The execution time corresponding to each step to be executed is different, and the service to be executed comprises 1 first execution time and 4 second execution times.
Step S204, determining a wake-up time sequence according to the scheduled execution time, the first execution time and each second execution time.
Wherein the wake-up time sequence is used to wake up each of the remaining steps to be executed.
For example, the scheduled execution time is
Figure 890458DEST_PATH_IMAGE001
The first execution time is
Figure 842233DEST_PATH_IMAGE002
Second execution time
Figure 642699DEST_PATH_IMAGE003
Wherein
Figure 287307DEST_PATH_IMAGE004
is an integer greater than 1. Wherein the execution time is planned
Figure 743696DEST_PATH_IMAGE001
May correspond to the first execution time being
Figure 499163DEST_PATH_IMAGE002
The same as the first execution time
Figure 91818DEST_PATH_IMAGE002
Different. Different scheduled execution times are set according to specific conditions, the awakening time corresponding to each remaining step to be executed is conveniently and flexibly acquired, and each remaining step to be executed can be smoothly completed.
In some implementations, the wake-up time sequence includes a plurality of wake-up times, the wake-up times corresponding to the remaining steps to be performed; determining a wakeup time sequence according to the scheduled execution time, the first execution time and each second execution time, wherein the determining comprises: determining the difference value of the execution time of each residual step to be executed relative to the initial step to be executed according to the first execution time and each second execution time; determining the awakening time corresponding to each remaining step to be executed according to each execution time difference value, the first execution time and the scheduled execution time; and determining a wake-up time sequence according to the respective wake-up times.
Wherein the execution time difference may be
Figure 910257DEST_PATH_IMAGE005
. The awakening time corresponding to each remaining step to be executed can be calculated and obtained through the formula (1)
Figure 853942DEST_PATH_IMAGE006
Figure 413100DEST_PATH_IMAGE007
(1)
By multiple wake-up times
Figure 125841DEST_PATH_IMAGE006
A wake-up time sequence may be determined. Through accurate awakening time sequence, the user can quickly jump to the step to be executed which needs to be executed, the execution efficiency of the step to be executed is improved, meanwhile, the user can conveniently and quickly adapt to the repeated execution requirement of the step to be executed, and the user experience is improved.
Step S205, determining an execution sequence of the service to be executed according to the wakeup time sequence and the first execution time.
Through the first execution time, the execution time of the initial step to be executed of the service to be executed can be quickly determined, and the service to be executed is started; then, the remaining steps to be executed can be conveniently and quickly skipped through the wake-up time sequence, so that various execution requirements can be met, and the processing efficiency of the service to be executed is improved.
Step S206, according to the execution sequence of the service to be executed, processing each step to be executed, and obtaining an execution result.
Step S206 in this embodiment is the same as step S104 in the first embodiment, and is not described again here.
In this embodiment, by determining the wakeup time sequence according to the scheduled execution time, the first execution time, and each second execution time, it can be determined when to wake up which specific remaining steps to be executed, which facilitates dynamic call of each remaining step to be executed; determining an execution sequence of the service to be executed according to the wake-up time sequence and the first execution time, and conveniently and quickly jumping to the rest steps to be executed according to the execution sequence of the service to be executed, so that the method is suitable for various execution requirements and accelerates the processing efficiency of the service to be executed; and processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result, so that the execution accuracy of the service to be executed is ensured, and the idle occupancy rate of the disk is reduced.
Fig. 3 shows a block diagram of a service control apparatus according to a third embodiment of the present application. As shown in fig. 3, the service control apparatus specifically includes the following modules:
a first obtaining module 301, configured to obtain a to-be-executed service input by an external device, where the to-be-executed service includes multiple to-be-executed steps; a second obtaining module 302, configured to obtain a scheduled execution time of the service to be executed and a time to be executed corresponding to each step to be executed; an execution sequence determining module 303, configured to determine an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed; the service execution module 304 is configured to process each step to be executed according to the execution sequence of the service to be executed, and obtain an execution result.
In some implementations, the step to be performed includes an initial step to be performed and a plurality of remaining steps to be performed; an execution sequence determination module 303, comprising: the execution time acquisition submodule is used for acquiring a first execution time corresponding to the initial step to be executed and a second execution time corresponding to each remaining step to be executed; a wake-up time sequence determining sub-module, configured to determine a wake-up time sequence according to the scheduled execution time, the first execution time, and each of the second execution times, where the wake-up time sequence is used to wake up each of the remaining steps to be executed; and the execution sequence determining submodule is used for determining the execution sequence of the service to be executed according to the awakening time sequence and the first execution time.
In this embodiment, a first obtaining module obtains a service to be executed, which is input by an external device and includes a plurality of steps to be executed, and a second obtaining module obtains a scheduled execution time of the service to be executed and a time to be executed corresponding to each step to be executed, so as to implement arrangement and adjustment of the time to be executed corresponding to different steps to be executed; determining an execution sequence of the service to be executed by using an execution sequence determining module according to the scheduled execution time and the time to be executed corresponding to each step to be executed; and processing each step to be executed by using the service execution module according to the execution sequence of the service to be executed to obtain an execution result. Through the execution sequence of the to-be-executed service, the steps to be executed in the to-be-executed service are sequentially controlled and executed, so that the quick jump to a certain execution step in the to-be-executed service can be realized, the execution efficiency of the to-be-executed service is improved, the execution accuracy of the to-be-executed service is ensured, and the idle occupancy rate of a disk is reduced.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, a unit that is not so closely related to solving the technical problem proposed by the present application is not introduced in the present embodiment, but it does not indicate that no other unit exists in the present embodiment.
Fig. 4 shows a block diagram of a service control system according to a fourth embodiment of the present application. As shown in fig. 4, the service control system specifically includes the following devices: a service control device 410, a mouse 420, a keyboard 430, a voice control device 440 and a virtual machine 450.
The service control device 410 is configured to obtain a service to be executed, which is input by any one or more of the mouse 420, the keyboard 430, and the voice control device 440, where the service to be executed includes a plurality of steps to be executed (e.g., a plurality of instructions to be executed). Each instruction to be executed corresponds to an instruction execution time (for example, nanosecond time information), and each instruction to be executed includes an instruction type and instruction data. The instruction types include: any one or more of mouse movement, mouse button, keyboard input and audio information.
For example, if the command type is a keyboard input, the corresponding command data includes a number corresponding to a key of the keyboard, and/or a state of the key (e.g., pressing the key or lifting the key). If the command type is mouse movement, the corresponding command data includes an absolute position of the mouse. If the command type is a mouse button, the corresponding command data comprises: the number of the mouse button (for example, mouse wheel, left mouse button or right mouse button, etc.) and the state of the mouse button (for example, any one or more of mouse wheel action, left mouse button lifting, right mouse button lifting, left mouse button pressing and right mouse button pressing).
The virtual machine 450 is configured to receive the execution sequence of the service to be executed and each step to be executed, which are input by the service control device 410, and automatically execute each step to be executed, so as to generate an execution result.
Fig. 5 is a flowchart illustrating a working method of a service control system according to a fifth embodiment of the present application. As shown in fig. 5, the operation method of the service control system includes the following steps.
In step S501, the mouse 420 sends the acquired set of first control commands input by the user to the service control device 410.
Wherein, the instructions in the first control instruction set are instructions for executing some steps to be executed of the service to be executed.
In step S502, the voice control device 440 sends the acquired set of second control instructions input by the user to the service control apparatus 410.
The second control instruction in the set of second control instructions may be an instruction corresponding to voice information input by the user through the voice control device 440, or may be an instruction obtained by reading specified audio data (e.g., a preset audio file). The above-mentioned obtaining manner of the second control instruction is only an example, and may be specifically set according to a specific implementation, and other obtaining manners of the second control instruction that are not described are also within the protection scope of the present application, and are not described herein again.
In step S503, the keyboard 430 sends the acquired set of third control commands input by the user to the service control device 410.
Wherein the instructions in the third set of control instructions are instructions for executing some to-be-executed steps of the service to be executed.
In a specific implementation, the data may be obtained by reading the instruction and the corresponding data in the configuration file, then converting the obtained data into data corresponding to the data type that can be identified by the service control device 410, and then sending the data to the service control device 410.
In step S504, the service control device 410 determines a set of service processing instructions to be executed according to the acquired set of first control instructions, the set of second control instructions, and the set of third control instructions, and arranges each service processing instruction in the set of service processing instructions to obtain an instruction arrangement sequence.
For example, fig. 6 shows a schematic diagram of time difference between service processing instructions provided in the fifth embodiment of the present application. Each service processing instruction comprises execution time, instruction type and instruction data.
As shown in fig. 6, the first service processing instruction includes an execution time 1, an instruction type 1, and instruction data 1; the second service processing instruction comprises an execution time 2, an instruction type 2 and instruction data 2; … …, respectively; the nth service processing instruction comprises execution time n, instruction type n and instruction data n, wherein n is an integer greater than or equal to 1.
Figure 846672DEST_PATH_IMAGE008
Indicating a time interval between a first service processing instruction and a second service processing instruction;
Figure 277653DEST_PATH_IMAGE002
representing a time interval between the first service processing instruction and the third service processing instruction;
Figure 374922DEST_PATH_IMAGE009
indicating the time interval between the first traffic processing instruction and the fourth traffic processing instruction.
Is calculated according to the following formula (2) to obtain
Figure 207749DEST_PATH_IMAGE010
Wakeup time for a transaction processing instruction
Figure 99482DEST_PATH_IMAGE011
Figure 17759DEST_PATH_IMAGE012
(2)
Wherein,
Figure 918719DEST_PATH_IMAGE001
represents the scheduled execution time, i.e. the execution time of the 1 st business process instruction,
Figure 340473DEST_PATH_IMAGE011
which is indicative of the time of the wake-up,
Figure 668686DEST_PATH_IMAGE011
for waking up
Figure 808681DEST_PATH_IMAGE013
An instruction for the processing of the service is provided,
Figure 513331DEST_PATH_IMAGE014
indicating a first service processing instruction and
Figure 55171DEST_PATH_IMAGE013
the time interval between the traffic processing instructions.
It should be noted that, among them, the first one is set according to the wake-up time for each
Figure 557215DEST_PATH_IMAGE010
When a transaction instruction wakes up, i.e. at wake-up time
Figure 184506DEST_PATH_IMAGE011
When it is started to execute
Figure 427268DEST_PATH_IMAGE013
And processing the instruction by the service. By calculating the obtained plurality of wake-up times by equation (2), a wake-up time sequence (i.e., an instruction arrangement sequence) can be determined. According to the wake-up timeThe inter-sequence can sequentially execute each service processing instruction in the service to be executed, and ensure the smooth execution of the service to be executed.
For example, the wakeup time sequence is input into the timer, so that each service processing instruction can be accurately awakened and executed, and the execution accuracy of the service to be executed is improved.
In step S505, the service control device 410 sends the instruction arrangement sequence to the virtual machine 450.
In step S506, the virtual machine 450 sequentially executes each service processing instruction according to the obtained instruction arrangement sequence, generates an execution result, and feeds back the execution result to the user.
Wherein, the execution result is fed back to the user, and the following method can be adopted to complete the execution: writing the execution result into the notification information, and sending the notification information to the client so that the client can show the execution result therein to the user. The user can conveniently check the execution result of the service to be executed.
In a specific implementation, when a certain service processing instruction needs to be executed first, the corresponding service processing instruction can be automatically skipped to according to the wakeup time sequence, so that the execution efficiency of the service to be executed is improved, and the execution accuracy of the service to be executed is ensured.
In this embodiment, a set of service processing instructions corresponding to a service to be executed is obtained by batch screening of control instructions input by a mouse, a keyboard and a voice control device, and then, a wakeup time corresponding to each service processing instruction is obtained by calculation, so that a certain service processing instruction to be executed can be flexibly and automatically executed according to the wakeup time, the execution efficiency of the service to be executed is improved, and the execution accuracy of the service to be executed is ensured. Meanwhile, according to the awakening time sequence determined by the awakening time, unified planning and debugging can be performed on various service processing instructions, and the execution accuracy of the service to be executed is improved.
It should be apparent that the present application is not limited to the particular configurations and processes described in the above embodiments and shown in the figures. For convenience and brevity of description, detailed description of a known method is omitted here, and for the specific working processes of the system, the module and the unit described above, reference may be made to corresponding processes in the foregoing method embodiments, which are not described herein again.
Fig. 7 is a block diagram illustrating an exemplary hardware architecture of a computing device capable of implementing the service control method and apparatus provided in accordance with the sixth embodiment of the present application.
As shown in fig. 7, computing device 700 includes an input device 701, an input interface 702, a central processor 703, a memory 704, an output interface 705, and an output device 706. The input interface 702, the central processing unit 703, the memory 704, and the output interface 705 are connected to each other via a bus 707, and the input device 701 and the output device 706 are connected to the bus 707 via the input interface 702 and the output interface 705, respectively, and further connected to other components of the computing device 700.
Specifically, the input device 701 receives input information from the outside, and transmits the input information to the central processor 703 through the input interface 702; the central processor 703 processes input information based on computer-executable instructions stored in the memory 704 to generate output information, stores the output information temporarily or permanently in the memory 704, and then transmits the output information to the output device 706 through the output interface 705; the output device 706 outputs output information external to the computing device 700 for use by a user.
In one embodiment, the computing device shown in fig. 7 may be implemented as an electronic device that may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to perform the service control method described in the above embodiments.
In one embodiment, the computing device shown in fig. 7 may be implemented as a traffic control system that may include: a memory configured to store a program; a processor configured to execute the program stored in the memory to perform the service control method described in the above embodiments.
The above description is only an exemplary embodiment of the present application and is not intended to limit the scope of the present application. In general, the various embodiments of the application may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the application is not limited thereto.
Embodiments of the application may be implemented by a data processor of a mobile device executing computer program instructions, for example in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.
Any logic flow block diagrams in the figures of this application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program may be stored on a memory. The memory may be of any type suitable to the local technical environment and may be implemented using any suitable data storage technology, such as, but not limited to, Read Only Memory (ROM), Random Access Memory (RAM), optical storage devices and systems (digital versatile disks, DVDs, or CD discs), etc. The computer readable medium may include a non-transitory storage medium. The data processor may be of any type suitable to the local technical environment, such as but not limited to general purpose computers, special purpose computers, microprocessors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), programmable logic devices (FGPAs), and processors based on a multi-core processor architecture.
It is to be understood that the above embodiments are merely exemplary embodiments that are employed to illustrate the principles of the present application, and that the present application is not limited thereto. It will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the application, and these changes and modifications are to be considered as the scope of the application.

Claims (9)

1. A method for traffic control, the method comprising:
acquiring a service to be executed input by external equipment, wherein the service to be executed comprises a plurality of steps to be executed;
acquiring the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed;
determining an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed;
processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result;
the step to be executed comprises an initial step to be executed and a plurality of remaining steps to be executed, and the time to be executed comprises: a first execution time and a second execution time;
determining an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed, including:
acquiring the first execution time corresponding to the initial step to be executed and the second execution time corresponding to each of the remaining steps to be executed;
determining a wake-up time sequence according to the scheduled execution time, the first execution time and each second execution time, wherein the wake-up time sequence is used for waking up each remaining step to be executed;
and determining the execution sequence of the service to be executed according to the awakening time sequence and the first execution time.
2. The method of claim 1, wherein the sequence of wake-up times includes a plurality of wake-up times, the wake-up times corresponding to the remaining steps to be performed;
determining a wakeup time sequence according to the scheduled execution time, the first execution time, and each of the second execution times, including:
determining an execution time difference value of each remaining step to be executed relative to the initial step to be executed according to the first execution time and each second execution time;
determining the awakening time corresponding to each of the remaining steps to be executed according to each of the execution time difference, the first execution time and the scheduled execution time;
and determining the wake-up time sequence according to the wake-up time.
3. The method according to claim 1, wherein the obtaining of the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed comprises:
and reading a preset configuration file, and determining the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed.
4. The method according to claim 1, wherein the processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result comprises:
inputting the execution sequence of the service to be executed and each step to be executed into a virtual machine, so that the virtual machine automatically executes each step to be executed according to the execution sequence of the service to be executed and generates an execution result;
and acquiring the execution result fed back by the virtual machine.
5. The method according to any one of claims 1 to 4, wherein before the obtaining the service to be executed input by the external device, the method further comprises:
acquiring any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment;
and determining the processing mode of the service to be executed according to any one or more of the equipment type of the external equipment, the control mode of the external equipment and the control state of the external equipment.
6. The method according to claim 5, wherein the device type of the external device comprises any one or more of a mouse, a keyboard and a voice control device.
7. A traffic control device, characterized in that it comprises:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a service to be executed input by external equipment, and the service to be executed comprises a plurality of steps to be executed;
the second obtaining module is used for obtaining the scheduled execution time of the service to be executed and the execution time to be executed corresponding to each step to be executed;
an execution sequence determining module, configured to determine an execution sequence of the service to be executed according to the scheduled execution time and the time to be executed corresponding to each step to be executed;
the service execution module is used for processing each step to be executed according to the execution sequence of the service to be executed to obtain an execution result;
the steps to be executed comprise an initial step to be executed and a plurality of remaining steps to be executed;
the execution sequence determination module includes:
the execution time acquisition submodule is used for acquiring a first execution time corresponding to the initial step to be executed and a second execution time corresponding to each remaining step to be executed;
a wake-up time sequence determining sub-module, configured to determine a wake-up time sequence according to the scheduled execution time, the first execution time, and each of the second execution times, where the wake-up time sequence is used to wake up each of the remaining steps to be executed;
and the execution sequence determining submodule is used for determining the execution sequence of the service to be executed according to the awakening time sequence and the first execution time.
8. An electronic device, comprising:
one or more processors;
storage means having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the traffic control method according to any of claims 1 to 6.
9. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out a traffic control method according to any one of claims 1 to 6.
CN202110878555.6A 2021-08-02 2021-08-02 Service control method and device, electronic equipment and computer readable medium Active CN113312167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110878555.6A CN113312167B (en) 2021-08-02 2021-08-02 Service control method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110878555.6A CN113312167B (en) 2021-08-02 2021-08-02 Service control method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN113312167A CN113312167A (en) 2021-08-27
CN113312167B true CN113312167B (en) 2021-12-10

Family

ID=77382414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110878555.6A Active CN113312167B (en) 2021-08-02 2021-08-02 Service control method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113312167B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126354A (en) * 2016-06-21 2016-11-16 中国建设银行股份有限公司 A kind of asynchronous batch processing method and system
CN110543354A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Task scheduling method, device, equipment and storage medium
CN110968405A (en) * 2018-09-30 2020-04-07 杭州海康威视系统技术有限公司 Method and device for detecting planned tasks
CN111190708A (en) * 2019-11-19 2020-05-22 厦门二五八网络科技集团股份有限公司 Method and device for automatically scheduling tasks
CN111367629A (en) * 2020-03-30 2020-07-03 绿盟科技集团股份有限公司 Delayed task processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10078520B1 (en) * 2017-03-16 2018-09-18 Flexera Software Llc Calculating wait time for batch scheduler jobs

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126354A (en) * 2016-06-21 2016-11-16 中国建设银行股份有限公司 A kind of asynchronous batch processing method and system
CN110968405A (en) * 2018-09-30 2020-04-07 杭州海康威视系统技术有限公司 Method and device for detecting planned tasks
CN110543354A (en) * 2019-09-05 2019-12-06 腾讯科技(深圳)有限公司 Task scheduling method, device, equipment and storage medium
CN111190708A (en) * 2019-11-19 2020-05-22 厦门二五八网络科技集团股份有限公司 Method and device for automatically scheduling tasks
CN111367629A (en) * 2020-03-30 2020-07-03 绿盟科技集团股份有限公司 Delayed task processing method and device

Also Published As

Publication number Publication date
CN113312167A (en) 2021-08-27

Similar Documents

Publication Publication Date Title
CN107944773A (en) Business process control method, device and storage medium
CN109104327B (en) Service log generation method, device and equipment
US8972975B1 (en) Bounded installation time optimization of applications
WO2020063686A1 (en) Thermal load prediction method and apparatus, readable medium, and electronic device
CN110515871B (en) Interrupt method, interrupt device, FPGA (field programmable Gate array) and storage medium
US20210247987A1 (en) Algorithm program loading method and related apparatus
CN109117141B (en) Method, device, electronic equipment and computer readable storage medium for simplifying programming
CN108205469B (en) MapReduce-based resource allocation method and server
CN110297955B (en) Information query method, device, equipment and medium
CN104035747A (en) Method and device for parallel computing
US20200012250A1 (en) Program editing device, program editing method, and computer readable medium
CN114168114A (en) Operator registration method, device and equipment
CN113342671B (en) Method, device, electronic equipment and medium for verifying operation module
CN113312167B (en) Service control method and device, electronic equipment and computer readable medium
CN109271180B (en) Data processing method and device
CN111124634A (en) Training method and device, electronic equipment and storage medium
KR101674324B1 (en) Task scheduling device and method for real-time control applications
JP4870956B2 (en) Embedded program generation method, embedded program development system, and information table section
US9058207B2 (en) Simulation apparatus, method, and computer-readable recording medium
CN110825502A (en) Neural network processor and task scheduling method for neural network processor
EP4024286A1 (en) Computing method and apparatus for convolutional neural network model
JP2008090699A (en) Method, apparatus and program of trace logging
CN112988145A (en) Method for generating aeroengine software architecture and aeroengine control device
CN112148470A (en) Parameter synchronization method, computer device and readable storage medium
JP6473023B2 (en) Performance evaluation module and semiconductor integrated circuit incorporating the same

Legal Events

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