Communication terminal

By improving the design of the protocol stack, it participates in the state transition between the communication processor and the application processor, and optimizing the state and data transmission of the communication serial port, the problems of interaction complexity and low power consumption control difficulty in the prior art are solved, and efficient response and high-quality communication experience of the communication terminal are achieved.

CN119767391AActive Publication Date: 2025-04-04INST OF COMPUTING TECH CHINESE ACAD OF SCI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411814290.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-04
Estimated Expiration
2044-12-11

Smart Images

  • Figure CN119767391A_ABST
    Figure CN119767391A_ABST
Patent Text Reader

Abstract

The invention provides a communication terminal which comprises a protocol stack, an application processor and a communication processor, the protocol stack runs on the side of the application processor, the protocol stack adopts two task queues to maintain to-be-processed application-level services and awakens and sleeps the communication processor based on the number and the type of the application-level services in the task queues, and the application-level services in the task queues are sent to the communication processor. The communication processor awakens the application processor and the protocol stack based on the underlying communication task to be processed, so that interaction between the protocol stack and the communication processor and between the protocol stack and the application processor is simplified, and the response speed of the communication terminal is improved. The protocol stack controls the state of the communication serial port and the data transmitted by the communication serial port based on the states of the communication processor and the application processor so as to realize a flexible data processing mechanism. The state of the communication processor, the state of the application processor and the state of the communication serial port are efficiently and accurately controlled, and the power consumption of the communication terminal is effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, in particular to the field of low power consumption control of communication terminals, and more particularly to a communication terminal that implements low power consumption control based on a protocol stack. Background Art

[0002] In existing communication terminals, the Protocol Stack (PS) usually runs on the Communicate Processor (CP) side, and the communication terminal implements low power consumption control through the interaction between the Application Processor (AP) and the communication processor. In the scenario where low power consumption control is implemented through the interaction between the Application Processor (AP) and the communication processor, the state information is concentrated on the communication processor side to avoid state management and synchronization issues. However, due to the limited resources of the communication processor, the state conversion task between the communication processor and the application processor cannot be efficiently processed.

[0003] With the development of technology and the evolution of terminal equipment, there is a trend to migrate the protocol stack to the application processor side. Given that the application processor side often has more abundant computing resources and its software architecture is more flexible, when the protocol stack runs on the application processor side, the communication terminal can more effectively use computing resources to achieve low power control, showing significant advantages in performance improvement. However, this move also triggers a series of state management and synchronization issues, specifically, mainly reflected in the following four aspects: First, the interaction between the application processor and the communication processor tends to be more complicated. The data flow and control flow that were originally processed inside the communication processor now need to cross the interface between the application processor and the communication processor, which greatly increases the latency and complexity of data exchange; second, due to the increase in the frequency of interaction between the application processor and the communication processor, the difficulty of low-power entry and exit control increases. In particular, when dealing with the state transition between the application processor and the communication processor, it is necessary to make every effort to maintain the state synchronization between the application processor, the protocol stack and the communication processor. If the status cannot be synchronized in time, it is very likely to cause a series of problems such as communication interruption, data loss or service quality degradation; thirdly, the communication serial port is a commonly used communication interface between the application processor and the communication processor. The state control of the communication interface is directly related to the power consumption level and communication performance of the communication terminal. After the protocol stack is migrated to the application processor side, how to efficiently control the sleep and wake-up of the UART becomes the key to reducing power consumption; fourthly, when the communication processor is in low power consumption, it no longer reports the RSSI / SNR value to the application processor, making it impossible for the application processor to obtain real-time RSSI / SNR information. In this way, the communication terminal cannot accurately judge the current signal status, and it is difficult to optimize the user experience.

[0004] In summary, the protocol stack of existing communication terminals runs on the application processor side, which increases the complexity of the interaction between the application processor and the communication processor, increases the difficulty of low-power design and control, and cannot meet the optimization requirements of communication serial port sleep control and the real-time reporting of signal quality / signal-to-interference-and-noise ratio. These problems cover the delay of data flow and control flow, the accuracy of state synchronization, the efficiency of power management, and the real-time acquisition of signal quality information. These problems jointly affect the communication performance, battery life and user experience of the communication terminal. Therefore, there is an urgent need for a more efficient low-power control solution for communication terminals.

[0005] It should be noted that this background technology is only used to introduce the relevant information of the present invention to help understand the technical solution of the present invention, but it does not mean that the relevant information is necessarily the prior art. If there is no evidence that the relevant information has been disclosed before the application date of the present invention, the relevant information shall not be regarded as the prior art. Summary of the invention

