CN113821242A - Intelligent firmware matching method and system - Google Patents
Intelligent firmware matching method and system Download PDFInfo
- Publication number
- CN113821242A CN113821242A CN202111149526.2A CN202111149526A CN113821242A CN 113821242 A CN113821242 A CN 113821242A CN 202111149526 A CN202111149526 A CN 202111149526A CN 113821242 A CN113821242 A CN 113821242A
- Authority
- CN
- China
- Prior art keywords
- firmware
- equipment
- target
- upgrading
- upgraded
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/50—Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
- G06F21/57—Certifying or maintaining trusted computer platforms, e.g. secure boots or power-downs, version controls, system software checks, secure updates or assessing vulnerabilities
- G06F21/572—Secure firmware programming, e.g. of basic input output system [BIOS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses an intelligent firmware matching method and system, which comprises the following steps: the cloud acquires the equipment model of the equipment to be monitored, carries out equipment model name inspection and judges whether the equipment model name exists in the preset upgrading table or not; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device; the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device; and the cloud end inquires a firmware upgrading packet database according to the firmware identification information, determines a target firmware upgrading packet and sends the target firmware upgrading packet to the equipment to be monitored. The matching efficiency and the matching accuracy when the cloud end is matched with the firmware of the device to be monitored are improved, the long-distance upgrading time is shortened, and the user experience is improved.
Description
Technical Field
The invention relates to the technical field of communication, in particular to an intelligent firmware matching method and system.
Background
With the continuous development of cloud technology, the method is widely applied to various industries. For example, the method is applied to the field of fire protection maintenance, the technologies such as 4G/5G, Internet of things and cloud computing are combined to realize the conversion of fire protection maintenance work from extensive, traditional and inefficient to scientific, intelligent and informatization, and the maintenance work and supervision are on line in real time, so that the modern management of fire protection safety is realized. When monitoring building fire-fighting facilities, along with continuous optimization of programs, continuous upgrading and optimization of firmware of monitoring equipment are needed. In the prior art, when the firmware of the monitoring device is remotely upgraded based on the cloud, the cloud is firstly required to be matched with the firmware of the monitoring device, but the matching efficiency is low, errors are easy to occur, the length of the remote upgrade is prolonged, and the user experience is influenced.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, a first objective of the present invention is to provide an intelligent firmware matching method, which improves matching efficiency and matching accuracy when a cloud matches a firmware of a device to be monitored, shortens a remote upgrade time, and improves user experience.
The second purpose of the invention is to provide a firmware intelligent matching system.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides an intelligent firmware matching method, including:
the cloud acquires the equipment model of the equipment to be monitored, carries out equipment model name inspection and judges whether the equipment model name exists in the preset upgrading table or not;
if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device;
and the cloud end inquires a firmware upgrading packet database according to the firmware identification information, determines a target firmware upgrading packet and sends the target firmware upgrading packet to the equipment to be monitored.
According to some embodiments of the invention, the device to be monitored comprises at least one of an electrical fire monitor, a gas fire extinguishing controller, a fire alarm host, a fire door monitor, and a terminal information collecting device.
According to some embodiments of the invention, the transmission device comprises:
the information acquisition module is used for being connected with equipment to be monitored, is compatible with RS232/485, CAN bus and Ethernet communication modes, and supports an RS485 one-to-many host communication mode;
the data processing module is used for carrying out localized processing on the firmware identification information, realizing information analysis, rearranging according to a uniform communication protocol mode and then forwarding to the communication module;
the communication module is used for uploading the uniformly processed effective information to the cloud based on at least one transmission mode of wired communication, 4G communication, 5G communication, NB communication, LoRa communication, Z i gbee communication and international TCP communication protocol;
and the power supply module is used for providing electric energy for the information acquisition module, the data processing module and the communication module.
According to some embodiments of the invention, the transmission device further comprises: and the fault early warning module is used for monitoring faults of the computer and sending fault prompt information when the fault is determined.
According to some embodiments of the present invention, determining whether the device model name exists in the preset upgrade table includes:
based on a preset equipment model definition language, verifying the equipment model name to obtain a verification result;
when the verification result is determined to be reasonable, acquiring the name length and the name characters of the equipment model name;
calculating a first similarity between the name length of the model name of the equipment and the name length of the model name of the target equipment in a preset upgrading table;
calculating a second similarity between the name character of the model name of the equipment and the name character of the model name of the target equipment;
and determining a third similarity between the equipment model name and the target equipment model name according to the first similarity and the second similarity, and determining that the equipment model name exists in the preset upgrading table when the third similarity is determined to be greater than a preset similarity.
According to some embodiments of the present invention, after the connection between the device to be monitored and the transmission apparatus is established, the method further includes performing time calibration on the device to be monitored and the transmission apparatus.
According to some embodiments of the invention, after the alarm prompt message is sent, the alarm message is stored.
According to some embodiments of the present invention, the upgrading the firmware of the device to be monitored according to the target firmware upgrade package includes:
acquiring a public key and a firmware record table of the equipment to be monitored, verifying a plurality of firmware in the firmware record table according to the public key, acquiring signature information of a private key corresponding to the public key on the firmware when verification is successful and the corresponding firmware when verification fails, and removing the corresponding firmware when verification fails from the firmware record table to obtain an updated firmware record table;
respectively acquiring recorded firmware original data packets of the firmware according to the updated firmware record table;
generating a plurality of data packets to be upgraded according to the signature information and the firmware original data packets of the firmware;
performing type identification on the plurality of data packets to be upgraded, determining the types corresponding to the plurality of data packets to be upgraded, and performing cluster analysis according to the types corresponding to the plurality of data packets to be upgraded to obtain a plurality of classification sets;
extracting the characteristics of the data packet to be upgraded in each classification set to obtain the characteristics of the data packet to be upgraded and the character string characteristics included in the data packet to be upgraded;
determining the in-class association relation of each data packet to be upgraded in the classification set according to the data packet characteristics and the character string characteristics;
respectively obtaining classification set characteristics of a plurality of classification sets, and determining inter-class association relation among the classification sets according to the classification set characteristics;
establishing a data model about a data packet to be upgraded according to the intra-class association relation and the inter-class association relation, determining an upgrading sequence according to the data model, and establishing a first identifier for the data packet to be upgraded;
analyzing the target firmware upgrading package to obtain a plurality of firmware upgrading packages, determining a difference file between the updating packages and a data package to be upgraded of the corresponding firmware, generating corresponding target images according to the difference file, arranging the target images according to the upgrading sequence, and establishing a second identifier for the target images;
before the data package to be upgraded is upgraded according to the target mirror image, the first identification is matched with the first identification, when the matching is determined to be successful, the digital signature of the target mirror image is obtained, digital signature authentication is carried out according to a public key of the target mirror image, and when the authentication is determined to be passed, the data package to be upgraded is upgraded based on the target mirror image.
According to some embodiments of the present invention, after upgrading the data packet to be upgraded based on the target image, the method further includes:
upgrading the data packet to be upgraded based on the target mirror image to obtain a target data packet, obtaining a public key and a signature of the target data packet, and determining a private key of the target data packet according to the signature;
matching the public key of the target data packet with a private key, extracting a detail data table of the target data packet when the matching is successful, and verifying the integrity of the target data packet according to the detail data table;
when the verification is confirmed to pass, establishing an updating firmware list, and acquiring code information corresponding to the updating firmware according to the updating firmware list;
and detecting and analyzing the code information, generating a detection report according to a detection and analysis result, and sending prompt information when determining that the code leak exists in the detection report.
In order to achieve the above object, a second embodiment of the present invention provides an intelligent firmware matching system, including:
the cloud end is used for acquiring the equipment model of the equipment to be monitored, carrying out equipment model name inspection and judging whether the equipment model name exists in the preset upgrading table or not; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
the equipment to be monitored is used for receiving the firmware upgrading prompt information and sending firmware identification information based on the transmission device;
and the cloud end is also used for inquiring a firmware upgrading packet database according to the firmware identification information, determining a target firmware upgrading packet and sending the target firmware upgrading packet to the equipment to be monitored.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings:
FIG. 1 is a flow diagram of a firmware intelligent matching method according to one embodiment of the invention;
FIG. 2 is a flow diagram of a firmware intelligent matching method according to yet another embodiment of the invention;
FIG. 3 is a block diagram of a firmware intelligent matching system according to one embodiment of the invention;
FIG. 4 is a block diagram of a firmware intelligent matching system according to yet another embodiment of the invention.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it will be understood that they are described herein for the purpose of illustration and explanation and not limitation.
As shown in fig. 1, an embodiment of the first aspect of the present invention provides a firmware intelligent matching method, including steps S1-S4:
s1, the cloud acquires the equipment model of the equipment to be monitored, carries out equipment model name inspection and judges whether the equipment model name exists in the preset upgrading table or not;
s2, if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
s3, the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device;
and S4, the cloud end inquires a firmware upgrade packet database according to the firmware identification information, determines a target firmware upgrade packet and sends the target firmware upgrade packet to the equipment to be monitored.
The working principle of the technical scheme is as follows: before all transmission devices leave a factory, only boot l loader and a test program are burned in the equipment, after a user obtains the equipment model of the equipment to be monitored on site, the equipment model is selected on a mobile phone terminal APP, so that the cloud side obtains the equipment model of the equipment to be monitored, the cloud side carries out equipment model name inspection, and whether the equipment model name exists in the preset upgrading table or not is judged; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device; the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device; and the cloud end inquires a firmware upgrading packet database according to the firmware identification information, determines a target firmware upgrading packet and sends the target firmware upgrading packet to the equipment to be monitored.
The beneficial effects of the above technical scheme are that: the matching efficiency and the matching accuracy when the cloud end is matched with the firmware of the device to be monitored are improved, the long-distance upgrading time is shortened, and the user experience is improved.
According to some embodiments of the invention, the device to be monitored comprises at least one of an electrical fire monitor, a gas fire extinguishing controller, a fire alarm host, a fire door monitor, and a terminal information collecting device.
According to some embodiments of the invention, the transmission device comprises:
the information acquisition module is used for being connected with equipment to be monitored, is compatible with RS232/485, CAN bus and Ethernet communication modes, and supports an RS485 one-to-many host communication mode;
the data processing module is used for carrying out localized processing on the firmware identification information, realizing information analysis, rearranging according to a uniform communication protocol mode and then forwarding to the communication module;
the communication module is used for uploading the uniformly processed effective information to the cloud based on at least one transmission mode of wired communication, 4G communication, 5G communication, NB communication, LoRa communication, Z i gbee communication and international TCP communication protocol;
and the power supply module is used for providing electric energy for the information acquisition module, the data processing module and the communication module.
The working principle of the technical scheme is as follows: as shown in fig. 4, the transmission device includes an information acquisition module, which is used for connecting with a device to be monitored, is compatible with RS232/485, CAN bus and ethernet communication modes, and supports RS485 one-to-many host communication mode; the data processing module is used for carrying out localized processing on the firmware identification information, realizing information analysis, rearranging according to a uniform communication protocol mode and then forwarding to the communication module; the communication module is used for uploading the uniformly processed effective information to the cloud based on at least one transmission mode of wired communication, 4G communication, 5G communication, NB communication, LoRa communication, Z i gbee communication and international TCP communication protocol;
and the power supply module is used for providing electric energy for the information acquisition module, the data processing module and the communication module.
The beneficial effects of the above technical scheme are that: the stability of connection between the equipment to be monitored and the cloud end is guaranteed based on the transmission device, and the safety and the accuracy of data transmission are improved.
According to some embodiments of the invention, the transmission device further comprises: and the fault early warning module is used for monitoring faults of the computer and sending fault prompt information when the fault is determined.
The working principle and the beneficial effects of the technical scheme are as follows: the fault alarm function has the functions of monitoring, alarming and transmitting faults of the machine, and timely sends out fault prompt information under the condition that the short line of the transmission device cannot guarantee information transmission or power supply abnormality and equipment cannot be started, so that the equipment faults can be timely found and maintained, and the maintenance timeliness is improved.
As shown in fig. 2, according to some embodiments of the present invention, determining whether the device model name exists in the preset upgrade table includes steps S11-S15:
s11, checking the equipment model name based on a preset equipment model definition language to obtain a checking result;
s12, when the verification result is determined to be reasonable, acquiring the name length and the name characters of the equipment model name;
s13, calculating a first similarity between the name length of the device model name and the name length of the target device model name in a preset upgrading table;
s14, calculating a second similarity between the name character of the device model name and the name character of the target device model name;
and S15, determining a third similarity between the equipment model name and the target equipment model name according to the first similarity and the second similarity, and determining that the equipment model name exists in the preset upgrading table when the third similarity is determined to be greater than a preset similarity.
The working principle of the technical scheme is as follows: based on a preset equipment model definition language, verifying the equipment model name to obtain a verification result; when the verification result is determined to be reasonable, acquiring the name length and the name characters of the equipment model name; calculating a first similarity between the name length of the model name of the equipment and the name length of the model name of the target equipment in a preset upgrading table; calculating a second similarity between the name character of the model name of the equipment and the name character of the model name of the target equipment; and determining a third similarity between the equipment model name and the target equipment model name according to the first similarity and the second similarity, and determining that the equipment model name exists in the preset upgrading table when the third similarity is determined to be greater than a preset similarity.
The beneficial effects of the above technical scheme are that: and carrying out primary verification on the name of the equipment model based on a preset equipment model definition language, and judging the rationality of the name of the equipment model according to a verification result, such as whether the name of the equipment model is complete. And then accurately calculating a third similarity between the determined equipment model name and the target equipment model name according to a first similarity between the name length of the equipment model name and the name length of the target equipment model name in a preset upgrading table and a second similarity between the name character of the equipment model name and the name character of the target equipment model name, so as to improve the accuracy of determining whether the equipment model name exists in the preset upgrading table.
According to some embodiments of the present invention, after the connection between the device to be monitored and the transmission apparatus is established, the method further includes performing time calibration on the device to be monitored and the transmission apparatus.
The working principle of the technical scheme is as follows: after the equipment to be monitored is connected with the transmission device, time calibration is carried out on the equipment to be monitored and the transmission device.
The beneficial effects of the above technical scheme are that: the consistency of the transmission time of the equipment to be monitored and the transmission device is ensured, and the accuracy of data transmission is improved conveniently.
According to some embodiments of the invention, after the alarm prompt message is sent, the alarm message is stored.
The working principle and the beneficial effects of the technical scheme are as follows: the local storage can be used for alarming, monitoring equipment faults and other information, supporting the local storage to record at least 5000 pieces of alarm information, preventing data from being lost under the condition of power failure and conveniently tracing the data when needed.
According to some embodiments of the present invention, the upgrading the firmware of the device to be monitored according to the target firmware upgrade package includes:
acquiring a public key and a firmware record table of the equipment to be monitored, verifying a plurality of firmware in the firmware record table according to the public key, acquiring signature information of a private key corresponding to the public key on the firmware when verification is successful and the corresponding firmware when verification fails, and removing the corresponding firmware when verification fails from the firmware record table to obtain an updated firmware record table;
respectively acquiring recorded firmware original data packets of the firmware according to the updated firmware record table;
generating a plurality of data packets to be upgraded according to the signature information and the firmware original data packets of the firmware;
performing type identification on the plurality of data packets to be upgraded, determining the types corresponding to the plurality of data packets to be upgraded, and performing cluster analysis according to the types corresponding to the plurality of data packets to be upgraded to obtain a plurality of classification sets;
extracting the characteristics of the data packet to be upgraded in each classification set to obtain the characteristics of the data packet to be upgraded and the character string characteristics included in the data packet to be upgraded;
determining the in-class association relation of each data packet to be upgraded in the classification set according to the data packet characteristics and the character string characteristics;
respectively obtaining classification set characteristics of a plurality of classification sets, and determining inter-class association relation among the classification sets according to the classification set characteristics;
establishing a data model about a data packet to be upgraded according to the intra-class association relation and the inter-class association relation, determining an upgrading sequence according to the data model, and establishing a first identifier for the data packet to be upgraded;
analyzing the target firmware upgrading package to obtain a plurality of firmware upgrading packages, determining a difference file between the updating packages and a data package to be upgraded of the corresponding firmware, generating corresponding target images according to the difference file, arranging the target images according to the upgrading sequence, and establishing a second identifier for the target images;
before the data package to be upgraded is upgraded according to the target mirror image, the first identification is matched with the first identification, when the matching is determined to be successful, the digital signature of the target mirror image is obtained, digital signature authentication is carried out according to a public key of the target mirror image, and when the authentication is determined to be passed, the data package to be upgraded is upgraded based on the target mirror image.
The working principle and the beneficial effects of the technical scheme are as follows: acquiring a public key and a firmware record table of the equipment to be monitored, verifying a plurality of firmware in the firmware record table according to the public key, acquiring signature information of a private key corresponding to the public key on the firmware when verification is successful and the corresponding firmware when verification fails, and removing the corresponding firmware when verification fails from the firmware record table to obtain an updated firmware record table; the method and the device are convenient for accurately determining the firmware to be upgraded in the equipment to be monitored, and providing the firmware which is not upgraded, thereby being convenient for reducing the matching complexity, reducing the calculation amount and simultaneously being convenient for improving the matching efficiency and the accuracy of the upgraded firmware. Respectively acquiring recorded firmware original data packets of the firmware according to the updated firmware record table; generating a plurality of data packets to be upgraded according to the signature information and the firmware original data packets of the firmware; and accurately determining a data packet to be upgraded, and simultaneously realizing accurate starting of corresponding firmware to prepare for upgrading. Performing type identification on the plurality of data packets to be upgraded, determining the types corresponding to the plurality of data packets to be upgraded, and performing cluster analysis according to the types corresponding to the plurality of data packets to be upgraded to obtain a plurality of classification sets; extracting the characteristics of the data packet to be upgraded in each classification set to obtain the characteristics of the data packet to be upgraded and the character string characteristics included in the data packet to be upgraded; determining the in-class association relation of each data packet to be upgraded in the classification set according to the data packet characteristics and the character string characteristics; respectively obtaining classification set characteristics of a plurality of classification sets, and determining inter-class association relation among the classification sets according to the classification set characteristics; establishing a data model about a data packet to be upgraded according to the intra-class association relation and the inter-class association relation, determining an upgrading sequence according to the data model, and establishing a first identifier for the data packet to be upgraded; the upgrading sequence among the data packets to be upgraded is conveniently and accurately determined, and the accuracy of firmware upgrading is ensured. Analyzing the target firmware upgrading package to obtain a plurality of firmware upgrading packages, determining a difference file between the updating packages and a data package to be upgraded of the corresponding firmware, generating corresponding target images according to the difference file, arranging the target images according to the upgrading sequence, and establishing a second identifier for the target images; before the data package to be upgraded is upgraded according to the target mirror image, the first identification is matched with the first identification, when the matching is determined to be successful, the digital signature of the target mirror image is obtained, digital signature authentication is carried out according to a public key of the target mirror image, and when the authentication is determined to be passed, the data package to be upgraded is upgraded based on the target mirror image. The data packet to be upgraded and the target mirror image are arranged according to the upgrading sequence respectively, and are matched according to the first identification, so that the efficiency and the accuracy of matching of firmware upgrading are improved. Before the successful matching and upgrading, the validity of the target mirror image is also checked, so that undetected matching errors and the accuracy of the target mirror image are avoided, and the accuracy of firmware upgrading is improved.
According to some embodiments of the present invention, after upgrading the data packet to be upgraded based on the target image, the method further includes:
upgrading the data packet to be upgraded based on the target mirror image to obtain a target data packet, obtaining a public key and a signature of the target data packet, and determining a private key of the target data packet according to the signature;
matching the public key of the target data packet with a private key, extracting a detail data table of the target data packet when the matching is successful, and verifying the integrity of the target data packet according to the detail data table;
when the verification is confirmed to pass, establishing an updating firmware list, and acquiring code information corresponding to the updating firmware according to the updating firmware list;
and detecting and analyzing the code information, generating a detection report according to a detection and analysis result, and sending prompt information when determining that the code leak exists in the detection report.
The working principle of the technical scheme is as follows: upgrading the data packet to be upgraded based on the target mirror image to obtain a target data packet, obtaining a public key and a signature of the target data packet, and determining a private key of the target data packet according to the signature; matching the public key of the target data packet with a private key, extracting a detail data table of the target data packet when the matching is successful, and verifying the integrity of the target data packet according to the detail data table; when the verification is confirmed to pass, establishing an updating firmware list, and acquiring code information corresponding to the updating firmware according to the updating firmware list; and detecting and analyzing the code information, generating a detection report according to a detection and analysis result, and sending prompt information when determining that the code leak exists in the detection report.
The beneficial effects of the above technical scheme are that: after the data packet to be upgraded is upgraded based on the target image, firstly, the integrity of the target data packet is checked, when the data packet passes the checking, specific code information in the firmware running process is determined, detection and analysis are carried out, a detection report is generated according to the detection and analysis result, and when the code leak exists in the detection report, prompt information is sent. The vulnerability of the updated firmware can be optimized conveniently by a user in time, the reliability of the firmware operation is ensured, and the safety of the system is improved.
In an embodiment, the checking the device model name to determine whether the device model name exists in the preset upgrade table includes:
respectively carrying out similarity calculation on the equipment model names and a plurality of preset equipment model names in a preset upgrading table, determining the highest similarity, judging whether the highest similarity is smaller than the preset similarity, and indicating that the equipment model names do not exist in the preset upgrading table when the highest similarity is determined to be smaller than the preset similarity; otherwise, the device model name exists in the preset upgrading table.
Calculating the similarity between the model name of the equipment and the model name of the preset equipment, comprising the following steps:
splitting the equipment model name based on a preset rule to obtain a plurality of characters, inquiring a preset character-characteristic value data table according to the characters, and determining a characteristic value corresponding to each character;
splitting the preset equipment model name based on a preset rule to obtain a plurality of target characters, inquiring a preset character-characteristic value data table according to the plurality of target characters, and determining a characteristic value corresponding to each target character;
calculating the similarity sim (x) between the equipment model name and the preset equipment model name according to the characteristic value corresponding to each character and the characteristic value corresponding to each target character1,x2):
Wherein x is1Is the equipment model name; x is the number of2Presetting a device model name; x is the number of1iThe characteristic value corresponding to the ith character in the equipment model name;the average value of the characteristic values corresponding to the characters in the equipment model name is obtained; x is the number of2iThe method comprises the steps of setting a characteristic value corresponding to an ith target character in a preset device model name;the average value of the characteristic values corresponding to the target characters in the preset device model name is obtained; n is the number of characters in the equipment model name and the number of target characters in the preset equipment model name, and the number of the characters in the equipment model name is equal to the number of the target characters in the preset equipment model name.
The working principle and the beneficial effects of the technical scheme are as follows: the method and the device are convenient for accurately determining the similarity between the device model name and a plurality of preset device model names in a preset upgrading table, so that the highest similarity is accurately determined, the accuracy of judging the highest similarity and the preset similarity is improved, and the accuracy of judging whether the device model name exists in the preset upgrading table is improved. When the similarity between the equipment model name and a preset equipment model name is calculated, splitting the equipment model name based on a preset rule to obtain a plurality of characters, inquiring a preset character-characteristic value data table according to the characters, and determining a characteristic value corresponding to each character; splitting the preset equipment model name based on a preset rule to obtain a plurality of target characters, inquiring a preset character-characteristic value data table according to the plurality of target characters, and determining a characteristic value corresponding to each target character; and calculating the similarity between the equipment model name and the preset equipment model name according to the characteristic value corresponding to each character and the characteristic value corresponding to each target character. The characters are regularized, corresponding characteristic values are determined, semantic matching of the characters is avoided, calculation complexity is reduced, calculation efficiency and accuracy are improved, meanwhile, the accuracy of similarity between the name of the model of the calculation equipment and the name of the preset equipment model is improved by calculating the characteristic value of each character in the name of the model of the equipment based on the formula.
As shown in fig. 3, a second embodiment of the present invention provides a firmware intelligent matching system, including:
the cloud end is used for acquiring the equipment model of the equipment to be monitored, carrying out equipment model name inspection and judging whether the equipment model name exists in the preset upgrading table or not; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
the equipment to be monitored is used for receiving the firmware upgrading prompt information and sending firmware identification information based on the transmission device;
and the cloud end is also used for inquiring a firmware upgrading packet database according to the firmware identification information, determining a target firmware upgrading packet and sending the target firmware upgrading packet to the equipment to be monitored.
The working principle of the technical scheme is as follows: before all transmission devices leave a factory, only boot l loader and a test program are burned in the equipment, after a user obtains the equipment model of the equipment to be monitored on site, the equipment model is selected on a mobile phone terminal APP, so that the cloud side obtains the equipment model of the equipment to be monitored, the cloud side carries out equipment model name inspection, and whether the equipment model name exists in the preset upgrading table or not is judged; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device; the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device; and the cloud end inquires a firmware upgrading packet database according to the firmware identification information, determines a target firmware upgrading packet and sends the target firmware upgrading packet to the equipment to be monitored.
The beneficial effects of the above technical scheme are that: the matching efficiency and the matching accuracy when the cloud end is matched with the firmware of the device to be monitored are improved, the long-distance upgrading time is shortened, and the user experience is improved.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (10)
1. An intelligent firmware matching method is characterized by comprising the following steps:
the cloud acquires the equipment model of the equipment to be monitored, carries out equipment model name inspection and judges whether the equipment model name exists in the preset upgrading table or not;
if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
the equipment to be monitored receives the firmware upgrading prompt information and sends firmware identification information based on the transmission device;
and the cloud end inquires a firmware upgrading packet database according to the firmware identification information, determines a target firmware upgrading packet and sends the target firmware upgrading packet to the equipment to be monitored.
2. The intelligent firmware matching method according to claim 1, wherein the device to be monitored comprises at least one of an electrical fire monitor, a gas fire extinguishing controller, a fire alarm host, a fire door monitor and a terminal information acquisition device.
3. The intelligent firmware matching method of claim 1, wherein the transmission means comprises:
the information acquisition module is used for being connected with equipment to be monitored, is compatible with RS232/485, CAN bus and Ethernet communication modes, and supports an RS485 one-to-many host communication mode;
the data processing module is used for carrying out localized processing on the firmware identification information, realizing information analysis, rearranging according to a uniform communication protocol mode and then forwarding to the communication module;
the communication module is used for uploading the uniformly processed effective information to the cloud based on at least one transmission mode of wired communication, 4G communication, 5G communication, NB communication, LoRa communication, Zigbee communication and international TCP communication protocol;
and the power supply module is used for providing electric energy for the information acquisition module, the data processing module and the communication module.
4. The intelligent firmware matching method of claim 1, wherein the transmitting device further comprises: and the fault early warning module is used for monitoring faults of the computer and sending fault prompt information when the fault is determined.
5. The intelligent firmware matching method according to claim 1, wherein the determining whether the device model name exists in the preset upgrade table includes:
based on a preset equipment model definition language, verifying the equipment model name to obtain a verification result;
when the verification result is determined to be reasonable, acquiring the name length and the name characters of the equipment model name;
calculating a first similarity between the name length of the model name of the equipment and the name length of the model name of the target equipment in a preset upgrading table;
calculating a second similarity between the name character of the model name of the equipment and the name character of the model name of the target equipment;
and determining a third similarity between the equipment model name and the target equipment model name according to the first similarity and the second similarity, and determining that the equipment model name exists in the preset upgrading table when the third similarity is determined to be greater than a preset similarity.
6. The intelligent firmware matching method according to claim 1, wherein after the connection between the device to be monitored and the transmission device is established, the method further comprises time calibration between the device to be monitored and the transmission device.
7. The intelligent firmware matching method according to claim 1, wherein after the alarm prompt message is sent out, the alarm message is stored.
8. The intelligent firmware matching method according to claim 1, wherein the firmware upgrade of the device to be monitored according to the target firmware upgrade package includes:
acquiring a public key and a firmware record table of the equipment to be monitored, verifying a plurality of firmware in the firmware record table according to the public key, acquiring signature information of a private key corresponding to the public key on the firmware when verification is successful and the corresponding firmware when verification fails, and removing the corresponding firmware when verification fails from the firmware record table to obtain an updated firmware record table;
respectively acquiring recorded firmware original data packets of the firmware according to the updated firmware record table;
generating a plurality of data packets to be upgraded according to the signature information and the firmware original data packets of the firmware;
performing type identification on the plurality of data packets to be upgraded, determining the types corresponding to the plurality of data packets to be upgraded, and performing cluster analysis according to the types corresponding to the plurality of data packets to be upgraded to obtain a plurality of classification sets;
extracting the characteristics of the data packet to be upgraded in each classification set to obtain the characteristics of the data packet to be upgraded and the character string characteristics included in the data packet to be upgraded;
determining the in-class association relation of each data packet to be upgraded in the classification set according to the data packet characteristics and the character string characteristics;
respectively obtaining classification set characteristics of a plurality of classification sets, and determining inter-class association relation among the classification sets according to the classification set characteristics;
establishing a data model about a data packet to be upgraded according to the intra-class association relation and the inter-class association relation, determining an upgrading sequence according to the data model, and establishing a first identifier for the data packet to be upgraded;
analyzing the target firmware upgrading package to obtain a plurality of firmware upgrading packages, determining a difference file between the updating packages and a data package to be upgraded of the corresponding firmware, generating corresponding target images according to the difference file, arranging the target images according to the upgrading sequence, and establishing a second identifier for the target images;
before the data package to be upgraded is upgraded according to the target mirror image, the first identification is matched with the first identification, when the matching is determined to be successful, the digital signature of the target mirror image is obtained, digital signature authentication is carried out according to a public key of the target mirror image, and when the authentication is determined to be passed, the data package to be upgraded is upgraded based on the target mirror image.
9. The intelligent firmware matching method according to claim 8, after upgrading the data packet to be upgraded based on the target image, further comprising:
upgrading the data packet to be upgraded based on the target mirror image to obtain a target data packet, obtaining a public key and a signature of the target data packet, and determining a private key of the target data packet according to the signature;
matching the public key of the target data packet with a private key, extracting a detail data table of the target data packet when the matching is successful, and verifying the integrity of the target data packet according to the detail data table;
when the verification is confirmed to pass, establishing an updating firmware list, and acquiring code information corresponding to the updating firmware according to the updating firmware list;
and detecting and analyzing the code information, generating a detection report according to a detection and analysis result, and sending prompt information when determining that the code leak exists in the detection report.
10. A firmware intelligent matching system, comprising:
the cloud end is used for acquiring the equipment model of the equipment to be monitored, carrying out equipment model name inspection and judging whether the equipment model name exists in the preset upgrading table or not; if the firmware upgrading prompting information exists, the equipment to be monitored is connected with a transmission device, and the firmware upgrading prompting information is sent based on the transmission device;
the equipment to be monitored is used for receiving the firmware upgrading prompt information and sending firmware identification information based on the transmission device;
and the cloud end is also used for inquiring a firmware upgrading packet database according to the firmware identification information, determining a target firmware upgrading packet and sending the target firmware upgrading packet to the equipment to be monitored.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111149526.2A CN113821242B (en) | 2021-09-29 | 2021-09-29 | Intelligent firmware matching method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111149526.2A CN113821242B (en) | 2021-09-29 | 2021-09-29 | Intelligent firmware matching method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113821242A true CN113821242A (en) | 2021-12-21 |
CN113821242B CN113821242B (en) | 2023-08-22 |
Family
ID=78915881
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111149526.2A Active CN113821242B (en) | 2021-09-29 | 2021-09-29 | Intelligent firmware matching method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113821242B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968314A (en) * | 2022-08-01 | 2022-08-30 | 摩尔线程智能科技(北京)有限责任公司 | Firmware upgrading method and device for display equipment, electronic equipment and storage medium |
CN117312102A (en) * | 2023-11-29 | 2023-12-29 | 上海华立软件系统有限公司 | Debugging method, system, device and computer readable medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105591824A (en) * | 2016-01-14 | 2016-05-18 | 杭州赫智电子科技有限公司 | Method and system for firmware upgrade |
CN106293621A (en) * | 2016-08-01 | 2017-01-04 | 飞天诚信科技股份有限公司 | A kind of firmware upgrade method and device |
CN109117158A (en) * | 2018-08-02 | 2019-01-01 | 郑州云海信息技术有限公司 | Firmware update and device |
US20210216637A1 (en) * | 2020-01-10 | 2021-07-15 | Beijing Xiaomi Mobile Software Co., Ltd. | Firmware upgrade method and device, and storage medium |
CN113452802A (en) * | 2020-03-24 | 2021-09-28 | 华为技术有限公司 | Equipment model identification method, device and system |
-
2021
- 2021-09-29 CN CN202111149526.2A patent/CN113821242B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105591824A (en) * | 2016-01-14 | 2016-05-18 | 杭州赫智电子科技有限公司 | Method and system for firmware upgrade |
CN106293621A (en) * | 2016-08-01 | 2017-01-04 | 飞天诚信科技股份有限公司 | A kind of firmware upgrade method and device |
CN109117158A (en) * | 2018-08-02 | 2019-01-01 | 郑州云海信息技术有限公司 | Firmware update and device |
US20210216637A1 (en) * | 2020-01-10 | 2021-07-15 | Beijing Xiaomi Mobile Software Co., Ltd. | Firmware upgrade method and device, and storage medium |
CN113452802A (en) * | 2020-03-24 | 2021-09-28 | 华为技术有限公司 | Equipment model identification method, device and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114968314A (en) * | 2022-08-01 | 2022-08-30 | 摩尔线程智能科技(北京)有限责任公司 | Firmware upgrading method and device for display equipment, electronic equipment and storage medium |
CN117312102A (en) * | 2023-11-29 | 2023-12-29 | 上海华立软件系统有限公司 | Debugging method, system, device and computer readable medium |
CN117312102B (en) * | 2023-11-29 | 2024-02-13 | 上海华立软件系统有限公司 | Debugging method, system, device and computer readable medium |
Also Published As
Publication number | Publication date |
---|---|
CN113821242B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113821242B (en) | Intelligent firmware matching method and system | |
CN104468267A (en) | Information safety penetration testing method for distribution automation system | |
CN116894659B (en) | Intelligent operation and maintenance management method and system for charging pile, computer equipment and storage medium | |
KR101730267B1 (en) | Apparatus and method for checking conformance of substation automation equipment | |
CN101609407A (en) | Detection method based on the full station model file coupling of publisher/subscriber's pattern | |
CN112367680A (en) | External communication test method and device based on intelligent electric meter and computer equipment | |
CN115524082A (en) | Underground pipeline gas leakage alarm system | |
CN109473945A (en) | A kind of verification of relay protection model data and method of automatic configuration | |
CN112615848B (en) | Vulnerability repair state detection method and system | |
CN117607531A (en) | Transformer substation direct current system fault investigation system and investigation method thereof | |
CN103279702A (en) | Method for monitoring full-substation model file version during debugging of intelligent substation | |
CN111931012A (en) | Data model self-adaption method and device based on fault management subsystem | |
CN115604037B (en) | Communication safety test method of fault monitoring system | |
CN111897556A (en) | Video monitoring service system based on cloud computing | |
CN109982284B (en) | Communication system and method for line inspection | |
CN115987621A (en) | Shore power network target range system based on block chain | |
CN115880803A (en) | Intelligent inspection system and method | |
CN113495750B (en) | Upgrade detection method and device for equipment and server | |
CN111488235B (en) | Terminal fault processing method, system and cloud platform | |
CN113835939A (en) | Method and device for processing fault information, storage medium and electronic device | |
CN111146863A (en) | Power safety detection method for transformer substation | |
CN113157532B (en) | Instrument fault warning method and device based on terminal linkage | |
CN117857457B (en) | Internet of things flow optimization system based on edge calculation | |
US20230276276A1 (en) | Method and System for Monitoring a Wireless Communication Network | |
CN112860650A (en) | Instrument fault warning method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |