A scheduling method of data acquisition driver
By registering and classifying data acquisition drivers and establishing an index-function mapping table, the problem of poor adaptability of data acquisition devices is solved, and flexible data acquisition and support for hot-loading new drivers are realized.
Patent Information
- Application Number
- CN202310735315.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-06-20
AI Technical Summary
In existing technologies, data acquisition devices are difficult to adapt to different data acquisition scenarios, and it is difficult to achieve parallel acquisition of different types of data and hot-load new acquisition drivers under non-shutdown conditions.
By registering data acquisition drivers, a first registry is formed. The acquisition drivers are categorized and a mapping table between driver indexes and entry functions is established. External parameter requests are received and the entry functions are called in reverse mapping to perform data acquisition.
It enables the acquisition device to adapt to different data acquisition scenarios, supports parallel acquisition of different types of data, and can hot-load new acquisition drivers without restarting the system.
Smart Images

Figure CN116560740B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a scheduling method of data acquisition driver. BACKGROUND
[0002] In an industrial system, in order to obtain a large amount of industrial field data in time, data acquisition equipment needs to be used for data acquisition. Generally, for different data acquisition scenes, in order to efficiently and accurately acquire data, the acquisition equipment needs to be correspondingly configured, which makes the configured acquisition equipment difficult to adapt to other data acquisition scenes. In addition, in the prior art, for different types of data in the same scene, the acquisition equipment is difficult to realize parallel acquisition, and is difficult to adapt to the scene of hot loading a new acquisition driver under irrelevant conditions. SUMMARY
[0003] The present application aims at the deficiencies of the prior art, and provides a scheduling method of data acquisition driver to solve the scheduling problem of data acquisition driver.
[0004] To achieve the above-mentioned purpose, the technical solution adopted by the present application is as follows:
[0005] The present application provides a scheduling method of data acquisition driver, which comprises the following steps:
[0006] a. Registering data acquisition driver to form a first registration table to clearly indicate the acquisition capability possessed;
[0007] b. Registering data acquisition driver entry function to form a second registration table to indicate that the scheduling system schedules a specific acquisition interface;
[0008] c. Classifying the registered acquisition driver according to preset parameter indicators through the acquisition driver, wherein the preset parameter indicators include device type, manufacturer information and communication protocol;
[0009] d. Extracting the attribute parameter indicators of the acquisition driver, and establishing an index table through the attribute parameter indicator information;
[0010] e. Establishing a one-to-one mapping relationship between the driver index and the acquisition driver entry function to form a driver index and driver entry function mapping table;
[0011] f. Receiving an external parameter request, calculating index information, and confirming the calling of the entry function of the acquisition driver based on the mapping table in reverse;
[0012] g. Executing the confirmed entry function to acquire data from the specified device.
[0013] Optionally, in step a, the registered monomer attribute information includes device type, manufacturer, model and communication protocol.
[0014] Optionally, in step b, the registered monomer attribute information includes a device name or a device model, and an entry function name.
[0015] Optionally, in step d, the index establishment is divided into a double-layer structure, the first layer of the double-layer structure is based on the hash index calculation of the actual classification parameters in step c, and the second layer of the double-layer structure is based on the hash index establishment of the elements in each classification in step c, and the parameter of the second layer is another driving attribute parameter except the parameter or parameter combination of the first layer.
[0016] Optionally, step e includes the hash calculation of each element in the data acquisition driving entry function table when the index is established in step d, and a two-layer index information mapping table is established.
[0017] Optionally, for the case of temporarily increasing a new acquisition driver, only the registration table information needs to be increased according to steps a and b, the acquisition driver file is imported, and the new acquisition driver can be supported without restarting the scheduling system.
[0018] The beneficial effects of the present application include:
[0019] The scheduling method of the data acquisition driver provided by the present application includes the following steps: registering the data acquisition driver to form a first registration table to clearly indicate the acquisition capability; registering the data acquisition driver entry function to form a second registration table to indicate the scheduling system to schedule a specific acquisition interface; classifying the registered acquisition driver according to a preset parameter index through the acquisition driver, the preset parameter index including a device type, manufacturer information and a communication protocol; extracting the attribute parameter index of the acquisition driver, and establishing an index table through the attribute parameter index information; establishing a one-to-one mapping relationship between the driving index and the acquisition driver entry function to form a driving index and driving entry function mapping table; receiving an external parameter request, calculating the index information, and confirming the calling of the entry function of the acquisition driver based on the mapping table; and executing the confirmed entry function to perform data acquisition on the specified device. The scheduling method can adapt the acquisition device to different data acquisition scenes by classifying, indexing and mapping functions of multiple data acquisition drivers. BRIEF DESCRIPTION OF DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0021] Figure 1A flowchart of the scheduling method of the data acquisition driver provided by the embodiment of the present application is shown.
[0022] Figure 2 A practical operation flowchart of the scheduling method of the data acquisition driver provided by the embodiment of the present application is shown. DETAILED DESCRIPTION
[0023] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.
[0024] In an industrial system, in order to obtain a large amount of industrial field data in time, data acquisition equipment needs to be used for data acquisition. Generally, for different data acquisition scenes, in order to efficiently and accurately acquire data, the acquisition equipment needs to be correspondingly configured, which makes the configured acquisition equipment difficult to adapt to other data acquisition scenes. In addition, in the prior art, for different types of data in the same scene, the acquisition equipment is difficult to realize parallel acquisition, and is difficult to adapt to the scene of hot loading a new acquisition driver under irrelevant machine conditions.
[0025] In order to solve at least one of the above problems, the present application provides a scheduling method of a data acquisition driver to solve the scheduling problem of the data acquisition driver.
[0026] Figure 1 A flowchart of the scheduling method of the data acquisition driver provided by the embodiment of the present application is shown. Figure 2 A practical operation flowchart of the scheduling method of the data acquisition driver provided by the embodiment of the present application is shown.
[0027] As shown in Figure 1 and Figure 2 The scheduling method of the data acquisition driver provided by the present application includes the following steps:
[0028] a. Register the data acquisition driver to form a first registration table to clearly indicate the acquisition capability.
[0029] Optionally, in step a, the registered monomer attribute information includes device type, manufacturer, model, communication protocol, etc. The structure for storing the registration information of a single acquired device can have multiple forms, such as struct, class, etc.; and the storage form for multiple data acquisition drivers, such as array, linked list, etc.
[0030] b. Register the data acquisition driver entry function to form a second registration table to indicate that the scheduling system schedules a specific acquisition interface.
[0031] Optionally, in step b, the registered monomer attribute information includes device name or device model, entry function name. The form of registration also limits the parameter form of the entry function to be consistent, such as void functionName(void paraList); the storage of a single registration information can be in the form of struct, class, etc.; the storage of overall registration information can be in the form of array, linked list, hash table, etc.
[0032] c. Classify the registered collection drivers by collecting the driving parameters, including device type, manufacturer information, and communication protocol.
[0033] The classification of collection drivers is to improve the efficiency of driver positioning. The classification parameters that can be based on include device type, manufacturer, communication protocol, etc. After classification, a smaller data collection driver table can be formed to reduce the search range and improve the positioning efficiency. Parameter information examples are shown in Table 1 below:
[0034] Table 1 Classification parameter example table
[0035]
[0036] The classification can be performed independently or in combination with the above three parameters, and can be flexibly selected according to different scenarios.
[0037] d. Extract the attribute parameter indicators of the collection drivers, and establish an index table through the attribute parameter indicator information.
[0038] Optionally, in step d, the establishment of the index is divided into a double-layer structure. The first layer of the double-layer structure is based on the actual classification parameters of step c to perform hash index calculation. The second layer of the double-layer structure establishes a hash index based on the elements in each classification of step c. The parameters of the second layer are other driver attribute parameters in addition to the parameters or parameter combinations of the first layer.
[0039] e. Establish a one-to-one mapping relationship between the driver index and the collection driver entry function, and form a driver index and driver entry function mapping table.
[0040] Optionally, step e includes performing hash calculation on each element in the data collection driver entry function table when establishing the index in step d, and establishing a two-layer index information mapping table.
[0041] f. Receive an external parameter request, calculate the index information, and confirm the call of the entry function of the collection driver based on the mapping table.
[0042] The step is a core scheduling process of the scheduling system, specifically, by selecting input parameters, processing input data, confirming a driving type, and calculating an index value; by category information, the index value, confirming a collection driver, and a driving entry function.
[0043] g, executing the confirmed entry function, and collecting data from the specified device.
[0044] Optionally, for the case of temporarily increasing a new collection driver, only the registry information needs to be added according to the step a and the step b, and the collection driver file is imported, so that the new collection driver can be supported without restarting the scheduling system.
[0045] To sum up, after the multiple data collection drivers are classified, indexed, and function-mapped, the collection device can adapt to different data collection scenes, and can collect different types of data in parallel in the same scene, and can adapt to the scene of hot loading a new collection driver regardless of the machine condition.
[0046] The above examples are only for illustrating the technical concept and characteristics of the present application, the purpose is to enable those skilled in the art to understand the content of the present application and implement it, and cannot limit the protection scope of the present application, any equivalent changes or modifications made according to the spirit and essence of the present application should be covered within the protection scope of the present application.
Claims
1. A method of scheduling a data acquisition drive, characterized by, The method comprises the following steps: a. Register data collection drivers to form a first registry to specify the collection capabilities possessed; b. Register data collection driver entry functions to form a second registry to indicate the scheduling system to schedule specific collection interfaces; c. Classify the registered collection drivers according to preset parameter indicators, wherein the preset parameter indicators include device types, manufacturer information, and communication protocols; d. Extract the self attribute parameter indicators of the collection drivers and establish an index table through the attribute parameter indicator information; e. Establish a one-to-one mapping relationship between the driver index and the collection driver entry functions to form a driver index and driver entry function mapping table; f. Receive external parameter requests, calculate index information, and confirm the calling of the entry functions of the collection drivers based on the mapping table in a reverse mapping manner; g. Execute the confirmed entry functions to collect data from specified devices.
2. The method of claim 1, wherein, In the step a, the registered monomer attribute information includes device types, manufacturers, models, and communication protocols.
3. The method of claim 1, wherein, In the step b, the registered monomer attribute information includes device names or device models and entry function names.
4. The method of claim 1, wherein In the step d, the index establishment is divided into a double-layer structure, wherein the first layer of the double-layer structure performs hash index calculation based on the actual classification parameters in the step c, the second layer of the double-layer structure performs hash index establishment based on the elements in each classification in the step c, and the parameters of the second layer are other driver attribute parameters except the parameters or parameter combinations of the first layer.
5. The method of claim 4, wherein, The step e comprises performing hash calculation on each element in the data collection driver entry function table as in the index establishment in the step d to establish a two-layer index information mapping table.
6. The method of claim 4, wherein, For the case of temporarily adding new collection drivers, only the registry information needs to be added according to the steps a and b, and the collection driver files need to be imported, so that the new collection drivers can be supported without restarting the scheduling system.
Citation Information
Patent Citations
Multi-enrollments of a computing device into configuration sources
CN107077359A
Heterogeneous indexing for annotation systems
WO2004114148A1