[0006] Therefore, an object of the present invention is to overcome the above-mentioned defects of the prior art and provide a communication terminal.

[0007] The objective of the present invention is achieved through the following technical solutions:

[0008] According to a first aspect of the present invention, a communication terminal is proposed, the communication terminal comprising a protocol stack, an application processor, and a communication processor, wherein the protocol stack runs on the application processor side, and the protocol stack is configured to: send a corresponding request wake-up or request sleep signal to the communication processor to wake up or sleep the communication processor based on the type and number of application-level services to be processed and the state of the communication processor; control the state of the communication serial port between the communication processor and the application processor and the data reading method of the communication serial port in the open state based on the state of the communication processor and the application processor; the communication processor is configured to: switch from the sleep state to the wake-up state based on the request wake-up signal of the protocol stack and return a confirmation wake-up signal to the protocol stack; switch from the wake-up state to the sleep state based on the request sleep signal of the protocol stack and return a confirmation sleep signal to the protocol stack; and send a request wake-up signal to the application processor based on the underlying communication service to be processed and the state of the application processor to wake up the application processor; the application processor is configured to: switch from the sleep state to the wake-up state based on the request wake-up signal of the communication processor.

[0009] Preferably, the protocol stack is configured with a wake-up queue and a normal queue, both of which are used to cache application-level services initiated by the application processor, wherein the wake-up queue is used to cache application-level services initiated by the application processor when the communication processor is in a sleep state and requiring the participation of the communication processor; the normal queue is used to cache all application-level services initiated by the application processor when the communication processor is in an awake state, as well as application-level services initiated by the application processor when the communication processor is in a sleep state and not requiring the participation of the communication processor.

[0010] Preferably, the wake-up queue and the normal queue are configured to process application-level services in their respective queues according to first-in-first-out or preset priority.

[0011] Preferably, the protocol stack is configured to wake up the communication processor based on the number of application-level services in the wake-up queue, wherein, when the number of application-level services in the wake-up queue is not 0, the protocol stack sends a request wake-up signal to the communication processor and monitors whether the communication processor returns a confirmation wake-up signal.

[0012] Preferably, the protocol stack is configured to put the communication processor to sleep based on the number of application-level services in the wake-up queue and the normal queue, wherein when the number of application-level services in the wake-up queue and the normal queue are both 0, the protocol stack sends a request sleep signal to the communication processor and monitors whether the communication processor returns a confirmation sleep signal.

[0013] Preferably, the communication processor is configured to wake up the application processor based on the number of underlying communication services to be processed, wherein when the number of underlying communication services to be processed is not 0, the communication processor sends a wake-up request signal to the application processor.

[0014] Preferably, the protocol stack is configured such that after the application processor switches from the sleep state to the wake-up state based on the request wake-up signal of the communication processor, the protocol stack switches itself to the wake-up state and returns an application processor confirmation wake-up signal to the communication processor.

[0015] Preferably, the protocol stack is configured to control the state of the communication serial port based on the states of the communication processor and the application processor, wherein when the communication processor and the application processor are both in sleep state, the protocol stack sends a close signal to the communication serial port to switch the communication serial port to a closed state; when the communication processor and the application processor are in other states, the protocol stack sends an open signal to the communication serial port to switch the communication serial port to an open state.

[0016] Preferably, the protocol stack is configured to control the data reading method of the communication serial port in an open state based on the status of the communication processor and the application processor, wherein, when the communication processor is in an awake state, the protocol stack sends a slip read instruction to the communication serial port so that the communication serial port reads the data transmitted between the communication processor and the application processor in a slip frame format; when the communication processor is in a sleep state and the application processor is in an awake state, the protocol stack sends a byte read instruction to the communication serial port so that the communication serial port reads the data transmitted between the communication processor and the application processor byte by byte.

[0017] Preferably, the communication processor is configured with a sleep state, a wake-up state, a sleeping state, and a waking-up state, wherein the sleep state is a state when the communication processor does not process underlying communication tasks and application-level services that require the participation of the communication processor, the wake-up state is a state when the communication processor processes underlying communication tasks and application-level services that require the participation of the communication processor, the sleeping state is an intermediate state when the communication processor switches from the wake-up state to the sleep state, and the waking-up state is an intermediate state when the communication processor switches from the sleep state to the wake-up state.

[0018] Compared with the prior art, the advantages of the present invention are:

