Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be understood that the terms "comprises" and "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 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.
Referring to fig. 1 and 2, as shown in the drawings, an embodiment of the present application provides a parallel loading method for driving a compressor driver, where the parallel loading method for driving a compressor driver is applied to a loading control terminal 10, the loading control terminal 10 is simultaneously connected with a plurality of adapter plates 20 to realize transmission of data information, each adapter plate 20 is respectively connected with at least one driver 30, the driver 30 is a terminal device for loading a driver file, such as a compressor driver, the loading control terminal 10 is a terminal device for loading and controlling a driver file, such as a desktop computer, a notebook computer, a tablet computer or a mobile phone, the adapter plates 20 are connectors for establishing communication connection between the driver 30 and the loading control terminal 10, the loading control terminal 10 can be simultaneously connected with the plurality of adapter plates 20 to realize transmission of data information, and each adapter plate 20 is respectively connected with at least one driver 30, such as each adapter plate 20 is respectively connected with one driver 30 in the embodiment of the present application. As shown in FIG. 1, the method includes steps S110 to S130.
S110, receiving an input loading instruction, and carrying out segmentation processing on a pre-stored driver file corresponding to the loading instruction according to a preset segmentation rule to obtain a plurality of corresponding program segments.
And receiving an input loading instruction, and carrying out segmentation processing on a pre-stored driver file corresponding to the loading instruction according to a preset segmentation rule to obtain a plurality of corresponding program segments. The loading control terminal can receive a loading instruction input by a user, and can acquire a corresponding pre-stored driver file according to the received loading instruction, segment the driver file according to a preset segmentation rule, and acquire a plurality of program segments. The segmentation rule is a specific rule for carrying out segmentation processing on the driver file.
Specifically, the loading instruction may set information such as a loading program name, a program version, and a target loading number, and may match program files included in a preset program file library according to the loading program name and the program version, thereby obtaining a driver file corresponding to the loading program name and the program version, and load the driver file in each driver.
In a specific embodiment, step S110 includes the sub-steps of: splitting a pre-stored driver file corresponding to the loading instruction in a preset program file library into a plurality of program segments corresponding to the segmentation number according to the segmentation number in the segmentation rule.
The segmentation rule can be pre-configured with the segmentation number, so that the pre-stored driver files corresponding to the loading instructions in the program file library can be split according to the segmentation number, namely, the driver files are split into a plurality of program segments corresponding to the segmentation number, and the number of the program segments is equal to the segmentation number. Specifically, the corresponding basic file space can be calculated according to the occupied space and the number of segments of the driver file, for example, the occupied space of the driver file is divided by the number of segments to obtain the basic file space, and a plurality of program segments equal to the basic file space are obtained from the program file.
In a specific embodiment, step S110 includes the sub-steps of: splitting a pre-stored driver file corresponding to the loading instruction in a preset program file library into a plurality of program segments according to a splitting threshold value in the segmentation rule, wherein the occupied space of each program segment is not larger than the splitting threshold value.
The splitting threshold value can be preset in the segmentation rule, namely threshold value information used for limiting the occupied space of each program segment, for example, a pre-stored driver file corresponding to the loading instruction can be split according to the segmentation threshold value, and a plurality of program segments with occupied spaces not larger than the splitting threshold value can be obtained through splitting.
For example, if the splitting threshold is 20kb, a plurality of program segments with occupied space not greater than the splitting threshold can be split from the driver file according to the splitting threshold.
In a specific embodiment, step S110 includes the sub-steps of: obtaining the number of the connected adapter plates; calculating the number of segments corresponding to the number of the adapter plates according to a segment calculation formula in the segment rule; splitting a pre-stored driver file corresponding to the loading instruction in the preset program file library into a plurality of program segments corresponding to the segmentation number according to the segmentation number.
In another embodiment, the loading control terminal may further obtain the number of the patch boards connected to the loading control terminal, a segmentation calculation formula may be configured in the segmentation rule, the number of the patch boards is calculated by the segmentation calculation formula to obtain a corresponding segmentation number, and the corresponding driver files are split according to the calculated segmentation number to obtain a plurality of program segments corresponding to the calculated segmentation number.
For example, the segmentation calculation formula may be formula (1):
(1);
wherein r is the number of the adapter plates,to round up the calculated symbol, t is the number of segments calculated.
And S120, sequentially transmitting each program segment to each adapter plate so as to load the corresponding program segment into a corresponding driver through the adapter plate.
And sequentially transmitting each program segment to each adapter plate so as to load the corresponding program segment into a corresponding driver through the adapter plate. The loading control terminal transmits all the program segments to the adapter plate in parallel, namely, the loading control terminal can respectively send the same or different program segments to the adapter plate, and after the adapter plate receives the program segments, the corresponding program segments are loaded into a driver connected with the adapter plate. That is, the adapter plate loads each program segment into the driver in turn in a segmented loading manner, and when loading of all the program segments is completed in the driver, the loading process of the driver file is completed.
In a specific embodiment, step S120 includes the sub-steps of: transmitting a first program segment to each adapter plate according to the sequence of the program segments; judging whether loading information fed back by the adapter plate is received within preset time or not; if the loading information fed back by the adapter plate is received within the preset time, acquiring the next program segment, transmitting the next program segment to the adapter plate, and returning to the step of executing the judgment whether the loading information fed back by the adapter plate is received within the preset time or not until all the program segments are sent to the adapter plate.
Specifically, the loading control terminal simultaneously transmits a first program segment to each adapter plate according to the sequence of each program segment, after the program segments are transmitted, the adapter plates are in pressure connection to transmit and load the received program segments into the driver, if the driver is successfully loaded, loaded information is fed back to the adapter plates, and the adapter plates correspondingly feed back the loaded information to the loading control terminal after receiving the loaded information. After the loading control terminal transmits the program segment to the adapter plate, whether loading information fed back by the adapter plate is received within a preset time or not can be judged, for example, the preset time is set to be 2 seconds. If the loading information fed back by the adapter plate is received within the preset time, continuing to acquire the next program segment corresponding to the program segment transmitted to the adapter plate, transmitting the next program segment to the adapter plate according to the mode, returning to judge whether the loading information fed back by the adapter plate is received within the preset time, and repeating the steps until all the program segments are transmitted to each adapter plate.
In a specific embodiment, after the step of determining whether the loading information fed back by the adapter board is received within a preset time, the method further includes the steps of: if the loading information fed back by the adapter plate is not received within the preset time, the current program segment is sent to the adapter plate again when reaching a retry time point, wherein the retry time point is a time point which is preset with the sending time interval of the last program segment to the adapter plate.
After judging whether loading information fed back by the adapter plate is received within preset time or not, if the loading information fed back by the adapter plate is not received within the preset time, when the retry time point is reached, the current program segment is sent to the adapter plate again, and accordingly the resending and reloading of the program segment are achieved. The retry time point may be determined according to the last transmission time and the preset duration of the program segment, and specifically, when the preset duration of the last transmission time interval of the program segment is set, the retry time point for retransmitting the program segment may be determined.
S130, receiving loading feedback information fed back by each adapter plate, and judging whether the driver files are successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate.
And receiving loading feedback information fed back by each adapter plate, and judging whether the driver files are successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate. The loading control terminal can receive loading feedback information fed back by each adapter plate, and judge whether the driver files are successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate. In addition, the loading control terminal can also visually display the successful loading result of each driver through the display module, so that a user can conveniently check whether the drivers are successfully loaded or not, and the drivers which are not successfully loaded in the loading control terminal can be correspondingly operated.
In a specific embodiment, step S130 includes the sub-steps of: analyzing the loading feedback information of each adapter plate to obtain loading parameters corresponding to each adapter plate; and judging whether the loading parameters of the adapter plates are matched with preset loading target parameters or not so as to judge whether the driver files are loaded successfully in the drivers or not.
Specifically, loading feedback information of each adapter plate can be analyzed, so that corresponding loading parameters are obtained, wherein the loading feedback information can be information based on JSON format, and the loading feedback information can be analyzed, so that numerical values of specific fields are obtained as the loading parameters. For example, loading parameters including information including loading information amount, loading program segment number and the like can be obtained, loading target parameters corresponding to a currently loaded driver file preset in a loading control terminal are obtained at the same time, whether the loading parameters of the adapter plate are matched with the loading target parameters is judged, and if the loading parameters are matched with the loading target parameters, the driver file is judged to be successfully loaded in the driver; if the driver files do not match, the driver files are judged to be unsuccessfully loaded in the driver.
In addition, whether the number of the drivers successfully loaded is not less than the target loading number in the loading instruction can be judged, and if the number of the drivers completing the loading of the driver files is not less than the target loading number, the first prompt information is fed back; if the number of drivers completing the loading of the driver files is smaller than the target loading number, feeding back a second prompt message.
According to the method for driving parallel loading of the compressor driver, provided by the embodiment of the application, an input loading instruction is received, and a pre-stored driver file corresponding to the loading instruction is subjected to segmentation processing according to a preset segmentation rule to obtain a plurality of corresponding program segments; transmitting each program segment to each adapter plate in turn so as to load the corresponding program segment into a corresponding driver through the adapter plate; and receiving loading feedback information fed back by each adapter plate, and judging whether the driver files are successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate. According to the method for driving and loading the parallel compressor drivers, the driver program files to be loaded can be processed in a segmented mode, a plurality of program segments are loaded into each driver in parallel and whether the loading is successful or not is automatically judged, parallel loading of the driver program files can be achieved, and loading efficiency of the driver program files is greatly improved.
The embodiment of the application also provides a driving parallel loading device of the compressor driver, which can be configured in a loading control terminal and is used for executing any embodiment of the driving parallel loading method of the compressor driver. Specifically, referring to fig. 3, fig. 3 is a schematic block diagram of a parallel loading device for driving a compressor driver according to an embodiment of the present application.
As shown in fig. 3, the parallel loading device 100 for driving the compressor driver includes a file segment processing unit 110, a loading unit 120, and a loading feedback information judging unit 130.
The file segmentation processing unit 110 is configured to receive an input loading instruction, segment a pre-stored driver file corresponding to the loading instruction according to a preset segmentation rule, and obtain a plurality of corresponding program segments;
and the loading unit 120 is used for sequentially transmitting each program segment to each adapter plate so as to load the corresponding program segment into the corresponding driver through the adapter plate.
And the loading feedback information judging unit 130 is configured to receive loading feedback information fed back by each adapter plate, and judge whether the driver file is successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate.
The parallel loading device for driving the compressor driver provided by the embodiment of the application is applied to the parallel loading method for driving the compressor driver, receives an input loading instruction, and performs segmentation processing on a pre-stored driver file corresponding to the loading instruction according to a preset segmentation rule to obtain a plurality of corresponding program segments; transmitting each program segment to each adapter plate in turn so as to load the corresponding program segment into a corresponding driver through the adapter plate; and receiving loading feedback information fed back by each adapter plate, and judging whether the driver files are successfully loaded in each driver according to the loading feedback information corresponding to each adapter plate. According to the method for driving and loading the parallel compressor drivers, the driver program files to be loaded can be processed in a segmented mode, a plurality of program segments are loaded into each driver in parallel and whether the loading is successful or not is automatically judged, parallel loading of the driver program files can be achieved, and loading efficiency of the driver program files is greatly improved.
The above-described driving parallel loading means of the compressor driver may be implemented in the form of a computer program which can be run on a computer device as shown in fig. 4.
Referring to fig. 4, fig. 4 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer apparatus may be a loading control terminal for performing a driving parallel loading method of the compressor driver to load the driver program file to the driver.
Referring to fig. 4, the computer device 500 includes a processor 502, a memory, and a network interface 505, which are connected by a communication bus 501, wherein the memory may include a storage medium 503 and an internal memory 504.
The storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a method of parallel loading of drives of compressor drives, wherein the storage medium 503 may be a volatile storage medium or a non-volatile storage medium.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a method of driving parallel loading of compressor drivers.
The network interface 505 is used for network communication, such as providing for transmission of data information, etc. It will be appreciated by those skilled in the art that the architecture shown in fig. 4 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting of the computer device 500 to which the present inventive arrangements may be implemented, and that a particular computer device 500 may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
The processor 502 is configured to execute a computer program 5032 stored in a memory, so as to implement the corresponding functions in the method for driving parallel loading of compressor drivers.
Those skilled in the art will appreciate that the embodiment of the computer device shown in fig. 4 is not limiting of the specific construction of the computer device, and in other embodiments, the computer device may include more or less components than those shown, or certain components may be combined, or a different arrangement of components. For example, in some embodiments, the computer device may include only a memory and a processor, and in such embodiments, the structure and function of the memory and the processor are consistent with the embodiment shown in fig. 4, and will not be described again.
It should be appreciated that in an embodiment of the application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSPs), application specific integrated circuits (Application Specific Integrated Circuit, ASICs), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In another embodiment of the application, a computer-readable storage medium is provided. The computer readable storage medium may be a volatile or nonvolatile computer readable storage medium. The computer readable storage medium stores a computer program which, when executed by a processor, implements the steps included in the method for driving parallel loading of compressor drivers described above.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the apparatus, device and unit described above may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein. Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the units is merely a logical function division, there may be another division manner in actual implementation, or units having the same function may be integrated into one unit, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present application.
In addition, each functional unit in the embodiments of the present application 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. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application is essentially or part of what contributes to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a computer-readable storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned computer-readable storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.