Disclosure of Invention
In view of the above, it is necessary to provide a communication link control method, apparatus, computer device and storage medium for solving the above technical problems.
A communication link control method is applied to an intelligent gateway adopting solar power supply and/or induction power supply, and comprises the following steps:
determining a first sensor and a second sensor which are in communication connection with the intelligent gateway; the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor is in communication connection with the intelligent gateway through a first communication link, and the second sensor is in communication connection with the intelligent gateway through a second communication link;
acquiring a first residual electric quantity corresponding to the first sensor and a second residual electric quantity corresponding to the second sensor;
when the first remaining capacity and/or the second remaining capacity meet/meets a preset capacity threshold, determining a target communication link from the first communication link and the second communication link, and closing the target communication link.
In one embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold includes:
when the first residual capacity is larger than a preset first capacity threshold and the second residual capacity is smaller than the first threshold, determining the second communication link as a target communication link;
and the electric quantity corresponding to the first electric quantity threshold value is the electric quantity required by the first sensor and the second sensor to maintain a normal operation state.
In one embodiment, the method further comprises the following steps:
reducing the current communication frequency of the first sensor and the intelligent gateway to obtain a target communication frequency;
sending the target communication frequency to the first sensor to instruct the first sensor to communicate with the intelligent gateway according to the target communication frequency.
In one embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold includes:
and when the first residual capacity and the second residual capacity are both smaller than a preset first capacity threshold, determining the first communication link and the second communication link as target communication links.
In one embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold includes:
when the first residual electric quantity is larger than a preset second electric quantity threshold value, determining the second communication link as a target communication link; the second electric quantity threshold value is larger than a preset first electric quantity threshold value.
In one embodiment, the method further comprises the following steps:
determining the current electric quantity corresponding to the sensor with the closed target communication link based on the preset energy storage parameter;
and if the current electric quantity is larger than a preset first electric quantity threshold value, starting the target communication link.
In one embodiment, the method further comprises the following steps:
and acquiring sensing data acquired by a sensor corresponding to the target communication link during the closing period of the target communication link.
A communication link control apparatus applied to an intelligent gateway using solar power and/or inductive power, the apparatus comprising:
the sensor determination module is used for determining a first sensor and a second sensor which are in communication connection with the intelligent gateway; the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor is in communication connection with the intelligent gateway through a first communication link, and the second sensor is in communication connection with the intelligent gateway through a second communication link;
a remaining power acquiring module, configured to acquire a first remaining power corresponding to the first sensor and a second remaining power corresponding to the second sensor;
and the target communication link closing module is used for determining a target communication link from the first communication link and the second communication link and closing the target communication link when the first residual electric quantity and/or the second residual electric quantity meet a preset electric quantity threshold value.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method as claimed in any one of the above when the computer program is executed.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of the preceding claims.
The communication link control method, the communication link control device, the computer equipment and the storage medium adopt the intelligent gateway powered by solar energy or induction, and realize the automatic closing of the communication link by determining the first sensor and the second sensor which are in communication connection with the intelligent gateway, wherein the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor adopts the first communication link to be in communication connection with the intelligent gateway, the second sensor adopts the second communication link to be in communication connection with the intelligent gateway, so that the intelligent gateway can acquire the first residual electric quantity corresponding to the first sensor and the second residual electric quantity corresponding to the second sensor, when the first residual electric quantity and/or the second residual electric quantity meet the preset electric quantity threshold value, the target communication link is determined from the first communication link and the second communication link, and the target communication link is closed, the communication between the intelligent gateway and the sensor can be reduced when the electric quantity is limited, the electric quantity is saved, and the using continuity of the sensor is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The communication link control method provided by the application can be applied to the application environment shown in fig. 1. In the application environment, the intelligent gateway 102 may communicate with the plurality of sensors 104 through a network, the intelligent gateway 102 may be deployed in an outdoor environment, and obtain electric energy in a solar power supply and/or inductive power supply manner, the electric energy obtained by the intelligent gateway 102 may be used for the operation of the sensors 104, for example, the intelligent gateway may be electrically connected to the sensors 104, and the intelligent gateway 102 may distribute the obtained electric energy to the sensors 104.
The intelligent gateway 102 may include a plurality of modules, such as a 5G module, a 4G module, a MESH networking module, a main processor, and the like, and the intelligent gateway 102 may send an instruction to the sensors 104, collect the sensing data collected by the sensors 104, and upload the sensing data to the internet of things platform in a centralized manner. The smart terminal 104 may be a monitoring device that may monitor and collect data from the transmission line and/or the grid device.
In one embodiment, as shown in fig. 2, a communication link control method is provided, which is described by taking the method as an example applied to the intelligent gateway 102 in fig. 1, and includes the following steps
Step 201, determining a first sensor and a second sensor which are in communication connection with the intelligent gateway.
As an example, a first sensor and a second sensor may be used to monitor an operating state of a power grid and collect sensing data, the data types of the sensing data collected by the first sensor and the second sensor are the same, the first sensor may be communicatively connected to the smart gateway using a first communication link, and the second sensor may be communicatively connected to the smart gateway using a second communication link. Specifically, the smart gateway may monitor the same power grid through a plurality of sensors, where the same power grid may be the same power grid device or power grid line, or may be a power grid device or power grid line within the same range, and for example, the smart gateway may monitor the operating state of the outdoor power grid device through two or more image capturing devices. When one or more sensors in the multiple sensors suspend operation, the rest sensors in normal operation can still collect sensing data, and the intelligent gateway can analyze the data only based on the sensor uploaded by at least one sensor in the multiple sensors to determine whether the power grid is abnormal. In one example, the first sensor and the second sensor may be any one of: the device comprises a camera device, a microclimate sensor, a tower inclination sensor, a tension sensor, an inclination angle sensor, a wire clamp temperature measuring sensor, a wire galloping sensor and an intelligent spacer.
The first sensor and the second sensor can acquire electric energy from the intelligent gateway; or, a solar power supply module may be disposed on the first sensor and/or the second sensor, and the first sensor and/or the second sensor may convert solar energy into electric energy through the solar power supply module, and collect and transmit sensing data using the electric energy.
In practical applications, the intelligent gateway may determine a first sensor and a second sensor communicatively connected thereto, wherein the first sensor may be one or more first sensors, and the second sensor may also be one or more second sensors.
Step 201, acquiring a first remaining power corresponding to the first sensor and a second remaining power corresponding to the second sensor;
as an example, the first remaining amount of power may be a remaining amount of power available to the first sensor, and the second remaining amount of power may be a remaining amount of power available to the second sensor. The first remaining power and/or the second remaining power may be power that can be allocated to the first sensor and/or the second sensor by the intelligent gateway, or may also be power that is stored by the first sensor and/or the second sensor through the solar power supply module.
After determining the first sensor and the second sensor which are in communication connection with the intelligent gateway, the intelligent gateway may obtain a first remaining power amount corresponding to the first sensor, and obtain a second remaining power amount corresponding to the second sensor. Specifically, the intelligent gateway may communicate with the first sensor and/or the second sensor through a communication link corresponding to the sensor, receive the remaining power reported by the first sensor and/or the second sensor through communication, and determine the remaining power through calculation.
Step 203, when the first remaining power and/or the second remaining power satisfy a preset power threshold, determining a target communication link from the first communication link and the second communication link, and closing the target communication link.
After the first remaining capacity and the second remaining capacity are determined, the first remaining capacity and the second remaining capacity can be compared with a preset capacity threshold. When the first remaining capacity and/or the second remaining capacity is smaller than a preset capacity threshold, a target communication link may be determined from the first communication link and the second communication link, and the target communication link is closed.
In this embodiment, an intelligent gateway powered by solar energy or induction can determine a first sensor and a second sensor communicatively connected to the intelligent gateway, where the data types of sensing data collected by the first sensor and the second sensor are the same, the first sensor is communicatively connected to the intelligent gateway by a first communication link, the second sensor is communicatively connected to the intelligent gateway by a second communication link, and the intelligent gateway can further obtain a first remaining power amount corresponding to the first sensor and a second remaining power amount corresponding to the second sensor, when the first remaining power amount and/or the second remaining power amount satisfy a preset power amount threshold, a target communication link is determined from the first communication link and the second communication link, and the target communication link is closed, so that the automatic closing of the communication link is realized, and communication between the intelligent gateway and the sensors can be reduced when the power amount is limited, the electric quantity is saved, and the using continuity of the sensor is improved.
In an embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold may include:
and when the first residual capacity is greater than a preset first capacity threshold and the second residual capacity is less than the first threshold, determining the second communication link as a target communication link.
The electric quantity corresponding to the first electric quantity threshold may be an electric quantity required by the first sensor and the second sensor to maintain a normal operation state, for example, the electric quantity may be an electric quantity required by the first sensor or the second sensor to maintain a normal operation state within a preset time. The first sensor and the second sensor may have the same first electric quantity threshold, or may have different second electric quantity thresholds, and if there is a difference between the models of the first sensor and the second sensor or between the solar power modules used, the first electric quantity thresholds corresponding to the first sensor and the second sensor may be different.
In a specific implementation, after the first remaining capacity and the second remaining capacity are obtained, the first remaining capacity and the second remaining capacity may be compared with a preset first capacity threshold. When the first remaining power is greater than the first power threshold and the second remaining power is less than the first power threshold, it may be determined that the first remaining power corresponding to the first sensor is available for the first sensor to normally operate, and the second remaining power corresponding to the second sensor may temporarily fail to maintain the second sensor in a normal operation state.
In this embodiment, when the first remaining power is greater than the preset first power threshold and the second remaining power is less than the first power threshold, the second communication link is determined as the target communication link, and the communication link may be closed when the sensor remaining power is insufficient, so as to reduce power consumption.
In one embodiment, the method may further include the steps of:
reducing the current communication frequency of the first sensor and the intelligent gateway to obtain a target communication frequency; sending the target communication frequency to the first sensor to instruct the first sensor to communicate with the intelligent gateway according to the target communication frequency.
As an example, the target communication frequency may be a frequency for instructing the first sensor to communicate with a smart gateway.
In a specific implementation, the intelligent gateway can control the communication frequency of each sensor and the intelligent gateway. After the normal connection between the intelligent gateway and the first sensor is maintained, and the second communication link is determined as the target communication link and is closed, the intelligent gateway may determine the current communication frequency between the first sensor and the intelligent gateway, and reduce the current communication frequency to obtain the target communication frequency.
After the target communication frequency is obtained, the target communication frequency can be sent to the first sensor through the first communication link, and after the first sensor receives the target communication frequency, the first sensor can communicate with the intelligent gateway according to the target communication frequency.
In this embodiment, the intelligent gateway may adjust down a current communication frequency between the first sensor and the intelligent gateway to obtain a target communication frequency, and send the target communication frequency to the first sensor to instruct the first sensor to communicate with the intelligent gateway according to the target communication frequency, so that when the available electric quantity is limited, the communication frequency is limited, the electric quantity is effectively reduced, and the working time of the first sensor is prolonged.
In an embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold may include:
and when the first residual capacity and the second residual capacity are both smaller than a preset first capacity threshold, determining the first communication link and the second communication link as target communication links.
In practical application, after the first remaining capacity and the second remaining capacity are obtained, the first remaining capacity and the second remaining capacity may be compared with a preset first capacity threshold. When both the first remaining capacity and the second remaining capacity are smaller than the first capacity threshold, the first remaining capacity corresponding to the first sensor and the second remaining capacity corresponding to the second sensor may be determined, and the sensor may not be maintained in a normal operation state for a while.
In this embodiment, when the first remaining capacity and the second remaining capacity are smaller than the first capacity threshold, the first communication link and the second communication link may be determined as the target communication link, so that the communication link may be closed when the remaining capacity of the sensor is insufficient, and power consumption may be reduced.
In an embodiment, the determining a target communication link from the first communication link and the second communication link when the first remaining capacity and/or the second remaining capacity satisfy a preset capacity threshold may include:
and when the first residual electric quantity is larger than a preset second electric quantity threshold value, determining the second communication link as a target communication link.
As an example, the second electric quantity threshold is greater than the preset first electric quantity threshold, and the electric quantity corresponding to the second electric quantity threshold may be an electric quantity capable of maintaining the sensor to operate for a preset time period.
In practical application, after the first remaining capacity is obtained, whether the first remaining capacity is greater than a preset second capacity threshold value or not can be judged. When the first remaining charge is greater than the second charge threshold, it may be determined that the first sensor has sufficient charge to maintain the first sensor operating for a long time. Therefore, the second communication two-link can be determined as the target communication link, the communication between the intelligent gateway and the second sensor is suspended, and the data analysis is carried out based on the sensing data collected by the first sensor.
In this embodiment, when the first remaining power is greater than the preset second power threshold, the second communication link is determined as the target communication link, and when the first remaining power is sufficient, the first sensor is used as a main sensor for collecting sensing data, and communication with the second sensor is suspended, so that a limited power can be saved or reserved for the second sensor.
In this embodiment, the method may further include the steps of:
determining the current electric quantity corresponding to the sensor with the closed target communication link based on the preset energy storage parameter; and if the current electric quantity is larger than a preset first electric quantity threshold value, starting the target communication link.
As an example, the energy storage parameter may be an operating parameter when the solar power module stores electric energy and/or supplies electric energy to the sensor, such as electric energy that the solar power module can store or supply per unit time.
Specifically, the intelligent gateway may store the energy storage parameter in advance. After the target communication link is closed, calculation can be performed based on preset energy storage parameters, and the current electric quantity corresponding to the sensor with the closed target communication link is determined. After the current electric quantity is acquired, whether the current electric quantity is larger than a preset first electric quantity threshold value or not can be judged, and if the current electric quantity is larger than the preset first electric quantity threshold value, the target communication link can be restarted to continue to communicate with the sensor corresponding to the target communication link, so that sensing data can be acquired. If the current electric quantity is less than or equal to the preset first electric quantity threshold value, the closing state of the target communication link can be continuously maintained.
In this embodiment, the intelligent gateway may determine, based on a preset energy storage parameter, a current electric quantity corresponding to a sensor whose corresponding target communication link is closed, and if the current electric quantity is greater than a preset first electric quantity threshold, open the target communication link, and may determine whether to open the target communication link in time, and when the available electric quantity is limited, effectively improve the acquisition efficiency of the sensing data.
In this embodiment, the method may further include the steps of:
and acquiring sensing data acquired by a sensor corresponding to the target communication link during the closing period of the target communication link.
In a particular implementation, the sensor may continue to collect the sensed data after the communication link is closed. After the target communication link is re-opened, the intelligent gateway can acquire sensing data acquired by a sensor corresponding to the target communication link during the closing period of the target communication link. For example, the second sensor that is turned off the second communication link may continuously collect and store the sensing data after the second communication link is turned off, and when the second communication link is turned back on, the second sensor may upload the sensing data that is currently stored and is not uploaded to the intelligent gateway through the second communication link.
In this embodiment, the intelligent gateway may obtain the sensing data acquired by the sensor corresponding to the target communication link during the period when the target communication link is closed, so that the electric quantity of the sensor corresponding to the target communication link may be effectively saved, and the missing of the sensing data may be avoided.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, which are not necessarily performed in sequence, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
In one embodiment, as shown in fig. 3, there is provided a communication link control apparatus, which can be applied to an intelligent gateway using solar power and/or inductive power, the apparatus including:
a sensor determining module 301, configured to determine a first sensor and a second sensor communicatively connected to the intelligent gateway; the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor is in communication connection with the intelligent gateway through a first communication link, and the second sensor is in communication connection with the intelligent gateway through a second communication link;
a remaining power obtaining module 302, configured to obtain a first remaining power corresponding to the first sensor and a second remaining power corresponding to the second sensor;
a target communication link closing module 303, configured to determine a target communication link from the first communication link and the second communication link and close the target communication link when the first remaining power and/or the second remaining power meet a preset power threshold.
In one embodiment, the target communication link closing module 303 includes:
a first target communication link determining submodule, configured to determine the second communication link as a target communication link when the first remaining power is greater than a preset first power threshold and the second remaining power is less than the first threshold;
and the electric quantity corresponding to the first electric quantity threshold value is the electric quantity required by the first sensor and the second sensor to maintain a normal operation state.
In one embodiment, the apparatus further comprises:
the target communication frequency acquisition module is used for reducing the current communication frequency of the first sensor and the intelligent gateway to obtain a target communication frequency;
and the target communication frequency sending module is used for sending the target communication frequency to the first sensor so as to instruct the first sensor to communicate with the intelligent gateway according to the target communication frequency.
In one embodiment, the target communication link closing module 303 includes:
and the second target communication link determining submodule is used for determining the first communication link and the second communication link as target communication links when the first residual capacity and the second residual capacity are both smaller than a preset first capacity threshold.
In one embodiment, the target communication link closing module 303 includes:
a third target communication link determining submodule, configured to determine the second communication link as a target communication link when the first remaining power is greater than a preset second power threshold; the second electric quantity threshold value is larger than a preset first electric quantity threshold value.
In one embodiment, the apparatus further comprises:
the current electric quantity determining module is used for determining the current electric quantity corresponding to the sensor with the closed target communication link based on the preset energy storage parameter;
and the target communication link starting module is used for starting the target communication link if the current electric quantity is greater than a preset first electric quantity threshold value.
In one embodiment, the apparatus further comprises:
and the sensing data acquisition module is used for acquiring sensing data acquired by the sensor corresponding to the target communication link during the closing period of the target communication link.
For a specific definition of a communication link control device, reference may be made to the above definition of a communication link control method, which is not described herein again. The respective modules in the above-described communication link control apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the sensing data and/or the energy storage parameters. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a communication link control method.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
determining a first sensor and a second sensor which are in communication connection with the intelligent gateway; the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor is in communication connection with the intelligent gateway through a first communication link, and the second sensor is in communication connection with the intelligent gateway through a second communication link;
acquiring a first residual electric quantity corresponding to the first sensor and a second residual electric quantity corresponding to the second sensor;
when the first remaining capacity and/or the second remaining capacity meet/meets a preset capacity threshold, determining a target communication link from the first communication link and the second communication link, and closing the target communication link.
In one embodiment, the steps in the other embodiments described above are also implemented when the computer program is executed by a processor.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
determining a first sensor and a second sensor which are in communication connection with the intelligent gateway; the data types of the sensing data acquired by the first sensor and the second sensor are the same, the first sensor is in communication connection with the intelligent gateway through a first communication link, and the second sensor is in communication connection with the intelligent gateway through a second communication link;
acquiring a first residual electric quantity corresponding to the first sensor and a second residual electric quantity corresponding to the second sensor;
when the first remaining capacity and/or the second remaining capacity meet/meets a preset capacity threshold, determining a target communication link from the first communication link and the second communication link, and closing the target communication link.
In one embodiment, the computer program when executed by the processor further performs the steps of the other embodiments described above:
it will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory. Non-volatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical storage, or the like. Volatile Memory can include Random Access Memory (RAM) or external cache Memory. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.