[0019] In the solution proposed in the present invention, the protocol stack is improved to enable it to deeply participate in the state transition process of the communication processor and the application processor, and the state transition and underlying hardware interaction of the communication processor and the application processor are realized based on the business needs of the communication terminal, so that the communication terminal can quickly complete the switching of the low-power mode in a short time, thereby significantly improving the response speed and communication efficiency of the communication terminal. At the same time, in the solution of the present invention, improvements are also made to the control method of the state of the communication serial port and the data transmission, and a more flexible data processing mechanism is constructed, thereby providing users with a better communication experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The embodiments of the present invention are further described below with reference to the accompanying drawings, in which:

[0021] Figure 1 A schematic diagram of a service processing flow of a communication terminal according to an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of state transition of a communication processor according to an embodiment of the present invention;

[0023] Figure 3 A schematic diagram of a process flow of a sleep communication processor according to an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of a process of waking up a communication processor according to an embodiment of the present invention;

[0025] Figure 5 The figure is a schematic diagram of a process of waking up an application processor according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail by specific embodiments below. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0027] As mentioned in the background technology section, the protocol stack of existing communication terminals runs on the application processor side, which increases the complexity of the interaction between the application processor and the communication processor, increases the difficulty of low-power design and control, and cannot meet the optimization requirements of communication serial port sleep control and the real-time reporting of signal quality / signal-to-interference-and-noise ratio. These problems cover the delay problems of data flow and control flow, the accuracy of state synchronization, the efficiency of power management, and the real-time acquisition of signal quality information. These problems jointly affect the communication performance, battery life and user experience of the communication terminal. Therefore, there is an urgent need for a more efficient low-power control solution for communication terminals.

[0028] Before specifically introducing the embodiments of the present invention, some of the terms used therein are explained as follows:

[0029] The communication processor (CP) is a key component for processing wireless communication signals and protocols. In wireless terminals, the communication processor includes a baseband processor and a digital signal processor. The communication processor is mainly responsible for wireless communication functions such as modulation and demodulation, signal processing, and RF transceiver.

[0030] Application Processor (AP), AP usually acts as the main control CPU, responsible for managing hardware resources and supporting the expansion of applications. The application processor not only controls the operating system, user interface and application, but also integrates a GPU to support image processing. There is a close cooperative relationship between the application processor and the communication processor. In order to ensure the independence of communication functions, the application processor and the communication processor usually exchange data through shared memory or inter-processor communication mechanism.

[0031] In order to better understand the present invention, the inventive concept of the present invention is first briefly introduced. The present invention improves the protocol stack so that it has the function of waking up and sleeping the communication processor, and configures the wake-up queue and the normal queue in the protocol stack to respectively maintain the application-level services to be processed in different states, and wakes up or sleeps the communication processor based on the number and type of application-level services in the task queue; based on the improvement of the protocol stack, the communication processor wakes up the application processor and the protocol stack based on the underlying communication tasks to be processed, thereby simplifying the interaction between the protocol stack, the communication processor, and the application processor to improve the response speed of the communication terminal. In addition, the protocol stack is also configured to control the state of the communication serial port and the data transmitted based on the state of the communication processor and the application processor to realize a flexible data processing mechanism.

[0032] According to one embodiment of the present invention, the protocol stack wakes up and sleeps the communication processor based on the number and type of application-level services in the task queue, and the communication processor wakes up the application processor and the protocol stack based on the underlying communication tasks to be processed, such as Figure 1 As shown, Figure 1 The method of waking up and sleeping the communication processor by the protocol stack and the method of waking up the application processor by the communication processor are demonstrated. Specifically, when the application processor initiates an application-level task that needs to be processed by the communication processor, the protocol stack sends a request wake-up signal to the communication processor to wake up the communication processor. When the application-level task is processed, the protocol stack sends a request sleep signal to the communication processor to put the communication processor to sleep. When there is a low-level communication task that needs to be processed, the communication processor sends a request wake-up signal to the application processor to wake up the application processor and the protocol stack.

[0033] In order to better understand the scheme of the present invention, the following describes in detail through drawings and embodiments how the protocol stack wakes up and puts the communication processor to sleep, how the communication processor wakes up the application processor, how the protocol stack controls the state of the communication serial port, and how the protocol stack controls the data reading method of the communication serial port.

[0034] 1. Protocol stack wakeup and sleep communication processor

[0035] It should be noted that the services of the communication terminal are roughly divided into application-level services initiated by the application processor and underlying communication tasks initiated by the communication processor. Among them, application-level services include calling services that require the participation of the application processor (such as voice, text messages, etc.), and services that do not require the participation of the application processor (such as scheduled tasks, periodic checks, etc.), while underlying communication tasks include called tasks and other scheduled tasks (such as communication quality reporting, positioning information reporting, etc.).

