Disclosure of Invention
The invention provides a method and a system for dynamically calling an Internet of things communication gateway, which are used for solving the problems of low calling efficiency and poor running stability of a network manager during calling existing in the conventional gateway dynamic calling, and adopt the following technical scheme:
a method of dynamically invoking an internet of things communication gateway, the method comprising:
the communication gateway of the Internet of things regularly establishes a sending task, wherein the sending task comprises gateway state data of the communication gateway of the Internet of things;
monitoring the processing capacity of the server in real time, and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server;
the communication gateway of the Internet of things regularly sends gateway state data of the communication gateway of the Internet of things to a server corresponding to the communication gateway of the Internet of things;
preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition;
and determining whether to carry out gateway dynamic calling or not according to a judgment result of whether the data analysis result reaches a preset condition or not and a calling instruction.
Further, the real-time monitoring of the processing capacity of the server adjusts the uploading period of the sending task in real time according to the processing capacity of the server, and comprises the following steps:
determining a basic unit period according to the maximum processing capacity value of the server;
monitoring the residual energy of the server in real time, and adjusting the uploading period to be a first adjusting period when the residual energy of the server reaches a first energy threshold, wherein the first adjusting period is as follows:
wherein, T1Represents a first adjustment period value, T0The basic unit period is represented, alpha represents a first period adjustment coefficient, and the value range of alpha is as follows: 1.8 to 2.4;
monitoring the residual energy of the server in real time, and adjusting the uploading period to be a second adjustment period when the residual energy of the server reaches a second energy threshold, wherein the second adjustment period is as follows:
wherein, T2Represents a second adjustment period value, T0The basic unit period is represented, beta represents a second period adjustment coefficient, and the value range of alpha is as follows: 2.7 to 3.6.
Further, preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result meets a preset condition, wherein the data analysis method comprises the following steps:
performing characteristic value processing on the gateway state data by using a preprocessing model to obtain a weighted characteristic value corresponding to the gateway state data; wherein the preprocessing model is as follows:
wherein C represents a gateway state data matrix, and G represents a weighted characteristic value; m represents the number of data types in the gateway state data; n represents the data volume in each type of gateway state data, CijRepresenting the parameter characteristics corresponding to the jth data in the ith data type; a is describediA type parameter indicating an ith data type;
and determining whether the gateway state data meets preset conditions or not by using the weighted characteristic value.
Further, the determining whether the gateway state data meets the preset condition by using the weighted feature value includes:
acquiring a data index value of the communication gateway of the internet of things by using the weighted characteristic value, wherein the data index value is acquired by the following formula:
wherein, Q represents a data index value, xi represents a weight characteristic ratio adjusting parameter, and the value range of xi is (0.5, 1.2);
comparing the data index value Q with a preset index reference threshold value to determine whether the gateway state data is abnormal or not; when Q is larger than or equal to Q, the index is indicated to be abnormal, when Q is smaller than Q, the index is indicated to be abnormal, and Q is a preset index reference threshold value.
Further, determining whether to perform gateway dynamic call according to a judgment result of whether the data analysis result reaches a preset condition in combination with a call instruction, including:
when the data analysis result reaches a preset condition, calling an execution function corresponding to a calling instruction from a dynamic library of the communication gateway of the Internet of things according to the calling instruction, and realizing dynamic calling of the gateway;
when the data analysis result does not reach a preset condition, scanning the communication gateway of the Internet of things to acquire abnormal data causing the communication gateway of the Internet of things to be inconsistent with the preset condition;
updating the abnormal data, acquiring updated data, and comparing the data analysis result of the gateway state data with a preset condition by using the updated data;
if the abnormal data are updated and the data analysis result reaches a preset condition, calling an execution function corresponding to the calling instruction from a dynamic library of the communication gateway of the Internet of things according to the calling instruction to realize dynamic calling of the gateway;
if the abnormal data are updated and the data analysis result does not reach a preset condition, judging a safety performance index and a residual energy index of the communication gateway of the Internet of things, and if the safety performance index and the residual energy index both meet a preset requirement, allowing a dynamic call to be performed on a call instruction; if the calling fails, no dynamic calling is executed on the calling instruction; and the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
A system for dynamically invoking an internet of things communication gateway, the system comprising:
the task creating module is used for creating a sending task at regular time by the communication gateway of the Internet of things, wherein the sending task comprises gateway state data of the communication gateway of the Internet of things;
the adjusting module is used for monitoring the processing capacity of the server in real time and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server;
the sending module is used for controlling the Internet of things communication gateway to send own gateway state data to a server corresponding to the Internet of things communication gateway at regular time;
the judging module is used for preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition;
and the dynamic calling module is used for determining whether to carry out gateway dynamic calling according to the judgment result of whether the data analysis result reaches the preset condition and the calling instruction.
Further, the adjustment module includes:
the determining module is used for determining a basic unit cycle according to the maximum processing capacity value of the server;
the first adjusting module is configured to monitor remaining energy of the server in real time, and adjust the upload period to a first adjusting period when the remaining energy of the server reaches a first energy threshold, where the first adjusting period is:
wherein, T1Represents a first adjustment period value, T0The basic unit period is represented, alpha represents a first period adjustment coefficient, and the value range of alpha is as follows: 1.8 to 2.4;
a second adjusting module, configured to monitor remaining energy of the server in real time, and adjust the upload period to a second adjustment period when the remaining energy of the server reaches a second energy threshold, where the second adjustment period is:
wherein, T2Represents a second adjustment period value, T0The basic unit period is represented, beta represents a second period adjustment coefficient, and the value range of alpha is as follows: 2.7 to 3.6.
Further, the determination module includes:
the preprocessing module is used for processing the characteristic value of the gateway state data by utilizing a preprocessing model to obtain a weighted characteristic value corresponding to the gateway state data; wherein the preprocessing model is as follows:
wherein C represents a gateway state data matrix, and G represents a weighted characteristic value; m represents the number of data types in the gateway state data; n represents the data volume in each type of gateway state data, CijRepresenting the parameter characteristics corresponding to the jth data in the ith data type; a is describediA type parameter indicating an ith data type;
and the condition determining module is used for determining whether the gateway state data meets the preset conditions by using the weighted characteristic value.
Further, the condition determining module includes:
an index value obtaining module, configured to obtain a data index value of the internet of things communication gateway by using the weighted feature value, where the data index value is obtained through the following formula:
wherein Q represents a data index value, xi represents a weight characteristic ratio adjusting parameter, and the value range of xi is (0.5, 1.2);
the abnormity judgment module is used for comparing the data index value Q with a preset index reference threshold value and determining whether the gateway state data is abnormal or not; when Q is larger than or equal to Q, the index is indicated to be abnormal, when Q is smaller than Q, the index is indicated to be abnormal, and Q is a preset index reference threshold value.
Further, the dynamic calling module comprises:
the first calling execution module is used for calling an execution function corresponding to a calling instruction from a dynamic library of the communication gateway of the Internet of things according to the calling instruction when the data analysis result reaches a preset condition, so as to realize dynamic calling of the gateway;
the scanning module is used for scanning the Internet of things communication gateway when the data analysis result does not reach a preset condition, and acquiring abnormal data which cause the Internet of things communication gateway not to meet the preset condition;
the updating module is used for updating the abnormal data, acquiring updated data, and comparing the data analysis result of the gateway state data with a preset condition again by using the updated data;
a second calling execution module, configured to, if the abnormal data is updated and the data analysis result reaches a preset condition, call, according to a call instruction, an execution function corresponding to the call instruction from a dynamic library of the internet of things communication gateway, so as to implement dynamic calling of the gateway;
the calling execution module III is used for judging the safety performance index and the residual energy index of the communication gateway of the Internet of things if the data analysis result does not reach the preset condition after the abnormal data is updated, and allowing one-time dynamic calling for a calling instruction if the safety performance index and the residual energy index both meet the preset requirement; if the calling fails, no dynamic calling is executed on the calling instruction; and the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
The invention has the beneficial effects that:
the method and the system for dynamically calling the communication gateway of the Internet of things provided by the invention can determine whether the operation of the gateway has a fault in advance by detecting the state of the gateway in advance, and can effectively ensure the stable operation of software and hardware equipment of the gateway before dynamic calling by carrying out dynamic calling after the fault detection. The calling efficiency during dynamic calling is improved. Meanwhile, the uploading period of the sending task is adjusted in a real-time self-adaptive mode by utilizing the processing capacity of the server, data transmission can be reasonably carried out according to the processing capacity of the server, and excessive server resources occupied by gateway state data monitoring during high-intensity operation of the server can be effectively avoided, so that the efficiency of the whole network and the gateway state data detection is prevented from being reduced, and the burden of the server is effectively reduced. The network state data detection efficiency is improved, and the dynamic calling efficiency is further improved.
Detailed Description
The preferred embodiments of the present invention will be described in conjunction with the accompanying drawings, and it should be understood that they are presented herein only to illustrate and explain the present invention and not to limit the present invention.
The invention provides a method and a system for dynamically calling an Internet of things communication gateway, which are used for solving the problems of low calling efficiency and poor calling stability of the conventional gateway dynamic calling.
The embodiment of the invention provides a method for dynamically calling an internet of things communication gateway, and as shown in fig. 1, the method comprises the following steps:
s1, the Internet of things communication gateway establishes a sending task at regular time, and the sending task comprises gateway state data of the Internet of things communication gateway;
s2, monitoring the processing capacity of the server in real time, and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server;
s3, the Internet of things communication gateway sends gateway state data of the Internet of things communication gateway to a server corresponding to the Internet of things communication gateway at regular time;
s4, preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition;
and S5, determining whether to carry out gateway dynamic calling or not according to the judgment result of whether the data analysis result reaches the preset condition and the calling instruction.
The working principle of the technical scheme is as follows: firstly, the communication gateway of the internet of things establishes a sending task at regular time, wherein the sending task comprises gateway state data of the communication gateway of the internet of things; then, monitoring the processing capacity of the server in real time, and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server; then, the communication gateway of the internet of things sends own gateway state data to a server corresponding to the communication gateway of the internet of things at regular time; then, preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition; and finally, determining whether to carry out gateway dynamic calling or not according to a judgment result of whether the data analysis result reaches a preset condition or not and a calling instruction.
The effect of the above technical scheme is as follows: whether a fault exists in the operation of the gateway is determined in advance by detecting the state of the gateway in advance, and dynamic calling is carried out after the fault is detected, so that the stable operation of software and hardware equipment of the gateway before dynamic calling can be effectively ensured. The calling efficiency during dynamic calling is improved. Meanwhile, the uploading period of the sending task is adjusted in a real-time self-adaptive mode by utilizing the processing capacity of the server, data transmission can be reasonably carried out according to the processing capacity of the server, and excessive server resources occupied by gateway state data monitoring during high-intensity operation of the server can be effectively avoided, so that the efficiency of the whole network and the gateway state data detection is prevented from being reduced, and the burden of the server is effectively reduced. The network state data detection efficiency is improved, and the dynamic calling efficiency is further improved.
In an embodiment of the present invention, the monitoring the processing capability of the server in real time, and adjusting the transmission task upload period in real time according to the processing capability of the server, includes:
s201, determining a basic unit cycle according to the maximum processing capacity value of the server;
s202, monitoring the residual energy of the server in real time, and adjusting the uploading period to be a first adjusting period when the residual energy of the server reaches a first energy threshold, wherein the first adjusting period is as follows:
wherein, T1Represents a first adjustment period value, T0The basic unit period is represented, alpha represents a first period adjustment coefficient, and the value range of alpha is as follows: 1.8 to 2.4;
s203, monitoring the residual energy of the server in real time, and adjusting the uploading period to be a second adjustment period when the residual energy of the server reaches a second energy threshold, wherein the second adjustment period value is as follows:
wherein the content of the first and second substances,T2represents a second adjustment period value, T0The basic unit period is represented, beta represents a second period adjustment coefficient, and the value range of alpha is as follows: 2.7 to 3.6.
The working principle of the technical scheme is as follows: and adjusting the uploading period of the sending task in real time by taking the basic unit period as a basis and combining the residual energy of the current server.
The effect of the above technical scheme is as follows: the data transmission can be reasonably carried out according to the processing capacity of the server, and the situation that excessive server resources are occupied by monitoring gateway state data when the server runs at high intensity can be effectively avoided, so that the efficiency of the whole network and the gateway state data processing is avoided being reduced, and the burden of the server is effectively reduced. The network state data detection efficiency is improved, and the dynamic calling efficiency is further improved. Meanwhile, the models of the first adjustment period value and the second adjustment period value can enable the matching degree of the adjusted uploading period and the residual capacity value of the actual server. The method and the system have the advantages that the resources occupied by the gateway state data processing and the server for processing other data of the Internet of things are coordinated to the greatest extent when the residual energy levels of different servers are different, the data processing efficiency of the gateway state data processing and the server for processing other data of the Internet of things is ensured, and the reduction caused by the occupation of the resources for processing the gateway state data is avoided.
In an embodiment of the present invention, the gateway state data is preprocessed to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result meets a preset condition, wherein the data analysis method comprises the following steps:
s401, carrying out characteristic value processing on the gateway state data by using a preprocessing model to obtain a weighted characteristic value corresponding to the gateway state data; wherein the preprocessing model is as follows:
wherein C represents a gateway state data matrix, and G represents a weighted characteristic value; m represents the number of data types in the gateway state data; n represents the data volume in each type of gateway state data, CijRepresenting the parameter characteristics corresponding to the jth data in the ith data type; a is describediA type parameter indicating an ith data type;
s402, determining whether the gateway state data meet preset conditions or not by using the weighted characteristic value.
Wherein the determining whether the gateway state data meets the preset condition by using the weighted feature value comprises:
s4021, acquiring a data index value of the Internet of things communication gateway by using the weighted characteristic value, wherein the data index value is acquired by the following formula:
wherein Q represents a data index value, xi represents a weight characteristic ratio adjusting parameter, and the value range of xi is (0.5, 1.2);
s4022, comparing the data index value Q with a preset index reference threshold value, and determining whether the gateway state data is abnormal; when Q is larger than or equal to Q, the index is indicated to be abnormal, when Q is smaller than Q, the index is indicated to be abnormal, and Q is a preset index reference threshold value.
The working principle of the technical scheme is as follows: firstly, carrying out characteristic value processing on the gateway state data by using a preprocessing model to obtain a weighted characteristic value corresponding to the gateway state data; and then, determining whether the gateway state data meets preset conditions or not by using the weighted characteristic value.
The effect of the above technical scheme is as follows: the method and the formula are used for detecting the index abnormality, the problem that whether the index abnormality exists in the gateway can be accurately and accurately determined by using the weighted characteristic value of the data and the index value of the data, and the accuracy of monitoring the running state of the gateway is effectively improved. Meanwhile, the data index value obtained according to the formula is higher in matching degree with the actual running state of the gateway, and the error of running monitoring of the gateway state is reduced to the greatest extent.
In an embodiment of the present invention, determining whether to perform gateway dynamic call according to a result of determining whether the data analysis result meets a preset condition in combination with a call instruction includes:
s501, when the data analysis result reaches a preset condition, calling an execution function corresponding to a calling instruction from a dynamic library of the communication gateway of the Internet of things according to the calling instruction, and realizing dynamic calling of the gateway;
s502, when the data analysis result does not reach a preset condition, scanning the Internet of things communication gateway to obtain abnormal data causing the Internet of things communication gateway not to meet the preset condition;
s503, updating the abnormal data to obtain updated data, and comparing the data analysis result of the gateway state data with preset conditions again by using the updated data;
s504, if the data analysis result reaches a preset condition after the abnormal data are updated, calling an execution function corresponding to the calling instruction from a dynamic library of the Internet of things communication gateway according to the calling instruction to realize dynamic calling of the gateway;
s505, if the abnormal data are updated and the data analysis result does not reach a preset condition, judging a safety performance index and a residual energy index of the communication gateway of the Internet of things, and if the safety performance index and the residual energy index both meet a preset requirement, allowing a dynamic call to be performed on a call instruction; if the calling fails, no dynamic calling is executed on the calling instruction; the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
The working principle of the technical scheme is as follows: firstly, when the data analysis result reaches a preset condition, calling an execution function corresponding to a calling instruction in a dynamic library of the communication gateway of the Internet of things according to the calling instruction to realize dynamic calling of the gateway; then, when the data analysis result does not reach a preset condition, scanning the communication gateway of the Internet of things to acquire abnormal data causing the communication gateway of the Internet of things to be inconsistent with the preset condition; then, updating the abnormal data to obtain updated data, and comparing the data analysis result of the gateway state data with preset conditions again by using the updated data; then, if the abnormal data are updated and the data analysis result reaches a preset condition, calling an execution function corresponding to the calling instruction from a dynamic library of the communication gateway of the internet of things according to the calling instruction to realize dynamic calling of the gateway; finally, if the abnormal data are updated and the data analysis result does not reach a preset condition, judging the safety performance index and the residual energy index of the communication gateway of the Internet of things, and if the safety performance index and the residual energy index both meet a preset requirement, allowing a dynamic call to be performed on a call instruction; if the calling fails, no dynamic calling is executed on the calling instruction; and the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
The effect of the above technical scheme is as follows: the gateway is scanned when the communication gateway of the Internet of things is not in accordance with the preset conditions, the reason caused by abnormal data can be quickly determined, meanwhile, the abnormal data is detected after being updated, the method is used for avoiding that the gateway is mistakenly judged to be abnormal in operation under the condition that the gateway data are abnormal due to accidental factors such as network abnormality and the like, further avoiding that the dynamic calling of the gateway is influenced due to the delay of the condition, the normal Internet operation and data processing are influenced, the detection accuracy of the running state of the gateway is effectively ensured, the stability of the Internet operation and data processing is ensured after the monitoring of the running state of the gateway is increased, and the calling efficiency and the stability of the gateway are improved.
On the other hand, the gateway which still does not accord with the preset condition after the second detection is subjected to the second detection is allowed to execute one-time dynamic calling when the safety performance index and the residual energy index are ensured to accord with the preset threshold value requirement, so that the influence on normal internet operation and data processing caused by the influence on the dynamic calling executed by the gateway due to the delay of the accidental factors of the internet or the shallow layer or simple system problems is avoided under the condition of ensuring the network safety and the permission of the gateway capacity. In this case, the dynamic call execution frequency is limited to one time, and the operation that fails after one dynamic call is tried is effectively prohibited in time. Effectively avoid the gateway resource quota to waste, improve the effective rate of utilization of gateway.
The embodiment of the invention provides a system for dynamically calling an internet of things communication gateway, as shown in fig. 2, the system comprises:
the task creating module is used for creating a sending task at regular time by the communication gateway of the Internet of things, wherein the sending task comprises gateway state data of the communication gateway of the Internet of things;
the adjusting module is used for monitoring the processing capacity of the server in real time and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server;
the sending module is used for controlling the Internet of things communication gateway to send own gateway state data to a server corresponding to the Internet of things communication gateway at regular time;
the judging module is used for preprocessing the gateway state data to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition;
and the dynamic calling module is used for determining whether to carry out gateway dynamic calling according to the judgment result of whether the data analysis result reaches the preset condition and the calling instruction.
The working principle of the technical scheme is as follows: the method comprises the steps that a task creating module is used for creating a sending task at regular time by the communication gateway of the Internet of things, wherein the sending task comprises gateway state data of the communication gateway of the Internet of things; monitoring the processing capacity of the server in real time by using an adjusting die, and adaptively adjusting the uploading period of the transmission task in real time according to the processing capacity of the server; the sending module is used for controlling the Internet of things communication gateway to send own gateway state data to a server corresponding to the Internet of things communication gateway at regular time; preprocessing the gateway state data through a judging module to obtain preprocessed data; the server performs data analysis on the preprocessed data to obtain a data analysis result, and determines whether the data analysis result reaches a preset condition; and determining whether to carry out gateway dynamic calling or not by using a dynamic calling module according to a judgment result of whether the data analysis result reaches a preset condition in combination with a calling instruction.
The effect of the above technical scheme is as follows: whether a fault exists in the operation of the gateway is determined in advance by detecting the state of the gateway in advance, and dynamic calling is carried out after the fault is detected, so that the stable operation of software and hardware equipment of the gateway before dynamic calling can be effectively ensured. The calling efficiency during dynamic calling is improved. Meanwhile, the uploading period of the sending task is adjusted in a real-time self-adaptive mode by utilizing the processing capacity of the server, data transmission can be reasonably carried out according to the processing capacity of the server, and excessive server resources occupied by gateway state data monitoring during high-intensity operation of the server can be effectively avoided, so that the efficiency of the whole network and the gateway state data detection is prevented from being reduced, and the burden of the server is effectively reduced. The network state data detection efficiency is improved, and the dynamic calling efficiency is further improved.
In one embodiment of the present invention, the adjusting module includes:
the determining module is used for determining a basic unit cycle according to the maximum processing capacity value of the server;
the first adjusting module is configured to monitor remaining energy of the server in real time, and adjust the upload period to a first adjusting period when the remaining energy of the server reaches a first energy threshold, where the first adjusting period is:
wherein, T1Represents a first adjustment period value, T0The basic unit period is represented, alpha represents a first period adjustment coefficient, and the value range of alpha is as follows: 1.8 to 2.4;
a second adjusting module, configured to monitor remaining energy of the server in real time, and adjust the upload period to a second adjustment period when the remaining energy of the server reaches a second energy threshold, where the second adjustment period is:
wherein, T2Represents a second adjustment period value, T0The basic unit period is represented, beta represents a second period adjustment coefficient, and the value range of alpha is as follows: 2.7 to 3.6.
The working principle of the technical scheme is as follows: firstly, determining a basic unit cycle through a determining module according to the maximum processing capacity value of a server; then, monitoring the residual energy of the server in real time by using a first adjusting module, and adjusting the uploading period to be a first adjusting period when the residual energy of the server reaches a first energy threshold value; and finally, monitoring the residual energy of the server in real time by adopting a second adjusting module, and adjusting the uploading period to be a second adjusting period when the residual energy of the server reaches a second energy threshold value.
The effect of the above technical scheme is as follows: the data transmission can be reasonably carried out according to the processing capacity of the server, and the situation that excessive server resources are occupied by monitoring gateway state data when the server runs at high intensity can be effectively avoided, so that the efficiency of the whole network and the gateway state data processing is avoided being reduced, and the burden of the server is effectively reduced. The network state data detection efficiency is improved, and the dynamic calling efficiency is further improved. Meanwhile, the models of the first adjustment period value and the second adjustment period value can enable the matching degree of the adjusted uploading period and the residual capacity value of the actual server. The method and the system have the advantages that the resources occupied by the gateway state data processing and the server for processing other data of the Internet of things are coordinated to the greatest extent when the residual energy levels of different servers are different, the data processing efficiency of the gateway state data processing and the server for processing other data of the Internet of things is ensured, and the reduction caused by the occupation of the resources for processing the gateway state data is avoided.
In one embodiment of the present invention, the determining module includes:
the preprocessing module is used for processing the characteristic value of the gateway state data by utilizing a preprocessing model to obtain a weighted characteristic value corresponding to the gateway state data; wherein the preprocessing model is as follows:
wherein C represents a gateway state data matrix, and G represents a weighted characteristic value; m represents the number of data types in the gateway state data; n represents the data volume in each type of gateway state data, CijRepresenting the parameter characteristics corresponding to the jth data in the ith data type; a is describediA type parameter indicating an ith data type;
and the condition determining module is used for determining whether the gateway state data meets the preset conditions by using the weighted characteristic value.
Wherein the condition determining module comprises:
an index value obtaining module, configured to obtain a data index value of the internet of things communication gateway by using the weighted feature value, where the data index value is obtained through the following formula:
wherein Q represents a data index value, xi represents a weight characteristic ratio adjusting parameter, and the value range of xi is (0.5, 1.2);
the abnormity judgment module is used for comparing the data index value Q with a preset index reference threshold value and determining whether the gateway state data is abnormal or not; when Q is larger than or equal to Q, the index is indicated to be abnormal, when Q is smaller than Q, the index is indicated to be abnormal, and Q is a preset index reference threshold value.
The working principle of the technical scheme is as follows: firstly, a preprocessing module utilizes a preprocessing model to perform characteristic value processing on the gateway state data to obtain a weighted characteristic value corresponding to the gateway state data; and then, determining whether the gateway state data meets the preset conditions or not by using the weighted characteristic value through a condition determination module. In the operation process of the condition determining module, an index value obtaining module is adopted to obtain a data index value of the communication gateway of the Internet of things by using the weighted characteristic value, and the data index value Q is compared with a preset index reference threshold value by an abnormality judging module to determine whether the gateway state data is abnormal or not; when Q is larger than or equal to Q, the index is indicated to be abnormal, when Q is smaller than Q, the index is indicated to be abnormal, and Q is a preset index reference threshold value.
The effect of the above technical scheme is as follows: the method and the formula are used for detecting the index abnormality, the problem that whether the index abnormality exists in the gateway can be accurately and accurately determined by using the weighted characteristic value of the data and the index value of the data, and the accuracy of monitoring the running state of the gateway is effectively improved. Meanwhile, the data index value obtained according to the formula is higher in matching degree with the actual running state of the gateway, and the error of running monitoring of the gateway state is reduced to the greatest extent.
In an embodiment of the present invention, the dynamic call module includes:
the calling execution module I is used for calling an execution function corresponding to the calling instruction in a dynamic library of the communication gateway of the Internet of things according to the calling instruction when the data analysis result reaches a preset condition, so that the dynamic calling of the gateway is realized;
the scanning module is used for scanning the Internet of things communication gateway when the data analysis result does not reach a preset condition, and acquiring abnormal data causing the Internet of things communication gateway not to meet the preset condition;
the updating module is used for updating the abnormal data, acquiring updated data, and comparing the data analysis result of the gateway state data with a preset condition again by using the updated data;
a second calling execution module, configured to, if the abnormal data is updated and the data analysis result reaches a preset condition, call, according to a call instruction, an execution function corresponding to the call instruction from a dynamic library of the internet of things communication gateway, so as to implement dynamic calling of the gateway;
the calling execution module III is used for judging the safety performance index and the residual energy index of the communication gateway of the Internet of things if the data analysis result does not reach the preset condition after the abnormal data is updated, and allowing one-time dynamic calling for a calling instruction if the safety performance index and the residual energy index both meet the preset requirement; if the calling fails, no dynamic calling is executed on the calling instruction; and the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
The working principle of the technical scheme is that firstly, when the data analysis result reaches a preset condition, an execution function corresponding to a calling instruction is called in a dynamic library of the communication gateway of the internet of things according to the calling instruction by calling an execution module, so that the dynamic calling of the gateway is realized; when the data analysis result does not reach a preset condition, scanning the Internet of things communication gateway by using a scanning module to obtain abnormal data causing the Internet of things communication gateway not to meet the preset condition; then, updating the abnormal data through an updating module to obtain updated data, and comparing the data analysis result of the gateway state data with the preset condition again by using the updated data; if the abnormal data are updated, calling an execution function corresponding to the calling instruction in a dynamic library of the communication gateway of the Internet of things according to the calling instruction by using a calling execution module II when the data analysis result reaches a preset condition, and realizing dynamic calling of the gateway;
if the abnormal data are updated and the data analysis result does not reach a preset condition, judging the safety performance index and the residual energy index of the communication gateway of the Internet of things by using a calling execution module III, and if the safety performance index and the residual energy index both meet a preset requirement, allowing a dynamic calling for a calling instruction; if the calling fails, no dynamic calling is executed on the calling instruction; and the safety performance index and the residual energy are index parameter thresholds preset according to the actual condition of the network.
The effect of the above technical scheme is as follows: the gateway is scanned when the communication gateway of the internet of things is not in accordance with preset conditions, the reason caused by abnormal data can be rapidly determined, meanwhile, the abnormal data is detected after being updated, the abnormal data is used for avoiding that the gateway is judged to be abnormally operated under the condition that the gateway data are abnormal due to accidental factors such as network abnormality and the like, further avoiding that the gateway is delayed to influence the execution of dynamic calling due to the condition, the normal internet operation and data processing are influenced, the detection accuracy of the running state of the gateway is effectively ensured, the stability of the internet operation and data processing is ensured after the monitoring of the running state of the gateway is increased, and the calling efficiency and the stability of the gateway are 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.