Disclosure of Invention
The invention aims to solve the technical problem of providing a power consumption management method and system of communication positioning equipment and the communication positioning equipment, which solve the problems of high energy consumption and drift in the existing communication positioning equipment, thereby overcoming the defects of the prior art.
In order to solve the technical problems, the invention provides a power consumption management method of a communication positioning device, which comprises the following steps:
After the communication positioning equipment receives the communication task, a CPU in the 4G+GNSS communication module designates a corresponding communication mode according to a network environment, and executes a corresponding power consumption management strategy according to the designated communication mode, wherein the power consumption management strategy comprises a physical power consumption strategy and a program power consumption strategy;
Transmitting the positioning information to a server according to a specified communication mode, wherein in the transmitting process, a physical power consumption strategy in a corresponding power consumption management strategy is firstly executed, and then a program power consumption strategy is executed;
The communication positioning equipment repeatedly executes the wake-up state and the sleep state according to a preset sending period, and the positioning information sending is completed regularly.
As an improvement of the present invention, the communication mode includes a 4G communication mode and a short message communication mode.
As a further improvement of the present invention, the specific method of the program power consumption strategy is as follows:
dividing a corresponding program in each communication task into a plurality of program segments according to different execution functions to form a plurality of task strategies, wherein each task strategy is provided with a wake-up mark and a dormancy mark at the head and tail of the program segment;
When executing according to the power consumption management strategy, according to the wake-up mark of the called task strategy, the CPU unit is waken up as long as at least one wake-up mark of the task strategy exists, and after all sleep marks of the called task strategy are executed, the CPU unit enters a sleep state.
As an improvement of the invention, the specific method for judging the network environment by the CPU unit in the 4G+GNSS communication module is as follows:
The 4G communication unit in the 4G+GNSS communication module sends a registration request to the network base station, and judges whether a 4G network exists or not according to whether correct reply information is received;
when the 4G communication unit receives the correct information reply, the communication positioning equipment is judged to be in the 4G network environment, and the 4G communication mode is selected at the moment;
When the 4G communication unit cannot receive correct information reply within a certain time, the communication positioning equipment is judged to be in a 4G network-free environment, and the communication mode is selected to be a short message communication mode.
As a further improvement of the present invention, the power consumption management policy executed in the process that the communication positioning device sends the positioning information to the server in the 4G communication manner is:
After receiving the low level sent by the CPU unit in the 4G+GNSS communication module, the enabling pin of the power module cuts off the power connection with the navigation satellite module and the acceleration module, and simultaneously the 4G+GNSS communication module closes the IO interface connected with the navigation satellite module and the acceleration module;
And after the task strategies of calling the 4G communication unit and the SIM card module are executed, the CPU unit firstly judges whether all the sleep marks are executed, if all the sleep marks are executed, the CPU unit enters an ultralow frequency working state, the CPU radio frequency unit keeps periodically sending heartbeat signals, and a timer runs a timing task.
As an improvement of the present invention, the power consumption management policy executed in the process that the communication positioning device sends the positioning information to the server in a short message communication manner is:
After receiving the high level sent by the CPU in the 4G+GNSS communication module, the enabling pin of the power module is connected with the power supply of the navigation satellite module and the acceleration module, and at the same time, the 4G+GNSS communication module at least closes the IO interface for connecting the 4G communication unit, the CPU radio frequency unit and the SIM card module;
And after the task strategies of the calling navigation satellite module and the acceleration module are executed, the CPU unit firstly judges whether all the sleep marks are executed, and if all the sleep marks are executed, the CPU unit enters an ultralow frequency working state and only a timer runs a timing task.
In addition, the invention also discloses a power consumption management system of the communication positioning equipment, which is used for executing the power consumption management method, the system comprises a 4G+GNSS communication module, a navigation satellite module, an acceleration module and a power module,
The power module is respectively connected with the navigation satellite module, the acceleration module and the 4G+GNSS communication module, the 4G+GNSS communication module is provided with a plurality of groups of IO interfaces, at least 1 group of IO interfaces are connected with enabling pins in the power module, the 4G+GNSS communication module is in communication connection with the navigation satellite module through a UART_RX interface and a UART_TX interface, and the 4G+GNSS communication module is in communication connection with the acceleration module through an I2SCL interface and an I2SDA interface.
As a further improvement of the invention, the system also comprises an indicator light module, a SIM card module and an antenna module, wherein at least 5 groups of IO interfaces in the 4G+GNSS communication module are respectively connected with the indicator light module, at least 4 groups of IO interfaces are respectively connected with the SIM card module, and the 4G+GNSS communication module is connected with the antenna module through a GPS_ANT interface and a LET_ANT interface.
As a further improvement of the present invention, the 4g+gnss communication module includes a 4G communication unit, a CPU radio frequency unit, and a timer, where the 4G communication unit is configured to send positioning information in a 4G communication manner, the CPU unit is configured to generate and execute a task policy, and the CPU radio frequency unit is configured to periodically send a heartbeat signal to maintain communication between the communication positioning device and the server, and the timer is configured to time a positioning information sending period.
Furthermore, the invention also discloses a communication positioning device which comprises the power consumption management system.
With such a design, the invention has at least the following advantages:
The power consumption management method of the invention selects the corresponding communication mode by intelligently judging the current network environment and combines two strategies of physical dormancy and program dormancy, so that the equipment can automatically adjust the use mode of the equipment in different use scenes, and can complete the required functions and simultaneously keep the minimum power loss, thereby prolonging the endurance time of the equipment.
Detailed Description
Examples of embodiments of the invention are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements throughout, or elements having like or similar functionality. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, unless explicitly stated or limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected, mechanically connected, electrically connected, directly connected, indirectly connected via an intermediate medium, or communicating between two members. It will be understood by those of ordinary skill in the art that the terms described above are in the specific sense of the present invention.
The embodiment specifically discloses a power consumption management system of a communication positioning device, which is used for executing the power consumption management method, the system comprises a 4G+GNSS communication module, a navigation satellite module, an acceleration module, an indicator light module, a SIM card module, a power module and an antenna module,
The power module is respectively connected with the navigation satellite module, the acceleration module and the 4G+GNSS communication module, the 4G+GNSS communication module is provided with a plurality of groups of IO interfaces, at least 1 group of IO interfaces are connected with enabling pins in the power module, at least 5 groups of IO interfaces are respectively connected with the indicator lamp module, at least 4 groups of IO interfaces are respectively connected with the SIM card module, the 4G+GNSS communication module is in communication connection with the navigation satellite module through the UART_RX interface and the UART_TX interface, the 4G+GNSS communication module is in communication connection with the acceleration module through the I2SCL interface and the I2SDA interface, and the 4G+GNSS communication module is connected with the antenna module through the GPS_ANT interface and the LET_ANT interface.
More specifically, the 4g+gnss communication module includes a 4G communication unit, a CPU radio frequency unit, and a timer, where the 4G communication unit is configured to send positioning information in a 4G communication manner, the CPU unit is configured to generate and execute a task policy, the CPU radio frequency unit is configured to periodically send a heartbeat signal to maintain communication between the communication positioning device and the server, and the timer is configured to time a positioning information sending period.
In addition, the embodiment also discloses a power consumption management method of the communication positioning equipment, which comprises the following steps:
Firstly, after the communication positioning device receives a communication task, a CPU in the 4G+GNSS communication module designates a corresponding communication mode according to a network environment, and executes a corresponding power consumption management strategy according to the designated communication mode, wherein the power consumption management strategy comprises a physical power consumption strategy and a program power consumption strategy, and the communication mode in the preferred embodiment comprises a 4G communication mode and a short message communication mode. In this embodiment, the 4G communication mode is implemented through a 4G communication unit integrated with a 4g+gnss communication module, and the short message communication mode sends text short messages to a global navigation satellite system, such as a beidou satellite navigation system, a global positioning system, a gnonius satellite navigation system, a galileo satellite navigation system, etc., through a navigation satellite module.
In detail, in this embodiment, the specific method for determining the network environment by the CPU unit in the 4g+gnss communication module may preferably be determined by using the radio frequency unit to send out a network registration signal, and the specific method is as follows:
the 4G communication unit in the 4G+GNSS communication module sends network registration information to the network base station, and judges whether a 4G network exists or not according to whether correct reply information is received;
When the 4G communication unit receives the correct reply information, the communication positioning equipment is judged to be in the 4G network environment, and the 4G communication mode is selected at the moment;
when the 4G communication unit cannot receive the correct reply message within a certain time, the communication positioning equipment is judged to be in a 4G network-free environment, and the communication mode is selected to be a short message communication mode.
Secondly, positioning information is sent to a server according to a specified communication mode, and in the sending process, a physical power consumption strategy in a corresponding power consumption management strategy is firstly executed, and then a program power consumption strategy is executed;
the specific method of the program power consumption strategy in the embodiment is as follows:
dividing a corresponding program in each communication task into a plurality of program segments according to different execution functions to form a plurality of task strategies, wherein each task strategy is provided with a wake-up mark and a dormancy mark at the head and tail of the program segment;
When executing according to the power consumption management strategy, according to the wake-up mark of the called task strategy, the CPU unit is waken up as long as at least one wake-up mark of the task strategy exists, and after all sleep marks of the called task strategy are executed, the CPU unit enters a sleep state. As shown in fig. 3, the wake-up execution ("a") system is awakened, the wake-up execution ("B") system is awakened, and the module is not dormant as the wake-up execution ("a") acts as it is, because the sleep-up ("B") is not executed at this time, the sleep-up ("B") is executed, and no wake exists at this time, and the module is dormant. Continuing to execute wake ("C"), the module wakes up. Sleep ("C") is executed and the module sleeps.
Based on the program power consumption policy, in this embodiment, as long as a wake-up flag of a task policy is executed, the whole module, i.e., the CPU unit, is woken up, and only after all sleep flags are executed, the module goes to sleep. Therefore, after generating different task strategies, the CPU unit in the embodiment can add a wake-up mark and a sleep mark to each task strategy, and the CPU unit can wake up any task strategy and enter a sleep state only when the sleep marks of all the task strategies are executed no matter how many task strategies are executed. By the method, the program task can adjust the sleep time period according to different tasks, all tasks do not need to be completely executed, and the running time of the program is reduced.
It can be described in detail that, when the communication positioning device sends positioning information to the server in a 4G communication manner, that is, by combining a physical power consumption policy with a program power consumption policy, a specific power consumption management policy is:
Firstly, after receiving low level sent by a CPU unit in a 4G+GNSS communication module, an enabling pin of the power module cuts off power connection with a navigation satellite module and an acceleration module, and meanwhile, the 4G+GNSS communication module closes IO interfaces connected with the navigation satellite module and the acceleration module, and the step is to close physical equipment related to short message communication in the equipment, so that the energy consumption of the equipment is reduced.
When the CPU unit of the 4G+GNSS communication module generates at least the task strategies for calling the 4G communication unit and the SIM card module, firstly, the wake-up mark and the sleep mark are respectively added to the task strategies for calling the 4G communication unit and the SIM card module, so that when any one of the task strategies is executed, the CPU unit can be waken, and only after all the task strategies for calling the 4G communication unit and the SIM card module are executed, namely, the CPU unit judges that all the sleep marks are executed, the CPU unit enters an ultralow frequency working state, and simultaneously, in order to keep the 4G communication normal, the CPU radio frequency unit keeps periodically sending heartbeat signals, and a timer runs for timing tasks so as to execute the next positioning information sending task according to a preset period.
Similarly, when the communication positioning device sends positioning information to the server in a short message communication manner, the power consumption management policy executed by the communication positioning device is as follows:
After receiving the high level sent by the CPU unit in the 4G+GNSS communication module, the enabling pin of the power module is connected with the power supply of the navigation satellite module and the acceleration module, and meanwhile, the 4G+GNSS communication module at least closes the IO interface for connecting the 4G communication unit, the CPU radio frequency unit and the SIM card module, so that the equipment related to 4G communication is closed, and the equipment related to short message communication keeps normal operation, thereby ensuring that positioning information is normally sent and the equipment operates with the lowest power consumption.
Correspondingly, at least a task strategy for calling the navigation satellite module and the acceleration module is generated in a CPU unit of the 4G+GNSS communication module, a wake-up mark and a sleep mark are respectively added to the task strategies for calling the navigation satellite module and the acceleration module, after the task strategies for calling the navigation satellite module and the acceleration module are executed, the CPU unit firstly judges whether all sleep marks are executed, if all sleep marks are executed, the CPU unit enters an ultralow frequency working state, and only a timer runs a timing task.
Further, the physical power consumption strategies adopted in the embodiment include strategies of cutting off power supply of the device, closing output voltage of the module, closing the IO interface and the like, and the power consumption of the device is reduced by reducing the number of executing devices, reducing voltage power and the like.
Taking the device executing process as an example, as shown in fig. 4, when the device is in a coverage area of a 4G network, it preferentially invokes a 4G communication mode to send positioning data, at this time, a program executing wake ("4G") is used to wake up a CPU unit, the wake ("4G") is a wake-up flag of the 4G communication unit, after the data is sent, a sleep ("4G") is executed to enter a sleep mode, the sleep ("4G") is used as a sleep flag of the 4G communication unit, at this time, the CPU unit sleeps, and enters an ultralow frequency operation, and the CPU radio frequency unit works, and periodically pages and maintains heartbeat to maintain network connection, at this time, the CPU unit current is only about 4mA, when the device is in a coverage area of a 4G network, a beidou communication module can be invoked to send data, at this time, a wake ("beidou") is executed to wake up the CPU unit, at this time, the wake ("beidou") is a wake-up flag of the beidou communication module, at this time, the CPU unit is controlled to turn on a 5V power supply, at this time, the beidou communication module is turned off the 5V power supply, and then the sleep ("beidou") is executed, at this time, the CPU radio frequency unit and the SIM unit is turned off to work, and only at this time, the CPU radio frequency unit and the SIM unit has a minimum current of 1 mA. And when the 4G network and the Beidou network are not available, the CPU circularly searches the 4G network and the Beidou network.
Finally, the communication positioning device in this embodiment makes the communication positioning device repeatedly execute the above steps according to the preset transmission period, so that the positioning information transmission can be completed at regular time.
Furthermore, the embodiment also discloses a communication positioning device, which comprises the power consumption management system.
The above description is only of the preferred embodiments of the present invention, and is not intended to limit the invention in any way, and some simple modifications, equivalent variations or modifications can be made by those skilled in the art using the teachings disclosed herein, which fall within the scope of the present invention.