[0036] According to one embodiment of the present invention, a normal queue and a wake-up queue are configured in the protocol stack to maintain application-level services initiated by the application processor in different states, wherein the wake-up queue is used to cache application-level services initiated by the application processor when the communication processor is not in the awake state and that require the participation of the communication processor, while the normal queue is used to cache all application-level services initiated by the application processor when the communication processor is in the awake state, as well as application-level services initiated by the application processor when the communication processor is in the sleep state and that do not require the participation of the communication processor. Specifically, when the application processor initiates an application-level service, if the communication processor is in the awake state, all application-level services initiated by the communication processor are cached to the normal queue; when the communication processor is not in the awake state, application-level services that do not require the participation of the communication processor are cached to the normal queue, and application-level services that require the participation of the communication processor are cached to the wake-up queue, and the protocol stack sends a request wake-up signal to the communication processor to wake up the communication processor to process the application-level services in the wake-up queue.

[0037] Since the processor order of application-level services is affected by the urgency, importance, initiation time or other factors of the services, it is crucial to ensure that application-level services are processed in a timely and efficient manner. According to one embodiment of the present invention, the wake-up queue and the normal queue are configured to process the application-level services of their respective queues according to first-in-first-out (FIFO) or preset priority to ensure that high-priority tasks can be processed first. Specifically, when the application-level tasks are processed in the order of first-in-first-out, the processing order of the application-level tasks in the wake-up queue and the normal queue is processed in sequence according to the task initiation time, that is, the earlier the application-level tasks are initiated, the earlier they are processed; when the application-level services are processed in the order of priority, if the service urgency is used as the priority judgment of the application-level services, the application-level tasks in the wake-up queue and the normal queue are processed according to their urgency, that is, the application-level tasks with high urgency are processed first. It should be understood that the above-mentioned processing order of application-level services is only a preferred embodiment, not exhaustive, and other priority algorithms that can be used to constrain the execution order of services in the communication terminal are all acceptable.

[0038] According to an embodiment of the present invention, in the solution of the present invention, the communication processor is configured with four states, such as Figure 2As shown, the figure shows the four states of the communication processor and the conversion relationship between each state, wherein the four states are awake state, sleep state, awakening state and sleeping state. The sleep state is the state when the communication processor does not process the underlying communication tasks and the application-level services that require the participation of the communication processor. The awake state is the state when the communication processor processes the underlying communication tasks or the application-level services that require the participation of the communication processor. The sleeping state is the intermediate state when the communication processor switches from the awake state to the sleep state. The awakening state is the intermediate state when the communication processor switches from the sleep state to the awake state. Specifically, the awake state is the state in which the communication processor is in active mode. In this state, the communication processor can immediately perform operations such as data sending and receiving, network request response and other types of tasks. The characteristics of the awake state are high power consumption and fast response speed. Therefore, this state is particularly suitable for scenarios that require instant communication. The sleep state is a low-power mode of the communication processor. In this state, most functions of the communication processor are turned off to reduce energy consumption. The communication processor does not actively perform communication tasks in the sleep state, and the communication processor in the sleep state will only return to the wake-up state when it receives a request wake-up signal from the protocol stack. When the communication processor is in the sleep state, the power consumption is significantly reduced, so this state is suitable for periods when the communication demand is at a low level. The waking state is an intermediate state when the communication processor switches from the sleep state to the wake-up state, and the sleeping state is an intermediate state when the communication processor switches from the wake-up state to the sleep state. The waking state and the sleeping state are the intermediate states of the two communication processors proposed in the present invention. By introducing the two intermediate states of "waking up" and "sleeping", the protocol stack can handle the state transition of the communication processor more smoothly. This design not only reduces the delay and jitter in the state transition process, but also improves the response speed of the communication terminal to external events and requests. Especially in scenarios where power consumption modes need to be switched quickly, it can significantly improve the performance and user experience of the communication terminal, thereby providing a strong guarantee for the efficient and stable operation of the communication terminal in different working states, further enhancing the reliability and practicality of the communication terminal, so that it can better meet the communication needs of users in diverse scenarios.

