CN112035239B - Task scheduling method, device, terminal equipment and storage medium - Google Patents
Task scheduling method, device, terminal equipment and storage medium Download PDFInfo
- Publication number
- CN112035239B CN112035239B CN202011026891.XA CN202011026891A CN112035239B CN 112035239 B CN112035239 B CN 112035239B CN 202011026891 A CN202011026891 A CN 202011026891A CN 112035239 B CN112035239 B CN 112035239B
- Authority
- CN
- China
- Prior art keywords
- usb
- information
- usb device
- control platform
- unique identification
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 167
- 230000008569 process Effects 0.000 claims abstract description 125
- 238000012545 processing Methods 0.000 claims abstract description 35
- 238000004891 communication Methods 0.000 claims abstract description 19
- 230000002159 abnormal effect Effects 0.000 claims description 29
- 238000012544 monitoring process Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 16
- 238000013507 mapping Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 6
- 101150093676 HUB2 gene Proteins 0.000 description 5
- 101000785712 Homo sapiens Zinc finger protein 282 Proteins 0.000 description 4
- 102100026417 Zinc finger protein 282 Human genes 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 101100004933 Arabidopsis thaliana CYP79F1 gene Proteins 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling 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)
- Information Transfer Systems (AREA)
Abstract
The application is suitable for the technical field of computers, and provides a task scheduling method, a task scheduling device, terminal equipment and a storage medium. The task scheduling method is applied to a main control platform of a task scheduling system, the task scheduling system comprises the main control platform and USB equipment connected to the main control platform, and the method comprises the following steps: acquiring interface information of a main control platform and connection information of the USB equipment to the main control platform, and processing the interface information and the connection information to obtain unique identification information of the USB equipment; and carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the business process. The embodiment of the application can accurately schedule the tasks of the USB equipment.
Description
Technical Field
The present application belongs to the field of computer technology, and in particular, relates to a task scheduling method, a device, a terminal device, and a storage medium.
Background
With the development of big data technology, there is a need to implement edge computing and server acceleration operation through multiple universal serial bus (Universal Serial Bus, USB) devices. However, the existing USB devices do not have unique identification codes, so that in a multi-USB device scenario, each USB device cannot be accurately identified and distinguished, and task scheduling cannot be accurately performed on each USB device.
Disclosure of Invention
In view of this, the embodiments of the present application provide a task scheduling method, apparatus, terminal device, and storage medium, so as to solve the problem in the prior art how to accurately schedule tasks for USB devices.
A first aspect of an embodiment of the present application provides a task scheduling method, where the method is applied to a master control platform of a task scheduling system, the task scheduling system includes the master control platform and a universal serial bus USB device connected to the master control platform, and the task scheduling method includes:
acquiring interface information of a main control platform and connection information of the USB equipment to the main control platform, and processing the interface information and the connection information to obtain unique identification information of the USB equipment;
and carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the business process.
A second aspect of an embodiment of the present application provides a task scheduling device, including:
the unique identification information determining unit is used for acquiring interface information of the main control platform and connection information of the USB equipment accessed to the main control platform and processing the interface information and the connection information to obtain unique identification information of the USB equipment;
And the scheduling unit is used for carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the business process.
A third aspect of an embodiment of the present application provides a terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, which when executed by the processor causes the terminal device to implement the steps of the task scheduling method as in the first aspect.
A fourth aspect of the embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, causes a terminal device to implement the steps of the task scheduling method as in the first aspect.
A fifth aspect of the embodiments of the present application provides a computer program product for causing a terminal device to carry out the steps of the task scheduling method as the first aspect when the computer program product is run on the terminal device.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the embodiment of the application, in the task scheduling system, the access position of each USB device can be uniquely described according to the interface information of the main control platform accessed by the USB device and the connection information of each USB device accessed to the main control platform, so that the unique identification information of each USB device can be calculated according to the two information, the main control platform can schedule the tasks of the USB device for processing the corresponding service processes according to the unique identification information of the USB device, and the accuracy of task scheduling of the USB device can be ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a first task scheduling system according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a second task scheduling system according to an embodiment of the present application.
Fig. 3 is a schematic diagram of a third task scheduling system according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a fourth task scheduling system according to an embodiment of the present application.
Fig. 5 is a schematic flow chart of an implementation of a task scheduling method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a target scheduling mode provided by an embodiment of the present application;
fig. 7 is a schematic structural diagram of a master control platform according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a task scheduling device according to an embodiment of the present application;
fig. 9 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to illustrate the technical scheme of the application, the following description is made by specific examples.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In addition, in the description of the present application, the terms "first," "second," "third," etc. are used merely to distinguish between descriptions and should not be construed as indicating or implying relative importance.
Currently, USB devices typically use Vendor ID (VID) and Product ID (PID) as device identifications of the USB devices. Wherein the VID is applied by the provider to the application forum (IMPLEMENTERS FORUM, USB-IF) and the PID is at the discretion of the provider. However, the VID and PID of each USB device are not unique, and the VID and PID of different USB devices in the same batch produced by the same vendor may be the same, so in the task scheduling system that invokes the USB device to perform the acceleration operation, each USB device cannot be accurately distinguished, and thus, task scheduling cannot be accurately performed on each USB device. In order to solve the technical problem, the application provides a task scheduling method, a device, a terminal device and a storage medium, wherein a main control platform obtains unique identification information of a USB device by obtaining interface information of the main control platform and connection information of the USB device to the main control platform and processing the interface information, so that the main control platform can schedule the USB device to process tasks of corresponding service processes according to the unique identification information of the USB device, and therefore, the accuracy of task scheduling of the USB device can be ensured.
Embodiment one:
The execution main body of the task scheduling method in the embodiment of the application is a main control platform of a task scheduling system. Specifically, the task scheduling system comprises a main control platform and USB equipment connected with the main control platform. The main control platform can be an embedded platform (such as a singlechip), a server or terminal equipment such as a personal computer, a notebook computer and the like; the USB device is provided with a USB interface and a processor, and has an operation capability, for example, the USB device can be an artificial intelligence (ARTIFICIAL INTELLIGENCE) processor module with the USB interface. Optionally, in the task scheduling system, if the main control platform carries a USB interface, the USB device may directly access the USB interface of the main control platform, as shown in fig. 1; the USB interface of the host platform may also be indirectly accessed through a HUB (HUB), as shown in fig. 2. Optionally, if the main control platform carries a PCIE board card of a high-speed serial computer expansion bus standard (PERIPHERAL COMPONENT INTERCONNECT EXPRESS, PCIE), the USB device may access the PCIE board card of the main control platform through a PCIE-to-USB interface, as shown in fig. 3. Optionally, the manner of accessing the USB device to the master control platform may also be a combination of any two or more access manners as shown in fig. 1 to 3, as shown in fig. 4.
The flow chart of the task scheduling method in the embodiment of the application is shown in fig. 5, and is described in detail as follows:
In S501, interface information of the master control platform and connection information of the USB device to the master control platform are obtained and processed, so as to obtain unique identification information of the USB device.
In the embodiment of the application, when the main control platform detects that one or more USB devices are accessed, the interface information of the main control platform and the connection information of each USB device accessed to the main control platform are obtained and processed to obtain the unique identification information corresponding to each USB device, and the unique identification information is used as the unique identification of the follow-up USB device participating in task scheduling in the main control platform. The USB device comprises a main control platform, a USB device and a USB interface, wherein the main control platform is provided with unique interface information for each interface which can be accessed by the USB device; and for a single interface, the connection line of each USB device connected to the interface is unique, namely, the connection information when connected to one interface is unique, so that the position of the connection line when each USB device is connected to the main control platform can be uniquely described according to the interface information of the main control platform and the connection information when the USB device is connected to the interface, namely, the unique identification information of each USB device can be obtained according to the combination of the interface information of the main control platform and the connection information when the USB device is connected to the interface.
Optionally, the interface information of the master control platform includes USB bus number information corresponding to a USB interface of the master control platform, and the connection information of the USB device to the master control platform includes port information of a hub through which the USB device accesses the master control platform.
When the interface of the USB device accessing the host platform is specifically a USB interface of the host platform (for example, as shown in fig. 1 or fig. 2), the interface information of the host platform is specifically information of a USB BUS number (may be referred to as a USB BUS number) corresponding to the USB interface of the host platform, and the connection information is specifically information of a port of a HUB through which the USB device accesses the host platform. The main control platform is unique in USB bus number information set for each USB interface and used for uniquely identifying each USB interface; and for a hub connected to the USB interface, port information (e.g., port number) of each port of the hub is unique; therefore, the information obtained by combining the USB bus number information and the port information of the hub can be used as unique identification information of the USB device. Alternatively, when the USB device is uniquely connected to the USB interface of the host platform directly without passing through the HUB, the port information may be set to a default field (e.g., "Origin", "NULL", etc.) for indicating "direct connection". Optionally, the USB device establishes connection with the USB interface after cascading more than one HUB, and the port information of the passing HUB includes port information of each stage HUB (the port information of the stage HUB may be stored in a field of one byte, respectively), and since each port information of each stage HUB is unique, the unique identification information of the USB device can be determined uniquely. For example, for the USB device a in fig. 4, if the connection between the host platform and the USB device a passes through the first-stage HUB1 and the second-stage HUB2, and if the second-stage HUB2 is connected to the 9 th port of the first-stage HUB1, the determined port information of the first-stage HUB1 corresponding to the USB device a is "09" or "HUB1_09"; in the second-stage connection, the USB device a is specifically connected to the first port of the second-stage HUB2, and then the determined port information of the second-stage HUB2 corresponding to the USB device a is "01" or "HUB2_01", and then the port information of the first-stage HUB is combined with the port information of the second-stage HUB, so that the final corresponding port information of the USB device a is "0901" (one byte represents the port information of the first-stage HUB) or "HUB1_09_hub2_01_" (each stage HUB is identified by HUB1, HUB2, etc.).
Optionally, the interface information of the master control platform includes PCIE board information of the master control platform, and the connection information of the USB device to the master control platform includes port information of a PCIE to USB module through which the USB device accesses the master control platform.
When the interface of the USB device accessing the main control platform is specifically a PCIE board card of the main control platform (for example, as shown in fig. 3), the interface information of the main control platform is specifically PCIE board card information of the main control platform, and the connection information is specifically port information of a PCIE-to-USB module through which the USB device accesses the main control platform. The PCIE board card information corresponding to each PCIE board card of the main control platform is used for uniquely identifying each PCIE board card; in addition, each PCIE is uniquely connected to a PCIE to USB module, and for a PCIE to USB module, port information (for example, a port number) of each port of the PCIE to USB module is unique; therefore, the information obtained by combining the PCIE board information of the main control platform and the port information of the PCIE-to-USB module can be used as the unique identification information of the USB device.
Optionally, in step S501, the acquired interface information of the main control platform and connection information of the USB device accessing the main control platform may be directly spliced and combined, and the field (referred to as a first unique identification field KEY) obtained by the splicing and combining may be used as the unique identification information of the USB device.
For example, in the task scheduling system shown in fig. 1, the interface identification information of the master platform is a USB BUS number, and since the USB device is directly connected to the master platform (i.e. directly connected to the USB interface of the USB device), a preset field (e.g. an "Origin", "NULL", etc.) for indicating "direct connection" may be used as the current connection information. And splicing the USB BUS number with the preset connection information to obtain a first unique identification field KEY. For example, let the USB BUS number corresponding to the USB interface to which the USB device in fig. 1 is connected be BUS1, and the preset field for indicating direct connection be "Origin", then the first unique identification field KEY obtained by splicing be "BUS1Origin".
In an exemplary task scheduling system as shown in fig. 2, the interface identification information of the main control platform is a USB BUS number, the connection information is port information of a HUB through which the USB device accesses the main control platform, and the USB BUS number and the port information of the HUB are spliced to obtain the first unique identification field KEY. For example, let the USB BUS number corresponding to the USB interface accessed by the USB device in fig. 2 be BUS2, and the port information of the USB passing through the HUB be HUB1_01, then the first unique identification field KEY obtained by splicing is "BUS2HUB1_01"
In an exemplary task scheduling system as shown in fig. 3, the interface identification information of the main control platform is PCIE board information, the connection information is port information of the USB device connected to the PCIE-USB module, and the PCIE board information and the port information of the PCIE-USB module are spliced to obtain the first unique identification field KEY. For example, let PCIE board information corresponding to a PCIE board to which one USB device in fig. 3 is connected be SLOT1, and port information pcie_usb_01 of a PCIE to USB module is connected, then the spliced first unique identification field KEY is "SLOT1pcie_usb_01".
Further, the spliced first unique identification field KEY may be mapped to a preset second unique identification field with a shorter field length, and the second unique identification field is used as the unique identification information of the USB device. At this time, in step S501, interface information of the master control platform and connection information of the USB device to the master control platform are obtained and processed to obtain unique identification information of the USB device, which specifically includes:
acquiring interface information of the main control platform and connection information of the USB equipment to the main control platform, and combining the interface information and the connection information to obtain a first unique identification field of each USB equipment;
Mapping the first unique identification fields of each USB device into preset second unique identification fields one by one, and taking each second unique identification field as the unique identification information of each USB device, wherein the length of the second unique identification field is smaller than that of the first unique identification field.
For example, a master control platform is provided for 20 USB devices to connect, and the master control platform presets 20 different second unique identification fields ID, where the 20 second unique identification fields ID are specifically numbers 1-20; if the obtained first unique identification field KEY value is determined to be 'USB 102', selecting a second unique identification field ID (for example, 2) corresponding to the first unique identification field KEY value from 20 preset different second unique identification field IDs, binding and storing a second unique identification field ID '2' corresponding to the first unique identification field KEY value 'USB 102', realizing the unique mapping of the first unique identification field KEY and the second unique identification field, and taking the second unique identification field ID '2' as the unique identification information of the USB device in the task scheduling process of the master control platform.
In the embodiment of the application, because the field length of the first unique identification field uniquely determined according to the interface information of the master control platform and the connection information of the USB device is considered to be longer, the first unique identification field with longer field length is uniquely mapped into the second unique identification field with shorter preset field length, and the second unique identification field is used as the unique identification information of the USB device, the representation of the unique identification information of the USB device can be simplified, and the information identification during the subsequent scheduling of the USB device according to the unique identification information is facilitated.
Optionally, step S501 includes:
If the USB equipment is detected to be connected to the main control platform, acquiring a provider identification code VID and/or a product identification code PID of the USB equipment;
If the VID of the USB device accords with the preset VID information and/or the PID of the USB device accords with the preset PID information, judging that the USB device is legal; and acquiring interface information of the main control platform and judging legal connection information of the USB equipment to the main control platform, and processing the connection information to obtain unique identification information of the USB equipment.
In the embodiment of the application, the VID information and the PID information are device identification information carried in the USB device, and for the USB device, the VID information and the PID information can not be used for uniquely identifying the USB device, but can be used for identifying the supplier information and the product batch information of the USB device. The main control platform stores preset VID information and/or preset PID information as white list information for limiting the USB devices capable of participating in task scheduling of the main control platform.
When the master control platform detects that the USB device is accessed, VID and/or PID information of the USB device is read first. And then comparing the read VID with preset VID information and/or comparing the read PID with the preset VID information, if the read VID is matched with the preset VID information, indicating that the currently accessed USB device is matched with the white list information set by the main control platform, and judging that the USB device is legal. And after judging legal, obtaining the unique identification information of the USB equipment according to the interface information of the main control platform and the connection information of the USB equipment which is judged legal and accessed to the main control platform. And for the illegal USB equipment, the unique identification information is not determined, so that the illegal USB equipment cannot participate in task scheduling of a subsequent main control platform.
In the embodiment of the application, when the USB device accessed to the main control platform is detected, whether the USB device is a legal USB device which allows the task scheduling of the main control platform is judged according to the VID and/or PID information of the USB device, and after judging legal, the unique identification information of the USB device is determined, so that the illegal USB device can be prevented from participating in the task scheduling of the main control platform, and the safety of the task scheduling can be improved.
In S502, data communication is performed with the USB device according to the unique identification information of the USB device, so as to invoke a task of the USB device to process a service process.
In the embodiment of the application, after the unique identification information is determined for the USB device accessed to the main control platform, the main control platform can accurately distinguish each USB device according to the unique identification information of the USB device, and accurately communicate data with the corresponding USB device through the unique identification information, thereby accurately calling the USB device to process the task of the appointed business process. Optionally, in the embodiment of the present application, after determining the unique identification information of the USB device accessing to the master control platform, if it is detected that the current master control platform has an running service process, the corresponding USB device is directly indicated to process the task of the running service process according to the unique identification information of the USB device. Optionally, after determining the unique identification information of the USB device accessing to the master control platform, if it is detected that the current master control platform does not have a running service process, waiting first, after detecting that the service process is started, allocating the USB device to the service process just started according to the unique identification information of the USB device, and subsequently invoking the USB device to process the task of the service process.
Optionally, the number of service processes in the embodiment of the present application is more than one, and correspondingly, step S502 includes:
Acquiring an allocation instruction, and respectively allocating unique identification information of at least one USB device to each service process;
and indicating each service process to perform data communication with the corresponding USB device according to the unique identification information of the USB device respectively allocated to the service process so as to call the corresponding USB device to process the task of the service process.
In the embodiment of the application, the main control platform can simultaneously support the operation of a plurality of business processes. When the unique identification information of each USB device is determined, and a plurality of service processes in an operating state are detected, an allocation instruction input by a user or an allocation instruction automatically generated by a device configuration management module storing device configuration management information in a main control platform can be acquired, and the unique identification information of one or more USB devices is selected for each service process. And then, each business process performs data communication with the corresponding USB device according to the unique identification information of the allocated USB device, so as to call the corresponding USB device to process the task of the business process.
In the embodiment of the application, when a plurality of service processes exist, corresponding USB devices can be accurately allocated to each service process according to the allocation instruction and the unique identification information of the USB devices, so that each service process can accurately call each USB device through the unique identification information of the USB device, and the task processing efficiency of each service process is improved.
Optionally, if the number of service processes operated by the master control platform is more than one and the number of USB devices is also more than one, an allocation instruction may be obtained, and corresponding USB devices are allocated to each service process according to unique identification information of the USB devices.
Optionally, after step S501, the method further includes:
a1: configuring thread information of each USB device according to the unique identification information of each USB device and the operation capability of the main control platform to obtain device configuration management information, wherein the device configuration management information comprises the unique identification information of each USB and corresponding thread information;
correspondingly, step S502 includes:
a2: if the service process in the running state is detected, outputting unique identification information of each USB device connected with the main control platform according to the device configuration management information;
A3: acquiring a selection instruction, selecting unique identification information of at least one USB device from the output unique identification information of each USB device according to the selection instruction, and determining a USB device corresponding to the unique identification information of the at least one USB device as a target USB device corresponding to the business process;
A4: determining thread information corresponding to each target USB device according to the unique identification information of the target USB device and the device configuration management information;
A5: registering each target USB device into a thread resource corresponding to the service process according to the thread information corresponding to each target USB device to obtain a target scheduling mode corresponding to the service process;
A6: and operating the business process according to the target scheduling mode, so that the business process performs data communication with the target USB equipment corresponding to the unique identification information of the target USB equipment according to the corresponding thread resource, and the task of the target USB equipment for processing the business process is called.
In the embodiment of the application, the number of the USB devices accessed to the main control platform is more than one. In step A1, after the unique identification information of the USB device is determined, the thread information of each USB device may be configured according to the unique identification information of each USB device and the operational capability of the current master control platform, to obtain device configuration management information. The device configuration management information includes unique identification information of each USB device and corresponding thread information, where the thread information may specifically be a thread number, and is used to identify under which thread the USB device operates. Through the thread information, grouping of USB devices can be achieved, namely USB devices with the same thread number are a group of USB devices, and the same group of USB devices can run under the same thread. Specifically, the step A1 may include:
Determining the number of target threads according to the type of the main control platform and/or the residual operation resource quantity;
And configuring the thread information of each USB device according to the unique identification information of each USB device and the target thread number to obtain device configuration management information.
In the embodiment of the application, the target thread number is the thread number which can support simultaneous operation and is determined by the main control platform according to the current operation capability, and the current operation capability of the main control platform can be determined by the type of the main control platform and/or the residual operation resource amount. When the device configuration management module detects that the type of the current main control platform is an embedded type (such as an ARM platform) and/or detects that the residual operation resource amount is smaller than a preset threshold value, the device configuration management module determines that the operation capability of the current main control platform is weaker and can support fewer thread resources which are opened simultaneously, so that the target thread amount is determined to be a first preset amount with smaller value. When the device configuration management module detects that the type of the current main control platform is the server type and/or detects that the residual operation resource amount is greater than or equal to a preset threshold value, the device configuration management module determines that the operation capability of the current main control platform is stronger and more thread resources which are simultaneously opened can be supported, so that the target thread amount is determined to be a second preset amount with a larger value, and the second preset amount is greater than the first preset amount.
After the number of the target threads is determined, the thread information of the USB device is configured according to the number of the target threads. For example, if the number of target threads is 10, only 10 thread numbers can be set, and the thread information of the USB device can only one of the 10 thread numbers, thereby limiting the number of threads that are started when the USB device is scheduled after the host platform.
In the embodiment of the application, the current operation capability of the main control platform can be accurately measured according to the type of the main control platform and the residual operation resource quantity, the supported target thread quantity is determined, and the thread information of each USB device is configured according to the target thread quantity, so that the main control platform can reasonably start the thread according to the thread information, and the situation of thread start failure caused by limited operation capability of the main control platform is avoided.
In step A2, after determining the unique identification information of each USB device and configuring the thread information of each USB device, when detecting a service process in an operating state, specifically, a service process that has been executed before each USB device is configured or a service process that has just been started to be executed after each USB device is configured, according to the device configuration management information configured in step A1, the unique identification number information of the USB device that has been currently accessed to the main control platform is output, for example, output to a user interface for display.
In step A3, the selection instruction is an instruction for selecting a USB device by a user on an operation interface of a business process according to the output unique identification information of the USB device. The main control platform obtains the selection instruction, selects the unique identification information of at least one USB device from the unique identification information of each USB device according to the selection instruction, and determines that the USB device corresponding to the unique identification information of the at least one USB device is the target USB device selected by the current user and used for running the business process.
In step A4, according to the unique identification information of each target USB device selected by the user, the thread information corresponding to each target USB device stored corresponding to the unique identification information is searched from the configured device configuration management information.
In step A5, according to the determined thread information corresponding to each target USB device, a thread is created and the target USB device is added to the corresponding thread to operate, so that each target USB device is registered in the thread resource corresponding to the current service process, and the target scheduling mode corresponding to the service process is obtained. When registering thread resources for each target USB device, judging whether a thread conforming to the thread information is created by a main control platform according to the thread information, if so, directly adding the target device into the created thread conforming to the thread information for operation; if not, creating a thread running the USB device according to the thread information.
In step A6, after corresponding thread resources are registered for each target USB device according to the thread information, the service process is operated according to the target scheduling mode obtained by registration, so that the service process performs data communication with each target USB device according to the unique identification information of each target USB device and the corresponding thread resources, thereby implementing the task of calling the target USB device to process the service process.
In the embodiment of the application, after the unique identification information of each USB device is determined, the thread information of each USB device can be configured according to the operation capability of the current main control platform and the corresponding device configuration management information is generated, so that when the service process is operated subsequently, the corresponding target USB device can be selected according to the device configuration management information to process the service process, the corresponding thread resources can be reasonably allocated for each target USB device, and the flexibility and the efficiency of dispatching the USB device are improved.
Optionally, in the step A5, the configured target scheduling mode corresponding to the service process may include a first scheduling mode, a second scheduling mode, a third scheduling mode, and a fourth scheduling mode, where the first scheduling mode includes a single thread, and the single thread is used to run a single USB device; the second scheduling mode includes a single thread, and the single thread is used to run at least two USB devices; the third scheduling mode includes at least two threads, and each thread is used to run a single USB device; the fourth scheduling mode includes at least two threads, and there are threads for running at least two USB devices in the at least two threads.
In the embodiment of the present application, after selecting each corresponding target USB device for each service process and registering a corresponding thread resource, any one of a first scheduling mode, a second scheduling mode, a third scheduling mode, and a fourth scheduling mode as shown in fig. 6 may be obtained as a target scheduling mode. Specifically, when the user selects the USB device, the device configuration management module may output and display a schematic diagram of four scheduling modes shown in fig. 6 to the user interface, and prompt the USB device that is selectable in each scheduling mode, so that the user may flexibly select one of the scheduling modes as the current target scheduling mode according to the current operation requirement of the service process, and improve flexibility of task scheduling. Specifically, the operation resources required to be occupied by the first to fourth scheduling modes gradually increase, and the user can select a corresponding scheduling mode according to the remaining operation resources of the current main control platform and the operation amount of the task to be processed.
Optionally, after the step A6, the method further includes:
if the updated USB equipment is detected to exist, determining thread information corresponding to the updated USB equipment according to the unique identification information and equipment configuration management information of the updated USB equipment, and recovering the updated USB equipment to the thread resource of the business process according to the thread information; the updated USB device is a target USB device which is accessed to the main control platform again after the disconnection or a target USB device after the reset.
In the embodiment of the application, after the business process is operated according to the target scheduling mode to realize the scheduling processing task of the target USB device, a USB device state monitoring thread can be established to monitor the states of all the operated target USB devices. When it is detected that an updated USB device exists, for example, a target USB device of the main control platform is accessed again after the disconnection, or the target USB device is reset, according to the unique identification information of the updated USB device, thread information of the updated USB device stored in the device configuration management information corresponding to the unique identification information is searched. And then, according to the searched thread information, recovering the updated USB equipment to the thread resource corresponding to the thread information to run.
In the embodiment of the application, the USB equipment can be accurately and efficiently restored to the corresponding thread resources after the disconnection and reconnection or reset according to the thread information of the USB equipment recorded in the equipment configuration management information after the disconnection and reconnection or reset of the USB equipment, and the updated USB equipment is not required to be allocated with the thread resources again, so that the task scheduling efficiency can be improved.
Optionally, after step S502, the method further includes:
and creating a USB device state monitoring thread, and monitoring and recording the state information of each USB device through the USB device state monitoring thread.
In the embodiment of the application, after the task of the USB device for processing the business process is invoked, a USB device state monitoring thread can be established in the background of the main control platform, the state information of each USB device is monitored and recorded through the USB device state monitoring thread, and the unique identification information of each USB device and the corresponding state information thereof are specifically bound and recorded. Specifically, the state information of the USB device may include a connection state (including a connected state and a disconnected state) and an operation state (including a normal state and an operation abnormal state) of the USB device. By monitoring and recording the state information of each USB device, a manager can timely and accurately overhaul and maintain the USB device according to the recorded state information of the USB device.
Optionally, after creating the USB device state monitoring thread, monitoring and recording the state information of each USB device by using the USB device state monitoring thread, the method further includes:
If the abnormal USB equipment is monitored, performing fault processing on the abnormal USB equipment according to the unique identification information of the abnormal USB equipment, wherein the abnormal USB equipment is as follows: the state information is a USB device in an abnormal operation state.
In the embodiment of the application, when an abnormal USB device is detected, namely, the USB device with state information of an operation abnormal state is detected, fault processing is carried out on the abnormal device according to the unique identification information of the abnormal USB device. Optionally, the fault handling may specifically include: according to the unique identification information of the abnormal USB equipment, indicating the abnormal USB equipment to reset the equipment; or according to the unique identification information of the abnormal USB equipment, indicating the abnormal USB equipment to carry out software upgrading; or the unique identification information of the abnormal USB device is notified to the manager (for example, sent to the terminal device used by the manager) to instruct the manager to go to repair the abnormal USB device.
In the embodiment of the application, when the abnormal USB equipment is monitored, the abnormal USB equipment can be timely and accurately processed by faults according to the unique identification information of the abnormal USB equipment, so that the master control platform can be ensured to effectively schedule tasks.
An exemplary schematic structural diagram of a master control platform according to an embodiment of the present application is shown in fig. 7, which includes an application layer, a device management interface (DEVICE CARD MANAGEMENT INTERFACE, DCMI) layer, a hardware abstraction layer (Hardware Abstraction Layer, HAL layer), a hardware layer, and a device configuration management module, wherein:
the device configuration management module is used for acquiring and processing interface identification information of the main control platform and connection information of each USB device accessed to the main control platform to obtain unique identification information of each USB device; the device configuration management information comprises the unique identification information of each USB and corresponding thread information;
The application layer comprises application programs corresponding to each service process and is used for indicating the DCMI layer to acquire equipment configuration management information from the equipment configuration management module if the service process in the running state is detected;
The DCMI layer is used for acquiring the equipment configuration management information from the equipment management module and outputting the unique identification information of each connected USB equipment to the application layer;
The application layer is used for acquiring a selection instruction, selecting at least one piece of unique identification information from the unique identification information of each connected USB device returned by the DCMI layer according to the selection instruction, and determining the USB device corresponding to the at least one piece of unique identification information as a target USB device corresponding to the current business process;
The DCMI layer is used for acquiring the unique identification information of the target USB device selected by the application layer and transmitting the unique identification information of the target USB device to the HAL layer; creating a corresponding data transmission pipeline according to the unique identification information of the target USB equipment;
The HAL layer is used for determining thread information corresponding to each target USB device according to the unique identification information of the target USB device transmitted by the DCMI layer and the device configuration management information acquired from the device configuration management module, registering each target USB device into a thread resource corresponding to a service process according to the thread information corresponding to each target USB device, and obtaining a target scheduling mode corresponding to the service process;
the application layer is used for acquiring first data sent by the business process according to the unique identification information of the target USB device and transmitting the first data information to a data transmission pipeline corresponding to the unique identification information of the target USB device in the DCMI layer;
a DCMI layer for receiving the first data and transmitting the first data to the HAL layer through a data transmission pipeline;
The HAL layer is used for receiving the first data, calling the corresponding thread resource to analyze and package the first data according to the unique identification information of the target USB equipment corresponding to the data transmission pipeline to obtain second data, and sending the second data to the hardware layer;
and the hardware layer comprises a USB interface and/or a PCIE interface and is used for sending the second data to the target USB equipment corresponding to the unique identification information.
In the embodiment of the application, the unique identification information of each USB device can be calculated according to the interface information of the main control platform accessed by the USB device and the connection information accessed by each USB device to the main control platform in the task scheduling system, so that the main control platform can schedule the USB device to process the task of the corresponding service process according to the unique identification information of the USB device, thereby ensuring the accuracy of task scheduling on the USB device.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Embodiment two:
Fig. 8 is a schematic structural diagram of a task scheduling device according to an embodiment of the present application, and for convenience of explanation, only a portion related to the embodiment of the present application is shown:
The task scheduling device comprises: a unique identification information determining unit 81, a scheduling unit 82. Wherein:
The unique identification information determining unit 81 is configured to obtain interface information of a main control platform and connection information of a USB device to the main control platform, and process the interface information and the connection information to obtain unique identification information of the USB device;
and the scheduling unit 82 is used for carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the service process.
Optionally, the unique identification information determining unit 81 includes an identification code acquiring module and a determining module:
the identification code acquisition module is used for acquiring a supplier identification code and/or a product identification code of the USB equipment if the USB equipment is detected to be connected to the main control platform;
The judging module is used for judging that the USB equipment is legal if the supplier identification code of the USB equipment is consistent with preset supplier identification code information and/or the product identification code of the USB equipment is consistent with preset product identification code information; and acquiring interface information of the main control platform and judging legal connection information of the USB equipment to the main control platform, and processing the connection information to obtain unique identification information of the USB equipment.
Optionally, the interface information of the master control platform includes UBS bus number information corresponding to a USB interface of the master control platform, and the connection information of the USB device to the master control platform includes port information of a hub through which the USB device accesses the master control platform.
Optionally, the interface information of the master control platform includes PCIE board information of the master control platform, and the connection information of the USB device to the master control platform includes port information of a PCIE to USB module through which the USB device is connected to the master control platform.
Optionally, the unique identification information determining unit 81 includes a first unique identification field determining module and a second unique identification field determining module:
The first unique identification field determining module is used for acquiring and combining interface information of the main control platform and connection information of the USB equipment to the main control platform to obtain a first unique identification field of each USB equipment;
The second unique identification field determining module is used for mapping the first unique identification fields of each USB device into preset second unique identification fields one by one, and respectively taking each second unique identification field as unique identification information of each USB device, wherein the length of the second unique identification field is smaller than that of the first unique identification field.
Optionally, the scheduling unit 82 includes an allocation module and a process scheduling module:
The distribution module is used for acquiring a distribution instruction and respectively distributing unique identification information of at least one USB device for each business process;
And the process scheduling module is used for indicating each service process to perform data communication with the corresponding USB device according to the unique identification information of the USB device respectively allocated to the service process so as to call the corresponding USB device to process the task of the service process.
Optionally, the task scheduling device further includes:
The configuration unit is used for configuring the thread information of each USB device according to the unique identification information of each USB device and the operation capability of the main control platform to obtain device configuration management information, wherein the device configuration management information comprises the unique identification information of each USB device and the corresponding thread information;
correspondingly, the scheduling unit 82 includes a unique identification information output module, a target USB device determining module, a thread information determining module, a thread resource registering module, and an operating module:
The unique identification information output module is used for outputting the unique identification information of each USB device connected with the main control platform according to the device configuration management information if the service process in the running state is detected;
The target USB equipment determining module is used for acquiring a selection instruction, selecting at least one unique identification information of the USB equipment from the output unique identification information of each USB equipment according to the selection instruction, and determining the USB equipment corresponding to the unique identification information of the at least one USB equipment as the target USB equipment corresponding to the business process;
The thread information determining module is used for determining thread information corresponding to each target USB device according to the unique identification information of the target USB device and the device configuration management information;
The thread information determining module is used for determining thread information corresponding to each target USB device according to the unique identification information of the target USB device and the device configuration management information;
The thread resource registration module is used for registering each target USB device into the thread resource corresponding to the service process according to the thread information corresponding to each target USB device to obtain a target scheduling mode corresponding to the service process;
And the operation module is used for operating the business process according to the target scheduling mode so that the business process can perform data communication with the target USB device corresponding to the unique identification information of the target USB device according to the corresponding thread resource to call the target USB device to process the task of the business process.
Optionally, the configuration unit includes a target thread number determining module and a thread information configuration module:
The target thread number determining module is used for determining the number of target threads according to the type of the main control platform and/or the residual operation resource amount;
And the thread information configuration module is used for configuring the thread information of each USB device according to the unique identification information of each USB device and the target thread number to obtain device configuration management information.
Optionally, the target scheduling mode includes a first scheduling mode, a second scheduling mode, a third scheduling mode, and a fourth scheduling mode, wherein the first scheduling mode includes a single thread, and the single thread is used to run a single USB device; the second scheduling mode includes a single thread, and the single thread is used to run at least two of the USB devices; the third scheduling mode includes at least two threads, and each thread is used to run a single USB device; the fourth scheduling mode includes at least two threads, and there are threads for running at least two of the USB devices in the at least two threads.
Optionally, the task scheduling device further includes:
and the monitoring unit is used for creating a USB device state monitoring thread, and monitoring and recording the state information of each USB device through the USB device state monitoring thread.
Optionally, the task scheduling device further includes:
The fault processing unit is used for performing fault processing on the abnormal USB equipment according to the unique identification information of the abnormal USB equipment if the abnormal USB equipment is monitored, wherein the abnormal USB equipment is: the state information is USB equipment in abnormal operation state.
Optionally, the task scheduling device further includes:
A recovery unit, configured to determine thread information corresponding to the updated USB device according to the unique identification information of the updated USB device and the device configuration management information if it is detected that the updated USB device exists, and recover the updated USB device to a thread resource of the service process according to the thread information; and the updated USB equipment is the target USB equipment which is accessed to the main control platform again after the disconnection or the target USB equipment after the reset.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiment III:
Fig. 9 is a schematic diagram of a terminal device according to an embodiment of the present application. As shown in fig. 9, the terminal device 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92, such as a task scheduler, stored in the memory 91 and executable on the processor 90. The steps in the respective task scheduling method embodiments described above, such as steps S501 to S502 shown in fig. 5, are implemented when the processor 90 executes the computer program 92. Or the processor 90, when executing the computer program 92, performs the functions of the modules/units of the apparatus embodiments described above, such as the functions of the units 81 to 82 shown in fig. 8.
By way of example, the computer program 92 may be partitioned into one or more modules/units that are stored in the memory 91 and executed by the processor 90 to complete the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 92 in the terminal device 9. For example, the computer program 92 may be divided into a unique identification information determining unit and a scheduling unit, each unit functioning specifically as follows:
The unique identification information determining unit is used for acquiring and processing interface information of the main control platform and connection information of the USB equipment accessed to the main control platform to obtain unique identification information of the USB equipment;
And the scheduling unit is used for carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the business process.
The terminal device 9 may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server. The terminal device may include, but is not limited to, a processor 90, a memory 91. It will be appreciated by those skilled in the art that fig. 9 is merely an example of the terminal device 9 and does not constitute a limitation of the terminal device 9, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The Processor 90 may be a central processing unit (Central Processing Unit, CPU), other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or a memory of the terminal device 9. The memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk provided on the terminal device 9, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like. Further, the memory 91 may also include both an internal storage unit of the terminal device 9 and an external storage device. The memory 91 is used to store computer programs and other programs and data required by the terminal device. The memory 91 may also be used to temporarily store data that has been output or is to be output.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (12)
1. The task scheduling method is characterized by being applied to a main control platform of a task scheduling system, wherein the task scheduling system comprises the main control platform and USB equipment connected to the main control platform, and the task scheduling method comprises the following steps:
acquiring interface information of the main control platform and connection information of the USB equipment to the main control platform, and processing the interface information and the connection information to obtain unique identification information of the USB equipment;
according to the unique identification information of the USB equipment, carrying out data communication with the USB equipment so as to call the task of the USB equipment for processing the business process;
The interface information of the main control platform comprises USB bus number information corresponding to a USB interface of the main control platform, and the connection information of the USB equipment to the main control platform comprises port information of a hub through which the USB equipment is connected to the main control platform; or alternatively
The interface information of the main control platform comprises PCIE board card information of the main control platform, and the connection information of the USB equipment to the main control platform comprises port information of a PCIE-to-USB module through which the USB equipment is connected to the main control platform;
The number of the service processes is more than one, the data communication is carried out with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the service processes, and the method comprises the following steps:
Acquiring an allocation instruction, and respectively allocating unique identification information of at least one USB device to each business process;
And indicating each service process to perform data communication with the corresponding USB device according to the unique identification information of the USB device respectively allocated to the service process so as to call the corresponding USB device to process the task of the service process.
2. The task scheduling method according to claim 1, wherein the obtaining interface information of the master control platform and connection information of the USB device to the master control platform and processing the interface information to obtain unique identification information of the USB device includes:
if the USB equipment is detected to be connected to the main control platform, acquiring a supplier identification code and/or a product identification code of the USB equipment;
If the supplier identification code of the USB device is consistent with preset supplier identification code information and/or the product identification code of the USB device is consistent with preset product identification code information, judging that the USB device is legal; and acquiring interface information of the main control platform and judging legal connection information of the USB equipment to the main control platform, and processing the connection information to obtain unique identification information of the USB equipment.
3. The task scheduling method according to claim 1, wherein the obtaining interface information of the master control platform and connection information of the USB device to the master control platform and processing the interface information to obtain unique identification information of the USB device includes:
Acquiring interface information of the main control platform and connection information of the USB equipment to the main control platform, and combining the interface information and the connection information to obtain a first unique identification field of each USB equipment;
mapping the first unique identification fields of each USB device into preset second unique identification fields one by one, and taking each second unique identification field as unique identification information of each USB device, wherein the length of the second unique identification field is smaller than that of the first unique identification field.
4. The task scheduling method according to claim 1, wherein after the interface information of the main control platform and the connection information of the USB device to the main control platform are obtained and processed, obtaining the unique identification information of the USB device, the task scheduling method further comprises:
Configuring thread information of each USB device according to the unique identification information of each USB device and the operation capability of the main control platform to obtain device configuration management information, wherein the device configuration management information comprises the unique identification information of each USB device and corresponding thread information;
Correspondingly, the data communication is performed with the USB device according to the unique identification information of the USB device so as to call the task of the USB device for processing the business process, and the method comprises the following steps:
if the service process in the running state is detected, outputting unique identification information of each USB device connected with the main control platform according to the device configuration management information;
acquiring a selection instruction, selecting unique identification information of at least one USB device from the output unique identification information of each USB device according to the selection instruction, and determining a USB device corresponding to the unique identification information of the at least one USB device as a target USB device corresponding to the business process;
Determining thread information corresponding to each target USB device according to the unique identification information of the target USB device and the device configuration management information;
Registering each target USB device into a thread resource corresponding to the service process according to the thread information corresponding to each target USB device to obtain a target scheduling mode corresponding to the service process;
And operating the business process according to the target scheduling mode, so that the business process performs data communication with the target USB device corresponding to the unique identification information of the target USB device according to the corresponding thread resource, and the target USB device is called to process the task of the business process.
5. The task scheduling method according to claim 4, wherein configuring the thread information of each USB device according to the unique identification information of each USB device and the operational capability of the main control platform to obtain device configuration management information includes:
Determining the number of target threads according to the type of the main control platform and/or the residual operation resource quantity;
And configuring the thread information of each USB device according to the unique identification information of each USB device and the target thread number to obtain device configuration management information.
6. The task scheduling method of claim 4, wherein the target scheduling mode comprises a first scheduling mode, a second scheduling mode, a third scheduling mode, and a fourth scheduling mode, wherein the first scheduling mode comprises a single thread, and the single thread is used to run a single USB device; the second scheduling mode includes a single thread, and the single thread is used to run at least two of the USB devices; the third scheduling mode includes at least two threads, and each thread is used to run a single USB device; the fourth scheduling mode includes at least two threads, and there are threads for running at least two of the USB devices in the at least two threads.
7. A task scheduling method according to any one of claims 4 to 6, further comprising, after said running said business process in said target scheduling mode:
If the updated USB equipment is detected to exist, thread information corresponding to the updated USB equipment is determined according to the unique identification information of the updated USB equipment and the equipment configuration management information, and the updated USB equipment is restored to the thread resource of the business process according to the thread information; and the updated USB equipment is the target USB equipment which is accessed to the main control platform again after the disconnection or the target USB equipment after the reset.
8. The task scheduling method according to any one of claims 1 to 6, further comprising, after the task of communicating with the USB device according to the unique identification information of the USB device to invoke the USB device to process a business process:
and creating a USB device state monitoring thread, and monitoring and recording the state information of each USB device through the USB device state monitoring thread.
9. The task scheduling method of claim 8, further comprising, after the creating a USB device status monitoring thread, monitoring and recording status information of each USB device by the USB device status monitoring thread:
If the abnormal USB equipment is monitored, performing fault processing on the abnormal USB equipment according to the unique identification information of the abnormal USB equipment, wherein the abnormal USB equipment is: the state information is USB equipment in abnormal operation state.
10. A task scheduling device, comprising:
The unique identification information determining unit is used for acquiring and processing interface information of the main control platform and connection information of the USB equipment accessed to the main control platform to obtain unique identification information of the USB equipment;
The scheduling unit is used for carrying out data communication with the USB equipment according to the unique identification information of the USB equipment so as to call the task of the USB equipment for processing the business process;
The interface information of the main control platform comprises USB bus number information corresponding to a USB interface of the main control platform, and the connection information of the USB equipment to the main control platform comprises port information of a hub through which the USB equipment is connected to the main control platform; or alternatively
The interface information of the main control platform comprises PCIE board card information of the main control platform, and the connection information of the USB equipment to the main control platform comprises port information of a PCIE-to-USB module through which the USB equipment is connected to the main control platform;
the scheduling unit comprises an allocation module and a process scheduling module:
The distribution module is used for acquiring a distribution instruction and respectively distributing unique identification information of at least one USB device for each business process;
And the process scheduling module is used for indicating each service process to perform data communication with the corresponding USB device according to the unique identification information of the USB device respectively allocated to the service process so as to call the corresponding USB device to process the task of the service process.
11. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, causes the terminal device to carry out the steps of the method according to any one of claims 1 to 9.
12. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, causes a terminal device to carry out the steps of the method according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011026891.XA CN112035239B (en) | 2020-09-25 | 2020-09-25 | Task scheduling method, device, terminal equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011026891.XA CN112035239B (en) | 2020-09-25 | 2020-09-25 | Task scheduling method, device, terminal equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112035239A CN112035239A (en) | 2020-12-04 |
CN112035239B true CN112035239B (en) | 2024-06-28 |
Family
ID=73574429
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011026891.XA Active CN112035239B (en) | 2020-09-25 | 2020-09-25 | Task scheduling method, device, terminal equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112035239B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112486656B (en) * | 2020-12-10 | 2022-12-16 | 上海创远仪器技术股份有限公司 | Method for realizing wireless ionization wire task scheduling and data downloading |
CN113127308B (en) * | 2021-04-26 | 2022-11-11 | 山东英信计算机技术有限公司 | Equipment monitoring method, device and system based on BMC and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104820647A (en) * | 2015-03-20 | 2015-08-05 | 惠州Tcl移动通信有限公司 | Method and terminal for processing USB interface information |
CN109474977A (en) * | 2018-11-29 | 2019-03-15 | 华普特科技(深圳)股份有限公司 | A kind of monitoring method of equipment, apparatus and system |
-
2020
- 2020-09-25 CN CN202011026891.XA patent/CN112035239B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104820647A (en) * | 2015-03-20 | 2015-08-05 | 惠州Tcl移动通信有限公司 | Method and terminal for processing USB interface information |
CN109474977A (en) * | 2018-11-29 | 2019-03-15 | 华普特科技(深圳)股份有限公司 | A kind of monitoring method of equipment, apparatus and system |
Also Published As
Publication number | Publication date |
---|---|
CN112035239A (en) | 2020-12-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9092356B2 (en) | Executing a kernel device driver as a user space process | |
US5579509A (en) | Apparatus and method for verifying compatibility of system components | |
US6550006B1 (en) | Method and apparatus to perform a remote boot | |
CN111026367B (en) | Micro-service arrangement method, device, terminal equipment and storage medium | |
US8032681B2 (en) | Processor selection for an interrupt based on willingness to accept the interrupt and on priority | |
CN112035239B (en) | Task scheduling method, device, terminal equipment and storage medium | |
US8484325B1 (en) | Providing a common management console for managing the operation of a server computer | |
US9806959B2 (en) | Baseboard management controller (BMC) to host communication through device independent universal serial bus (USB) interface | |
US9779047B2 (en) | Universal intelligent platform management interface (IPMI) host to baseboard management controller (BMC) communication for non-x86 and legacy free systems | |
WO2015142521A1 (en) | Selectively enabling platform-specific features | |
CN116450046A (en) | Cloud disk implementation method and device, intelligent network card, server and storage medium | |
CN114089713A (en) | Communication method based on UDS, ECU and upper computer | |
CN115033352A (en) | Task scheduling method, device and equipment for multi-core processor and storage medium | |
CN115576613A (en) | PXE-based operating system installation method, computing device and communication system | |
US9069572B2 (en) | Replacement of inbox driver with third party driver | |
US20200089571A1 (en) | Fault tolerant and diagnostic boot | |
US7725806B2 (en) | Method and infrastructure for recognition of the resources of a defective hardware unit | |
CN116225541B (en) | Method and system for communication between in-band CPU and out-of-band management BMC | |
US6591320B1 (en) | Method and system for selective disablement of expansion bus slots in a multibus data processing system | |
CN115878333A (en) | Method, device and equipment for judging consistency between process groups | |
CN112580086B (en) | Access protection method, device and equipment for configuration file and storage medium | |
US6715110B1 (en) | External debug card sharing a communication bus | |
CN112948106B (en) | Task allocation method and device | |
CN108363618A (en) | A kind of method and apparatus of process processing | |
CN114490276A (en) | Peripheral equipment abnormity monitoring method, device and system and storage medium |
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 |