WO2020177572A1 - 一种终端的控制方法和装置 - Google Patents
一种终端的控制方法和装置 Download PDFInfo
- Publication number
- WO2020177572A1 WO2020177572A1 PCT/CN2020/076532 CN2020076532W WO2020177572A1 WO 2020177572 A1 WO2020177572 A1 WO 2020177572A1 CN 2020076532 W CN2020076532 W CN 2020076532W WO 2020177572 A1 WO2020177572 A1 WO 2020177572A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- management process
- application management
- application
- preset
- request
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4418—Suspend and resume; Hibernate and awake
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3089—Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/48—Indexing scheme relating to G06F9/48
- G06F2209/484—Precedence
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Definitions
- This application relates to the field of electronic technology, in particular to a terminal control method and device.
- the wide area network communication technology usually uses a wide area communication chip, which is connected to the main micro-control unit that controls each hardware module in the electronic device, so as to realize the wide area network communication function of the electronic device.
- the wide area communication chip is equivalent to a micro-control unit that individually handles tasks related to wide area communication.
- wireless communication technology does not only need to pursue an increase in speed, but needs to consider a series of issues such as speed, power consumption, distance, and cost.
- the focus is on how to reduce power consumption and cost as much as possible while maintaining the existing communication range.
- the embodiments of the present application are proposed to provide a terminal control method and device that overcome the foregoing problems or at least partially solve the foregoing problems.
- this application discloses a method for controlling a terminal, the terminal includes a micro control unit MCU, and the method is applied to the MCU;
- the method includes:
- the receiving time window management process corresponding to the receiving time window request is called within a preset first time period; wherein, the receiving time window management process is used to receive the first time window management process sent by a gateway.
- Downlink data frame
- the method further includes:
- the suspending of at least one second application management process according to the preset first priority principle according to the receiving time window request in response to the first application management process includes:
- the method further includes:
- the calling state of the first application management process and the at least one second application management process is monitored.
- the method further includes:
- the MCU When it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state, the MCU is set to enter a sleep state through the monitoring process.
- the method includes:
- the second application invocation request is added to the preset waiting queue.
- the application also discloses a control method of a terminal, the terminal includes a micro control unit MCU, and the method is applied to the MCU;
- the method includes:
- the periodic listening window is called to request the corresponding listening window receiving process within a preset second time period; wherein, the listening window receiving process is used to receive the first sent by a gateway 2.
- Downlink data frame
- the method further includes:
- the time synchronization receiving window process corresponding to the time synchronization receiving window request is called within a preset third time period; wherein, the time synchronization receiving window process is used to receive the time sent by a gateway Sync frame.
- the method further includes:
- said responding to periodic listening window requests through the first application management process and suspending at least one second application management process according to a preset first priority principle includes:
- the method further includes:
- the calling state of the first application management process and the at least one second application management process is monitored.
- the method further includes:
- the MCU When it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state, the MCU is set to enter a sleep state through the monitoring process.
- the method includes:
- the second application invocation request is added to the preset waiting queue.
- the application also discloses a control method of a terminal, the terminal includes a micro control unit MCU, and the method is applied to the MCU;
- the method includes:
- the first application management process Responding to the first interrupt request through the first application management process, suspend at least one second application management process according to a preset first priority principle, and call the first application communication process corresponding to the first interrupt request;
- the first application communication process is used to receive a data frame sent by a gateway;
- the first application management process responds to at least one second interrupt request, and according to the preset second priority principle, puts the at least one second interrupt request into the preset In the waiting queue;
- the second priority principle is determined by a preset priority management module.
- the method further includes:
- the first application management process After the first application management process has finished invoking the second application communication process and there is no second interrupt request in the waiting queue, the first application management process suspends itself.
- the first application management process responds to the first interrupt request, and at least one second application management process is suspended according to a preset first priority principle, and the first application corresponding to the first interrupt request is called Communication process, including:
- the method further includes:
- the calling state of the first application management process and the at least one second application management process is monitored.
- the method further includes:
- the MCU When it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state, the MCU is set to enter a sleep state through the monitoring process.
- the method includes:
- the second application management process responds to the second application call request, and adds the second application process corresponding to the second application call request to the preset waiting queue according to the preset first priority principle.
- the application also discloses a terminal control device, which includes:
- the first process creation module is used to create a first application management process and at least one second application management process
- the first process suspension module is configured to respond to receiving a time window request through the first application management process, and suspend at least one second application management process according to a preset first priority principle
- the receiving time window management process calling module is used to call the receiving time window request corresponding receiving time window management process within a preset first time period through the first application management process; wherein, the receiving time window management The process is used to receive the first downlink data frame sent by a gateway.
- the device further includes:
- a receiving time window management process suspension module configured to suspend the receiving time window management process through the first application management process after a preset first time period
- the first management process suspension module is configured to suspend itself through the first application management process after the receiving time window management process is suspended.
- the first process suspension module includes:
- the first remaining semaphore determining sub-module is configured to determine the current remaining semaphore in response to the receiving time window request through the first application management process;
- the first process suspension submodule is configured to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold.
- the device further includes:
- the first monitoring process creation module is used to create a monitoring process
- the first monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the first sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the first waiting module is configured to respond to the second application call request, and add the second application call request to the preset waiting queue according to the preset first priority principle.
- the application also discloses a terminal control device, the terminal includes a micro control unit MCU, and the device is applied to the MCU;
- the device includes:
- the second process creation module is used to create a first application management process and at least one second application management process
- the second process suspension module is configured to respond to periodic listening window requests through the first application management process, and suspend at least one second application management process according to the preset first priority principle;
- the listening window receiving process invoking module is configured to invoke the periodic listening window to request the corresponding listening window receiving process in a preset second time period through the first application management process; wherein, the listening window The receiving process is used to receive a second downlink data frame sent by a gateway.
- the device further includes:
- the third process suspension module is configured to synchronously receive window requests through the response time of the first application management process, and suspend at least one second application management process according to the preset first priority principle;
- the time synchronization receiving window process calling module is used to call the time synchronization receiving window process corresponding to the time synchronization receiving window request within a preset third time period through the first application management process; wherein the time synchronization receiving The window process is used to receive a time synchronization frame sent by a gateway.
- the device further includes:
- a listening window receiving process suspension module configured to suspend the listening window receiving process through the first application management process after a preset second time period
- the second management process suspension module is configured to suspend itself through the first application management process after the listening window receiving process is suspended.
- the second process suspension module includes:
- the second remaining semaphore determining sub-module is configured to determine the current remaining semaphore in response to the response period listening window request through the first application management process;
- the second process suspension submodule is configured to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold.
- the device further includes:
- the second monitoring process creation module is used to create a monitoring process
- the second monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the second sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the second waiting module is configured to respond to the second application call request, and add the second application call request to the preset waiting queue according to the preset first priority principle.
- the application also discloses a terminal control device, the terminal includes a micro control unit MCU, and the device is applied to the MCU;
- the device includes:
- the third process creation module is used to create a first application management process and at least one second application management process
- the fourth process suspension module is configured to respond to the first interrupt request through the first application management process, suspend at least one second application management process according to the preset first priority principle, and call the first interrupt Request a corresponding first application communication process; wherein the first application communication process is used to receive a data frame sent by a gateway;
- the second interrupt request waiting module is configured to respond to at least one second interrupt request through the first application management process when the first application communication process is called, and according to the preset second priority principle, the at least A second interrupt request is placed in the preset waiting queue;
- the first application communication process suspension module is configured to suspend the first application communication process after the first application management process has finished calling the first application communication process
- the second application communication process invoking module is configured to respond to at least one second interrupt request in the waiting queue in turn, and invoke the second application communication process corresponding to the second interrupt request.
- the second priority principle is determined by a preset priority management module.
- the device further includes:
- the third management process suspension module is used to suspend the first application management process after the first application management process calls the second application communication process and there is no second interrupt request in the waiting queue. Up oneself.
- the fourth process suspension module includes:
- the third remaining semaphore determining submodule is configured to respond to the first terminal request through the first application management process to determine the current remaining semaphore;
- the third process suspension submodule is used to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold, and call the first interrupt Request the corresponding first application communication process.
- the device further includes:
- the third monitoring process creation module is used to create a monitoring process
- the third monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the third sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the third waiting module is used to respond to the second application call request through the second application management process, and add the second application process corresponding to the second application call request to the preset waiting queue according to the preset first priority principle in.
- a device including:
- One or more processors are One or more processors.
- One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the device to execute one or more of the methods described in this application.
- One or more machine-readable media having instructions stored thereon, when executed by one or more processors, cause the processors to perform one or more methods described in this application.
- the embodiments of the present application include the following advantages:
- the terminal control method of the embodiment of the present application there is no need to separately set up hardware modules for separately processing tasks related to wide area communication in LoRa Class A and Class B modes, and a single MCU is used to process and call the first application management process and the second
- the application management process realizes the coordinated work of the WAN communication of LoRa Class A and Class B modes controlled by an MCU and other hardware modules, which further reduces the power consumption and cost of the terminal.
- FIG. 1 is a flowchart of steps of an embodiment of a terminal control method of the present application
- FIG. 3 is a flowchart of steps of an embodiment of a terminal control method of the present application.
- FIG. 4 is a structural block diagram of an embodiment of a terminal control device of the present application.
- FIG. 5 is a structural block diagram of an embodiment of a terminal control device of the present application.
- Fig. 6 is a structural block diagram of an embodiment of a terminal control device of the present application.
- the MCU may be a terminal chip, which is a central processing unit (CPU), random access memory (RAM), read only memory (ROM), Multiple I/O ports, interrupt system, timer/counter and other functions are integrated on a silicon chip to form a small and complete microcomputer system.
- the MCU can control various hardware modules on the terminal, so that the electronic device can realize different functions.
- multiple logical processes are called in the MCU, and the monitoring process, the first application management process, and the second application management process are all logical processes in the MCU.
- the MCU may not use an operating system, but may process basic tasks in a main loop mode, and process emergency tasks through interrupt requests to achieve management of logical processes.
- the MCU may also adopt an operating system, such as an RTOS real-time operating system, to realize the management of logical processes.
- the MCU using the operating system can have more ways to handle multiple logical processes on the basis of the MCU without the operating system, for example, a cooperative way, a time slice polling way, and a priority preemption way.
- the LoRa wide area network communication between the terminal and the gateway may include Class A and Class B communication modes.
- the terminal in Class A mode can periodically send uplink data frames to the gateway, and open two short downlink reception windows after sending the uplink data frames, so as to realize two-way data transmission between the terminal and the gateway.
- the gateway cannot send a data frame to the terminal and needs to wait until the terminal opens the downlink receiving window again. Therefore, the Class A mode can effectively save the power consumed by the terminal for wireless communication.
- the terminal in the Class B mode can open a time synchronization receiving window within a specified time to receive the data frame sent by the gateway.
- the terminal also needs to separately receive a time synchronization frame (Beacon) for time synchronization from the gateway to ensure time synchronization between the gateway and the terminal, and to let the gateway know that the terminal is listening.
- Beacon time synchronization frame
- the terminal has more opportunities for data transmission compared with the gateway and Class A mode.
- the terminal consumes more power wirelessly than in Class A mode, and the time delay of data transmission is reduced.
- the logic process related to LoRa WAN communication can receive various interrupt requests, and the interrupt requests can include: radio Interrupt, timer Interrupt, and data sending request from external module (DataSendReq Interrupt).
- the wireless request may include a transmission completion request (TxDone Interrupt), a reception completion request (RxDone Interrupt), and a reception timeout request (RxTimeout Interrupt).
- the timing request may include a receiving time window request, a first downlink receiving window request (Rx1Interrupt), a second downlink receiving window request (Rx2Interrupt), a periodic listening window request (PingSlot Interrupt), and a time synchronization window request (Beacon Interrupt) .
- the terminal includes a micro-control unit MCU, and the method is applied to the MCU;
- the method may specifically include the following steps:
- Step 101 Create a first application management process and at least one second application management process
- the first application management process is used to manage LoRa-related application processes.
- the first application management process can also call and process LoRa WAN related protocols, thereby controlling the LoRa WAN hardware module on the terminal.
- the LoRa wide area network hardware module has low power consumption characteristics, which can effectively reduce the power consumption of the terminal.
- the second application management process is used to manage other hardware modules on the terminal except for LoRa-related hardware modules.
- LoRa-related hardware modules For example, light modules, power modules, liquid crystal display modules, keyboard control modules, etc., which are not limited in this application.
- Step 102 Respond to the receiving time window request through the first application management process, and suspend at least one second application management process according to a preset first priority principle;
- the receiving time window request is an interrupt request used in LoRa Class A mode, which is used to request the terminal to send uplink data frames in Class A mode and to initiate the receiving time window management process.
- the receiving time window management process is used to open a downlink receiving window to receive the data frame sent by the gateway.
- a preset first period may be used to periodically send the receiving time window request, so that the preset first period may be used to periodically call the receiving time through the first application management process.
- the receiving time window management process corresponding to the window request.
- the preset first period may be 1s, 5min, 2h, etc., which is not limited in this application.
- the terminal may also adopt the Aloha protocol to determine the preset first period.
- the preset first period may be accompanied by a certain random delay, so that the duration of the preset first period may not be fixed.
- the MCU has a multi-thread function and can execute multiple logical processes at the same time.
- the multi-thread resources in the MCU are all occupied, at least one logical process needs to be suspended first, and the resources are released. New logical processes can be run.
- the priority of a new logical process is lower, you need to wait for the currently executing logical process to finish executing and hang up before the new logical process can be executed, and when the priority of a new logical process is higher than the current executing logical process When it is higher, the currently executing logical process can be suspended and a new logical process can be executed.
- the first priority principle may include a preset priority corresponding to each logical process, and the highest priority is 0.
- the logic process related to LoRa may have a higher priority than other logic processes. Therefore, when preparing to execute the logic process related to LoRa, it is determined according to the preset first priority principle. The priority of the currently executed second application management process, and at least one second application management process is suspended in order to release resources in order of priority from low to high.
- Step 103 Call the receiving time window request corresponding receiving time window management process within a preset first time period through the first application management process; wherein, the receiving time window management process is used to receive a gateway sent The first downlink data frame.
- the first application management process may respond to the receiving time window request, interrupt the main loop, send an uplink data frame in Class A mode, and start the receiving time window management process
- the receiving time window management process may receive the downlink receiving window request, so that the receiving time window management process may sequentially open the downlink receiving windows within the preset first time period, and receive the first downlink data frame sent by the gateway. In this way, the data transmission in the Class A mode between the terminal and the gateway is completed.
- the receiving time window management process may receive a first downlink receiving window request (Rx1 Interrupt) and a second downlink receiving window request (Rx2 Interrupt).
- the receiving time window management process may open the first downlink receiving window after receiving the first downlink receiving window request (Rx1 Interrupt), and waiting to receive the data sent by the gateway. If the data sent by the gateway is received, then this time The data transfer is complete. If the data sent by the gateway is not received within the period of the first downlink receiving window, the receiving time window management process can continue to receive the second downlink receiving window request (Rx2 Interrupt), and start the second downlink receiving window request, Continue to wait to receive the data sent by the gateway.
- multiple LoRa-related interrupt requests may be received during the process of invoking a LoRa-related logic process.
- the LoRa-related logic process can be determined according to the preset second priority principle.
- the processing sequence between. the priority of the data sending request (DataSendReq Interrupt) from the external module is lower than the first downlink receiving window request (Rx1 Interrupt) and the second downlink receiving window request (Rx2 Interrupt), so that the priority can be reduced Lower interrupt requests are placed in a preset waiting queue to process LoRa-related interrupt requests in order from high to low according to the priority.
- the preset second priority principle can be dynamically modified.
- the priority of the data sending request (DataSendReq Interrupt) can be dynamically set to be high according to actual needs.
- Receive window request (Rx1 Interrupt) in the first downlink and receive window request (Rx2 Interrupt) in the second downlink.
- the dynamic modification of the preset second priority principle can be achieved by setting a priority management module in the MCU, and setting the dynamic modification rule of the second priority principle in the priority management module, thereby Complete the dynamic modification of the second priority principle.
- a single MCU is used to process and call the first application management process and the second application management process at the same time, so as to realize the coordinated work of the wide area network communication of LoRa Class A mode controlled by one MCU and other hardware modules .
- the wide area network hardware module does not need to separately handle tasks related to wide area communication in LoRa Class A mode, thereby further reducing the power consumption and cost of the terminal.
- the method further includes:
- the first application management process may start the receiving time window management process within a preset first period of time after sending the uplink data frame in Class A mode, and in the preset After the first period of time, the first application management process suspends the receiving time window management process, and releases the multi-threaded resources of the MCU. Therefore, in the Class A mode, the terminal does not perform WAN communication at times other than the preset first time period, and the gateway cannot send data to the terminal at this time.
- the first application management process can suspend itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to process other transactions, and facilitating the reduction of MCU Power consumption.
- the receiving time window management process can be suspended by the first application management process, and then suspended by the first application management process. Start by itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to handle other transactions, and reducing the power consumption of the MCU.
- the suspending at least one second application management process in accordance with the preset first priority principle according to the receiving time window request in response to the first application management process includes:
- S21 Determine the current remaining semaphore by responding to the receiving time window request through the first application management process
- the semaphore is a resource used to manage multiple threads in the MCU.
- the semaphore is a non-negative integer variable, and every logical process needs to obtain the semaphore when it is called. Therefore, when the first application management process responds to the receiving time window request, the current remaining semaphore can be determined, and it is determined that the receiving time window management process corresponding to the receiving time window request can be directly called, or other logic needs to be suspended process.
- the MCU when the current remaining semaphore is not greater than the preset threshold, the MCU cannot call a new logic process at this time, and needs to wait for the logic process currently being called to hang. After the semaphore is released, Only then can the new logical process be called.
- the preset threshold may be 0, 1, 5, etc., which is not limited in the present application.
- the value of the semaphore is 3, and each time the MCU invokes a logic process, the value of the current remaining semaphore is reduced by 1, when the current remaining semaphore is not greater than a preset
- the threshold is 0, the new logic process cannot be called, and when a calling logic process stops calling, the semaphore can be released, and the value of the current remaining semaphore is increased by 1.
- At least one second application management process can be suspended in order from low to high priority to ensure that LoRa-related logic processes with higher priority can be transfer.
- the semaphore is used to manage the multi-threaded resources in the MCU, and the logical processes are sequentially invoked according to the preset first priority principle to ensure the LoRa correlation with higher priority
- the logic process can be called as soon as possible to ensure the stability of LoRa WAN communication.
- the method further includes:
- a monitoring process may be used to monitor the calling state of the MCU, and determine whether the MCU is calling at least one logical process other than the monitoring process. At least one logical process other than the monitoring process can also be called up through the monitoring process.
- the invocation status of the first application management process and the at least one second application management process can be monitored through the monitoring process.
- the monitoring process can also invoke the logic process corresponding to the interrupt request so that the logic process can Respond to the interrupt request.
- a monitoring process is adopted to monitor the calling status of the first application management process and the at least one second application management process, so as to monitor the running status of the MCU in the terminal.
- the method further includes:
- the monitoring process can set the MCU to enter a sleep state to reduce power consumption.
- a monitoring process is adopted to determine the current status of the first application management process and the second application management process, and the status of the first application management process and the second application management process
- the monitoring process sets the MCU to enter the sleep state, so that the power consumption of the MCU can be further reduced, and low power consumption and low-cost calling of the MCU can be realized.
- the method includes:
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the priority of the second application process corresponding to the second application call request and the logic of the current call state can be determined according to the preset first priority principle.
- the priority of the process When the priority of the second application process corresponding to the second application call request is lower than the priority of the logic process currently in the calling state, the second application call request may be added to the preset waiting queue, and wait for the current The logic process that is in the calling state is suspended, and after the semaphore is released, it responds to the second application call request and calls the second application process.
- the priority of the second application process corresponding to the second application call request may be determined through the second application management process corresponding to the second application call request.
- the priority of the second application process corresponding to the second application call request may be determined through the monitoring process.
- the second application invocation request is added to the preset waiting queue according to the preset first priority principle.
- the terminal includes a micro control unit MCU, and the method is applied to the MCU;
- the method includes:
- Step 201 Create a first application management process and at least one second application management process
- the first application management process is used to manage LoRa-related application processes.
- the first application management process can also call and process LoRa WAN related protocols, thereby controlling the LoRa WAN hardware module on the terminal.
- the LoRa wide area network hardware module has low power consumption characteristics, which can effectively reduce the power consumption of the terminal.
- the second application management process is used to manage other hardware modules on the terminal except for LoRa-related hardware modules.
- LoRa-related hardware modules For example, light modules, power modules, liquid crystal display modules, keyboard control modules, etc., which are not limited in this application.
- Step 202 Respond to the periodic listening window request through the first application management process, and suspend at least one second application management process according to a preset first priority principle;
- the periodic listening window request is an interrupt request used in the LoRa Class B mode, and is used to initiate a listening window receiving process.
- a preset second period may be used, and/or at least one designated second time may be used to periodically send the periodic listening window request.
- a preset second period is adopted, and/or at least one designated second time is adopted to periodically call the listening window receiving process through the first application management process.
- the preset second period may be 1s, 5min, 2h, etc., which is not limited in this application.
- the preset first period for sending and receiving time window requests can be determined using the Aloha protocol.
- the terminal sends uplink data in Class A mode.
- the time point of the frame cannot be determined.
- the preset second period or second time for sending the periodic listening window request may be fixed, so that the gateway may perform data transmission with the terminal at a certain point in time.
- the MCU has a multi-thread function and can execute multiple logical processes at the same time.
- the multi-thread resources in the MCU are all occupied, at least one logical process needs to be suspended first, and the resources are released. New logical processes can be run.
- the priority of a new logical process is lower, you need to wait for the currently executing logical process to finish executing and hang up before the new logical process can be executed, and when the priority of a new logical process is higher than the current executing logical process When it is higher, the currently executing logical process can be suspended and a new logical process can be executed.
- the first priority principle may include a preset priority corresponding to each logical process, and the highest priority is 0.
- the logic process related to LoRa may have a higher priority than other logic processes. Therefore, when preparing to execute the logic process related to LoRa, it is determined according to the preset first priority principle. The priority of the currently executed second application management process, and at least one second application management process is suspended in order to release resources in order of priority from low to high.
- Step 203 Invoke the periodic listening window request corresponding listening window receiving process within a preset second time period through the first application management process; wherein the listening window receiving process is used to receive a gateway The second downlink data frame sent.
- the first application management process may respond to the periodic listening window request, interrupt the main loop, and start the listening window receiving process.
- the listening window receiving process may receive the second downlink data sent by the gateway within the preset second time period, thereby completing the data transmission in the Class B mode between the terminal and the gateway.
- multiple LoRa-related interrupt requests may be received during the process of invoking a LoRa-related logic process.
- the LoRa-related logic process can be determined according to the preset second priority principle. The processing sequence between.
- the priority of the data sending request (DataSendReq Interrupt) from the external module is higher than the periodic listening window request (PingSlot Interrupt). Therefore, when the data sending request and the periodic interval are received simultaneously When listening to a window request, it may first respond to the data sending request, and then respond to the periodic listening window request.
- the preset second priority principle can be dynamically modified.
- the priority of the data sending request (DataSendReq Interrupt) can be dynamically set according to actual needs. The level is lower than the periodic listening window request.
- the dynamic modification of the preset second priority principle can be achieved by setting a priority management module in the MCU, and setting the dynamic modification rule of the second priority principle in the priority management module, thereby Complete the dynamic modification of the second priority principle.
- a single MCU is used to process and call the first application management process and the second application management process at the same time, so as to realize the coordinated work of the wide area network communication of LoRa Class B mode and other hardware modules in one MCU.
- the wide area network hardware module does not need to separately handle the tasks related to the wide area communication in the LoRa Class B mode, thereby further reducing the power consumption and cost of the terminal.
- the method further includes:
- S61 Receiving a window request synchronously through the response time of the first application management process, and suspend at least one second application management process according to a preset first priority principle
- the terminal in the Class B mode, will not send an uplink data frame to notify the gateway to send a downlink data frame, but in a preset third period agreed upon by the terminal and the gateway, and/or, at least one At the specified third time, start the listening window receiving process to receive the time synchronization frame sent by the gateway to synchronize the time between the gateway and the terminal, ensuring that the terminal can start the listening window receiving process at the appointed time, and the gateway can know The terminal is in a monitoring state.
- the preset third period may be 1s, 5min, 2h, etc., which is not limited in this application.
- the time synchronization receiving window process corresponding to the time synchronization receiving window request is called within a preset third time period; wherein the time synchronization receiving window process is used to receive a gateway sent Time synchronization frame.
- the first application management process may respond to the time synchronization receiving window request (Beacon Interrupt), interrupt the main loop, and call the time synchronization receiving window process corresponding to the time synchronization receiving window request.
- the time synchronization receiving window process may receive the time synchronization frame sent by the gateway within the preset third time period, so as to complete the time synchronization between the terminal and the gateway.
- the terminal may continue to try to receive the time synchronization frame in the next preset third period or the specified third time. If within a certain period of time, the terminal never receives the time synchronization frame. Then the terminal can switch from the Class B mode to the Class A mode to communicate with the gateway.
- multiple LoRa-related interrupt requests may be received during the process of invoking a LoRa-related logic process.
- the LoRa-related logic process can be determined according to the preset second priority principle. The processing sequence between.
- the priority of the data sending request (DataSendReq Interrupt) from the external module is lower than the time synchronization receiving window request (Beacon Interrupt), so that interrupt requests with lower priority can be set to a preset In the waiting queue, LoRa-related interrupt requests are processed in order from high to low according to the priority.
- the preset second priority principle can be dynamically modified.
- the priority of the data sending request (DataSendReq Interrupt) can be dynamically set to be high according to actual needs.
- the window request (Beacon Interrupt) is received synchronously at the time.
- the first application management process responds to the time synchronization receiving window request, and calls the time synchronization receiving window process corresponding to the time synchronization receiving window request within the preset third time period
- the time synchronization between the terminal and the gateway is realized, and the stability of the data transmission of the terminal in the Class B mode is ensured.
- the method further includes:
- the first application management process may start the listening window receiving process within a preset second time period, and after the preset second time period, the first application The management process suspends the listening window receiving process and releases the multithreaded resources of the MCU. Therefore, in the Class B mode, the terminal does not perform WAN communication at times other than the preset second time period and the preset third time period, and the gateway cannot send data to the terminal at this time.
- the first application management process can suspend itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to process other transactions, and facilitating the reduction of MCU Power consumption.
- the listening window receiving process can be suspended by the first application management process, and then suspended by the first application management process. Start by itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to handle other transactions, and reducing the power consumption of the MCU.
- the method further includes:
- the first application management process may start the time synchronization receiving window process within a preset third time period, and after the preset third time period, the first application The management process suspends the time synchronization receiving window process, and releases the multi-threaded resources of the MCU. Therefore, in the Class B mode, the terminal does not perform WAN communication at times other than the preset second time period and the preset third time period, and the gateway cannot send data to the terminal at this time.
- the first application management process can suspend itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to process other transactions, and facilitating the reduction of MCU Power consumption.
- the time synchronization receiving window process can be suspended through the first application management process, and thereafter suspended through the first application management process. Start by itself, thereby releasing the MCU's multi-threaded resources, facilitating the MCU to handle other transactions, and reducing the power consumption of the MCU.
- responding to periodic listening window requests through the first application management process and suspending at least one second application management process according to a preset first priority principle includes:
- S91 Determine the current remaining semaphore in response to the response period listening window request through the first application management process
- the semaphore is a resource used to manage multiple threads in the MCU.
- the semaphore is a non-negative integer variable, and every logical process needs to obtain the semaphore when it is called. Therefore, when responding to the periodic listening window request through the first application management process, the current remaining semaphore can be determined, and it is determined that the listening window receiving process corresponding to the periodic listening window request can be called directly or needs to be suspended Other logical processes.
- the MCU when the current remaining semaphore is not greater than the preset threshold, the MCU cannot call a new logic process at this time, and needs to wait for the logic process currently being called to hang. After the semaphore is released, Only then can the new logical process be called.
- the preset threshold may be 0, 1, 5, etc., which is not limited in the present application.
- the value of the semaphore is 3, and each time the MCU invokes a logic process, the value of the current remaining semaphore is reduced by 1, when the current remaining semaphore is not greater than a preset
- the threshold is 0, the new logic process cannot be called, and when a calling logic process stops calling, the semaphore can be released, and the value of the current remaining semaphore is increased by 1.
- At least one second application management process can be suspended in order from low to high priority to ensure that LoRa-related logic processes with higher priority can be transfer.
- the semaphore is used to manage the multi-threaded resources in the MCU, and the logical processes are sequentially invoked according to the preset first priority principle to ensure the LoRa correlation with higher priority
- the logic process can be called as soon as possible to ensure the stability of LoRa WAN communication.
- receiving a window request synchronously through the first application management process response time and suspending at least one second application management process according to a preset first priority principle includes:
- S101 Determine the current remaining semaphore by responding to the response time synchronization receiving window request by the first application management process
- the method further includes:
- a monitoring process may be used to monitor the calling state of the MCU, and determine whether the MCU is calling at least one logical process other than the monitoring process. At least one logical process other than the monitoring process can also be called up through the monitoring process.
- the invocation status of the first application management process and the at least one second application management process can be monitored through the monitoring process.
- the monitoring process can also invoke the logic process corresponding to the interrupt request so that the logic process can Respond to the interrupt request.
- a monitoring process is adopted to monitor the calling status of the first application management process and the at least one second application management process, so as to monitor the running status of the MCU in the terminal.
- the method further includes:
- S121 When it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state, set the MCU to enter a sleep state through the monitoring process.
- the monitoring process can set the MCU to enter a sleep state to reduce power consumption.
- a monitoring process is adopted to determine the current status of the first application management process and the second application management process, and the status of the first application management process and the second application management process
- the monitoring process sets the MCU to enter the sleep state, so that the power consumption of the MCU can be further reduced, and low power consumption and low-cost calling of the MCU can be realized.
- the method includes:
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the priority of the second application process corresponding to the second application call request and the logic of the current call state can be determined according to the preset first priority principle.
- the priority of the process When the priority of the second application process corresponding to the second application call request is lower than the priority of the logic process currently in the calling state, the second application call request may be added to the preset waiting queue, and wait for the current The logic process that is in the calling state is suspended, and after the semaphore is released, it responds to the second application call request and calls the second application process.
- the priority of the second application process corresponding to the second application call request may be determined through the second application management process corresponding to the second application call request.
- the priority of the second application process corresponding to the second application call request may be determined through the monitoring process.
- the second application invocation request is added to the preset waiting queue according to the preset first priority principle.
- the terminal includes a micro control unit MCU, and the method is applied to the MCU;
- the method includes:
- Step 301 Create a first application management process and at least one second application management process
- the first application management process is used to manage LoRa-related application processes.
- the first application management process can also call and process LoRa WAN related protocols, thereby controlling LoRa WAN hardware modules on the terminal.
- the LoRa wide area network hardware module has low power consumption characteristics, which can effectively reduce the power consumption of the terminal.
- the second application management process is used to manage other hardware modules on the terminal except for LoRa-related hardware modules.
- LoRa-related hardware modules For example, light modules, power modules, liquid crystal display modules, keyboard control modules, etc., which are not limited in this application.
- Step 302 Respond to the first interrupt request through the first application management process, suspend at least one second application management process according to the preset first priority principle, and call the first application corresponding to the first interrupt request Communication process; wherein, the first application communication process is used to receive a data frame sent by a gateway;
- the first interrupt request may be any interrupt request related to LoRa wide area network communication.
- the first application communication process may be a logic process related to LoRa wide area communication corresponding to the first interrupt request.
- the MCU has a multi-thread function and can execute multiple logical processes at the same time.
- the multi-thread resources in the MCU are all occupied, at least one logical process needs to be suspended first, and the resources are released. New logical processes can be run.
- the priority of a new logical process is lower, you need to wait for the currently executing logical process to finish executing and hang up before the new logical process can be executed, and when the priority of a new logical process is higher than the current executing logical process When it is higher, the currently executing logical process can be suspended and a new logical process can be executed.
- the first priority principle may include a preset priority corresponding to each logical process, and the highest priority is 0.
- the logic process related to LoRa may have a higher priority than other logic processes. Therefore, when preparing to execute the first application communication process, it may be based on the preset first priority principle, The priority of the currently executed second application management process is determined, and at least one second application management process is suspended in order to release resources in the order of priority from low to high.
- Step 303 When calling the first application communication process, respond to at least one second interrupt request through the first application management process, and release the at least one second interrupt request according to a preset second priority principle. Into the preset waiting queue;
- the second priority principle may include a preset priority corresponding to each LoRa-related logic process, and the highest priority is 0.
- the second priority principle may be included in the first priority principle. It is also possible to set the priority corresponding to the LoRa-related logic process to the highest in the first priority principle, and use the second priority principle to further process the priority order between the LoRa-related logic processes.
- the second interrupt request may be any interrupt request related to LoRa wide area network communication.
- At least one second interrupt request in the process of invoking the first application communication process, at least one second interrupt request may be received.
- at least one second interrupt request may be determined according to the preset second priority principle. The priority between the second application communication processes corresponding to the interrupt request, and according to the priority from high to low, the at least one second interrupt request is placed into the preset waiting queue in order.
- Step 304 After the first application management process finishes calling the first application communication process, suspend the first application communication process;
- the first application communication process can be suspended as soon as possible, and the MCU's multi-threaded resources can be released for execution as soon as possible The at least one second interrupt request in the waiting queue.
- Step 305 Responding to at least one second interrupt request in the waiting queue in sequence, and invoking a second application communication process corresponding to the second interrupt request.
- the second application communication process may be a logic process related to LoRa wide area communication corresponding to the second interrupt request.
- the multi-threaded resource of the MCU after the multi-threaded resource of the MCU is released, it can respond to at least one second interrupt request in the waiting queue in turn, and invoke the second application communication process corresponding to the second interrupt request , So as to implement LoRa-related interrupt requests in sequence according to priority.
- the first application communication process can also be directly suspended and the second application communication process is called.
- the second application communication process corresponding to the interrupt request when the second application communication process corresponding to the interrupt request has a higher priority and is more urgent, the first application communication process can also be directly suspended and the second application communication process is called.
- the second application communication process corresponding to the interrupt request when the second application communication process corresponding to the interrupt request has a higher priority and is more urgent, the first application communication process can also be directly suspended and the second application communication process is called.
- the second application communication process corresponding to the interrupt request when the second application communication process corresponding to the interrupt request has a higher priority and is more urgent, the first application communication process can also be directly suspended and the second application communication process is called.
- the second application communication process corresponding to the interrupt request when the second application communication process corresponding to the interrupt request has a higher priority and is more urgent, the first application communication process can also be directly suspended and the second application communication process is called.
- the second application communication process corresponding to the interrupt request when the second application communication process
- the receiving time window request in Class A mode the first downlink receiving window request (Rx1 Interrupt), the second downlink receiving window request (Rx2 Interrupt), and Class
- the time synchronization window request (Beacon Interrupt) in mode B has the highest priority; the data sending request (DataSendReq request) from an external module has medium priority; the periodic listening window request (PingSlot Interrupt) in the class B mode has priority The lowest level.
- the data sending request is received through the first application management process,
- the data sending request may be put into a preset waiting queue, and the data sending process corresponding to the data sending request may be called after the receiving time window management process is called and suspended.
- the first application management process receives the data sending request and For the periodic listening window request, since the priority of the data transmission request is higher than the priority of the periodic listening window request, the data transmission request and the periodic listening window request may be ordered The data sending request and the periodic listening window request are put into a preset waiting queue. After the time synchronization receiving window process is called and suspended, the data sending process corresponding to the data sending request is called again. After the data sending process is called and suspended, the periodic listening window is called to request the corresponding listening window receiving process.
- a single MCU is used to process and call the first application management process and the second application management process at the same time, so as to realize the coordinated work of the wide area network communication of LoRa Class B mode and other hardware modules in one MCU.
- the wide area network hardware module does not need to separately handle the tasks related to the wide area communication in LoRa Class B mode, thereby further reducing the power consumption and cost of the terminal.
- the first application management process responds to at least one second interrupt request, and according to the preset second priority principle, puts the at least one second interrupt request into the preset In the set waiting queue, the LoRa-related interrupt requests are processed in order to ensure the stability of LoRa WAN communication.
- the second priority principle is determined by a preset priority management module.
- the preset second priority principle can be dynamically modified. According to the importance of the uplink service, the priority of the data sending request can be dynamically set higher than the receiving time according to actual needs. The priority of the window request, the first downlink receiving window request, and the second downlink receiving window request, or the dynamic setting of the data sending request is lower than the periodic listening window request.
- the dynamic modification of the preset second priority principle can be achieved by setting a priority management module in the MCU, and setting the dynamic modification of the second priority principle in the priority management module Therefore, the dynamic modification of the second priority principle is completed, and the priority of the LoRa-related interrupt request can be adjusted according to actual needs.
- the method further includes:
- the first application management process after the first application management process has finished calling the second application communication process, and there is no second interrupt request in the waiting queue, at this time, the first application management process has been completed.
- the first application management process can suspend itself, thereby releasing the multi-threaded resources of the MCU, facilitating the MCU to process other transactions, and reducing the power consumption of the MCU.
- the first application management process responds to the first interrupt request, and at least one second application management process is suspended according to a preset first priority principle, and the first application management process is called
- the first application communication process corresponding to the interrupt request includes:
- S151 Respond to the request of the first terminal through the first application management process, and determine the current remaining signal amount
- the semaphore is a resource used to manage multiple threads in the MCU.
- the semaphore is a non-negative integer variable, and every logical process needs to obtain the semaphore when it is called. Therefore, when the first application management process responds to the receiving time window request, the current remaining semaphore can be determined, and it is determined that the receiving time window management process corresponding to the receiving time window request can be directly called, or other logic needs to be suspended process.
- the MCU when the current remaining semaphore is not greater than the preset threshold, the MCU cannot call a new logic process at this time, and needs to wait for the logic process currently being called to hang. After the semaphore is released, Only then can the new logical process be called.
- the preset threshold may be 0, 1, 5, etc., which is not limited in the present application.
- the value of the semaphore is 3, and each time the MCU invokes a logic process, the value of the current remaining semaphore is reduced by 1, when the current remaining semaphore is not greater than a preset
- the threshold is 0, the new logic process cannot be called, and when a calling logic process stops calling, the semaphore can be released, and the value of the current remaining semaphore is increased by 1.
- At least one second application management process can be suspended in order from low to high priority to ensure that the communication process of the first application with higher priority can be transfer.
- the semaphore is used to manage the multi-threaded resources in the MCU, and logical processes are called in sequence according to the preset first priority principle to ensure that the first priority is higher.
- the application communication process can be called as soon as possible to ensure the stability of LoRa WAN communication.
- the method further includes:
- a monitoring process may be used to monitor the calling state of the MCU, and determine whether the MCU is calling at least one logical process other than the monitoring process. At least one logical process other than the monitoring process can also be called up through the monitoring process.
- the invocation status of the first application management process and the at least one second application management process can be monitored through the monitoring process.
- the monitoring process can also invoke the logic process corresponding to the interrupt request so that the logic process can Respond to the interrupt request.
- a monitoring process is adopted to monitor the calling status of the first application management process and the at least one second application management process, so as to monitor the running status of the MCU in the terminal.
- the method further includes:
- S171 When it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state, set the MCU to enter a sleep state through the monitoring process.
- the monitoring process can set the MCU to enter a sleep state to reduce power consumption.
- a monitoring process is adopted to determine the current status of the first application management process and the second application management process, and the status of the first application management process and the second application management process
- the monitoring process sets the MCU to enter the sleep state, so that the power consumption of the MCU can be further reduced, and low power consumption and low-cost calling of the MCU can be realized.
- the method includes:
- S181 Respond to the second application call request through the second application management process, and add the second application process corresponding to the second application call request to a preset waiting queue according to a preset first priority principle.
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the MCU can directly call the logic corresponding to the LoRa-related interrupt request Process, or suspend at least one second application management process as soon as possible, and call the logic process corresponding to the LoRa-related interrupt request.
- the priority of the second application process corresponding to the second application call request and the logic of the current call state can be determined according to the preset first priority principle.
- the priority of the process When the priority of the second application process corresponding to the second application call request is lower than the priority of the logic process that is currently in the calling state, the second application call request may be added to the preset waiting queue, waiting for the current The logic process that is in the calling state is suspended, and after the semaphore is released, it responds to the second application call request and calls the second application process.
- the priority of the second application process corresponding to the second application call request may be determined through the second application management process corresponding to the second application call request.
- the priority of the second application process corresponding to the second application call request may be determined through the monitoring process.
- the second application invocation request is added to the preset waiting queue according to the preset first priority principle.
- the terminal includes a micro control unit MCU, and the device is applied to the MCU;
- the device specifically includes:
- the first process creation module 401 is configured to create a first application management process and at least one second application management process
- the first process suspension module 402 is configured to respond to receiving a time window request through the first application management process, and suspend at least one second application management process according to a preset first priority principle;
- the receiving time window management process calling module 403 is configured to call the receiving time window management process corresponding to the receiving time window request within a preset first time period through the first application management process; wherein, the receiving time window The management process is used to receive the first downlink data frame sent by a gateway.
- the device further includes:
- a receiving time window management process suspension module configured to suspend the receiving time window management process through the first application management process after a preset first time period
- the first management process suspension module is configured to suspend itself through the first application management process after the receiving time window management process is suspended.
- the first process suspension module includes:
- the first remaining semaphore determining sub-module is configured to determine the current remaining semaphore in response to the receiving time window request through the first application management process;
- the first process suspension submodule is configured to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold.
- the device further includes:
- the first monitoring process creation module is used to create a monitoring process
- the first monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the first sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the first waiting module is configured to respond to the second application call request, and add the second application call request to the preset waiting queue according to the preset first priority principle.
- the terminal includes a micro control unit MCU, and the device is applied to the MCU;
- the device specifically includes:
- the second process creation module 501 is configured to create a first application management process and at least one second application management process
- the second process suspension module 502 is configured to respond to periodic listening window requests through the first application management process, and suspend at least one second application management process according to a preset first priority principle;
- the listening window receiving process invoking module 503 is configured to invoke the periodic listening window request corresponding listening window receiving process within a preset second time period through the first application management process; wherein the listening window The window receiving process is used to receive a second downlink data frame sent by a gateway.
- the device further includes:
- the third process suspension module is configured to synchronously receive window requests through the response time of the first application management process, and suspend at least one second application management process according to the preset first priority principle;
- the time synchronization receiving window process calling module is used to call the time synchronization receiving window process corresponding to the time synchronization receiving window request within a preset third time period through the first application management process; wherein the time synchronization receiving The window process is used to receive a time synchronization frame sent by a gateway.
- the device further includes:
- a listening window receiving process suspension module configured to suspend the listening window receiving process through the first application management process after a preset second time period
- the second management process suspension module is configured to suspend itself through the first application management process after the listening window receiving process is suspended.
- the second process suspension module includes:
- the second remaining semaphore determining sub-module is configured to determine the current remaining semaphore in response to the response period listening window request through the first application management process;
- the second process suspension submodule is configured to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold.
- the device further includes:
- the second monitoring process creation module is used to create a monitoring process
- the second monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the second sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the second waiting module is configured to respond to the second application call request and add the second application call request to the preset waiting queue according to the preset first priority principle.
- the terminal includes a micro control unit MCU, and the device is applied to the MCU;
- the device specifically includes:
- the third process creation module 601 is configured to create a first application management process and at least one second application management process
- the fourth process suspension module 602 is configured to respond to the first interrupt request through the first application management process, and suspend at least one second application management process according to the preset first priority principle, and call the first The first application communication process corresponding to the interrupt request; wherein the first application communication process is used to receive a data frame sent by a gateway;
- the second interrupt request waiting module 603 is configured to respond to at least one second interrupt request through the first application management process when the first application communication process is called, and according to the preset second priority principle, the At least one second interrupt request is placed in the preset waiting queue;
- the first application communication process suspension module 604 is configured to suspend the first application communication process after the first application management process has finished calling the first application communication process
- the second application communication process invoking module 605 is configured to respond to at least one second interrupt request in the waiting queue in turn, and invoke the second application communication process corresponding to the second interrupt request.
- the second priority principle is determined by a preset priority management module.
- the device further includes:
- the third management process suspension module is used to suspend the first application management process after the first application management process calls the second application communication process and there is no second interrupt request in the waiting queue. Up oneself.
- the fourth process suspension module includes:
- the third remaining semaphore determining submodule is configured to respond to the first terminal request through the first application management process to determine the current remaining semaphore;
- the third process suspension submodule is used to suspend at least one second application management process according to the preset first priority principle when the current remaining semaphore is not greater than the preset threshold, and call the first interrupt Request the corresponding first application communication process.
- the device further includes:
- the third monitoring process creation module is used to create a monitoring process
- the third monitoring module is configured to monitor the calling state of the first application management process and the at least one second application management process through the monitoring process.
- the device further includes:
- the third sleep module is used to set the MCU to sleep through the monitoring process when it is monitored through the monitoring process that the states of the first application management process and the second application management process are both in a suspended state status.
- the device includes:
- the third waiting module is used to respond to the second application call request through the second application management process, and add the second application process corresponding to the second application call request to the preset waiting queue according to the preset first priority principle in.
- the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
- An electronic device including:
- One or more processors are One or more processors.
- One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, cause the apparatus to perform one or more of the aforementioned methods.
- One or more machine-readable media having instructions stored thereon, when executed by one or more processors, cause the processors to perform one or more of the aforementioned methods.
- the embodiments of the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- the memory may include non-permanent memory in computer readable media, random access memory (RAM) and/or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM).
- RAM random access memory
- ROM read-only memory
- flash RAM flash memory
- Computer-readable media include permanent and non-permanent, removable and non-removable media, and information storage can be realized by any method or technology.
- the information can be computer-readable instructions, data structures, program modules, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, Magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
- PRAM phase change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- ROM read-only memory
- EEPROM electrically erasable programmable read-only memory
- flash memory or other memory technology
- CD-ROM compact disc
- DVD digital versatile disc
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the instruction device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Telephonic Communication Services (AREA)
- Telephone Function (AREA)
Abstract
本申请实施例提供了一种终端的控制方法和装置,所述方法包括:创建第一应用管理进程以及至少一个第二应用管理进程;通过第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;通过第一应用管理进程,在预设的第一时段内调用接收时间窗口请求对应的接收时间窗口管理进程。所述装置包括:第一进程创建模块、第一进程挂起模块、接收时间窗口管理进程调用模块。通过本申请实施例的终端的控制方法,采用单个MCU同时处理、调用第一应用管理进程以及第二应用管理进程,从而实现在一个MCU控制LoRa Class A和Class B模式的广域网通信与其他硬件模块的协同工作。
Description
本申请要求2019年03月07日递交的申请号为201910172716.2、发明名称为“一种终端的控制方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及电子技术领域,特别是涉及一种终端的控制方法和装置。
在物联网等行业的快速发展下,各式家电、电子产品、嵌入式产品、穿戴式装置、工业设备之间的联网需求也在不断增长。物联网的无线通信技术很多,主要分为两类:一类是Zigbee、WiFi、蓝牙、Z-wave等短距离通信技术;另一类是广域网通信技术。
现有技术中,广域网通信技术通常采用广域通信芯片,与电子设备中的控制各个硬件模块的主微控制单元相连接,从而实现电子设备的广域网通信功能。广域通信芯片相当于单独处理广域通信相关的任务的微控制单元。
对于物联网来说,无线通讯技术并只需要追求速率上的提升,而是需要综合考虑速率、功耗、距离、成本的一系列的问题。对于广域网通信技术来说,其重点更是在于如何在保持现有通信范围的前提下,尽可能降低功耗以及成本。
发明内容
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种终端的控制方法和装置。
为了解决上述问题,本申请公开了一种终端的控制方法,所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法包括:
创建第一应用管理进程以及至少一个第二应用管理进程;
通过所述第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第 一下行数据帧。
优选地,所述方法还包括:
在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;
在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
优选地,所述通过所述第一应用管理进程响应的接收时间窗口请求,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:
通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;
当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
优选地,所述方法还包括:
创建监控进程;
通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述方法还包括:
当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述方法包括:
响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
本申请还公开了一种终端的控制方法,所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法包括:
创建第一应用管理进程以及至少一个第二应用管理进程;
通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
优选地,所述方法还包括:
通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间同步接收窗口进程用于接收一网关发送的时间同步帧。
优选地,所述方法还包括:
在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;
在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
优选地,所述通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:
通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;
当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
优选地,所述方法还包括:
创建监控进程;
通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述方法还包括:
当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述方法包括:
响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
本申请还公开了一种终端的控制方法所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法包括:
创建第一应用管理进程、以及至少一个第二应用管理进程;
通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;
在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;
当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;
依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
优选地,所述第二优先级原则通过预设的优先级管理模块确定。
优选地,所述方法还包括:
在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
优选地,通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程,包括:
通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;
当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
优选地,所述方法还包括:
创建监控进程;
通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述方法还包括:
当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述方法包括:
通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
本申请还公开了一种终端的控制装置,所述装置包括:
第一进程创建模块,用于创建第一应用管理进程以及至少一个第二应用管理进程;
第一进程挂起模块,用于通过所述第一应用管理进程响应接收时间窗口请求,并根 据预设的第一优先级原则,挂起至少一个第二应用管理进程;
接收时间窗口管理进程调用模块,用于通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第一下行数据帧。
优选地,所述装置还包括:
接收时间窗口管理进程挂起模块,用于在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;
第一管理进程挂起模块,用于在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
优选地,所述第一进程挂起模块包括:
第一剩余信号量确定子模块,用于通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;
第一进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
优选地,所述装置还包括:
第一监控进程创建模块,用于创建监控进程;
第一监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述装置还包括:
第一睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述装置包括:
第一等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
本申请还公开了一种终端的控制装置,所述终端包括微控制单元MCU,所述装置应用于所述MCU;
所述装置包括:
第二进程创建模块,用于创建第一应用管理进程以及至少一个第二应用管理进程;
第二进程挂起模块,用于通过所述第一应用管理进程响应周期侦听窗口请求,并根 据预设的第一优先级原则,挂起至少一个第二应用管理进程;
侦听窗口接收进程调用模块,用于通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
优选地,所述装置还包括:
第三进程挂起模块,用于通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
时间同步接收窗口进程调用模块,用于通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间同步接收窗口进程用于接收一网关发送的时间同步帧。
优选地,所述装置还包括:
侦听窗口接收进程挂起模块,用于在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;
第二管理进程挂起模块,用于在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
优选地,第二进程挂起模块包括:
第二剩余信号量确定子模块,用于通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;
第二进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
优选地,所述装置还包括:
第二监控进程创建模块,用于创建监控进程;
第二监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述装置还包括:
第二睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述装置包括:
第二等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述 第二应用调用请求加入预设的等待队列中。
本申请还公开了一种终端的控制装置,所述终端包括微控制单元MCU,所述装置应用于所述MCU;
所述装置包括:
第三进程创建模块,用于创建第一应用管理进程、以及至少一个第二应用管理进程;
第四进程挂起模块,用于通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;
第二中断请求等待模块,用于在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;
第一应用通信进程挂起模块,用于当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;
第二应用通信进程调用模块,用于依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
优选地,所述第二优先级原则通过预设的优先级管理模块确定。
优选地,所述装置还包括:
第三管理进程挂起模块,用于在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
优选地,第四进程挂起模块包括:
第三剩余信号量确定子模块,用于通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;
第三进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
优选地,所述装置还包括:
第三监控进程创建模块,用于创建监控进程;
第三监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
优选地,所述装置还包括:
第三睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
优选地,所述装置包括:
第三等待模块,用于通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
一种装置,包括:
一个或多个处理器;和
其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行本申请所述的一个或多个的方法。
一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行本申请所述的一个或多个的方法。
与现有技术相比,本申请实施例包括以下优点:
通过本申请实施例的终端的控制方法,无需另行设置单独处理LoRa Class A和Class B模式的广域通信相关的任务的硬件模块,而采用单个MCU同时处理、调用第一应用管理进程以及第二应用管理进程,从而实现在一个MCU控制LoRa Class A和Class B模式的广域网通信与其他硬件模块的协同工作,进一步降低了终端的功耗以及成本。
图1是本申请的一种终端的控制方法实施例的步骤流程图;
图2是本申请的一种终端的控制方法实施例的步骤流程图;
图3是本申请的一种终端的控制方法实施例的步骤流程图;
图4是本申请的一种终端的控制装置实施例的结构框图;
图5是本申请的一种终端的控制装置实施例的结构框图;
图6是本申请的一种终端的控制装置实施例的结构框图。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
在本申请实施例中,所述MCU可以为一种终端芯片,是采用超大规模集成电路技 术把具有数据处理能力的中央处理器(CPU)、随机存储器(RAM)、只读存储器(ROM)、多种I/O口和中断系统、定时器/计数器等功能集成到一块硅片上构成的一个小而完善的微型计算机系统。所述MCU可以控制终端上的各种硬件模块,从而使电子设备实现不同的功能。
在本申请实施例中,所述MCU中调用有多个逻辑进程,所述监控进程、第一应用管理进程、第二应用管理进程皆为MCU中的逻辑进程。
在本申请实施例中,所述MCU可以不采用操作系统,而采用主循环的方式处理基本任务,并通过中断请求处理紧急任务的方式,实现对逻辑进程的管理。所述MCU也可以采用一操作系统,例如RTOS实时操作系统,实现对逻辑进程的管理。采用操作系统的MCU可以在无操作系统的MCU的基础上,具有更多方式处理多个逻辑进程,例如,协同方式、时间片轮询方式以及抢占优先级方式。
在本申请实施例中,所述终端与网关之间的LoRa广域网通信可以包括Class A、Class B两种通信模式。
在本申请实施例中,Class A模式下的终端可以定期向网关发送上行数据帧,并在发送上行数据帧后开启两个短暂的下行接收窗口,以实现终端与网关之间的双向数据传输。在开启下行接收窗口之外的时间,网关无法向所述终端发送数据帧,需要等待至终端再次开启下行接收窗口。由此,Class A模式可以有效节约所述终端进行无线通信消耗的电量。
在本申请实施例中,Class B模式下的终端可以在指定的时间内,开启一时间同步接收窗口,以接收网关发送的数据帧。终端还需要另行从网关接收一用于时间同步的时间同步帧(Beacon),确保网关与终端两者之间时间同步,并使网关得知终端正在监听。Class B模式下终端与网关与Class A模式相比,有更多机会进行数据传输,终端进行无线消耗的电量与Class A模式更多,而数据传输的时间延迟降低。
在本申请实施例中,与LoRa广域网通信相关的逻辑进程可以接收多种中断请求,所述中断请求可以包括:无线请求(radio Interrupt)、定时请求(timer Interrupt)、来自外部模块的数据发送请求(DataSendReq Interrupt)。其中,无线请求可以包括发送完成请求(TxDone Interrupt)、接收完成请求(RxDone Interrupt)、接收超时请求(RxTimeout Interrupt)。所述定时请求可以包括接收时间窗口请求、第一下行接收窗口请求(Rx1Interrupt)、第二下行接收窗口请求(Rx2Interrupt)、周期侦听窗口请求(PingSlot Interrupt)、时间同步窗口请求(Beacon Interrupt)。
参照图1,示出了本申请的一种终端的控制方法实施例的步骤流程图,所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法具体可以包括如下步骤:
步骤101,创建第一应用管理进程以及至少一个第二应用管理进程;
在本申请实施例中,所述第一应用管理进程用于对LoRa相关的应用进程进行管理。所述第一应用管理进程还可以调用处理LoRa广域网相关的协议,从而控制终端上的LoRa广域网硬件模块。所述LoRa广域网硬件模块具有低功耗的特性,可以有效降低终端的功耗。
在本申请实施例中,所述第二应用管理进程用于对所述终端上除LoRa相关的硬件模块之外的其他硬件模块进行管理。例如,灯光模块、电源模块、液晶显示模块、键盘控制模块等等,本申请对此不做限制。
步骤102,通过所述第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
在本申请实施例中,所述接收时间窗口请求为一种用于LoRa Class A模式下的中断请求,用于请求终端发送Class A模式下的上行数据帧,并调起接收时间窗口管理进程。所述接收时间窗口管理进程用于开启下行接收窗口接收网关发送的数据帧。
在本申请实施例中,可以采用一预设第一周期,定期地发送所述接收时间窗口请求,从而实现采用预设第一周期,定期地通过所述第一应用管理进程调用所述接收时间窗口请求对应的接收时间窗口管理进程。
在本申请实施例中,所述预设第一周期可以为1s、5min、2h等,本申请对此不做限制。
在本申请实施例中,所述终端还可以采用Aloha协议,确定所述预设第一周期。在Aloha协议下,所述预设第一周期可以附带一定的随机延时,从而所述预设第一周期的时长可以并非是固定的。
在本申请实施例中,所述MCU具有多线程功能,可以同时执行多个逻辑进程,当所述MCU内多线程资源已经被全部占用时,需要先挂起至少一个逻辑进程,释放资源,才可运行新的逻辑进程。当一新的逻辑进程的优先级较低时,需要等待当前执行的逻辑进程执行完毕并挂起,才可执行新的逻辑进程,而当一新的逻辑进程的优先级比当前执行的逻辑进程更高时,可以挂起当前执行的逻辑进程,并执行新的逻辑进程。
在本申请实施例中,所述第一优先级原则可以包括预设的每一逻辑进程对应的优先 级,优先级最高为0。
在本申请实施例中,LoRa相关的逻辑进程可以具有比其他逻辑进程更高的优先级,由此,当准备执行所述LoRa相关的逻辑进程时,根据预设的第一优先级原则,确定当前执行的第二应用管理进程的优先级,并按照优先级从低到高的次序,依次挂起至少一个第二应用管理进程以释放资源。
步骤103,通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第一下行数据帧。
在本申请实施例中,所述第一应用管理进程可以响应所述接收时间窗口请求,中断主循环,发送Class A模式下的上行数据帧,并调起所述接收时间窗口管理进程,所述接收时间窗口管理进程可以接收下行接收窗口请求,从而所述接收时间窗口管理进程可以在预设的第一时段内依次开启下行接收窗口,接收网关发送的第一下行数据帧。由此完成所述终端与网关之间的Class A模式下的数据传输。
在具体实现中,所述接收时间窗口管理进程可以接收第一下行接收窗口请求(Rx1 Interrupt)、第二下行接收窗口请求(Rx2 Interrupt)。所述接收时间窗口管理进程可以在接收到第一下行接收窗口请求(Rx1 Interrupt)后,开启第一下行接收窗口,等待接收网关发送的数据,如果接收到网关发送的数据,则本次数据传输完成。如在第一下行接收窗口的时段内,未收到网关发送数据,则所述接收时间窗口管理进程可以继续接收第二下行接收窗口请求(Rx2 Interrupt),并开启第二下行接收窗口请求,继续等待接收网关发送的数据。
在具体实现中,可能会在调用一LoRa相关的逻辑进程的过程中,收到多个LoRa相关的中断请求,此时可以根据预设的第二优先级原则,确定所述LoRa相关的逻辑进程之间的处理顺序。通常来说,所述来自外部模块的数据发送请求(DataSendReq Interrupt)的优先级低于第一下行接收窗口请求(Rx1 Interrupt)以及第二下行接收窗口请求(Rx2 Interrupt),从而可以将优先级较低的中断请求置于一预设的等待队列中,以根据优先级由高至低依次处理LoRa相关的中断请求。
在具体实现中,所述预设的第二优先级原则可以动态地修改,在上行业务较为紧迫的情况下,可以根据实际需要,动态地设置所述数据发送请求(DataSendReq Interrupt)的优先级高于第一下行接收窗口请求(Rx1 Interrupt)以及第二下行接收窗口请求(Rx2 Interrupt)。
在具体实现中,所述预设的第二优先级原则的动态修改,可以通过在MCU中设置一优先级管理模块,在该优先级管理模块中设置第二优先级原则的动态修改规则,从而完成所述第二优先级原则的动态修改。
通过本申请实施例的终端的控制方法,采用单个MCU同时处理、调用第一应用管理进程以及第二应用管理进程,从而实现在一个MCU控制LoRa Class A模式的广域网通信与其他硬件模块的协同工作。此时,广域网硬件模块无需单独处理LoRa Class A模式的广域通信相关的任务,从而进一步降低了终端的功耗以及成本。
在本申请的一种实施例中,所述方法还包括:
S11,在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;
在本申请实施例中,所述第一应用管理进程可以在发送Class A模式下的上行数据帧后,在预设的第一时段内调起所述接收时间窗口管理进程,在所述预设的第一时段之后,所述第一应用管理进程即挂起所述接收时间窗口管理进程,释放MCU的多线程资源。由此,在Class A模式下,除预设的第一时段以外的时间,终端不进行广域网通信,此时网关无法发送数据至终端。
S12,在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
在本申请实施例中,在完成所述定期的Class A模式广域网通信后,所述第一应用管理进程可以挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
通过本申请实施例的终端的控制方法,在预设的第一时段之后,可以通过所述第一应用管理进程挂起所述接收时间窗口管理进程,其后通过所述第一应用管理进程挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
在本申请的一种实施例中,所述通过所述第一应用管理进程响应的接收时间窗口请求,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:
S21,通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;
在本申请实施例中,信号量为所述MCU中用于管理多线程的资源。信号量为一非负整型变量,每一逻辑进程在调用时,都需要获取信号量。由此,在通过所述第一应用管理进程响应接收时间窗口请求时,可以确定当前剩余信号量,确定所述接收时间窗口请求对应的接收时间窗口管理进程可以直接调用,或需要挂起其他逻辑进程。
S22,当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
在本申请实施例中,当所述当前剩余信号量不大于预设阈值时,则此时所述MCU无法调用新的逻辑进程,需要等待当前正在调用的逻辑进程挂起,释放信号量后,才可调用新的逻辑进程。
在本申请实施例中,所述预设阈值可以为0、1、5等,本申请对此不做限制。
作为本申请的一种示例,所述信号量的数值为3,所述MCU每次调用一逻辑进程时,所述当前剩余信号量的数值减1,当所述当前剩余信号量不大于预设阈值,即0时,新的逻辑进程无法调用,而当一正在调用的逻辑进程停止调用时,可以释放信号量,所述当前剩余信号量的数值加1。
在本申请实施例中,可以根据预设的第一优先级原则,按照优先级由低至高,依次挂起至少一个第二应用管理进程,确保优先级较高的LoRa相关的逻辑进程可以尽快被调用。
通过本申请实施例的终端的控制方法,采用信号量对所述MCU中的多线程的资源进行管理,并按照预设的第一优先级原则依次调用逻辑进程,确保优先级较高的LoRa相关的逻辑进程可以尽快被调用,以确保LoRa广域网通信的稳定性。
在本申请的一种实施例中,所述方法还包括:
S31,创建监控进程;
在本申请实施例中,可以采用一监控进程,监控MCU的调用状态,确定所述MCU是否正在调用所述监控进程之外的至少一个逻辑进程。还可以通过所述监控进程,调起所述监控进程之外的至少一个逻辑进程。
S32,通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请实施例中,可以通过监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。当所述MCU接收到一中断请求时,且所述中断请求对应的逻辑进程未在调用状态时,也可以通过所述监控进程,调起该中断请求对应的逻辑进程,使所述逻辑进程可以响应该中断请求。
通过本申请实施例的终端的控制方法,采用监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态,实现对终端中MCU的运行状态进行监控。
在本申请的一种实施例中,所述方法还包括:
S41,当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请实施例中,当所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,则此时在所述MCU中除所述监控进程以外,没有其他逻辑进程正在调用,此时所述监控进程可以设置所述MCU进入睡眠状态,以降低功耗。
通过本申请实施例的终端的控制方法,采用监控进程确定当前所述第一应用管理进程以及所述第二应用管理进程的状态,并在所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,所述监控进程设置所述MCU进入睡眠状态,从而可以进一步降低所述MCU的功耗,实现MCU的低功耗、低成本调用。
在本申请的一种实施例中,所述方法包括:
S51,响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
在本申请实施例中,对LoRa相关的逻辑进程来说,由于其具有较高的优先级,一般在接收到LoRa相关的中断请求后,所述MCU可以直接调用LoRa相关的中断请求对应的逻辑进程,或尽快挂起至少一个第二应用管理进程,并调用LoRa相关的中断请求对应的逻辑进程。而对于与LoRa无关的逻辑进程来说,由于其优先级较低,在接收到相关的中断请求,还需要根据预设的第一优先级原则,确定该中断请求对应的逻辑进程的优先级。
在本申请实施例中,当响应第二应用调用请求,可以根据预设的第一优先级原则,确定所述第二应用调用请求对应的第二应用进程的优先级以及当前正在调用状态的逻辑进程的优先级。当所述第二应用调用请求对应的第二应用进程的优先级低于当前正在调用状态的逻辑进程的优先级时,可以将所述第二应用调用请求加入预设的等待队列中,待当前正在调用状态的逻辑进程挂起,释放信号量后,再响应所述第二应用调用请求,并调用所述第二应用进程。
在本申请实施例中,可以通过第二应用调用请求相应的第二应用管理进程确定所述第二应用调用请求对应的第二应用进程的优先级。当所述第二应用调用请求相应的第二应用管理进程未在调用状态时,可以通过所述监控进程确定所述第二应用调用请求对应的第二应用进程的优先级。
通过本申请实施例的终端的控制方法,通过响应第二应用调用请求,根据预设的第 一优先级原则,将所述第二应用调用请求加入预设的等待队列中。从而实现所述MCU可以根据优先级协调调用逻辑进程的效果。
参照图2,示出了本申请的另一种终端的控制方法实施例的步骤流程图,所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法包括:
步骤201,创建第一应用管理进程以及至少一个第二应用管理进程;
在本申请实施例中,所述第一应用管理进程用于对LoRa相关的应用进程进行管理。所述第一应用管理进程还可以调用处理LoRa广域网相关的协议,从而控制终端上的LoRa广域网硬件模块。所述LoRa广域网硬件模块具有低功耗的特性,可以有效降低终端的功耗。
在本申请实施例中,所述第二应用管理进程用于对所述终端上除LoRa相关的硬件模块之外的其他硬件模块进行管理。例如,灯光模块、电源模块、液晶显示模块、键盘控制模块等等,本申请对此不做限制。
步骤202,通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
在本申请实施例中,所述周期侦听窗口请求(PingSlot Interrupt)为一种用于LoRa Class B模式下的中断请求,用于调起侦听窗口接收进程。
在本申请实施例中,可以采用一预设第二周期,和/或,采用至少一个指定的第二时间,定期地发送所述周期侦听窗口请求。从而实现采用一预设第二周期,和/或,采用至少一个指定的第二时间,定期地通过所述第一应用管理进程调用所述侦听窗口接收进程。
在本申请实施例中,所述预设第二周期可以为1s、5min、2h等,本申请对此不做限制。
在本申请实施例中,由于在所述Class A模式下,发送接收时间窗口请求的预设第一周期可以采用Aloha协议确定,对于网关来说,接收所述终端发送Class A模式下的上行数据帧的时间点是无法确定的。而在Class B模式下,发送所述周期侦听窗口请求的预设第二周期或第二时间可以是固定的,从而所述网关可以在确定的时间点与所述终端进行数据传输。
在本申请实施例中,所述MCU具有多线程功能,可以同时执行多个逻辑进程,当所述MCU内多线程资源已经被全部占用时,需要先挂起至少一个逻辑进程,释放资源,才可运行新的逻辑进程。当一新的逻辑进程的优先级较低时,需要等待当前执行的逻辑 进程执行完毕并挂起,才可执行新的逻辑进程,而当一新的逻辑进程的优先级比当前执行的逻辑进程更高时,可以挂起当前执行的逻辑进程,并执行新的逻辑进程。
在本申请实施例中,所述第一优先级原则可以包括预设的每一逻辑进程对应的优先级,优先级最高为0。
在本申请实施例中,LoRa相关的逻辑进程可以具有比其他逻辑进程更高的优先级,由此,当准备执行所述LoRa相关的逻辑进程时,根据预设的第一优先级原则,确定当前执行的第二应用管理进程的优先级,并按照优先级从低到高的次序,依次挂起至少一个第二应用管理进程以释放资源。
步骤203,通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
在本申请实施例中,所述第一应用管理进程可以响应所述周期侦听窗口请求,中断主循环,调起所述侦听窗口接收进程。所述侦听窗口接收进程可以在预设的第二时段内接收网关发送的第二下行数据,由此完成所述终端与网关之间的Class B模式下的数据传输。
在具体实现中,可能会在调用一LoRa相关的逻辑进程的过程中,收到多个LoRa相关的中断请求,此时可以根据预设的第二优先级原则,确定所述LoRa相关的逻辑进程之间的处理顺序。通常来说,所述来自外部模块的数据发送请求(DataSendReq Interrupt)的优先级高于所述周期侦听窗口请求(PingSlot Interrupt),由此,当同时接收到所述数据发送请求以及所述周期侦听窗口请求时,可以先响应所述数据发送请求,再响应所述周期侦听窗口请求。而当调用所述侦听窗口接收进程的过程中,如接收到数据发送请求,则可以根据实际需要,等待所述侦听窗口接收进程调用完毕后,即响应所述数据发送请求,或者直接挂起所述侦听窗口接收进程,并响应所述数据发送请求,进一步提高上行业务的处理效率。
在具体实现中,所述预设的第二优先级原则可以动态地修改,在上行业务重要性较低的情况下,可以根据实际需要,动态地设置所述数据发送请求(DataSendReq Interrupt)的优先级低于所述周期侦听窗口请求。
在具体实现中,所述预设的第二优先级原则的动态修改,可以通过在MCU中设置一优先级管理模块,在该优先级管理模块中设置第二优先级原则的动态修改规则,从而完成所述第二优先级原则的动态修改。
通过本申请实施例的终端的控制方法,采用单个MCU同时处理、调用第一应用管理进程以及第二应用管理进程,从而实现在一个MCU控制LoRa Class B模式的广域网通信与其他硬件模块的协同工作。此时,广域网硬件模块无需单独处理LoRa Class B模式的广域通信相关的任务,从而进一步降低了终端的功耗以及成本。
在本申请的一种实施例中,所述方法还包括:
S61,通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
在本申请实施例中,在Class B模式下,终端不会发送一上行数据帧,通知网关发送下行数据帧,而是在终端与网关约定的一预设第三周期,和/或,至少一个指定的第三时间,开启侦听窗口接收进程,以接收网关发送的时间同步帧,使网关与终端的时间同步,确保终端可以在约定的时间开启侦听窗口接收进程,同时使网关可以得知所述终端处于监听状态。
在本申请实施例中,所述预设第三周期可以为1s、5min、2h等,本申请对此不做限制。
S62,通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间同步接收窗口进程用于接收一网关发送的时间同步帧。
在本申请实施例中,所述第一应用管理进程可以响应所述时间同步接收窗口请求(Beacon Interrupt),中断主循环,调用所述时间同步接收窗口请求对应的时间同步接收窗口进程。所述时间同步接收窗口进程可以在预设的第三时段内接收网关发送的时间同步帧,从而完成所述终端与所述网关之间的时间同步。
在本申请实施例中,假如所述终端由于无线干扰、通信拥塞等原因,导致所述终端无法接收到所述网关发送的时间同步帧。所述终端可以在下一个预设第三周期或指定的第三时间继续尝试接收所述时间同步帧。如果在一定的时长内,所述终端始终未接收到所述时间同步帧。则所述终端可以从Class B模式切换为Class A模式,与网关进行通信。
在具体实现中,可能会在调用一LoRa相关的逻辑进程的过程中,收到多个LoRa相关的中断请求,此时可以根据预设的第二优先级原则,确定所述LoRa相关的逻辑进程之间的处理顺序。通常来说,所述来自外部模块的数据发送请求(DataSendReq Interrupt)的优先级低于所述时间同步接收窗口请求(Beacon Interrupt),从而可以将优先级较低的中断请求可以置于一预设的等待队列中,以根据优先级由高至低依次处理LoRa相关 的中断请求。
在具体实现中,所述预设的第二优先级原则可以动态地修改,在上行业务较为紧迫的情况下,可以根据实际需要,动态地设置所述数据发送请求(DataSendReq Interrupt)的优先级高于所述时间同步接收窗口请求(Beacon Interrupt)。
通过本申请实施例的终端的控制方法,通过所述第一应用管理进程响应时间同步接收窗口请求,并在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程以接收时间同步帧,从而实现在所述终端与所述网关之间的时间同步,确保终端在Class B模式下的数据传输的稳定性。
在本申请实施例中,所述方法还包括:
S71,在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;
在本申请实施例中,所述第一应用管理进程可以在在预设的第二时段内调起所述侦听窗口接收进程,在所述预设的第二时段之后,所述第一应用管理进程即挂起所述侦听窗口接收进程,释放MCU的多线程资源。由此,在Class B模式下,除预设的第二时段以及预设的第三时段以外的时间,终端不进行广域网通信,此时网关无法发送数据至终端。
S72,在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
在本申请实施例中,在完成所述定期的Class B模式广域网通信后,所述第一应用管理进程可以挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
通过本申请实施例的终端的控制方法,在预设的第二时段之后,可以通过所述第一应用管理进程挂起所述侦听窗口接收进程,其后通过所述第一应用管理进程挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
在本申请实施例中,所述方法还包括:
S81,在预设的第三时段之后,通过所述第一应用管理进程挂起所述时间同步接收窗口进程;
在本申请实施例中,所述第一应用管理进程可以在在预设的第三时段内调起所述时间同步接收窗口进程,在所述预设的第三时段之后,所述第一应用管理进程即挂起所述时间同步接收窗口进程,释放MCU的多线程资源。由此,在Class B模式下,除预设的第二时段以及预设的第三时段以外的时间,终端不进行广域网通信,此时网关无法发送 数据至终端。
S82,在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
在本申请实施例中,在完成所述定期的Class B模式广域网通信后,所述第一应用管理进程可以挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
通过本申请实施例的终端的控制方法,在预设的第三时段之后,可以通过所述第一应用管理进程挂起所述时间同步接收窗口进程,其后通过所述第一应用管理进程挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
在本申请的一种实施例中,所述通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:
S91,通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;
在本申请实施例中,信号量为所述MCU中用于管理多线程的资源。信号量为一非负整型变量,每一逻辑进程在调用时,都需要获取信号量。由此,在通过所述第一应用管理进程响应周期侦听窗口请求时,可以确定当前剩余信号量,确定所述周期侦听窗口请求对应的侦听窗口接收进程可以直接调用,或需要挂起其他逻辑进程。
S92,当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
在本申请实施例中,当所述当前剩余信号量不大于预设阈值时,则此时所述MCU无法调用新的逻辑进程,需要等待当前正在调用的逻辑进程挂起,释放信号量后,才可调用新的逻辑进程。
在本申请实施例中,所述预设阈值可以为0、1、5等,本申请对此不做限制。
作为本申请的一种示例,所述信号量的数值为3,所述MCU每次调用一逻辑进程时,所述当前剩余信号量的数值减1,当所述当前剩余信号量不大于预设阈值,即0时,新的逻辑进程无法调用,而当一正在调用的逻辑进程停止调用时,可以释放信号量,所述当前剩余信号量的数值加1。
在本申请实施例中,可以根据预设的第一优先级原则,按照优先级由低至高,依次挂起至少一个第二应用管理进程,确保优先级较高的LoRa相关的逻辑进程可以尽快被调用。
通过本申请实施例的终端的控制方法,采用信号量对所述MCU中的多线程的资源 进行管理,并按照预设的第一优先级原则依次调用逻辑进程,确保优先级较高的LoRa相关的逻辑进程可以尽快被调用,以确保LoRa广域网通信的稳定性。
在本申请的一种实施例中,通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:
S101,通过所述第一应用管理进程响应响应时间同步接收窗口请求,确定当前剩余信号量;
S102,当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
在本申请的一种实施例中,所述方法还包括:
S111,创建监控进程;
在本申请实施例中,可以采用一监控进程,监控MCU的调用状态,确定所述MCU是否正在调用所述监控进程之外的至少一个逻辑进程。还可以通过所述监控进程,调起所述监控进程之外的至少一个逻辑进程。
S112,通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请实施例中,可以通过监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。当所述MCU接收到一中断请求时,且所述中断请求对应的逻辑进程未在调用状态时,也可以通过所述监控进程,调起该中断请求对应的逻辑进程,使所述逻辑进程可以响应该中断请求。
通过本申请实施例的终端的控制方法,采用监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态,实现对终端中MCU的运行状态进行监控。
在本申请的一种实施例中,所述方法还包括:
S121,当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请实施例中,当所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,则此时在所述MCU中除所述监控进程以外,没有其他逻辑进程正在调用,此时所述监控进程可以设置所述MCU进入睡眠状态,以降低功耗。
通过本申请实施例的终端的控制方法,采用监控进程确定当前所述第一应用管理进程以及所述第二应用管理进程的状态,并在所述第一应用管理进程以及所述第二应用管 理进程的状态皆处于挂起状态时,所述监控进程设置所述MCU进入睡眠状态,从而可以进一步降低所述MCU的功耗,实现MCU的低功耗、低成本调用。
在本申请的一种实施例中,所述方法包括:
S131,响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
在本申请实施例中,对LoRa相关的逻辑进程来说,由于其具有较高的优先级,一般在接收到LoRa相关的中断请求后,所述MCU可以直接调用LoRa相关的中断请求对应的逻辑进程,或尽快挂起至少一个第二应用管理进程,并调用LoRa相关的中断请求对应的逻辑进程。而对于与LoRa无关的逻辑进程来说,由于其优先级较低,在接收到相关的中断请求,还需要根据预设的第一优先级原则,确定该中断请求对应的逻辑进程的优先级。
在本申请实施例中,当响应第二应用调用请求,可以根据预设的第一优先级原则,确定所述第二应用调用请求对应的第二应用进程的优先级以及当前正在调用状态的逻辑进程的优先级。当所述第二应用调用请求对应的第二应用进程的优先级低于当前正在调用状态的逻辑进程的优先级时,可以将所述第二应用调用请求加入预设的等待队列中,待当前正在调用状态的逻辑进程挂起,释放信号量后,再响应所述第二应用调用请求,并调用所述第二应用进程。
在本申请实施例中,可以通过第二应用调用请求相应的第二应用管理进程确定所述第二应用调用请求对应的第二应用进程的优先级。当所述第二应用调用请求相应的第二应用管理进程未在调用状态时,可以通过所述监控进程确定所述第二应用调用请求对应的第二应用进程的优先级。
通过本申请实施例的终端的控制方法,通过响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。从而实现所述MCU可以根据优先级协调调用逻辑进程的效果。
参照图3,示出了本申请的另一种终端的控制方法实施例的步骤流程图,所述终端包括微控制单元MCU,所述方法应用于所述MCU;
所述方法包括:
步骤301,创建第一应用管理进程、以及至少一个第二应用管理进程;
在本申请实施例中,所述第一应用管理进程用于对LoRa相关的应用进程进行管理。所述第一应用管理进程还可以调用处理LoRa广域网相关的协议,从而控制终端上的 LoRa广域网硬件模块。所述LoRa广域网硬件模块具有低功耗的特性,可以有效降低终端的功耗。
在本申请实施例中,所述第二应用管理进程用于对所述终端上除LoRa相关的硬件模块之外的其他硬件模块进行管理。例如,灯光模块、电源模块、液晶显示模块、键盘控制模块等等,本申请对此不做限制。
步骤302,通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;
在本申请实施例中,所述第一中断请求可以为任一与LoRa广域网通信相关的中断请求。所述第一应用通信进程可以为所述第一中断请求对应的与LoRa广域通信相关的逻辑进程。
在本申请实施例中,所述MCU具有多线程功能,可以同时执行多个逻辑进程,当所述MCU内多线程资源已经被全部占用时,需要先挂起至少一个逻辑进程,释放资源,才可运行新的逻辑进程。当一新的逻辑进程的优先级较低时,需要等待当前执行的逻辑进程执行完毕并挂起,才可执行新的逻辑进程,而当一新的逻辑进程的优先级比当前执行的逻辑进程更高时,可以挂起当前执行的逻辑进程,并执行新的逻辑进程。
在本申请实施例中,所述第一优先级原则可以包括预设的每一逻辑进程对应的优先级,优先级最高为0。
在本申请实施例中,LoRa相关的逻辑进程可以具有比其他逻辑进程更高的优先级,由此,当准备执行所述第一应用通信进程时,可以根据预设的第一优先级原则,确定当前执行的第二应用管理进程的优先级,并按照优先级从低到高的次序,依次挂起至少一个第二应用管理进程以释放资源。
步骤303,在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;
在本申请实施例中,所述第二优先级原则可以包括预设的每一LoRa相关的逻辑进程对应的优先级,优先级最高为0。所述第二优先级原则可以包含在所述第一优先级原则之中。也可以在所述第一优先级原则中,将所述LoRa相关的逻辑进程对应的优先级设置为最高,并采用第二优先级原则进一步处理LoRa相关的逻辑进程之间的优先级次序。
在本申请实施例中,所述第二中断请求可以为任一与LoRa广域网通信相关的中断请求。
在本申请实施例中,在调用所述第一应用通信进程的过程中,可以收到至少一个第二中断请求,此时可以根据预设的第二优先级原则,确定至少一个所述第二中断请求对应的第二应用通信进程之间的优先级,并根据优先级由高至低,按序将所述至少一个第二中断请求放入预设的等待队列中。
步骤304,当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;
在本申请实施例中,当所述第一应用管理进程调用所述第一应用通信进程完毕后,可以尽快挂起所述第一应用通信进程,释放所述MCU的多线程资源,以尽快执行在所述等待队列中的所述至少一个第二中断请求。
步骤305,依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
在本申请实施例中,所述第二应用通信进程可以为所述第二中断请求对应的与LoRa广域通信相关的逻辑进程。
在本申请实施例中,所述MCU的多线程资源被释放后,即可依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程,从而实现根据优先级依次执行LoRa相关的中断请求。
在本申请实施例中,当所述第二中断请求对应的第二应用通信进程优先级较高,且较为紧迫的情况下,也可以直接挂起所述第一应用通信进程,并调用第二中断请求对应的第二应用通信进程。
在具体实现中,在多种LoRa相关的中断请求中,Class A模式下的接收时间窗口请求、第一下行接收窗口请求(Rx1 Interrupt)、第二下行接收窗口请求(Rx2 Interrupt),以及Class B模式下的时间同步窗口请求(Beacon Interrupt)的优先级最高;来自外部模块的数据发送请求(DataSendReq请求)具有中等的优先级;Class B模式下的周期侦听窗口请求(PingSlot Interrupt)的优先级最低。
作为本申请的一种示例,在Class A模式下,当在调用所述接收时间窗口请求对应的接收时间窗口管理进程的过程中,通过所述第一应用管理进程接收到所述数据发送请求,可以将所述数据发送请求放入预设的等待队列中,待所述接收时间窗口管理进程调用完毕并挂起后,再调用所述数据发送请求对应的数据发送进程。
作为本申请的一种示例,在Class B模式下,当在调用所述时间同步窗口请求对应的时间同步接收窗口进程的过程中,通过所述第一应用管理进程接收到所述数据发送请求以及所述周期侦听窗口请求,由于所述数据发送请求的优先级高于所述周期侦听窗口请求的优先级,可以按照所述数据发送请求、所述周期侦听窗口请求的顺序,将所述数据发送请求以及所述周期侦听窗口请求放入预设的等待队列中。待所述时间同步接收窗口进程调用完毕并挂起后,再调用所述数据发送请求对应的数据发送进程。待所述数据发送进程调用完毕并挂起后,再调用所述周期侦听窗口请求对应的侦听窗口接收进程。
通过本申请实施例的终端的控制方法,采用单个MCU同时处理、调用第一应用管理进程以及第二应用管理进程,从而实现在一个MCU控制LoRa Class B模式的广域网通信与其他硬件模块的协同工作。广域网硬件模块无需单独处理LoRa Class B模式的广域通信相关的任务,从而进一步降低了终端的功耗以及成本。并在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中,实现了按序处理LoRa相关的中断请求,确保LoRa广域网通信的稳定性。
在本申请的一种实施例中,所述第二优先级原则通过预设的优先级管理模块确定。
在本申请的实施例中,所述预设的第二优先级原则可以动态地修改,根据上行业务的重要性,可以根据实际需要,动态地设置所述数据发送请求的优先级高于接收时间窗口请求、第一下行接收窗口请求以及第二下行接收窗口请求,或者动态地设置动态地设置所述数据发送请求的优先级低于所述周期侦听窗口请求。
在本申请的实施例中,所述预设的第二优先级原则的动态修改,可以通过在MCU中设置一优先级管理模块,在该优先级管理模块中设置第二优先级原则的动态修改规则,从而完成所述第二优先级原则的动态修改,实现根据实际需要调整LoRa相关的中断请求的优先级。
在本申请的一种实施例中,所述方法还包括:
S141,在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
在本申请实施例中,在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,此时所述第一应用管理进程已经完成需要处理的任务,则所述第一应用管理进程可以挂起自身,从而释放MCU的多线程资源,便于MCU处理其他事务,并便于降低MCU的耗电量。
在本申请的一种实施例中,通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程,包括:
S151,通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;
在本申请实施例中,信号量为所述MCU中用于管理多线程的资源。信号量为一非负整型变量,每一逻辑进程在调用时,都需要获取信号量。由此,在通过所述第一应用管理进程响应接收时间窗口请求时,可以确定当前剩余信号量,确定所述接收时间窗口请求对应的接收时间窗口管理进程可以直接调用,或需要挂起其他逻辑进程。
S152,当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
在本申请实施例中,当所述当前剩余信号量不大于预设阈值时,则此时所述MCU无法调用新的逻辑进程,需要等待当前正在调用的逻辑进程挂起,释放信号量后,才可调用新的逻辑进程。
在本申请实施例中,所述预设阈值可以为0、1、5等,本申请对此不做限制。
作为本申请的一种示例,所述信号量的数值为3,所述MCU每次调用一逻辑进程时,所述当前剩余信号量的数值减1,当所述当前剩余信号量不大于预设阈值,即0时,新的逻辑进程无法调用,而当一正在调用的逻辑进程停止调用时,可以释放信号量,所述当前剩余信号量的数值加1。
在本申请实施例中,可以根据预设的第一优先级原则,按照优先级由低至高,依次挂起至少一个第二应用管理进程,确保优先级较高的第一应用通信进程可以尽快被调用。
通过本申请实施例的终端的控制方法,采用信号量对所述MCU中的多线程的资源进行管理,并按照预设的第一优先级原则依次调用逻辑进程,确保优先级较高的第一应用通信进程可以尽快被调用,以确保LoRa广域网通信的稳定性。
在本申请的一种实施例中,所述方法还包括:
S161,创建监控进程;
在本申请实施例中,可以采用一监控进程,监控MCU的调用状态,确定所述MCU是否正在调用所述监控进程之外的至少一个逻辑进程。还可以通过所述监控进程,调起所述监控进程之外的至少一个逻辑进程。
S162,通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请实施例中,可以通过监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。当所述MCU接收到一中断请求时,且所述中断请求对应的逻辑进程未在调用状态时,也可以通过所述监控进程,调起该中断请求对应的逻辑进程,使所述逻辑进程可以响应该中断请求。
通过本申请实施例的终端的控制方法,采用监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态,实现对终端中MCU的运行状态进行监控。
在本申请的一种实施例中,所述方法还包括:
S171,当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请实施例中,当所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,则此时在所述MCU中除所述监控进程以外,没有其他逻辑进程正在调用,此时所述监控进程可以设置所述MCU进入睡眠状态,以降低功耗。
通过本申请实施例的终端的控制方法,采用监控进程确定当前所述第一应用管理进程以及所述第二应用管理进程的状态,并在所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,所述监控进程设置所述MCU进入睡眠状态,从而可以进一步降低所述MCU的功耗,实现MCU的低功耗、低成本调用。
在本申请的一种实施例中,所述方法包括:
S181,通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
在本申请实施例中,对LoRa相关的逻辑进程来说,由于其具有较高的优先级,一般在接收到LoRa相关的中断请求后,所述MCU可以直接调用LoRa相关的中断请求对应的逻辑进程,或尽快挂起至少一个第二应用管理进程,并调用LoRa相关的中断请求对应的逻辑进程。而对于与LoRa无关的逻辑进程来说,由于其优先级较低,在接收到相关的中断请求,还需要根据预设的第一优先级原则,确定该中断请求对应的逻辑进程的优先级。
在本申请实施例中,当响应第二应用调用请求,可以根据预设的第一优先级原则,确定所述第二应用调用请求对应的第二应用进程的优先级以及当前正在调用状态的逻辑进程的优先级。当所述第二应用调用请求对应的第二应用进程的优先级低于当前正在调用状态的逻辑进程的优先级时,可以将所述第二应用调用请求加入预设的等待队列中, 待当前正在调用状态的逻辑进程挂起,释放信号量后,再响应所述第二应用调用请求,并调用所述第二应用进程。
在本申请实施例中,可以通过第二应用调用请求相应的第二应用管理进程确定所述第二应用调用请求对应的第二应用进程的优先级。当所述第二应用调用请求相应的第二应用管理进程未在调用状态时,可以通过所述监控进程确定所述第二应用调用请求对应的第二应用进程的优先级。
通过本申请实施例的终端的控制方法,通过响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。从而实现所述MCU可以根据优先级协调调用逻辑进程的效果。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本申请实施例所必须的。
参照图4,示出了本申请一种终端的控制装置实施例的结构框图,所述终端包括微控制单元MCU,所述装置应用于所述MCU;
所述装置具体包括:
第一进程创建模块401,用于创建第一应用管理进程以及至少一个第二应用管理进程;
第一进程挂起模块402,用于通过所述第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
接收时间窗口管理进程调用模块403,用于通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第一下行数据帧。
在本申请的一种实施例中,所述装置还包括:
接收时间窗口管理进程挂起模块,用于在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;
第一管理进程挂起模块,用于在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
在本申请的一种实施例中,所述第一进程挂起模块包括:
第一剩余信号量确定子模块,用于通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;
第一进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
在本申请的一种实施例中,所述装置还包括:
第一监控进程创建模块,用于创建监控进程;
第一监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请的一种实施例中,所述装置还包括:
第一睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请的一种实施例中,所述装置包括:
第一等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
参照图5,示出了本申请一种终端的控制装置实施例的结构框图,所述终端包括微控制单元MCU,所述装置应用于所述MCU;
所述装置具体包括:
第二进程创建模块501,用于创建第一应用管理进程以及至少一个第二应用管理进程;
第二进程挂起模块502,用于通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
侦听窗口接收进程调用模块503,用于通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
在本申请的一种实施例中,所述装置还包括:
第三进程挂起模块,用于通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;
时间同步接收窗口进程调用模块,用于通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间 同步接收窗口进程用于接收一网关发送的时间同步帧。
在本申请的一种实施例中,所述装置还包括:
侦听窗口接收进程挂起模块,用于在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;
第二管理进程挂起模块,用于在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
在本申请的一种实施例中,第二进程挂起模块包括:
第二剩余信号量确定子模块,用于通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;
第二进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
在本申请的一种实施例中,所述装置还包括:
第二监控进程创建模块,用于创建监控进程;
第二监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请的一种实施例中,所述装置还包括:
第二睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请的一种实施例中,所述装置包括:
第二等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
参照图6,示出了本申请一种终端的控制装置实施例的结构框图,所述终端包括微控制单元MCU,所述装置应用于所述MCU;
所述装置具体包括:
第三进程创建模块601,用于创建第一应用管理进程、以及至少一个第二应用管理进程;
第四进程挂起模块602,用于通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;
第二中断请求等待模块603,用于在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;
第一应用通信进程挂起模块604,用于当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;
第二应用通信进程调用模块605,用于依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
在本申请的一种实施例中,所述第二优先级原则通过预设的优先级管理模块确定。
在本申请的一种实施例中,所述装置还包括:
第三管理进程挂起模块,用于在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
在本申请的一种实施例中,第四进程挂起模块包括:
第三剩余信号量确定子模块,用于通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;
第三进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
在本申请的一种实施例中,所述装置还包括:
第三监控进程创建模块,用于创建监控进程;
第三监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
在本申请的一种实施例中,所述装置还包括:
第三睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
在本申请的一种实施例中,所述装置包括:
第三等待模块,用于通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
一种电子设备,包括:
一个或多个处理器;和
其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行如前所述的一个或多个的方法。
一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如前所述的一个或多个的方法。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
本领域内的技术人员应明白,本申请实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本申请实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
在一个典型的配置中,所述计算机设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非持续性的电脑可读媒体(transitory media),如调制的数据信号和载波。
本申请实施例是参照根据本申请实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设 备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本申请实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本申请实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本申请所提供的一种终端的控制方法和一种装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (42)
- 一种终端的控制方法,其特征在于,所述终端包括微控制单元MCU,所述方法应用于所述MCU;所述方法包括:创建第一应用管理进程以及至少一个第二应用管理进程;通过所述第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第一下行数据帧。
- 如权利要求1所述的方法,其特征在于,所述方法还包括:在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
- 如权利要求1所述的方法,其特征在于,所述通过所述第一应用管理进程响应的接收时间窗口请求,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
- 如权利要求1所述的方法,其特征在于,所述方法还包括:创建监控进程;通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求4所述的方法,其特征在于,所述方法还包括:当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
- 如权利要求1所述的方法,其特征在于,所述方法包括:响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
- 一种终端的控制方法,其特征在于,所述终端包括微控制单元MCU,所述方法应用于所述MCU;所述方法包括:创建第一应用管理进程以及至少一个第二应用管理进程;通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
- 如权利要求7所述的控制方法,其特征在于,所述方法还包括:通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间同步接收窗口进程用于接收一网关发送的时间同步帧。
- 如权利要求7所述的方法,其特征在于,所述方法还包括:在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
- 如权利要求7所述的方法,其特征在于,所述通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程,包括:通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
- 如权利要求7所述的方法,其特征在于,所述方法还包括:创建监控进程;通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求11所述的方法,其特征在于,所述方法还包括:当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的 状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
- 如权利要求7所述的方法,其特征在于,所述方法包括:响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
- 一种终端的控制方法,其特征在于,所述终端包括微控制单元MCU,所述方法应用于所述MCU;所述方法包括:创建第一应用管理进程、以及至少一个第二应用管理进程;通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
- 如权利要求14所述的终端的控制方法,其特征在于,所述第二优先级原则通过预设的优先级管理模块确定。
- 如权利要求14所述的方法,其特征在于,所述方法还包括:在所述第一应用管理进程调用第二应用通信进程完毕之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
- 如权利要求14所述的方法,其特征在于,通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程,包括:通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
- 如权利要求14所述的方法,其特征在于,所述方法还包括:创建监控进程;通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求18所述的方法,其特征在于,所述方法还包括:当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
- 如权利要求14所述的方法,其特征在于,所述方法包括:通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
- 一种终端的控制装置,其特征在于,所述装置包括:第一进程创建模块,用于创建第一应用管理进程以及至少一个第二应用管理进程;第一进程挂起模块,用于通过所述第一应用管理进程响应接收时间窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;接收时间窗口管理进程调用模块,用于通过所述第一应用管理进程,在预设的第一时段内调用所述接收时间窗口请求对应的接收时间窗口管理进程;其中,所述接收时间窗口管理进程用于接收一网关发送的第一下行数据帧。
- 如权利要求21所述的装置,其特征在于,所述装置还包括:接收时间窗口管理进程挂起模块,用于在预设的第一时段之后,通过所述第一应用管理进程挂起所述接收时间窗口管理进程;第一管理进程挂起模块,用于在所述接收时间窗口管理进程挂起后,通过所述第一应用管理进程挂起自身。
- 如权利要求21所述的装置,其特征在于,所述第一进程挂起模块包括:第一剩余信号量确定子模块,用于通过所述第一应用管理进程响应接收时间窗口请求,确定当前剩余信号量;第一进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程。
- 如权利要求21所述的装置,其特征在于,所述装置还包括:第一监控进程创建模块,用于创建监控进程;第一监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求24所述的装置,其特征在于,所述装置还包括:第一睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置MCU进入睡眠状态。
- 如权利要求21所述的装置,其特征在于,所述装置包括:第一等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
- 一种终端的控制装置,其特征在于,所述终端包括微控制单元MCU,所述装置应用于所述MCU;所述装置包括:第二进程创建模块,用于创建第一应用管理进程以及至少一个第二应用管理进程;第二进程挂起模块,用于通过所述第一应用管理进程响应周期侦听窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;侦听窗口接收进程调用模块,用于通过所述第一应用管理进程,在预设的第二时段内调用所述周期侦听窗口请求对应的侦听窗口接收进程;其中,所述侦听窗口接收进程用于接收一网关发送的第二下行数据帧。
- 如权利要求27所述的控制装置,其特征在于,所述装置还包括:第三进程挂起模块,用于通过所述第一应用管理进程响应时间同步接收窗口请求,并根据预设的第一优先级原则,挂起至少一个第二应用管理进程;时间同步接收窗口进程调用模块,用于通过所述第一应用管理进程,在预设的第三时段内调用所述时间同步接收窗口请求对应的时间同步接收窗口进程;其中,所述时间同步接收窗口进程用于接收一网关发送的时间同步帧。
- 如权利要求27所述的装置,其特征在于,所述装置还包括:侦听窗口接收进程挂起模块,用于在预设的第二时段之后,通过所述第一应用管理进程挂起所述侦听窗口接收进程;第二管理进程挂起模块,用于在所述侦听窗口接收进程挂起后,通过所述第一应用管理进程挂起自身。
- 如权利要求27所述的装置,其特征在于,第二进程挂起模块包括:第二剩余信号量确定子模块,用于通过所述第一应用管理进程响应响应周期侦听窗口请求,确定当前剩余信号量;第二进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的 第一优先级原则,挂起至少一个第二应用管理进程。
- 如权利要求27所述的装置,其特征在于,所述装置还包括:第二监控进程创建模块,用于创建监控进程;第二监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求31所述的装置,其特征在于,所述装置还包括:第二睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
- 如权利要求27所述的装置,其特征在于,所述装置包括:第二等待模块,用于响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求加入预设的等待队列中。
- 一种终端的控制装置,其特征在于,所述终端包括微控制单元MCU,所述装置应用于所述MCU;所述装置包括:第三进程创建模块,用于创建第一应用管理进程、以及至少一个第二应用管理进程;第四进程挂起模块,用于通过所述第一应用管理进程响应第一中断请求,并根据预设的第一优先级原则挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程;其中,所述第一应用通信进程用于接收一网关发送的数据帧;第二中断请求等待模块,用于在调用所述第一应用通信进程时,通过所述第一应用管理进程响应至少一个第二中断请求,根据预设的第二优先级原则,将所述至少一个第二中断请求放入预设的等待队列中;第一应用通信进程挂起模块,用于当所述第一应用管理进程调用所述第一应用通信进程完毕后,挂起所述第一应用通信进程;第二应用通信进程调用模块,用于依次响应所述等待队列中的至少一个第二中断请求,调起所述第二中断请求对应的第二应用通信进程。
- 如权利要求34所述的终端的控制装置,其特征在于,所述第二优先级原则通过预设的优先级管理模块确定。
- 如权利要求34所述的装置,其特征在于,所述装置还包括:第三管理进程挂起模块,用于在所述第一应用管理进程调用第二应用通信进程完毕 之后,且所述等待队列中不存在第二中断请求时,通过所述第一应用管理进程挂起自身。
- 如权利要求34所述的装置,其特征在于,第四进程挂起模块包括:第三剩余信号量确定子模块,用于通过所述第一应用管理进程响应第一终端请求,确定当前剩余信号量;第三进程挂起子模块,用于当所述当前剩余信号量不大于预设阈值时,根据预设的第一优先级原则,挂起至少一个第二应用管理进程,并调用所述第一中断请求对应的第一应用通信进程。
- 如权利要求34所述的装置,其特征在于,所述装置还包括:第三监控进程创建模块,用于创建监控进程;第三监控模块,用于通过所述监控进程,监控所述第一应用管理进程以及所述至少一个第二应用管理进程的调用状态。
- 如权利要求38所述的装置,其特征在于,所述装置还包括:第三睡眠模块,用于当通过所述监控进程监听到所述第一应用管理进程以及所述第二应用管理进程的状态皆处于挂起状态时,通过所述监控进程设置所述MCU进入睡眠状态。
- 如权利要求34所述的装置,其特征在于,所述装置包括:第三等待模块,用于通过第二应用管理进程响应第二应用调用请求,根据预设的第一优先级原则,将所述第二应用调用请求对应的第二应用进程加入预设的等待队列中。
- 一种装置,其特征在于,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质,当由所述一个或多个处理器执行时,使得所述装置执行如权利要求1-20所述的一个或多个的方法。
- 一个或多个机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得所述处理器执行如权利要求1-20所述的一个或多个的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910172716.2A CN111666120A (zh) | 2019-03-07 | 2019-03-07 | 一种终端的控制方法和装置 |
| CN201910172716.2 | 2019-03-07 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020177572A1 true WO2020177572A1 (zh) | 2020-09-10 |
Family
ID=72338156
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/076532 Ceased WO2020177572A1 (zh) | 2019-03-07 | 2020-02-25 | 一种终端的控制方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| CN (1) | CN111666120A (zh) |
| TW (1) | TW202044023A (zh) |
| WO (1) | WO2020177572A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115696615A (zh) * | 2022-09-16 | 2023-02-03 | 中国船舶重工集团公司第七一九研究所 | 一种基于准时制双缓冲队列算法的嵌入式LoRaWAN网关 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN119917366B (zh) * | 2024-12-18 | 2026-01-27 | 广州致远电子股份有限公司 | 线程超时检测和处理方法、装置、设备及存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103927191A (zh) * | 2013-01-11 | 2014-07-16 | 北京阿里巴巴云计算技术有限公司 | 函数调用的资源配置方法和装置 |
| CN103942178A (zh) * | 2014-03-03 | 2014-07-23 | 浙江大学 | 多核处理器上实时操作系统与非实时操作系统之间的通信方法 |
| CN107071869A (zh) * | 2016-11-15 | 2017-08-18 | 国动物联网技术(上海)有限公司 | 兼容LoRaWAN Class A、Class B和手抄模式的多模终端及多模兼容方法 |
| CN107071836A (zh) * | 2017-03-03 | 2017-08-18 | 国动物联网技术(上海)有限公司 | 一种兼容classa和classb的数据下行方法 |
| US20170374490A1 (en) * | 2016-06-22 | 2017-12-28 | Intel Corporation | Internet of things protocol handler |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101272402A (zh) * | 2008-05-14 | 2008-09-24 | 深圳市同洲电子股份有限公司 | 一种数据传输的方法、装置及系统 |
| CN103092691B (zh) * | 2013-01-23 | 2019-03-01 | Oppo广东移动通信有限公司 | 一种安卓系统的进程管理方法和管理单元 |
| CN104199669B (zh) * | 2014-09-12 | 2017-12-15 | 北京奇虎科技有限公司 | 对应用程序的进程进行管理的方法及装置 |
| CN105388990A (zh) * | 2015-10-19 | 2016-03-09 | 北京奇虎科技有限公司 | 终端设备的省电处理方法及装置 |
| CN106547566B (zh) * | 2016-11-24 | 2019-08-16 | 恒生电子股份有限公司 | 通讯服务进程池管理方法及系统 |
| CN106850402B (zh) * | 2017-01-16 | 2020-11-03 | 腾讯科技(深圳)有限公司 | 消息的传输方法和装置 |
| CN107659889B (zh) * | 2017-09-28 | 2021-06-29 | 新华三技术有限公司 | 数据转发方法和装置 |
-
2019
- 2019-03-07 CN CN201910172716.2A patent/CN111666120A/zh active Pending
- 2019-11-28 TW TW108143341A patent/TW202044023A/zh unknown
-
2020
- 2020-02-25 WO PCT/CN2020/076532 patent/WO2020177572A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103927191A (zh) * | 2013-01-11 | 2014-07-16 | 北京阿里巴巴云计算技术有限公司 | 函数调用的资源配置方法和装置 |
| CN103942178A (zh) * | 2014-03-03 | 2014-07-23 | 浙江大学 | 多核处理器上实时操作系统与非实时操作系统之间的通信方法 |
| US20170374490A1 (en) * | 2016-06-22 | 2017-12-28 | Intel Corporation | Internet of things protocol handler |
| CN107071869A (zh) * | 2016-11-15 | 2017-08-18 | 国动物联网技术(上海)有限公司 | 兼容LoRaWAN Class A、Class B和手抄模式的多模终端及多模兼容方法 |
| CN107071836A (zh) * | 2017-03-03 | 2017-08-18 | 国动物联网技术(上海)有限公司 | 一种兼容classa和classb的数据下行方法 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115696615A (zh) * | 2022-09-16 | 2023-02-03 | 中国船舶重工集团公司第七一九研究所 | 一种基于准时制双缓冲队列算法的嵌入式LoRaWAN网关 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111666120A (zh) | 2020-09-15 |
| TW202044023A (zh) | 2020-12-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP4610827A1 (en) | Rdma event management methods, and device and storage medium | |
| CN113037538B (zh) | 分布式资源管理中低时延节点本地调度的系统和方法 | |
| US20190108149A1 (en) | I3c in-band interrupts directed to multiple execution environments | |
| CN106899649B (zh) | 一种任务请求处理方法、装置和用户设备 | |
| WO2021000758A1 (zh) | 机器人资源任务周期管控方法及装置 | |
| WO2017162096A1 (zh) | 一种调度方法及电子设备 | |
| JP2014235746A (ja) | マルチコア装置及びマルチコア装置のジョブスケジューリング方法 | |
| JP2022537517A (ja) | Pdcchスキッピングおよびウェイクアップシグナリングを処理するためのメカニズム | |
| CN103888441A (zh) | 一种应用程序与协议栈之间的信息传输方法及处理装置 | |
| WO2020177572A1 (zh) | 一种终端的控制方法和装置 | |
| JP2013218744A (ja) | リソースに基づいたスケジューラ | |
| JP2024512209A (ja) | IoT機器に基づく情報処理方法、関連機器及び記憶媒体 | |
| WO2021057122A1 (zh) | 一种监测信号的方法和装置 | |
| CN102937893B (zh) | 一种动态重载定时长度的软件定时方法 | |
| CN106230917B (zh) | 一种批量数据通信方法、装置和系统 | |
| CN110837415B (zh) | 一种基于risc-v多核处理器的线程调度方法和装置 | |
| JP6154827B2 (ja) | 無線モバイル装置 | |
| WO2021228237A1 (zh) | 通信方法、装置及系统 | |
| HK40036447A (zh) | 一种终端的控制方法和装置 | |
| CN106997304B (zh) | 输入输出事件的处理方法及设备 | |
| US11343329B1 (en) | Techniques for increasing persistent connection scalability | |
| Yan et al. | Mixed time-triggered and event-triggered industrial controller in IoT environment | |
| WO2020134551A1 (zh) | 终端任务的处理方法、装置、存储介质及电子装置 | |
| WO2024051031A1 (en) | Dynamically varying time slice periods in a computer processor unit | |
| JP2024169341A (ja) | システムオンチップに基づくタスクスケジューリング方法、システムオンチップ、および電子機器 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20766088 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20766088 Country of ref document: EP Kind code of ref document: A1 |