[0039] According to one embodiment of the present invention, the protocol stack wakes up the communication processor based on the number of application-level services in the wake-up queue, wherein when the number of application-level services in the wake-up queue is not 0, the protocol stack sends a request wake-up signal to the communication processor to wake up the communication processor. At the same time, the protocol stack also needs to monitor whether the communication processor returns a confirmation wake-up signal. Specifically, when the number of application processors cached in the wake-up queue is not 0, it means that when the communication processor is asleep, the application processor initiates an application-level service that needs to be processed by the communication processor, such as a calling service, a text message service, etc. The protocol stack will wake up the communication processor to allow the communication processor to process the application-level service in the wake-up queue.

[0040] According to one embodiment of the present invention, the process of a protocol stack sending a wake-up request to wake up a communication processor includes: the protocol stack sends a wake-up request signal to the communication processor and monitors the signal sent by the communication processor to obtain the status of the communication processor; after receiving the wake-up request signal, the communication processor switches itself to a waking-up state and sends a waking-up signal to the protocol stack; the communication processor switches itself to a wake-up state and sends a confirmation wake-up signal to the protocol stack.

[0041] According to an embodiment of the present invention, the signals sent between the protocol stack and the communication processor include software signals and hardware signals. Therefore, in the scheme of the present invention, the application processor and the communication processor are configured with two connected hardware paths and the two hardware paths should have an interrupt detection function to transmit hardware signals. Among the two hardware paths, one hardware path is a path for the application processor to connect to the cp2ap pin of the communication processor, and the cp2ap pin is used for the communication processor to send hardware signals to the application processor. The other hardware path is a path for the communication processor to connect to the ap2cp pin of the application processor, and the ap2cp pin is used for the application processor to send hardware signals to the communication processor. It should be understood that the use of hardware paths to implement interrupt sending and detection is a well-known technology for those skilled in the art, and will not be elaborated here. The interactive mode combining software signals with hardware signals is conducive to ensuring the reliability and timeliness of signal transmission.

[0042] In order to more clearly illustrate the process of the protocol stack waking up the communication processor, it is described in detail below in conjunction with the first embodiment.

[0043] Embodiment 1

[0044] like Figure 3, the figure shows the detailed steps of the protocol stack waking up the communication processor, including: step S1, the protocol stack executes the trigger operation of waking up the communication processor, and sends a hardware wake-up signal to the communication processor by pulling down the hardware interface pin connected to the ap2cp path on the application processor; step S2, communication processor wakes up: after receiving the hardware wake-up signal, the communication processor executes the wake-up operation and prepares to send a wake-up reply message to the protocol stack; step S3, the communication processor sets the cp2ap pin to a low level state as a hardware confirmation signal, the protocol stack detects that the cp2ap pin is in a low level state to confirm that the communication processor has been successfully awakened, and the communication processor sends a confirmation wake-up message to the protocol stack, and the protocol stack receives the wake-up reply message to confirm that the communication processor has been successfully awakened.

[0045] According to one embodiment of the present invention, when the wake-up queue and the normal queue are empty, it means that the application-level services initiated by the application processor have been completely processed. In this scenario, in order to reduce the power consumption of the communication terminal, the protocol stack sends a sleep signal to the communication processor to switch the communication terminal to a sleep state (low power mode). The protocol stack sends a sleep request to the communication processor to put the communication processor to sleep. At the same time, the protocol stack also needs to listen to the communication processor's confirmation sleep message. Specifically, the process of the protocol stack putting the communication processor to sleep includes: if the current state of the communication processor is not a sleep state, subsequent operations are performed to put the communication processor to sleep; the protocol stack sends a signal requesting sleep to the communication processor and listens to the signal sent by the communication processor to obtain the state of the communication processor; after receiving the signal requesting sleep, the communication processor switches itself to a sleeping state and sends a sleeping state signal to the protocol stack; after the communication processor enters the sleep state, it sends a sleep confirmation signal to the protocol stack.

[0046] In order to more clearly illustrate the process of the protocol stack sleeping communication processor, it is described in detail below in conjunction with the second embodiment.

[0047] Embodiment 2

[0048] like Figure 4As shown, the figure shows the detailed steps of the protocol stack sleep communication processor, including: step T1, the protocol stack pulls up the ap2cp pin to send a hardware trigger signal, which is used to inform the communication processor to prepare to enter the sleep state, and the protocol stack sends a software signal containing a sleep request message to the communication processor through the serial port through the software level operation, which informs the communication processor that it needs to enter the sleep state; step T2, the communication processor responds to the signal sent by the protocol stack and switches to the sleep state; step T3, the protocol stack confirms the sleep state of the communication processor, including software confirmation operation and hardware confirmation operation, wherein the software confirmation operation is that the protocol stack waits and listens for the message from the communication processor to reply, which is the response of the communication processor to the sleep request message. When the flag bit in the reply message is 1, it indicates that it has successfully entered the sleep state, otherwise the sleep fails; the hardware confirmation operation is that the protocol stack further verifies the sleep state of the communication processor by detecting the cp2ap pin state of the communication processor. When the cp2ap pin is high, it indicates that the communication processor has successfully entered the sleep state.

