CN117130865A - Sensor parameter configuration method, device, equipment and readable storage medium - Google Patents
Sensor parameter configuration method, device, equipment and readable storage medium Download PDFInfo
- Publication number
- CN117130865A CN117130865A CN202311104198.3A CN202311104198A CN117130865A CN 117130865 A CN117130865 A CN 117130865A CN 202311104198 A CN202311104198 A CN 202311104198A CN 117130865 A CN117130865 A CN 117130865A
- Authority
- CN
- China
- Prior art keywords
- sensor
- configuration
- parameter
- file
- target
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 84
- 238000012544 monitoring process Methods 0.000 claims description 61
- 230000008569 process Effects 0.000 claims description 32
- 230000006978 adaptation Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 9
- 230000005540 biological transmission Effects 0.000 claims description 6
- 239000000758 substrate Substances 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 6
- 230000017525 heat dissipation Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 7
- 238000012827 research and development Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000003044 adaptive effect Effects 0.000 description 4
- 230000033228 biological regulation Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000011022 operating instruction Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 230000036541 health Effects 0.000 description 2
- 230000001939 inductive effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
- G06F11/3093—Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3058—Monitoring arrangements for monitoring environmental properties or parameters of the computing system or of the computing system component, e.g. monitoring of power, currents, temperature, humidity, position, vibrations
-
- 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Quality & Reliability (AREA)
- Computing Systems (AREA)
- Testing Or Calibration Of Command Recording Devices (AREA)
Abstract
The invention discloses a configuration method of sensor parameters, which is applied to the technical field of data processing and comprises the following steps: when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired; invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic; and filling the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file. Compared with the prior art that when the sensor parameter configuration is carried out, all parameters are required to be written into the whole code file one by one, the method and the device can uniformly write the parameters in the target sensor configuration parameter file into the configuration framework, realize the configuration of the sensor parameters, and do not need to write codes frequently and manually to configure the sensor parameters, so that the configuration efficiency of the sensor parameters can be improved, and the experience of a user is improved.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method, an apparatus, a device, and a readable storage medium for configuring sensor parameters.
Background
The BMC (baseboard management controller) is mainly responsible for main device status monitoring, sensor information reading, and the like. Monitoring sensor data is a basic function of the BMC, judging the current health state of the server based on sensor reading values (including voltage, temperature, power consumption, fan rotating speed, discrete state and the like), and feeding back logs and alarm information. The sensor types, names and parameters of different configuration models to be monitored are different, and the sensor types, names and parameters are required to be re-adapted and monitored by using a new version. When the parameters such as the type, the name, the range and the like of the current sensor are configured, the shutdown is needed to search target parameters from all monitoring files for modification and adaptation, so that the current sensor adaptation has the technical problem of low efficiency.
Therefore, how to improve the sensor adaptation efficiency is a problem that needs to be solved by the person skilled in the art.
Disclosure of Invention
Accordingly, the present invention is directed to a method, apparatus, device and readable storage medium for configuring sensor parameters, which solve the technical problem of low efficiency of sensor parameter configuration in the prior art.
In order to solve the above technical problems, the present invention provides a method for configuring sensor parameters, including:
when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired;
invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and filling parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
Optionally, when the sensor parameter configuration instruction is received, acquiring a target sensor configuration parameter file includes:
receiving the sensor parameter configuration instruction;
determining a download address corresponding to the target sensor configuration parameter file according to the sensor parameter configuration instruction; the download address is generated by a configuration server after configuring relevant parameters according to sensor configuration requirements and encrypting the configuration parameter file by applying an advanced encryption standard symmetric algorithm;
and decrypting and analyzing the configuration file in the download address according to the advanced encryption standard symmetry algorithm to obtain the configuration parameter file of the target sensor.
Optionally, before the step of receiving the sensor parameter configuration instruction and acquiring the target sensor configuration parameter file, the method further includes:
acquiring related parameters generated in the adaptation process of the target configuration sensor; wherein the number of the target configuration sensors is at least 1;
storing related parameters generated in the target configuration sensor adapting process into a sensor parameter information file; the parameter content of the sensor parameter information file comprises any one or any combination of a bus through which hardware is operated, a data transmission mode in a sensor, chip information of the sensor, reading conditions of sensor data, a parameter range of normal operation of the sensor, sensor codes, resistance values of the sensor, a threshold value of the sensor, identification of the sensor, a name of the sensor and alarm information of the sensor;
acquiring a sensor parameter configuration file created under a substrate controller, and storing the sensor parameter information files corresponding to different sensors by using the sensor parameter configuration file;
correspondingly, when the sensor parameter configuration instruction is received, acquiring the target sensor configuration parameter file includes:
and acquiring the target sensor configuration parameter file corresponding to the target sensor from the sensor parameter configuration file according to the sensor parameter configuration instruction.
Optionally, the invoking the sensor parameter configuration framework includes:
determining a sensor type according to the sensor parameter configuration instruction;
and determining the sensor parameter configuration framework according to the sensor type, and calling the sensor parameter configuration framework.
Optionally, before the invoking the sensor configuration framework, the method further includes:
and storing the target sensor configuration parameter file into a charged erasable programmable read-only memory.
Optionally, after the filling the parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file, the method further includes:
and forming a complete monitoring chain according to the parameter configuration file of the target sensor, and visually displaying the monitoring data.
Optionally, after the receiving the sensor parameter configuration instruction, the method further includes:
checking the integrity and the legality of the configuration parameter file of the target sensor;
and when the configuration parameter file of the target sensor is complete and legal, executing the step of calling the configuration framework of the sensor parameter.
The invention also provides a configuration device of the sensor parameters, which comprises:
the target sensor configuration parameter file acquisition module is used for acquiring a target sensor configuration parameter file when receiving a sensor parameter configuration instruction;
the sensor parameter configuration framework calling module is used for calling the sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and the configuration parameter module is used for filling parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
The invention also provides a configuration device of the sensor parameters, which comprises:
a memory for storing a computer program;
and the processor is used for realizing the steps of the sensor parameter configuration method when executing the computer program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described sensor parameter configuration method.
Therefore, when the sensor parameter configuration instruction is received, the target sensor configuration parameter file is acquired; invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic; and filling parameters in the target sensor configuration parameter file into a sensor configuration framework to obtain the target sensor parameter configuration file. Compared with the prior art that when the sensor parameter configuration is carried out, all parameters are required to be written into the whole monitoring code file one by one, the method can call the configuration framework to uniformly write the parameters, namely, the parameters of the sensor can be directly configured in a mode of leading the target sensor configuration parameter file into the sensor parameter configuration framework without repeated research and development, so that the configuration efficiency of the sensor parameters can be improved.
In addition, the invention also provides a configuration device, equipment and a readable storage medium of the sensor parameters, which also have the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a current sensor adaptation scheme provided by an embodiment of the present invention;
FIG. 2 is a flowchart of a method for configuring sensor parameters according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for configuring sensor parameters according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for configuring sensor parameters according to an embodiment of the present invention;
FIG. 5 is a flow chart of a fast non-sensing configuration of sensor parameters according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a sensor parameter configuration device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a configuration device for sensor parameters according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
At the beginning of the project, sensor adaptation is currently performed, taking a specific project as an example, different code blocks are selected according to the sensor type, and then sensor parameters are modified according to differences in monitoring values (such as 3V3 voltage, 5V voltage, etc.), including but not limited to sensor name, sensor number, deviceID (device identification), M value (average value), resistance value, threshold value, entity ID, etc. And selecting a corresponding chip according to the software and hardware interface document, adapting the data processing of the read value, and finally selecting a data transmission mode according to the bus. For example, the register value is read through I2C (bus) operation hardware, and after data processing is performed through a specific sensor parameter matched and adapted by a chip, the register value is converted into visual data (the register value is converted into common unit data such as 5V,34 ℃ and the like) and the visual data is fed back to a user. The above is a current complete sensor adaptation scheme, the data parameters automatically generate an xxxx.c file (monitoring file) in the compiling process, and the xxxxxx.c file is a file containing the whole flow of sensor monitoring. When the BMC operates normally, the monitoring process pulls up the monitoring code corresponding to the sensor in the xxxx.c, and the reading value is fed back. As shown in fig. 1, a schematic diagram of a current adaptation scheme corresponding to the above-mentioned flow, that is, fig. 1 is a schematic diagram of a current sensor adaptation scheme provided by an embodiment of the present invention, so that BMC research and development is currently required to provide different versions according to different configurations, a large amount of repetitive work is generated in the research and development stage, and errors are very easy to occur in the process of developing and adapting, and a large amount of research and development cost is generated. In the use process of the client, the data which are not included in the prior planning and need to be monitored are found, however, the current BMC version runs normally in addition, the data are added to monitor, the new version needs to be developed and provided, after a series of tests, the new version is provided for the client, the process is also complicated, the client is negatively affected during the shutdown, and the configuration efficiency of the sensor parameters is lower.
Referring to fig. 2, fig. 2 is a flowchart of a method for configuring sensor parameters according to an embodiment of the present invention. The method may include:
s100, when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired.
The embodiment is not limited to a specific sensor parameter configuration instruction as long as a target sensor configuration parameter file can be determined according to the sensor parameter configuration instruction. For example, the sensor parameter configuration instruction may be an instruction containing a sensor name and a sensor configuration parameter file name; or the sensor parameter configuration instruction may be an instruction to determine monitoring of the sensor with the BMC (substrate controller). The target sensor configuration parameter file in this embodiment is a file containing the sensor parameters that need to be configured. The embodiment is not limited to a specific target sensor configuration profile. For example, the target sensor profile may be a profile including a sensor name, a sensor parameter threshold, a sensor resistance value; or the target sensor configuration parameter file may also be a configuration parameter file comprising sensor type, sensor number, sensor parameter values.
It should be noted that, when the above-mentioned receiving the sensor parameter configuration instruction, obtaining the target sensor configuration parameter file may include: receiving a sensor parameter configuration instruction; determining a download address corresponding to the target sensor configuration parameter file according to the sensor parameter configuration instruction; the download address is generated by a configuration server after configuring relevant parameters according to the sensor configuration requirement and encrypting the configuration parameter file by applying an advanced encryption standard symmetric algorithm; and decrypting and analyzing the configuration file in the download address according to the advanced encryption standard symmetry algorithm to obtain the configuration parameter file of the target sensor. In the embodiment, when the configuration parameter file of the target sensor is acquired, the configuration file in the download address is decrypted and analyzed according to the advanced encryption standard symmetry algorithm to obtain the configuration parameter file of the target sensor, and the configuration parameter file of the target sensor is obtained by decoding and analyzing by utilizing the advanced encryption standard symmetry algorithm (AdvancedEncryptionStandard, AES), so that the configuration parameter file of the target sensor is prevented from being tampered, and the safety of data acquisition is improved.
It should be noted that, when the above-mentioned sensor parameter configuration instruction is received, before the target sensor configuration parameter file is obtained, the method may further include: acquiring related parameters generated in the adaptation process of the target configuration sensor; wherein the number of the target configuration sensors is at least 1; storing related parameters generated in the target configuration sensor adapting process into a sensor parameter information file; the parameter content of the sensor parameter information file comprises any one or any combination of a bus through which hardware is operated, a data transmission mode in a sensor, chip information of the sensor, reading conditions of sensor data, a parameter range of normal operation of the sensor, sensor codes, resistance values of the sensor, a threshold value of the sensor, identification of the sensor, a name of the sensor and alarm information of the sensor; acquiring a sensor parameter configuration file created under a substrate controller, and storing sensor parameter information files corresponding to different sensors by using the sensor parameter configuration file; correspondingly, when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired, which comprises: and acquiring a target sensor configuration parameter file corresponding to the target sensor from the sensor parameter configuration file according to the sensor parameter configuration instruction. According to the embodiment, the parameters corresponding to different sensors are stored in the sensor parameter information files with different paths, and the target sensor configuration parameter files corresponding to the sensors can be acquired later because the different sensors correspond to the different sensor parameter information files, so that the accuracy of acquiring the target sensor configuration parameter files is improved.
It should be noted that, after the foregoing filling the parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file, the method may further include: and forming a complete monitoring chain according to the parameter configuration file of the target sensor, and visually displaying the monitoring data. The embodiment can form a complete monitoring chain by using the configured target sensor parameter configuration file, and monitor the working state of the sensor in real time so as to determine the health state of the current server. The embodiment can visually display the monitoring data, and determine that the sensor state can be timely fed back to the relevant main body.
It should be noted that, when the above-mentioned sensor parameter configuration instruction is received, after the target sensor configuration parameter file is obtained, the method may further include: checking the integrity and legitimacy of the configuration parameter file of the target sensor; and when the configuration parameter file of the target sensor is complete and legal, executing the step of calling the configuration parameter framework of the sensor. The embodiment determines the integrity and legality of the target sensor configuration parameter file before executing the step of calling the sensor parameter configuration framework, thereby improving the integrity and security of the sensor parameter file configuration.
S101, calling a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic.
In this embodiment, a complete xxxxxx.c file (monitoring file) is not generated in the compiling process of the BMC version, and instead, a monitoring framework is used, and the spare parameters required to be supplemented are obtained in the corresponding target sensor configuration parameter file.
It should be noted that, the foregoing invoking the sensor parameter configuration framework may include: determining the type of the sensor according to the sensor parameter configuration instruction; and determining a sensor parameter configuration framework according to the sensor type, and calling the sensor parameter configuration framework. The embodiment is not limited to a specific process of determining a sensor parameter configuration framework according to a sensor type. For example, when the sensor type is a heat dissipation sensor, determining that the sensor parameter configuration framework is a heat dissipation regulation framework; or when the sensor type is a humidification sensor, determining the sensor parameter configuration framework as a humidification regulation framework.
Before invoking the sensor configuration framework, the method may further include: the target sensor configuration parameter file is stored in a charged erasable programmable read-only memory. This embodiment will store the target sensor configuration profile in a charged erasable programmable read-only memory (EEPROM, electricallyErasableProgrammableRead-only memory). Because the data in the charged erasable programmable read-only memory can not be lost after the charged erasable programmable read-only memory is powered off, the charged erasable programmable read-only memory is used for storing the configuration parameter file of the target sensor, so that the data loss can be prevented. It will be appreciated that this embodiment monitoring process detects sensors in the EEPROM that need to be monitored, thereby invoking the corresponding sensor configuration framework.
S102, filling parameters in the target sensor configuration parameter file into a sensor configuration framework to obtain the target sensor parameter configuration file.
According to the embodiment, the parameters of the sensor are configured by filling the parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
The configuration method of the sensor parameters provided by the embodiment of the invention can comprise the following steps: when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired; invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic; and filling parameters in the target sensor configuration parameter file into a sensor configuration framework to obtain the target sensor parameter configuration file. Compared with the sensor parameter configuration method that parameters are changed from all codes or a new version is provided by stopping when the sensor parameter is currently adapted, the invention can perform non-inductive adaptation according to the sensor parameter configuration frame and the target sensor configuration parameter file, and improves the efficiency of sensor parameter configuration; in addition, the embodiment of the invention encrypts the configuration file in the download address by using an advanced encryption standard symmetric algorithm, thereby improving the security of acquiring the configuration parameter file of the target sensor; in addition, the sensor parameter configuration file is utilized to store the sensor parameter information files corresponding to different sensors, so that the efficiency of the subsequent acquisition of the sensor parameter information files is improved; in addition, different sensors correspond to different sensor parameter configuration frames, so that the accuracy of acquiring the sensor parameter configuration frames is improved; and the configuration parameter file of the target sensor is stored in the electrified erasable programmable read-only memory, so that the configuration parameter file of the target sensor is prevented from being tampered; in addition, the monitoring data is visually displayed, so that the visibility of the monitoring data is improved; and moreover, the integrity and the legality of the configuration parameter file of the target sensor are checked, and the safety of the configuration of the sensor parameters is improved.
For better understanding of the present invention, please refer to fig. 3, fig. 3 is a flowchart of another method for configuring sensor parameters according to an embodiment of the present invention, which may specifically include:
s300, when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired.
S301, determining the sensor type according to the sensor parameter configuration instruction.
The embodiment may determine the sensor type based on the sensor parameter configuration instructions. For example, determining the sensor type as a temperature monitoring sensor according to the sensor parameter configuration instructions; or determining the sensor type as a humidity monitoring sensor according to the sensor parameter configuration instruction.
S302, determining a sensor parameter configuration framework according to the sensor type, and calling the sensor parameter configuration framework.
The embodiment will determine the sensor parameter configuration framework based on the sensor type such that different sensor types correspond to different sensor parameter configuration frameworks.
S303, filling parameters in the target sensor configuration parameter file into a sensor configuration framework to obtain the target sensor parameter configuration file.
In order to facilitate understanding of the embodiment of the invention, a specific embodiment is provided, and based on the method for adapting the sensor in a fast non-sensitive manner, the fast non-sensitive adapting heat dissipation strategy can be realized, and the adapted heat dissipation parameter file (conf file) is transmitted to the BMC system in a mode of importing the configuration file. In the BMC code compiling process, a complete xxxx.c file is not generated, and a heat dissipation regulation and control frame is replaced by the complete xxxxxx.c file, and the vacant parameters needing to be supplemented are obtained in the corresponding heat dissipation parameter file. In the BMC initialization process, a heat dissipation parameter file under the BMC system is written into EEProm to determine a heat dissipation regulation strategy which needs a current project. In the BMC monitoring process, the monitoring process pulls up the monitoring code, fills the adaptive parameters of the heat dissipation parameter file, forms a complete monitoring chain, and feeds back data to a user. When an additional monitoring sensor needs to be added in the normal running process of the BMC, firstly, a complete heat dissipation parameter file is obtained, the file is uploaded to the BMC system through the function of importing configuration, the integrity and the legality of the configuration file need to be checked in the importing process, and then the configuration file is written into the EEPROM. And restarting a monitoring process (monitor task), and monitoring the newly added sensor normally in the next polling.
In the embodiment, certain differences of the sensor parameter configuration frames corresponding to different sensors are considered, so that the sensor parameter configuration frames are determined according to the sensor types, and the accuracy of sensor parameter configuration is improved.
For better understanding of the present invention, please refer to fig. 4, fig. 4 is a flowchart illustrating a method for configuring sensor parameters according to an embodiment of the present invention, which may include:
s400, storing the parameter information generated in the sensor adapting process into a target parameter file.
For ease of understanding, please refer to fig. 5, fig. 5 is a flow frame of a fast non-inductance configuration sensor parameter provided in an embodiment of the present invention. The process framework mainly comprises (1) arranging relevant parameters generated in a sensor adaptation process into a conf file (parameter information file), a bus through which hardware is operated, a data transmission mode, chip configuration (comprising data processing, reading conditions and the like), a sensor type, a sensor name, a sensor number, a deviceID (equipment identification), an M value (average value), a resistance value, a threshold value and the like, and storing the parameters generated in the sensor adaptation process. (2) And creating a sensor file (parameter configuration file) folder under the BMC system/usr/local path for storing conf files corresponding to different sensors. (3) Instead of generating a complete xxxxxx.c file in the BMC version compiling process, a monitoring framework is used, and the spare parameters required to be supplemented are acquired from the corresponding conf file. (4) In the BMC initialization process, a conf file under the/usr/local path is written into EEProm (electrically erasable programmable read-only memory) to determine a sensor (5) to be monitored in a BMC monitoring process, the monitoring process pulls up a monitoring code, adaptive parameters in the conf are filled, a complete monitoring chain is formed, and data are fed back to a user. (6) When an additional monitoring sensor needs to be added in the normal running process of the BMC, firstly, a complete conf file is manually formed, the file is uploaded to the BMC system through the function of configuration importing, the integrity and the legality of the configuration file need to be checked in the importing process, and then the configuration file is written into the EEPROM. And restarting a monitoring process (monitor task), and monitoring the newly added sensor normally in the next polling.
S401, a sensor parameter file is established under a BMC system; the sensor parameter files are used for storing target parameter files corresponding to different sensors.
S402, generating a monitoring frame in the BMC compiling process; the parameters to be supplemented in the monitoring frame are parameters of the target parameter file.
S403, storing the sensor parameter file into the electrified erasable programmable read-only memory in the BMC initialization process.
S404, pulling up a monitoring frame code in the BMC monitoring process, acquiring target filling adaptive parameters from the sensor parameter file, filling the target filling adaptive parameters into the monitoring frame to form a complete monitoring chain, and feeding back monitoring data.
And S405, when an additional monitoring sensor needs to be added, acquiring a parameter file of the target monitoring sensor, and uploading the parameter file of the target monitoring sensor to the BMC system.
S406, checking the integrity and the legality of the parameter file of the target monitoring sensor.
S407, when the target monitoring sensor file is complete and legal, writing the file into the electrified erasable programmable read-only memory;
and S408, restarting monitoring, and monitoring the newly added sensor.
The embodiment of the invention provides a method for quickly adapting a sensor without inductance, which is realized by importing complete data of the sensor to be adapted in a mode of a target sensor configuration parameter file. (1) Different configuration machine types can be compatible through one BMC version, different sensors needing to be monitored are realized through a mode of uploading configuration files, the research and development cost is greatly saved in the research and development stage, and repeated and inefficient development is avoided. (2) In the customer site, the sensor needs to be newly added for monitoring, so that the sensor adaptation can be automatically and quickly completed, a manufacturer is not required to research and develop to provide a new version, and only a newly added configuration file is required to be provided. In the adapting process, the machine is not required to be stopped and updated, the monitoring process is only required to be restarted in the machine operation process, the time is about half a minute, the method is convenient and quick, the influence on a client machine system is avoided, the BMC operation stability and the service of a client are also avoided, and the method has important practical significance in the actual production process of the client.
The following describes a configuration device of a sensor parameter according to an embodiment of the present invention, and the configuration device of a sensor parameter described below and the configuration method of a sensor parameter described above may be referred to correspondingly.
Referring to fig. 6 specifically, fig. 6 is a schematic structural diagram of a configuration device for sensor parameters according to an embodiment of the present invention, which may include:
the target sensor configuration parameter file obtaining module 100 is configured to obtain a target sensor configuration parameter file when receiving a sensor parameter configuration instruction;
the sensor parameter configuration framework calling module 200 is used for calling the sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and the configuration parameter module 300 is configured to fill parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
Further, based on the above embodiment, the above target sensor configuration parameter file obtaining module 100 may include:
a sensor parameter configuration instruction receiving unit, configured to receive the sensor parameter configuration instruction;
the download address determining unit is used for determining a download address corresponding to the target sensor configuration parameter file according to the sensor parameter configuration instruction; the download address is generated by a configuration server after configuring relevant parameters according to sensor configuration requirements and encrypting the configuration parameter file by applying an advanced encryption standard symmetric algorithm;
and the decryption unit is used for decrypting and analyzing the configuration file in the download address according to the advanced encryption standard symmetry algorithm to obtain the configuration parameter file of the target sensor.
Further, based on any of the foregoing embodiments, the configuration device of the sensor parameter may further include:
the parameter acquisition unit is used for acquiring related parameters generated in the adaptation process of the target configuration sensor; wherein the number of the target configuration sensors is at least 1;
the storage unit is used for storing relevant parameters generated in the target configuration sensor adapting process into a sensor parameter information file; the parameter content of the sensor parameter information file comprises any one or any combination of a bus through which hardware is operated, a data transmission mode in a sensor, chip information of the sensor, reading conditions of sensor data, a parameter range of normal operation of the sensor, sensor codes, resistance values of the sensor, a threshold value of the sensor, identification of the sensor, a name of the sensor and alarm information of the sensor;
the sensor parameter information file determining unit is used for acquiring a sensor parameter configuration file created under the substrate controller and storing the sensor parameter information files corresponding to different sensors by utilizing the sensor parameter configuration file;
correspondingly, the target sensor configuration parameter file obtaining module 100 includes:
and the target sensor configuration parameter file acquisition unit is used for acquiring the target sensor configuration parameter file corresponding to the target sensor from the sensor parameter configuration file according to the sensor parameter configuration instruction.
Further, based on any of the above embodiments, the sensor parameter configuration framework invoking module 200 may include:
the sensor type determining unit is used for determining the sensor type according to the sensor parameter configuration instruction;
and the sensor parameter configuration crazy-Azimuth determination unit is used for determining the sensor parameter configuration framework according to the sensor type and calling the sensor parameter configuration framework.
Further, based on any of the foregoing embodiments, the configuration device of the sensor parameter may further include:
and the target sensor configuration parameter file storage unit is used for storing the target sensor configuration parameter file into the charged erasable programmable read-only memory.
Further, based on any of the foregoing embodiments, the configuration device of the sensor parameter may further include:
and the visual monitoring unit is used for forming a complete monitoring chain according to the parameter configuration file of the target sensor and visually displaying the monitoring data.
Further, based on any of the foregoing embodiments, the configuration device of the sensor parameter may further include:
the integrity and legality checking unit is used for checking the integrity and legality of the configuration parameter file of the target sensor;
and the calling sensor parameter configuration framework unit is used for executing the step of calling the sensor parameter configuration framework when the target sensor configuration parameter file is complete and legal.
The modules and units in the sensor parameter configuration device can be changed in sequence without affecting logic.
The configuration device for the sensor parameters provided by the embodiment of the invention can comprise: the target sensor configuration parameter file obtaining module 100 is configured to obtain a target sensor configuration parameter file when receiving a sensor parameter configuration instruction; the sensor parameter configuration framework calling module 200 is used for calling the sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic; and the configuration parameter module 300 is configured to fill parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file. Compared with the sensor parameter configuration method that parameters are changed from all codes or a new version is provided by stopping when the sensor parameter is currently adapted, the invention can perform non-inductive adaptation according to the sensor parameter configuration frame and the target sensor configuration parameter file, and improves the efficiency of sensor parameter configuration; in addition, the embodiment of the invention encrypts the configuration file in the download address by using an advanced encryption standard symmetric algorithm, thereby improving the security of acquiring the configuration parameter file of the target sensor; in addition, the sensor parameter configuration file is utilized to store the sensor parameter information files corresponding to different sensors, so that the efficiency of the subsequent acquisition of the sensor parameter information files is improved; in addition, different sensors correspond to different sensor parameter configuration frames, so that the accuracy of acquiring the sensor parameter configuration frames is improved; and the configuration parameter file of the target sensor is stored in the electrified erasable programmable read-only memory, so that the configuration parameter file of the target sensor is prevented from being tampered; in addition, the monitoring data is visually displayed, so that the visibility of the monitoring data is improved; and moreover, the integrity and the legality of the configuration parameter file of the target sensor are checked, and the safety of the configuration of the sensor parameters is improved.
The following describes a configuration device for sensor parameters according to an embodiment of the present invention, and the configuration device for sensor parameters described below and the configuration method for sensor parameters described above may be referred to correspondingly.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a sensor parameter configuration device according to an embodiment of the present invention, which may include:
a memory 10 for storing a computer program;
a processor 20 for executing a computer program for implementing the above-described method of configuring sensor parameters.
The memory 10, the processor 20, and the communication interface 30 all communicate with each other via a communication bus 40.
In the embodiment of the present invention, the memory 10 is used for storing one or more programs, the programs may include program codes, the program codes include computer operation instructions, and in the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:
when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired;
invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and filling parameters in the target sensor configuration parameter file into a sensor configuration framework to obtain the target sensor parameter configuration file.
In one possible implementation, the memory 10 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, and at least one application program required for functions, etc.; the storage data area may store data created during use.
In addition, memory 10 may include read only memory and random access memory and provide instructions and data to the processor. A portion of the memory may also include NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, where the operating instructions may include various operating instructions for performing various operations. The operating system may include various system programs for implementing various basic tasks as well as handling hardware-based tasks.
The processor 20 may be a central processing unit (CentralProcessingUnit, CPU), an asic, a dsp, a fpga or other programmable logic device, and the processor 20 may be a microprocessor or any conventional processor. The processor 20 may call a program stored in the memory 10.
The communication interface 30 may be an interface of a communication module for connecting with other devices or systems.
Of course, it should be noted that the structure shown in fig. 7 does not limit the configuration device of the sensor parameter in the embodiment of the present invention, and in practical application, the configuration device of the sensor parameter may include more or less components than those shown in fig. 7, or some components may be combined.
The following describes a computer readable storage medium provided in an embodiment of the present invention, where the computer readable storage medium described below and the method for configuring sensor parameters described above may be referred to correspondingly.
The present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described sensor parameter configuration method.
The computer readable storage medium may include: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RandomAccessMemory, RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order 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 invention.
Finally, it is further noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
The above detailed description of a method, apparatus, device and readable storage medium for configuring sensor parameters provided by the present invention, the specific examples are applied to illustrate the principles and embodiments of the present invention, and the above examples are only used to help understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. A method of configuring sensor parameters, comprising:
when a sensor parameter configuration instruction is received, a target sensor configuration parameter file is acquired;
invoking a sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and filling parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
2. The method for configuring sensor parameters according to claim 1, wherein the step of acquiring the target sensor configuration parameter file when the sensor parameter configuration instruction is received includes:
receiving the sensor parameter configuration instruction;
determining a download address corresponding to the target sensor configuration parameter file according to the sensor parameter configuration instruction; the download address is generated by a configuration server after configuring relevant parameters according to sensor configuration requirements and encrypting the configuration parameter file by applying an advanced encryption standard symmetric algorithm;
and decrypting and analyzing the configuration file in the download address according to the advanced encryption standard symmetry algorithm to obtain the configuration parameter file of the target sensor.
3. The method for configuring sensor parameters according to claim 1, further comprising, before the step of acquiring the target sensor configuration parameter file when the sensor parameter configuration instruction is received:
acquiring related parameters generated in the adaptation process of the target configuration sensor; wherein the number of the target configuration sensors is at least 1;
storing related parameters generated in the target configuration sensor adapting process into a sensor parameter information file; the parameter content of the sensor parameter information file comprises any one or any combination of a bus through which hardware is operated, a data transmission mode in a sensor, chip information of the sensor, reading conditions of sensor data, a parameter range of normal operation of the sensor, sensor codes, resistance values of the sensor, a threshold value of the sensor, identification of the sensor, a name of the sensor and alarm information of the sensor;
acquiring a sensor parameter configuration file created under a substrate controller, and storing the sensor parameter information files corresponding to different sensors by using the sensor parameter configuration file;
correspondingly, when the sensor parameter configuration instruction is received, acquiring the target sensor configuration parameter file includes:
and acquiring the target sensor configuration parameter file corresponding to the target sensor from the sensor parameter configuration file according to the sensor parameter configuration instruction.
4. A method of configuring sensor parameters according to any one of claims 1 to 3, wherein the invoking the sensor parameter configuration framework comprises:
determining a sensor type according to the sensor parameter configuration instruction;
and determining the sensor parameter configuration framework according to the sensor type, and calling the sensor parameter configuration framework.
5. The method of claim 1, further comprising, prior to said invoking the sensor configuration framework:
and storing the target sensor configuration parameter file into a charged erasable programmable read-only memory.
6. The method for configuring sensor parameters according to claim 1, further comprising, after said populating the sensor configuration framework with parameters in the target sensor configuration parameter file to obtain the target sensor parameter configuration file:
and forming a complete monitoring chain according to the parameter configuration file of the target sensor, and visually displaying the monitoring data.
7. The method for configuring sensor parameters according to claim 1, further comprising, after acquiring the target sensor configuration parameter file when the sensor parameter configuration instruction is received:
checking the integrity and the legality of the configuration parameter file of the target sensor;
and when the configuration parameter file of the target sensor is complete and legal, executing the step of calling the configuration framework of the sensor parameter.
8. A device for configuring sensor parameters, comprising:
the target sensor configuration parameter file acquisition module is used for acquiring a target sensor configuration parameter file when receiving a sensor parameter configuration instruction;
the sensor parameter configuration framework calling module is used for calling the sensor parameter configuration framework; wherein the sensor parameter configuration framework is a framework comprising only sensor configuration logic;
and the configuration parameter module is used for filling parameters in the target sensor configuration parameter file into the sensor configuration framework to obtain the target sensor parameter configuration file.
9. A configuration device for sensor parameters, comprising:
a memory for storing a computer program;
processor for implementing the steps of the method for configuring sensor parameters according to any one of claims 1 to 7 when executing said computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the steps of the method of configuring sensor parameters according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311104198.3A CN117130865A (en) | 2023-08-30 | 2023-08-30 | Sensor parameter configuration method, device, equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311104198.3A CN117130865A (en) | 2023-08-30 | 2023-08-30 | Sensor parameter configuration method, device, equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117130865A true CN117130865A (en) | 2023-11-28 |
Family
ID=88859553
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311104198.3A Pending CN117130865A (en) | 2023-08-30 | 2023-08-30 | Sensor parameter configuration method, device, equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117130865A (en) |
-
2023
- 2023-08-30 CN CN202311104198.3A patent/CN117130865A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3101547A1 (en) | Control system, method, program and information processing device | |
EP2472402A1 (en) | Remote management systems and methods for mapping operating system and management controller located in a server | |
CN110007946B (en) | Method, device, equipment and medium for updating algorithm model | |
US20180052683A1 (en) | System design supporting device, system design supporting method, and system design supporting program | |
JP2002268707A (en) | Controller and tool, and system constituted of the same | |
CN112395187A (en) | Test method, test system, computer device and storage medium | |
CN114489711A (en) | Terminal upgrading method and device and storage medium | |
CN113703781B (en) | Storage system interface generation method and device, electronic equipment and readable storage medium | |
US20090248384A1 (en) | Process control system in an automation installation | |
EP4136513A1 (en) | Configuration device, update server and method for updating software of a technical installation | |
CN110597714A (en) | Kafka message testing method and device, computer equipment and storage medium | |
CN111984520A (en) | Buried point testing method, computer device and computer-readable storage medium | |
CN112835598A (en) | Automobile ECU (electronic control Unit) flashing method and system and computer readable storage medium | |
CN104461741B (en) | Graphics device interface based computing device optimizing method and device | |
CN117130865A (en) | Sensor parameter configuration method, device, equipment and readable storage medium | |
CN117149283A (en) | Method, device, equipment and storage medium for adapting plug-in card | |
CN105938337A (en) | Microcomputer controller secondary development cloud platform and usage method and configuration update method | |
CN116483416A (en) | Firmware online upgrading method, server and storage medium | |
CN108566293B (en) | Electronic device, zk node information notification method, and storage medium | |
CN112384868B (en) | Program execution support device, program execution support method, and computer-readable storage medium | |
CN113485284A (en) | Message data processing method, device, equipment and storage medium | |
JP2006318102A (en) | Field equipment management device and field equipment management method | |
CN117453257B (en) | Upgrading method based on hierarchical management, terminal equipment and readable storage medium | |
CN111722949B (en) | Information processing method, terminal, server and storage medium | |
CN114244828B (en) | Data transmission method and vehicle-mounted dynamic data management system |
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 |