[0049] 2. The communication processor wakes up the application processor

[0050] It should be noted that the application processor in the communication terminal includes two states, namely, sleep state and wake-up state. When the application processor is in the sleep state, the communication terminal will reduce activities to reduce power consumption. When the application processor is in the wake-up state, the application processor of the communication terminal is in active mode and can quickly respond to network requests and user operations. The wake-up state is suitable for scenarios that require instant communication and high responsiveness. Taking communication terminals such as mobile phones as an example, when the application processors of some mobile phones are in the sleep state, the mobile phones reduce their own power consumption by reducing the application processor frequency, shutting down the wireless interface, and other operations. When the application processor is in the sleep state, the mobile phone usually presents the screen off state or enters the power saving mode, and when the application processors of some mobile phones are in the wake-up state, the mobile phone will increase the application processor frequency, open certain wireless interfaces, etc., to ensure the processing efficiency of the business. When the application processor is in the wake-up state, the mobile phone usually presents the screen on state, enters the performance mode, and other forms of expression. It should be understood that in terms of the state switching of the application processor, the switching of the application processor to the sleep state is generally triggered by the user, such as executing operations such as turning off the screen and turning on the power saving mode, while the switching of the application processor to the wake-up state can be triggered by both the user and the underlying communication service. Among them, the user triggering methods include manually lighting up the screen, switching performance modes, etc., and the underlying communication task triggering methods mainly include triggering of the called service and triggering of information reporting.

[0051] It should be noted that in the present invention, the protocol stack is configured to run on the application processor side, and the state of the protocol stack switches following the state of the application processor. When the application processor is in sleep state, the protocol stack is also in sleep state, and when the application processor is in wake-up state, the protocol stack is also in wake-up state.

[0052] According to one embodiment of the present invention, when the communication processor initiates the underlying communication service, the application processor is awakened in the following manner: the communication processor sends a wake-up request signal to the application processor; the application processor converts itself to the awake state after receiving the wake-up request signal; the protocol stack first converts itself to the awake state and then opens the communication serial port between the application processor and the communication processor, and finally replies to the communication processor to confirm the wake-up signal.

[0053] In order to more clearly understand the process of the communication processor waking up the application processor, it will be described in detail in conjunction with the third embodiment below.

[0054] Embodiment 3

[0055] When processing services initiated by the communication processor, if the application processor is in sleep mode, it is necessary to wake up the application processor, such as Figure 5 As shown in the figure, detailed steps for waking up the application processor are shown, including: step M1, the communication processor initiates a wake-up request and pulls down the cp2ap pin to generate a falling edge interrupt, and this falling edge interrupt can be detected by the protocol stack as a trigger condition for the wake-up request; step M2, first, the application processor switches itself to the awake state, then the protocol stack wakes itself up and immediately opens the serial port communication between the application processor and the communication processor, and finally the protocol stack pulls down the ap2cp pin as an application processor wake-up confirmation signal; step M3, the communication processor sends a wake-up message, and after receiving the wake-up confirmation sent by the protocol stack by pulling down ap2cp, the communication processor sends a wake-up reason message to the protocol stack through the serial port to inform the specific reason for waking up the application processor; step M4, the protocol stack parses the wake-up reason message sent by the communication processor and triggers subsequent related processing flows based on the parsed wake-up reason.

[0056] 3. Protocol stack controls the communication serial port status

[0057] According to one embodiment of the present invention, the protocol stack is configured to control the state of the communication serial port between the application processor and the communication processor based on the state of the application processor and the communication processor. When the communication processor and the application processor are both in a sleep state, the protocol stack sends a close signal to the communication serial port to switch the communication serial port to a closed state. When the communication processor and the application processor are in other states, the protocol stack sends an open signal to the communication serial port to switch the communication serial port to an open state, as shown in Table 1. The table shows the correspondence between the states of the application processor and the communication processor and the state of the communication serial port. Specifically, when the communication processor and the application processor are both in a sleep state, the protocol stack closes the communication serial port between the application processor and the communication processor; when the states of the communication processor and the application processor are both in an awake state, the protocol stack opens the communication serial port between the application processor and the communication processor; when the communication processor is in a sleep state and the application processor is in an awake state, the protocol stack opens the communication serial port between the application processor and the communication processor; when the communication processor is in an awake state and the application processor is in a sleep state, the protocol stack opens the communication serial port between the application processor and the communication processor. The present invention controls the state of the communication serial port in real time based on the state of the application processor and the communication processor, which can optimize the energy consumption of the communication terminal, improve the response speed and communication efficiency, and ensure the stability of data transmission and the performance of the communication terminal.

[0058] Table 1

[0059]

[0060] 4. Protocol stack controls the data reading method of the communication serial port

[0061] According to one embodiment of the present invention, the protocol stack controls the data reading mode of the communication serial port in the open state based on the state of the communication processor and the application processor, as shown in Table 2, which shows the corresponding relationship between the communication serial port data reading mode and the state of the application processor and the state of the communication processor. Specifically, when the communication processor and the application processor are both in the sleep state, that is, the communication serial port is in the closed state, the communication serial port does not transmit data; when the communication processor and the application processor are in the awake state and the application processor is in the sleep state or the awake state, the slip format is used to read the data transmitted between the communication processor and the application processor, and the data are stored, parsed or triggered corresponding events; when the communication processor is in the sleep state and the application processor is in the awake state, the communication serial port reads the RSSI (signal quality) / SNR (signal to interference and noise ratio) reported by the communication processor to the application processor byte by byte to evaluate the quality of the wireless communication link. The present invention controls the serial port state and the serial port data reading mode through the protocol stack based on the state of the application processor and the communication processor, which not only meets the data processing requirements in different scenarios, but also optimizes the power consumption and performance of the communication terminal.

[0062] Table 2

[0063]

[0064] According to one embodiment of the present invention, in order to facilitate debugging and optimization of the communication terminal, the present invention designs two ways to obtain the log of the communication processor during sleep to record the working status and performance of the communication processor during the surface period. In the first way, before the communication processor enters the sleep state, the protocol stack sends a log request to the communication processor, and after receiving the request, the communication processor reports the log information during the last sleep period to the protocol stack. In the second way, after the communication processor is awakened, the protocol stack sends a log request to the communication processor, and after receiving the request, the communication processor reports the log information during this sleep period to the protocol stack. Using the above two methods to obtain the log of the communication processor during sleep helps to record and analyze its working status and performance, thereby providing data support for the debugging and optimization of the communication terminal, enhancing the accuracy of problem diagnosis and improving the performance of the communication terminal.

[0065] According to one embodiment of the present invention, in order to handle the abnormal state of the communication processor, in low power consumption mode (i.e., the communication processor is in sleep mode), the protocol stack determines whether the communication processor is in a normal working state by monitoring whether the communication processor reports signals normally. If the communication processor stops reporting signals on its own, the protocol will determine that the communication processor is in an abnormal state, and the protocol will try to wake up the communication processor to make it work normally. If the operation of waking up the communication processor fails, the protocol will further execute the operation of restarting the communication processor to ensure that the communication terminal resumes normal operation. The present invention improves the reliability, security and user experience of the communication terminal by monitoring the state of the communication processor and automatically performing the wake-up or restart operation in the event of an abnormality, while optimizing energy consumption and resource utilization, ensuring the stable and efficient operation of the communication terminal in various network environments.

[0066] To sum up, in the scheme proposed in the present invention, the protocol stack is improved to enable it to deeply participate in the state transition process of the communication processor and the application processor, and the state transition and underlying hardware interaction of the communication processor and the application processor are realized based on the business needs of the communication terminal, so that the communication terminal can quickly complete the switching of the low-power mode in a short time, thereby significantly improving the response speed and communication efficiency of the communication terminal. At the same time, in the scheme of the present invention, improvements are also made to the control method of the state of the communication serial port and the data transmission, and a more flexible data processing mechanism is constructed, thereby providing users with a better communication experience. In addition, through the status monitoring and log analysis of the communication processor, the normal operation of the communication processor is effectively guaranteed, thereby ensuring that the communication terminal has a high degree of reliability and security.

[0067] It should be noted that although the above describes the various steps in a specific order, it does not mean that the various steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently or even in a different order as long as the required functions can be achieved.

[0068] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.

[0069] A computer-readable storage medium may be a tangible device that holds and stores instructions used by an instruction execution device. Computer-readable storage media may include, for example, but are not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.

[0070] The embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A communication terminal, comprising a protocol stack, an application processor, and a communication processor, wherein: The protocol stack runs on the application processor side, and is characterized by: The protocol stack is configured as: Sending a corresponding wake-up request or sleep request signal to the communication processor to wake up or sleep the communication processor based on the type and amount of application-level services to be processed and the state of the communication processor; Based on the status of the communication processor and the application processor, control the status of the communication serial port between the communication processor and the application processor and the data reading method of the communication serial port when it is open; The communication processor is configured to: Switching from a sleep state to a wake-up state based on a request wake-up signal from the protocol stack and returning a confirmation wake-up signal to the protocol stack; Switching from the awake state to the sleep state based on a request sleep signal from the protocol stack and returning a confirmation sleep signal to the protocol stack; and, Sending a wake-up request signal to the application processor to wake up the application processor based on the underlying communication service to be processed and the state of the application processor; The application processor is configured to: The communication processor switches from the sleep state to the wake-up state based on a request wake-up signal.

2. The communication terminal according to claim 1, characterized in that: The protocol stack is configured with a wake-up queue and a normal queue, both of which are used to cache application-level services initiated by the application processor, wherein: The wake-up queue is used to cache application-level services initiated by the application processor when the communication processor is in a sleep state and that require the participation of the communication processor; The normal queue is used to cache all application-level services initiated by the application processor when the communication processor is in an awake state, and application-level services initiated by the application processor when the communication processor is in a sleep state and that do not require the participation of the communication processor.

3. The communication terminal according to claim 2, characterized in that: The wake-up queue and the normal queue are configured to process application-level services in their respective queues according to first-in-first-out or preset priorities.

4. The communication terminal according to claim 2, characterized in that: The protocol stack is configured to wake up the communication processor based on the number of application-level services in the wake-up queue, wherein when the number of application-level services in the wake-up queue is not 0, the protocol stack sends a request wake-up signal to the communication processor and monitors whether the communication processor returns a confirmation wake-up signal.

5. The communication terminal according to claim 2, characterized in that: The protocol stack is configured to put the communication processor to sleep based on the number of application-level services in the wake-up queue and the normal queue, wherein when the number of application-level services in the wake-up queue and the normal queue are both 0, the protocol stack sends a request sleep signal to the communication processor and monitors whether the communication processor returns a confirmation sleep signal.

6. The communication terminal according to claim 1, characterized in that: The communication processor is configured to wake up the application processor based on the number of underlying communication services to be processed, wherein when the number of underlying communication services to be processed is not zero, the communication processor sends a wake-up request signal to the application processor.

7. The communication terminal according to claim 1, characterized in that: The protocol stack is configured as: After the application processor switches from the sleep state to the wake-up state based on the request wake-up signal of the communication processor, the protocol stack switches itself to the wake-up state and returns an application processor confirmation wake-up signal to the communication processor.

8. The communication terminal according to claim 1, characterized in that: The protocol stack is configured to control the state of the communication serial port based on the states of the communication processor and the application processor, wherein when the communication processor and the application processor are both in sleep state, the protocol stack sends a close signal to the communication serial port to switch the communication serial port to a closed state; when the communication processor and the application processor are in other states, the protocol stack sends an open signal to the communication serial port to switch the communication serial port to an open state.

9. The communication terminal according to claim 8, characterized in that: The protocol stack is configured to control the data reading mode of the communication serial port in the open state based on the state of the communication processor and the application processor, wherein: When the communication processor is in the awake state, the protocol stack sends a slip read instruction to the communication serial port so that the communication serial port reads the data transmitted between the communication processor and the application processor in the slip frame format; When the communication processor is in a sleep state and the application processor is in an awake state, the protocol stack sends a byte read instruction to the communication serial port so that the communication serial port reads the data transmitted between the communication processor and the application processor byte by byte.

10. The communication terminal according to claim 1, characterized in that: The communication processor is configured with a sleep state, a wake-up state, a sleeping state, and a wake-up state, wherein the sleep state is the state when the communication processor does not process underlying communication tasks and application-level services that require the participation of the communication processor, the wake-up state is the state when the communication processor processes underlying communication tasks and application-level services that require the participation of the communication processor, the sleeping state is the intermediate state when the communication processor switches from the wake-up state to the sleep state, and the wake-up state is the intermediate state when the communication processor switches from the sleep state to the wake-up state.

Citation Information

Patent Citations

  • Equipment control method, device and terminal

    CN105263182A

  • Sleep awakening method for mobile communication terminal

    CN111083772A

  • Sleep control method suitable for multimode communication terminal

    CN116056195A

  • Electronic device, and method for reducing current consumption

    EP4280711A1