Heartbeat packet transmission method and device, chip and medium
The baseband chip performs heartbeat packet transmission and reception without waking up the AP chip, and dynamically adjusts the packet transmission cycle and time of the heartbeat packet, which solves the problem of high power consumption of long-connection center packet hops, and achieves lower power consumption and better High flexibility.
Patent Information
- Application Number
- CN202411414939.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2024-12-10
AI Technical Summary
In the field of communication technology, when the terminal and the server are maintained for a long time, the transmission and reception power consumption of the heartbeat packet is high, and the prior art is difficult to effectively reduce.
The baseband chip provides heartbeat proxy function, receives heartbeat proxy requests from the AP chip, transmits and receives heartbeat packets without waking up the AP chip, and dynamically adjusts the packet transmission cycle and packet transmission time of the heartbeat packet, including extending or shortening the packet transmission cycle, or sending packets in packet transmission. Send heartbeat packets in advance within the cycle.
It reduces the overall power consumption of heartbeat packet transmission, improves transmission flexibility, and avoids power consumption caused by frequent wake-up of AP chips, saving power consumption on the AP chip side.
Smart Images

Figure CN119109968A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a heartbeat packet transmission method, device, chip and medium. Background Art
[0002] The sending and receiving of data in the network are all implemented using sockets. When the long connection between the terminal and the server needs to be maintained for a long time and there is no data interaction, the terminal needs to perform periodic heartbeat packet transmission with the server to ensure the availability of the socket.
[0003] Therefore, how to reduce the power consumption of sending and receiving heartbeat packets becomes an urgent problem to be solved. Summary of the invention
[0004] The embodiment of the present application provides a heartbeat packet transmission method, device, chip and medium. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a heartbeat packet transmission method, the method is used for a baseband chip, and the method includes:
[0006] Receive a heartbeat proxy request from an AP (application processor) chip, where the heartbeat proxy request is used to request the baseband chip to perform a heartbeat packet receiving and sending function;
[0007] Based on the heartbeat proxy request, sending and receiving the heartbeat packet in a heartbeat proxy process, wherein during the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet;
[0008] In the heartbeat proxy process, at least one of a packet sending period of the heartbeat packet and a packet sending time within the packet sending period is dynamically adjusted.
[0009] On the other hand, an embodiment of the present application provides a heartbeat packet transmission device, the device is used for a baseband chip, and the device includes:
[0010] A request receiving module, used to receive a heartbeat proxy request from an AP chip, wherein the heartbeat proxy request is used to request the baseband chip to perform a heartbeat packet receiving and sending function;
[0011] A heartbeat proxy module, configured to send and receive the heartbeat packet in a heartbeat proxy process based on the heartbeat proxy request, wherein in the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet;
[0012] The adjustment module is used to dynamically adjust at least one of the packet sending period of the heartbeat packet and the packet sending time within the packet sending period during the heartbeat proxy process.
[0013] On the other hand, an embodiment of the present application provides a baseband chip, which includes a programmable logic circuit, and the programmable logic circuit is used to implement the heartbeat packet transmission method described in the above aspects.
[0014] On the other hand, an embodiment of the present application provides a terminal, which includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the heartbeat packet transmission method as described in the above aspects.
[0015] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the heartbeat packet transmission method as described in the above aspects.
[0016] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the heartbeat packet transmission method described in the above aspects.
[0017] In the embodiment of the present application, when the baseband chip performs the heartbeat packet receiving and sending function based on the heartbeat proxy request of the AP chip, it can receive the heartbeat packets without waking up the AP chip, that is, the heartbeat packet receiving and sending can be completed independently by the baseband chip, which saves the power consumption of the AP chip side and helps to reduce the overall power consumption of the heartbeat packet transmission; and, in the heartbeat proxy process, the baseband chip does not send the heartbeat packets according to a fixed packet sending cycle and at a fixed packet sending time, but can dynamically adjust the packet sending cycle and / or packet sending time of the heartbeat packets, for example, it can extend the packet sending cycle, or send the heartbeat packets in advance within the packet sending cycle, which can further reduce the power consumption of the heartbeat packet transmission while improving the flexibility of the heartbeat packet transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a schematic diagram of an implementation environment shown in an exemplary embodiment of the present application;
[0019] Figure 2 is a system architecture diagram of a terminal shown in an exemplary embodiment of the present application;
[0020] Figure 3 A flowchart of a heartbeat packet transmission method provided by an exemplary embodiment of the present application is shown;
[0021] Figure 4is a timing diagram of a request, pause and recovery process of a heartbeat proxy shown in an exemplary embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of an implementation of a non-heartbeat packet reporting process shown in an exemplary embodiment of the present application;
[0023] Figure 6 is a timing diagram of a non-heartbeat packet processing process shown in an exemplary embodiment of the present application;
[0024] Figure 7 is a timing diagram of a process of handling a network side connection abnormality shown in an exemplary embodiment of the present application;
[0025] Figure 8 It is a schematic diagram of an implementation of a dynamic adjustment process of a contract issuance cycle shown in an exemplary embodiment of the present application;
[0026] Fig. 9 is a schematic diagram of an implementation of a ride-hailing contract issuing process shown in an exemplary embodiment of the present application;
[0027] Fig.10 A structural block diagram of a heartbeat packet transmission device provided by an exemplary embodiment of the present application is shown;
[0028] Fig.11 A structural block diagram of a terminal provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0029] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0030] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.
[0031] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, wherein the implementation environment includes a terminal 110 and a server 120.
[0032] The terminal 110 is an electronic device having an AP chip 111 and a baseband chip 112, and the electronic device may be a smart phone, a tablet computer, a smart wearable device, a car computer, etc. An application with a long connection requirement is installed in the terminal 110. During operation, the application with a long connection requirement needs to send and receive heartbeat packets to maintain a long connection with the server 120 side.
[0033] The server 120 is a background server of an application program with a long connection requirement. In the process of maintaining a long connection with the terminal 110, the server 120 sends a heartbeat reply packet to the terminal 110 after receiving the heartbeat packet sent by the terminal 110.
[0034] In the embodiment of the present application, in order to reduce the power consumption of heartbeat packet transmission and reception, the baseband chip 112 provides a heartbeat proxy function. When the application has a heartbeat proxy requirement, that is, the AP chip 111 sends a heartbeat proxy request to the baseband chip 112, and the baseband chip 112 implements the heartbeat packet transmission and reception function without waking up the AP chip 111. In addition, in the embodiment of the present application, the baseband chip 112 can dynamically adjust the heartbeat packet transmission cycle and the transmission time within the transmission cycle according to the heartbeat packet transmission and reception status and the connection establishment status during the heartbeat proxy process, so as to further reduce the overall power consumption of the heartbeat packet transmission and reception in the heartbeat proxy.
[0035] Please refer to Figure 2 , which shows a system architecture diagram of a terminal provided by an exemplary embodiment of the present application. The system architecture includes an application layer 210, a framework layer 220, a hardware abstraction layer 230, a kernel layer 240 and a hardware layer 250.
[0036] The application layer 210 includes applications installed in the terminal. In the embodiment of the present application, an application with a long connection requirement is installed in the terminal.
[0037] The framework layer 220 includes a framework interface layer 221 and a framework service layer 222. The framework interface layer 221 is used to provide an interface for the application upwards and to connect with the framework service layer 222 downwards to transmit instructions.
[0038] In some embodiments, the framework interface layer 221 is provided with a heartbeat proxy interface. Through the heartbeat proxy interface, an application with a heartbeat proxy requirement can make a heartbeat proxy request and callback. Optionally, the heartbeat proxy request interface includes a requestor 2211, a constructor 2212, a manager 2213, and a listener 2214. Among them, the requestor 2211 is used to receive a heartbeat proxy request of an application, and the listener 2214 is used to make a callback.
[0039] Correspondingly, when implementing the heartbeat proxy, the service 2221 in the framework service layer 222 is responsible for maintaining the heartbeat proxy status with the manager 2213; the tracker 2222 is a virtual interface of the underlying function, which is inherited by different platforms and implements interface unification to achieve polymorphic capabilities; the power saving module 2223 provides power consumption optimization function in the heartbeat proxy process.
[0040] In addition, the telephone communication module 223 of the framework layer 220 is also provided with a heartbeat service 2231, and the network power consumption unified management platform 224 of the framework layer 220 is also provided with a control center 2241. Among them, the heartbeat service 2231 is used to interact with the tracker 2222 to realize the heartbeat function; the control center 2241 is used to interact with the framework service layer 222 to realize the control of the heartbeat proxy service and the power consumption optimization capability.
[0041] The hardware abstraction layer 230 is used to abstract the hardware so that the operation of hardware such as CPU, I / O (input / output), memory, etc. can be controlled through programs, so that the system device driver is independent of the hardware. The hardware abstraction layer 230 encapsulates the specific operations of the hardware by defining a series of high-level APIs (Application Programmer Interfaces), such as memory access, I / O port operation, interrupt processing, timer control, peripheral communication, etc. These APIs describe the hardware functions in an abstract way without involving the implementation details of specific hardware models or manufacturers.
[0042] The kernel layer 240 is provided with drivers corresponding to hardware of different platforms. Through different drivers, it is possible to interact with hardware of different platforms, thereby driving the hardware to implement corresponding functions.
[0043] The hardware layer 250 includes a baseband chip. In the embodiment of the present application, the baseband chip has the ability to provide a heartbeat packet proxy transceiver. Moreover, for baseband chips of different hardware platforms, the methods for implementing the heartbeat packet proxy transceiver capability are different.
[0044] Illustratively, in order to adapt to the first platform and the second platform, the tracker 2222 is provided with a first platform tracker 2222A and a second platform tracker 2222B. The first platform tracker 2222A implements the call of the heartbeat proxy function of the first baseband chip 251 in the hardware layer 250 by interacting with the hardware abstraction layer 230 and the first platform driver 241 in the kernel layer 240; the second platform tracker 2222B implements the call of the heartbeat proxy function of the second baseband chip 252 in the hardware layer 250 by interacting with the hardware abstraction layer 230 and the second platform driver 242 in the kernel layer 240.
[0045] Please refer to Figure 3 , which shows a flowchart of a heartbeat packet transmission method provided by an exemplary embodiment of the present application. This embodiment is described by taking the method used in a baseband chip as an example, and the method may include the following steps:
[0046] Step 301: Receive a heartbeat proxy request from an AP chip, where the heartbeat proxy request is used to request the baseband chip to perform the function of sending and receiving heartbeat packets.
[0047] In a possible implementation, when an application has a heartbeat proxy requirement, the AP chip sends a heartbeat proxy request to the baseband chip, requesting the baseband chip to proxy the function of sending and receiving heartbeat packets.
[0048] In some embodiments, the heartbeat proxy request includes parameters related to the heartbeat proxy. Optionally, the parameters related to the heartbeat proxy include at least the heartbeat packet sending period (e.g., 5 minutes / time), the heartbeat packet payload, and the expected heartbeat packet payload, that is, the baseband chip can know at what period to send the heartbeat packet, the content that the heartbeat packet needs to carry when assembling the packet by itself, and how to judge whether the correct heartbeat packet from the network side is received based on the heartbeat proxy request.
[0049] In a possible implementation, an application with a heartbeat proxy requirement passes the heartbeat proxy related parameters to the heartbeat proxy service of the framework layer, and the heartbeat proxy service generates a heartbeat proxy request based on the heartbeat proxy related parameters and sends it to the kernel layer. The kernel layer further sends the heartbeat proxy request to the baseband chip of the hardware layer.
[0050] Step 302: Based on the heartbeat proxy request, a heartbeat packet is sent and received during the heartbeat proxy process. During the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet.
[0051] After receiving the heartbeat proxy request, the baseband chip enters the heartbeat proxy process. During the heartbeat proxy process, the baseband chip sends and receives heartbeat packets based on the heartbeat proxy request.
[0052] In a possible implementation, during the heartbeat proxy process, the terminal assembles the heartbeat packets based on the heartbeat packet payload included in the heartbeat proxy request, and periodically sends the heartbeat packets according to the packet sending cycle indicated by the heartbeat proxy request. After sending the heartbeat packets, the terminal determines whether the correct heartbeat return packet is received based on the expected heartbeat return packet payload indicated by the heartbeat proxy request.
[0053] In some embodiments, the heartbeat packet is a data packet including a custom structure, which may include a custom field for representing the state. Optionally, the custom structure may also include additional payload information, which may be control information or metadata, etc.
[0054] Compared with non-heartbeat packets used for data exchange, heartbeat packets do not contain actual business data. Therefore, the amount of data in heartbeat packets is much smaller than that in non-heartbeat packets. In addition, heartbeat packets are only used to maintain long connections and do not have specific business capabilities.
[0055] Since the heartbeat packet assembly and transmission and reception are completed by the baseband chip based on the relevant parameters of the heartbeat proxy, the power consumption caused by frequent awakening of the AP chip can be avoided during the heartbeat proxy process, thereby achieving the effect of reducing the overall power consumption of the heartbeat packet transmission process.
[0056] Step 303: During the heartbeat proxy process, dynamically adjust at least one of the heartbeat packet sending period and the packet sending time within the heartbeat packet sending period.
[0057] In some embodiments, during the heartbeat proxy process, the baseband chip does not send heartbeat packets based on a fixed packet transmission period and at a fixed packet transmission time, but can dynamically adjust the packet transmission period and / or dynamically adjust the packet transmission time within the packet transmission period.
[0058] Among them, adjusting the packet transmission period refers to adjusting the transmission interval between adjacent heartbeat packets, and adjusting the packet transmission time refers to selecting a suitable time point within the packet transmission period to send the heartbeat packet.
[0059] In one possible implementation, the baseband chip may only adjust the packet sending period of the heartbeat packet, and use the moment when the packet sending period is reached as the packet sending moment (i.e., dynamically adjusting the packet sending period, but fixing the packet sending moment within the packet sending period); or, the baseband chip may adopt a fixed packet sending period, and select a suitable packet sending moment within the fixed packet sending period (i.e., fixing the packet sending period, but supporting dynamic adjustment of the packet sending moment within the packet sending period); or, the baseband chip may dynamically adjust the packet sending period of the heartbeat packet, and select a suitable packet sending moment in the adjusted packet sending period (i.e., dynamically adjusting the packet sending period and the packet sending moment).
[0060] Optionally, the baseband chip can determine the current network environment based on the sending and receiving of heartbeat packets during the heartbeat proxy process, thereby dynamically adjusting the packet sending period based on the current network environment.
[0061] Among them, the adjustment method of the packet transmission period can include extending the packet transmission period and shortening the packet transmission period. Extending the packet transmission period can further reduce the power consumption of the heartbeat packet transmission when the network environment is good, while shortening the packet transmission period can ensure the validity of the connection when the network environment is poor. The specific method of adjusting the packet transmission period will be described in the following embodiment.
[0062] Optionally, the packet transmission period has an upper limit and a lower limit, and the baseband chip dynamically adjusts the packet transmission period between the upper limit and the lower limit.
[0063] Optionally, the baseband chip may adjust the packet sending time within the packet sending cycle based on the establishment of an RRC (Radio Resource Control) connection (non-heartbeat packet initiation) during the heartbeat proxy process.
[0064] The method for adjusting the packet sending time may include using an RRC connection not initiated by a heartbeat packet to send a heartbeat packet, thereby reducing the number of times the heartbeat packet initiates an RRC connection and further reducing the power consumption of the heartbeat packet transmission. The specific method for adjusting the packet sending time will be described in the following embodiments.
[0065] In the embodiment of the present application, when the baseband chip performs the heartbeat packet receiving and sending function based on the heartbeat proxy request of the AP chip, it can receive the heartbeat packets without waking up the AP chip, that is, the heartbeat packet receiving and sending can be completed independently by the baseband chip, which saves the power consumption of the AP chip side and helps to reduce the overall power consumption of the heartbeat packet transmission; and, in the heartbeat proxy process, the baseband chip does not send the heartbeat packets according to a fixed packet sending cycle and at a fixed packet sending time, but can dynamically adjust the packet sending cycle and / or packet sending time of the heartbeat packets, for example, it can extend the packet sending cycle, or send the heartbeat packets in advance within the packet sending cycle, which can further reduce the power consumption of the heartbeat packet transmission while improving the flexibility of the heartbeat packet transmission.
[0066] In TCP (Transmission Control Protocol), a unique sequence number is assigned to each byte to ensure the reliability of data transmission. Since the heartbeat packet assembly and transmission and reception are all performed by the baseband chip during the heartbeat proxy process, and the AP chip is not involved, there will be a problem of the sequence numbers on the baseband chip and AP chip sides being out of sync.
[0067] In order to ensure that the AP chip can continue to transmit data based on the correct sequence number after the heartbeat proxy ends, in a possible implementation, after receiving the heartbeat proxy pause request of the AP chip, the baseband chip pauses the heartbeat proxy based on the heartbeat proxy pause request, and synchronizes the sequence number with the AP chip, so that the sequence numbers of the AP chip and the baseband chip are consistent after the sequence number synchronization. In the subsequent process, the AP chip can continue to transmit data based on the synchronized sequence number.
[0068] Optionally, the heartbeat proxy pause request is actively triggered by the application program. For example, when the application program has a data transmission requirement, the heartbeat proxy pause request is sent to the baseband chip through the AP chip, instructing the baseband chip to pause the heartbeat proxy.
[0069] In some embodiments, when performing sequence number synchronization, the baseband chip synchronizes the sequence numbers of processed and unprocessed heartbeat packets in the heartbeat proxy process to the AP chip. In the TCP protocol, the operating system kernel is responsible for processing the transmission, sorting, segmentation, and reorganization of network data and ensuring the reliability and order of data. Therefore, when performing sequence number synchronization, after the baseband chip synchronizes the sequence number to the kernel layer, the kernel layer matches the sequence number on the baseband chip side with the sequence number in the self-defined queue, thereby realizing the synchronization of the sequence numbers between the AP chip and the baseband chip side.
[0070] When the heartbeat proxy needs to be continued later, the AP chip can send a heartbeat proxy recovery request to the baseband chip, which contains the updated sequence number on the AP chip side. After the heartbeat proxy recovery request, the baseband chip increments the sequence number starting from the sequence number updated on the AP chip side, and sends and receives heartbeat packets based on the incremented sequence number.
[0071] In an illustrative example, the request, suspension, and recovery process of the heartbeat proxy between the AP chip (including the application and the kernel) and the baseband chip is as follows: Figure 4 shown.
[0072] Step 401, the application (App) establishes a socket with the server (Server).
[0073] Step 402: The application sends a heartbeat proxy request carrying heartbeat proxy related parameters and an initial sequence number to a baseband chip (modem).
[0074] Step 403: The baseband chip accepts the request and makes a request callback to the kernel.
[0075] Step 404, the kernel performs nf_hook (hook) initialization.
[0076] Step 405: The kernel makes a request for a callback to the application.
[0077] Step 406: During the heartbeat proxy process, the baseband chip sends a heartbeat packet to the server based on the heartbeat proxy request.
[0078] Step 407: After receiving the heartbeat packet, the server sends an acknowledgment packet (ack).
[0079] Step 408: The server sends a heartbeat reply packet to the baseband chip.
[0080] Step 409: After receiving the heartbeat reply packet, the baseband chip sends a confirmation packet.
[0081] Step 410: The application sends a heartbeat proxy pause request to the baseband chip.
[0082] Step 411: The baseband chip suspends the heartbeat agent and calls back the serial number of the baseband chip side to the kernel.
[0083] Step 412: The kernel synchronizes the serial number based on the serial number on the baseband chip side.
[0084] Step 413: The kernel makes a request for a callback to the application.
[0085] Step 414: The application sends a heartbeat proxy recovery request carrying the AP side serial number to the baseband chip.
[0086] Step 415: The baseband chip accepts the request, resumes the heartbeat proxy and makes a request callback to the application.
[0087] In the present embodiment, the baseband chip suspends the heartbeat proxy based on the heartbeat proxy suspension request on the AP chip side, and at the same time synchronizes the serial number with the AP chip based on the serial number maintained by the baseband chip side, so as to ensure the consistency of the serial numbers of the AP chip and the baseband chip side after the heartbeat proxy is suspended, so that the AP chip can continue to transmit data packets based on the synchronized serial number, avoiding data transmission anomalies caused by incorrect serial numbers.
[0088] Since the baseband chip only has the function of sending and receiving heartbeat packets, but does not have the function of processing non-heartbeat packets, in addition to the application actively triggering the suspension of the heartbeat proxy, when the baseband chip receives a non-heartbeat packet, the baseband chip also needs to suspend the heartbeat proxy and the AP chip processes the non-heartbeat packet.
[0089] In a possible implementation, during the heartbeat proxy process, when a non-heartbeat packet is received, the baseband chip sends the non-heartbeat packet to the AP chip and stops sending the heartbeat packet.
[0090] Optionally, after receiving the data packet, the baseband chip detects whether the received data packet is a heartbeat packet. If the data packet is a heartbeat packet, the next round of heartbeat packet transmission begins. If the data packet is a non-heartbeat packet, the baseband chip suspends the sending of the heartbeat packet and reports the non-heartbeat packet. When reporting a non-heartbeat packet, the baseband chip needs to wake up the AP chip, and the AP chip processes the non-heartbeat packet.
[0091] In some embodiments, the heartbeat proxy request includes an expected heartbeat return packet payload, and the baseband chip can determine whether the received data packet is a heartbeat packet by detecting whether the payload in the received data packet is consistent with the expected heartbeat return packet payload.
[0092] Since the non-heartbeat packet carries a sequence number, after the non-heartbeat packet is sent to the AP chip, the AP chip performs sequence number synchronization based on the non-heartbeat packet. In some embodiments, after the baseband chip wakes up the AP chip, the AP chip first performs sequence number synchronization based on the sequence number in the non-heartbeat packet through the kernel (layer), and after synchronization is completed, the non-heartbeat packet is sent to the application program of the application layer, and the application program performs service processing based on the service data in the non-heartbeat packet.
[0093] like Figure 5 As shown, when the baseband chip 510 identifies a non-heartbeat packet through the heartbeat proxy server 511, it stops sending the heartbeat packet and sends the non-heartbeat packet to the kernel 520. The kernel 520 modifies the parameters of the protocol stack (IP protocol stack 511 and TCP protocol stack 512) according to the sequence number of the non-heartbeat packet, so that the protocol stack can correctly receive the data packet, and passes the non-heartbeat packet to the application 531 in the operating system 530, and the non-heartbeat packet is processed by the application 531. A heartbeat service 532 is provided in the framework layer of the operating system 530. Through the heartbeat service 532, the application 531 can send and receive the heartbeat packet by sending a five-tuple (including socket buffer, hook state, socket, TCP / IP header and IP type) to the NF_HOOK513 of the kernel 520.
[0094] In an illustrative example, the processing of non-heartbeat packets is as follows: Figure 6 shown.
[0095] Step 601: The server sends a non-heartbeat packet.
[0096] Step 602: The baseband chip determines that the received data packet is not a heartbeat packet.
[0097] Step 603: The baseband chip sends a non-heartbeat packet to the kernel.
[0098] Step 604: The kernel sends a heartbeat proxy pause request to the baseband chip.
[0099] Step 605: The kernel performs sequence number synchronization based on the sequence number in the non-heartbeat packet.
[0100] Step 606: The baseband chip accepts the pause request and makes a pause request callback to the kernel.
[0101] Step 607: The kernel sends a non-heartbeat packet to the application.
[0102] Step 608: After receiving the pause request callback from the baseband chip, the kernel makes a pause request callback to the application.
[0103] Step 609: The application sends a heartbeat proxy stop request to the baseband chip.
[0104] Step 610: The baseband chip receives the stop request and makes a stop request callback to the application.
[0105] In this embodiment, the baseband chip identifies whether the received data packet is a heartbeat packet, and when a non-heartbeat packet is identified, the heartbeat proxy is suspended, and the non-heartbeat packet is reported to the kernel, and the kernel synchronizes the sequence number based on the sequence number carried in the non-heartbeat packet, thereby ensuring that during the heartbeat proxy process, the AP chip can be awakened in time to process the non-heartbeat packet, and ensuring the consistency of the sequence numbers on the AP chip and the baseband chip side, so that subsequent data transmission can be carried out normally based on the synchronized sequence number.
[0106] During the heartbeat proxy process, a connection anomaly may occur on the network side, such as a TCP timeout. When an anomaly that the baseband chip cannot resolve occurs (such as TCP timeout, timeout retransmission still cannot resolve the anomaly), in order to be able to recover from the anomaly, in a possible implementation, when there is a connection anomaly on the network side, the baseband chip sends an anomaly notification to the AP chip.
[0107] After receiving the abnormal notification, the AP chip sends a heartbeat proxy stop request for the abnormal notification. After receiving the heartbeat proxy stop request, the baseband chip stops the heartbeat proxy.
[0108] In some embodiments, the AP chip performs abnormal recovery based on the abnormal notification. After the abnormal connection on the network side is recovered, the AP chip can request the baseband chip to proxy the heartbeat transceiver service again through the heartbeat proxy request.
[0109] Optionally, when the heartbeat reply packet sent by the server is not received, the baseband chip determines that there is a connection abnormality on the network side.
[0110] Optionally, the heartbeat proxy request may include the exception type of the network side connection exception to be reported. Accordingly, the baseband chip detects whether there is a network side connection exception belonging to the above exception type during the heartbeat proxy process, and reports an exception notification carrying the exception type when there is a network side connection exception, so as to improve the subsequent exception recovery efficiency.
[0111] In an illustrative example, during the heartbeat proxy process, the network side connection exception processing process is as follows: Figure 7 shown.
[0112] Step 701: The baseband chip sends a heartbeat packet.
[0113] Step 702: If no confirmation packet for the heartbeat packet is received, retransmission is performed after a timeout.
[0114] Step 703: The baseband chip reports an abnormal notification (indicating a timeout) to the kernel.
[0115] Step 704: The kernel sends a heartbeat proxy stop request to the baseband chip.
[0116] Step 705: The baseband chip accepts the request to stop the heartbeat proxy and makes a stop request callback to the kernel.
[0117] Step 706: The kernel reports the exception to the application program, and the application program performs exception processing.
[0118] In this embodiment, when the baseband chip identifies that there is a network side connection abnormality during the heartbeat proxy process, it stops the heartbeat proxy service, and wakes up the AP chip to handle the network side connection abnormality by reporting the abnormality notification to the AP chip, thereby improving the control of the network side connection abnormality scenario during the heartbeat proxy process.
[0119] During the heartbeat proxy process, the baseband chip can adopt at least one of the following dynamic adjustment strategies.
[0120] Dynamic adjustment strategy 1: During the heartbeat proxy process, the heartbeat packet sending period is dynamically adjusted based on the sending and receiving of heartbeat packets.
[0121] Under this strategy, the baseband chip can dynamically adjust the length of the packet transmission cycle based on the transmission and reception of heartbeat packets, while ensuring the normal transmission and reception of heartbeat packets, thereby determining the packet transmission cycle that is most suitable for the current network environment, taking into account the transmission and reception accuracy of heartbeat packets and the power consumption of transmission and reception.
[0122] The more times the heartbeat packets are successfully sent and received, the better the current network environment is. At this time, appropriately extending the heartbeat packet sending period will not affect the maintenance of the long connection. Therefore, in a possible implementation, during the heartbeat proxy process, the baseband chip dynamically adjusts the heartbeat packet sending period based on the number of consecutive successful heartbeat packet sending and receiving in the current sending period.
[0123] Optionally, the baseband chip counts the number of successful transmissions and receptions through a counter during the periodic transmission of packets based on the current transmission cycle. The initial value of the counter is 0. When the heartbeat packet is successfully transmitted and received, the count value of the counter is increased by one; when the heartbeat packet fails to be transmitted and received, the count value of the counter is reset to zero. Therefore, the count value of the counter is the number of consecutive successful transmissions and receptions of the heartbeat packet.
[0124] In some embodiments, the baseband chip is provided with a times threshold and a cycle extension step length, wherein the times threshold is a threshold for determining whether the packet transmission cycle can be extended, and the cycle extension step length is the minimum adjustment unit of the packet transmission cycle.
[0125] Optionally, the number threshold and the cycle extension step may be preset values maintained by the baseband chip, or the number threshold and the cycle extension step may be indicated by the AP chip.
[0126] Optionally, the number thresholds may be the same or different under different packet sending cycles. For example, the smaller the packet sending cycle, the smaller the number threshold, and the larger the packet sending cycle, the larger the number threshold, that is, the threshold for extending the packet sending cycle is raised to ensure the availability of the long connection after the packet sending cycle is extended.
[0127] In a possible implementation, the baseband chip detects whether the number of consecutive successful sending and receiving of heartbeat packets in the current packet sending cycle reaches a number threshold.
[0128] When the number of consecutive successful transmission and reception of the heartbeat packet reaches the number threshold in the current packet transmission cycle, the baseband chip extends the packet transmission cycle of the heartbeat packet based on the cycle extension step size on the basis of the current packet transmission cycle.
[0129] Optionally, when the heartbeat packet transmission period is extended, the extended transmission period = current transmission period + period extension step. For example, if the current transmission period is 5 minutes and the period extension step is 1 minute, when the number of consecutive successful transmissions reaches 10 times (number threshold), the baseband chip will extend the transmission period to 6 minutes.
[0130] Since the network environment changes all the time, in order to ensure the reliability of the connection when the network deteriorates, if there is a heartbeat packet timeout exception in the current packet sending cycle, the baseband chip shortens the heartbeat packet sending cycle based on the cycle extension step on the basis of the current packet sending cycle.
[0131] Optionally, the heartbeat packet timeout exception refers to the failure to receive a confirmation packet from the network side within a preset time after the heartbeat packet is sent. In addition, when the heartbeat packet timeout exception exists, the baseband chip will perform a preset number of heartbeat packet timeout retransmissions.
[0132] Optionally, when shortening the heartbeat packet transmission cycle, the shortened transmission cycle = current transmission cycle - cycle extension step. For example, if the current transmission cycle is 7 minutes and the cycle extension step is 1 minute, when there is a heartbeat packet timeout exception, the baseband chip will clear the number of consecutive successful transmissions and shorten the transmission cycle to 6 minutes.
[0133] In a possible implementation, in order to avoid indefinitely extending or shortening the packet transmission period (the former may affect the reliability of the long connection, and the latter may cause excessive power consumption of the heartbeat packet transmission and reception), the baseband chip is provided with an upper limit and a lower limit of the packet transmission period. The upper limit of the packet transmission period indicates the longest packet transmission period, and the lower limit of the packet transmission period indicates the shortest packet transmission period.
[0134] Correspondingly, when the number of consecutive successful sending and receiving of heartbeat packets in the current packet sending cycle reaches the number threshold and the current packet sending cycle has not reached the upper limit of the packet sending cycle, the baseband chip extends the packet sending cycle of the heartbeat packet based on the cycle extension step on the basis of the current packet sending cycle.
[0135] When the number of consecutive successful transmission and reception of heartbeat packets in the current packet transmission cycle reaches the number threshold and the current packet transmission cycle reaches the upper limit of the packet transmission cycle, the baseband chip maintains the current packet transmission cycle, that is, the baseband chip periodically transmits and receives heartbeat packets with the longest packet transmission cycle.
[0136] If a heartbeat packet timeout exception occurs in the current packet transmission cycle and the current packet transmission cycle does not reach the lower limit of the packet transmission cycle, the baseband chip shortens the heartbeat packet transmission cycle based on the current packet transmission cycle and the cycle extension step.
[0137] If a heartbeat packet timeout exception occurs in the current packet transmission cycle and the current packet transmission cycle reaches the lower limit of the packet transmission cycle, the baseband chip maintains the current packet transmission cycle, that is, the baseband chip periodically sends and receives heartbeat packets with the shortest packet transmission cycle.
[0138] In an illustrative example, Figure 8 As shown in the figure, when the initial packet transmission period (the lower limit of the packet transmission period) of the heartbeat packet is 5 minutes, the period extension step is 1 minute, and the upper limit of the packet transmission period is 10 minutes, the baseband chip first sends and receives the heartbeat packet at a frequency of once every 5 minutes, and records the number of consecutive transmissions and receptions of the heartbeat packet. When the number of consecutive transmissions and receptions of the heartbeat packet reaches 10 times, the baseband chip will extend the packet transmission period to 6 minutes, and send and receive the heartbeat packet at a frequency of once every 6 minutes, and record the number of consecutive transmissions and receptions of the heartbeat packet. When the number of consecutive transmissions and receptions of the heartbeat packet reaches 10 times, the baseband chip will extend the packet transmission period to 7 minutes, and send and receive the heartbeat packet at a frequency of once every 7 minutes, and record the number of consecutive transmissions and receptions of the heartbeat packet. If there is a heartbeat packet timeout exception under the 7-minute packet transmission period, the baseband chip will roll back the packet transmission period to 6 minutes, and send and receive the heartbeat packet at a frequency of once every 6 minutes again.
[0139] Optionally, the upper limit and lower limit of the packet transmission period may be preset values maintained by the baseband chip. Alternatively, the upper limit and lower limit of the packet transmission period may be indicated by the AP chip. Furthermore, the lower limit of the packet transmission period may be an initial value of the packet transmission period, that is, the baseband chip starts from the shortest packet transmission period and attempts to extend the packet transmission period according to the current network environment to reduce power consumption.
[0140] In a possible implementation, in order to improve the accuracy of dynamic adjustment of the period in different scenarios and avoid the problem of low efficiency, transitional adjustment or inadequate adjustment of the packet transmission period in some scenarios, the baseband chip receives the dynamic period adjustment parameter sent by the AP chip. In the subsequent process, the baseband chip dynamically adjusts the packet transmission period according to the dynamic period adjustment parameter.
[0141] Optionally, the dynamic cycle adjustment parameter may include at least one of an initial packet transmission period, a packet transmission period upper limit, a cycle extension step, and a number threshold, and the dynamic cycle adjustment parameter is dynamically determined by the AP chip based on the scenario. Different scenarios correspond to different dynamic cycle adjustment parameters, and different dynamic cycle adjustment parameters may be partially different or all different.
[0142] Optionally, scene recognition and determination of dynamic period adjustment parameters can be performed by Figure 2 The network power consumption unified management platform shown is determined.
[0143] In a possible implementation, the AP chip may determine the current scenario using the terminal status, the network status, and the application status as input, and thus send the dynamic period adjustment parameters matching the scenario to the baseband chip.
[0144] Optionally, based on the terminal status, network status and application status, different scenarios can be divided from three dimensions: power consumption requirements, network quality and application reliability requirements for long connections. Dynamic period adjustment parameters of different dimensions can be configured specifically according to the power consumption requirements, network quality and application reliability requirements for long connections in different scenarios.
[0145] For example, for scenarios with high power consumption requirements (such as being in a low-battery state or turning on the power saving mode), you can configure a larger upper limit and a larger lower limit of the packet sending period to improve the power consumption reduction effect; for scenarios with good network quality (such as accessing a network with a historically good network quality), you can configure a larger upper limit of the packet sending period and a larger cycle extension step to improve the power consumption reduction effect while improving the packet sending period adjustment efficiency; for scenarios with high requirements for the reliability of long connections (such as when performing heartbeat proxying for instant messaging applications), you can configure a smaller cycle extension step and a larger number threshold to increase the threshold for extending the packet sending period, and refine the adjustment granularity to avoid excessive adjustment.
[0146] In this embodiment, the baseband chip attempts to extend the heartbeat packet transmission period based on the heartbeat packet transmission and reception situation, when the heartbeat packet is successfully transmitted and received many times continuously, so as to reduce the heartbeat packet transmission frequency in the scenario with good network environment, and further reduce power consumption. In addition, the AP chip helps to improve the dynamic adjustment effect of the packet transmission period in different scenarios by identifying the current scenario and sending the dynamic cycle adjustment parameters for the scenario to the baseband chip, so as to avoid the problem of improper adjustment of the packet transmission period in some scenarios due to the use of unified cycle adjustment parameters, which affects the reliability of long connection or increases power consumption.
[0147] Dynamic adjustment strategy 2: During the heartbeat proxy process, based on the heartbeat packet sending period and the RRC connection establishment status within the sending period, the packet sending time within the sending period is dynamically adjusted.
[0148] In some embodiments, the RRC connection establishment situation within the packet sending period refers to the situation where other applications (applications other than the application that performs heartbeat proxy) trigger the establishment of an RRC connection within the packet sending period, that is, the RRC connection establishment situation within the packet sending period includes the following two situations: 1. The establishment of an RRC connection is triggered by other applications within the packet sending period; 2. The establishment of an RRC connection is not triggered by other applications within the packet sending period.
[0149] Under this strategy, the baseband chip can determine a packet sending window within the packet sending cycle, and based on the RRC connection establishment status within the packet sending window, determine whether it can send the packet together with other non-heartbeat packets, thereby reducing the number of RRC connections established when sending heartbeat packets and further reducing the power consumption of the heartbeat agent's transmission and reception.
[0150] In a possible implementation, during the heartbeat proxy process, if there is an RRC connection initiated by a non-heartbeat packet during the heartbeat packet transmission period, and the heartbeat packet meets the conditions for piggybacking transmission, the baseband chip dynamically adjusts the transmission time within the transmission period.
[0151] Among them, the RRC connection initiated by non-heartbeat packets refers to: the RRC connection created when non-heartbeat data packets are sent by other applications other than the current heartbeat proxy application. For example, when the baseband chip currently acts as a proxy for the heartbeat packet sending and receiving function of application A, if application B needs to interact with the server and create an RRC connection, the baseband chip determines that there is an RRC connection initiated by non-heartbeat packets.
[0152] Optionally, the piggyback packet sending condition refers to a condition satisfied by sending a heartbeat packet together with a non-heartbeat packet, that is, a condition satisfied by sending a heartbeat packet using an RRC connection initiated by a non-heartbeat packet.
[0153] In some embodiments, the baseband chip is provided with a window duration (the window duration is less than the packet transmission period). Based on the packet transmission period and the window duration, the packet transmission window for the heartbeat packet in the packet transmission period can be determined. At each moment in the packet transmission window, the baseband chip can send the heartbeat packet.
[0154] Optionally, the end position of the hitchhiking packet sending window is the default packet sending time of the packet sending cycle, and the time interval between the start position and the end position of the hitchhiking packet sending window is the window duration. For example, if the baseband chip starts to proxy the heartbeat packet from the 0th minute, and the packet sending cycle is 5 minutes, and the window duration is 1 minute, the 1-minute window from the 4th to the 5th minute is the hitchhiking packet sending window.
[0155] The baseband chip detects whether there is an RRC connection initiated by a non-heartbeat packet within the ride-sharing packet sending window.
[0156] If there is an RRC connection that is not initiated by a heartbeat packet in the packet sending window, the baseband chip sends a heartbeat packet based on the RRC connection that is not initiated by a heartbeat packet in the packet sending period. In this case, since the heartbeat packet is multiplexed with the RRC connection that is not initiated by the heartbeat packet for sending, there is no need to initiate an RRC connection specifically for the heartbeat packet, thus saving power consumption.
[0157] If there is no RRC connection that is not initiated by a heartbeat packet within the ride-sharing packet sending window, the baseband chip will initiate an RRC connection and send a heartbeat packet when the packet sending period is reached. In this case, since the ride-sharing packet sending conditions are not met, the baseband chip needs to initiate an RRC connection specifically for the heartbeat packet and send and receive the heartbeat packet through the RRC connection to ensure that the heartbeat packet is sent and received on time.
[0158] Since not all heartbeat packets can be sent by piggyback, when the RRC connection is pulled up and the heartbeat packet is sent when the packet sending cycle is reached, the baseband chip needs to return to the main line heartbeat to send and receive the heartbeat packet. Among them, the sending time of the heartbeat packet on the main line heartbeat is determined according to the packet sending cycle of the heartbeat packet.
[0159] For example, when the heartbeat packet sending period is 5 minutes, the heartbeat packets on the main line are sent at the 0th minute, the 5th minute, the 10th minute, the 15th minute, and so on.
[0160] In one possible implementation, the baseband chip determines the next heartbeat packet sending time based on the packet sending cycle, the initial heartbeat packet sending time, and the last heartbeat packet sending time. The next heartbeat packet sending time is located at the main line heartbeat, and the interval between the next heartbeat packet sending time and the initial heartbeat packet sending time is an integer multiple of the packet sending cycle.
[0161] Optional, when returning to the mainline heartbeat, For example, when the initial heartbeat packet is sent at the 0th minute, the last heartbeat packet is sent at the 13th minute (a ride-sharing packet was sent between the 0th and 13th minutes, but the ride-sharing packet failed at the 13th minute), and the packet sending cycle is 5 minutes, when the main line heartbeat is returned, the next heartbeat packet is sent at the 15th minute.
[0162] In the subsequent process, the baseband chip will continue to try to send packets starting from the time when the next heartbeat packet is sent.
[0163] In an illustrative example, Fig. 9 As shown, when the packet transmission cycle is 5 minutes and the window length is 1 minute, after the initial heartbeat packet is sent at the 0th minute, the baseband chip detects whether there is an RRC connection that is not pulled up by the heartbeat packet in the 4th to 5th minute of the packet transmission window. When the existence of an RRC connection that is not pulled up by the heartbeat packet is detected at the 4th minute, the baseband chip sends a heartbeat packet through the RRC connection at the 4th minute, without pulling up the RRC connection to send the heartbeat packet at the 5th minute of the main line heartbeat. When the baseband chip sends the heartbeat packet at the 4th minute, a 5-minute timer is set based on the packet transmission cycle.
[0164] The baseband chip continues to detect whether there is an RRC connection that is not initiated by a heartbeat packet in the window of sending packets from the 8th to the 9th minute. When an RRC connection that is not initiated by a heartbeat packet is detected in the 8th minute, the baseband chip sends a heartbeat packet through the RRC connection in the 8th minute, without having to initiate an RRC connection to send a heartbeat packet in the 10th minute of the main line heartbeat. When the baseband chip sends a heartbeat packet in the 8th minute, a 5-minute timer is set based on the packet sending cycle.
[0165] The baseband chip continues to detect whether there is an RRC connection that is not initiated by a heartbeat packet in the 12th to 13th minute window. Since there is no RRC connection that is not initiated by a heartbeat packet in this window, the ride packet fails. When the timer expires, the baseband chip initiates the RRC connection and sends a heartbeat packet in the 13th minute.
[0166] Furthermore, the baseband chip determines the return to the mainline heartbeat based on the last heartbeat packet sending time (13th minute), the initial heartbeat packet sending time (0th minute) and the packet sending cycle (5 minutes), and sends the heartbeat packet at the 15th minute. In the subsequent process, the baseband chip uses the 15th minute as the initial heartbeat sending time as the starting heartbeat sending time, and continues to try to send the package on the ride.
[0167] If piggybacking packet sending is not adopted, it is necessary to establish an RRC connection to send and receive heartbeat packets at the 0th minute, the 5th minute, the 10th minute and the 15th minute, and to establish an RRC connection to send non-heartbeat packets at the 4th minute and the 8th minute, for a total of 6 RRC connection establishments. If piggybacking packet sending is adopted, it is only necessary to establish an RRC connection to send heartbeat packets at the 0th minute, the 13th minute and the 15th minute, and to establish an RRC connection to send heartbeat packets and non-heartbeat packets at the 4th and 8th minutes, for a total of 5 RRC connection establishments.
[0168] In a possible implementation, in order to improve the effect of hitchhiking packet sending in different scenarios and improve the success rate of hitchhiking packet sending, the baseband chip receives the dynamic hitchhiking packet sending parameters sent by the AP chip. In the subsequent process, the baseband chip sends the hitchhiking packet according to the dynamic hitchhiking packet sending parameters.
[0169] Optionally, the dynamic ride-hailing packet sending parameter may include at least one of a packet sending period and a window duration, and the dynamic ride-hailing packet sending parameter is determined dynamically by the AP chip based on the scenario. Different scenarios correspond to different dynamic ride-hailing packet sending parameters, and different dynamic ride-hailing packet sending parameters may be partially different or all different.
[0170] Optionally, scene recognition and determination of dynamic ride-sharing parameters can be performed by Figure 2 The network power consumption unified management platform shown is determined.
[0171] In a possible implementation, the AP chip may use the terminal status, network status, and application status as input to determine the current scenario, and thus send dynamic ride-sharing packet sending parameters matching the scenario to the baseband chip.
[0172] Optionally, based on the terminal status, network status and application status, different scenarios can be divided from three dimensions: power consumption requirements, network quality and application reliability requirements for long connections. Dynamic ride-sharing packet parameters of different dimensions can be configured specifically according to the power consumption requirements, network quality and application reliability requirements for long connections in different scenarios.
[0173] For example, for scenarios with high power consumption requirements (such as low battery or power saving mode), a larger packet sending cycle and window duration can be configured, that is, a larger window for sending packets can be set to increase the success rate of sending packets, thereby reducing power consumption. Alternatively, the window duration can be dynamically set according to the running conditions of other applications outside the heartbeat proxy application. For example, when there are many other applications running outside the heartbeat proxy application, a longer window duration is configured, and when there are fewer other applications running outside the heartbeat proxy application, a smaller window duration is configured.
[0174] In this embodiment, the baseband chip sets a hitchhiking packet sending mechanism to reuse the RRC connection pulled up by non-heartbeat packets to send heartbeat packets within the packet sending cycle, eliminating the process of pulling up the RRC connection specifically for sending heartbeat packets, which helps to further reduce the power consumption of sending and receiving heartbeat packets. In addition, the AP chip identifies the current scene and sends dynamic hitchhiking packet sending parameters for the scene to the baseband chip, which helps to improve the hitchhiking packet sending effect of heartbeat packets in different scenes.
[0175] In some embodiments, after the RRC connection is established, the baseband chip sets an RRC inactive timer. When the RRC inactive timer reaches the timer duration, the baseband chip releases the RRC connection to reduce the power consumption of the baseband chip.
[0176] In order to further reduce the power consumption of sending and receiving heartbeat packets, in a possible implementation, the baseband chip can introduce an RRC fast release mechanism. Under the RRC fast release mechanism, during the heartbeat proxy process, the baseband chip sets the RRC idle timer of the RRC connection started by the heartbeat packet to the first timer duration, wherein the RRC idle timer is a timer that triggers the release of the RRC connection, and the first timer duration is less than the second timer duration, and the second timer duration is the timer duration of the RRC idle timer of the RRC connection not started by the heartbeat packet.
[0177] Optionally, the first timer duration may be a preset duration, or may be determined based on the second timer duration and the duration difference. For example, the second timer duration = the first timer duration - the duration difference.
[0178] Illustratively, when the second timer duration is 10 seconds and the duration difference is 5 seconds, the first timer duration is 5 seconds.
[0179] Combination Fig. 9 As shown, in the case of piggybacking packet sending, when the RRC connection is established at the 0th minute, the 13th minute and the 15th minute and the heartbeat packet is sent, the RRC connection is released after being maintained for 5 seconds; and when the RRC connection is established at the 4th and 8th minute and the heartbeat packet and the non-heartbeat packet are sent, the RRC connection is released after being maintained for 10 seconds.
[0180] In this embodiment, by introducing the RRC fast release mechanism, the RRC connection pulled up by the heartbeat packet is quickly released. Under the premise of ensuring the normal sending and receiving of the heartbeat packet, the holding time of the RRC connection is reduced, which helps to further reduce the power consumption of sending and receiving during the heartbeat proxy process.
[0181] Please refer to Fig.10 , which shows a structural block diagram of a heartbeat packet transmission device provided by an exemplary embodiment of the present application. The device includes:
[0182] The request receiving module 1001 is used to receive a heartbeat proxy request from an AP chip, wherein the heartbeat proxy request is used to request the baseband chip to perform a heartbeat packet receiving and sending function.
[0183] The heartbeat proxy module 1002 is used to send and receive the heartbeat packet in a heartbeat proxy process based on the heartbeat proxy request, wherein in the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet;
[0184] The adjustment module 1003 is used to dynamically adjust at least one of the heartbeat packet sending period and the packet sending time within the packet sending period during the heartbeat proxy process.
[0185] Optionally, the adjustment module 1003 includes:
[0186] A first adjustment unit is used to dynamically adjust the packet sending period of the heartbeat packet based on the sending and receiving status of the heartbeat packet during the heartbeat proxy process;
[0187] The second adjustment unit is used to dynamically adjust the packet sending time within the packet sending period based on the packet sending period of the heartbeat packet and the RRC connection pull-up status within the packet sending period during the heartbeat proxy process.
[0188] Optionally, the first adjustment unit is used to:
[0189] In the heartbeat proxy process, when the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches a number threshold, the packet sending cycle of the heartbeat packet is extended based on the cycle extension step on the basis of the current packet sending cycle; or,
[0190] In the case where a heartbeat packet timeout exception exists in the current packet sending cycle, the packet sending cycle of the heartbeat packet is shortened based on the cycle extension step on the basis of the current packet sending cycle.
[0191] Optionally, the first adjustment unit is used to:
[0192] When the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches the number threshold, and the current packet sending cycle does not reach the upper limit of the packet sending cycle, on the basis of the current packet sending cycle, the packet sending cycle of the heartbeat packet is extended based on the cycle extension step;
[0193] When the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches the number threshold and the current packet sending cycle reaches the upper limit of the packet sending cycle, the current packet sending cycle is maintained.
[0194] Optionally, the first adjustment unit is further used to:
[0195] Receive a dynamic cycle adjustment parameter sent by the AP chip, where the dynamic cycle adjustment parameter includes at least one of an initial packet transmission period, an upper limit of the packet transmission period, a cycle extension step, and a number threshold, and the dynamic cycle adjustment parameter is dynamically determined by the AP chip based on a scenario.
[0196] Optionally, the second adjustment unit is used to:
[0197] In the heartbeat proxy process, if there is an RRC connection pulled up by a non-heartbeat packet within the packet sending period of the heartbeat packet, and the heartbeat packet meets the piggyback packet sending condition, the packet sending time within the packet sending period is dynamically adjusted.
[0198] Optionally, the second adjustment unit is used to:
[0199] Based on the packet sending period and window duration of the heartbeat packet, determining a ride-sharing packet sending window within the packet sending period;
[0200] In the case where the RRC connection pulled up by the non-heartbeat packet exists in the ride-hailing packet sending window, sending the heartbeat packet based on the RRC connection pulled up by the non-heartbeat packet within the packet sending period;
[0201] In the case that there is no RRC connection established by the non-heartbeat packet within the ride-hailing packet sending window, the RRC connection is established and the heartbeat packet is sent when the packet sending period is reached.
[0202] Optionally, the second adjustment unit is further used for:
[0203] Based on the packet sending cycle, the initial heartbeat packet sending time and the last heartbeat packet sending time, the next heartbeat packet sending time is determined, and the interval between the next heartbeat packet sending time and the initial heartbeat packet sending time is an integer multiple of the packet sending cycle.
[0204] Optionally, the second adjustment unit is further used to:
[0205] Receive dynamic ride-hailing packet sending parameters sent by the AP chip, where the dynamic ride-hailing packet sending parameters include at least one of the packet sending period and the window duration, and the dynamic ride-hailing packet sending parameters are dynamically determined by the AP chip based on a scenario.
[0206] Optionally, the device further includes:
[0207] A timer setting module is used to set the RRC idle timer of the RRC connection started by the heartbeat packet to a first timer duration in the heartbeat proxy process, wherein the RRC idle timer is a timer that triggers the release of the RRC connection, and the first timer duration is less than the second timer duration, and the second timer duration is the timer duration of the RRC idle timer of the RRC connection not started by the heartbeat packet.
[0208] Optionally, the heartbeat proxy module 1002 is further used for:
[0209] The non-heartbeat packet processing module is used to send the non-heartbeat packet to the AP chip and suspend sending the heartbeat packet when receiving the non-heartbeat packet during the heartbeat proxy process. The AP chip is used to synchronize the sequence number based on the non-heartbeat packet.
[0210] Optionally, the heartbeat proxy module 1002 is further used for:
[0211] Receiving a heartbeat proxy pause request from the AP chip;
[0212] The heartbeat proxy is paused based on the heartbeat proxy pause request, and serial number synchronization is performed with the AP chip, wherein after the serial number synchronization, the serial numbers of the AP chip and the baseband chip remain consistent.
[0213] Optionally, the heartbeat proxy module 1002 is further used for:
[0214] During the heartbeat proxy process, when there is a network side connection abnormality, an abnormality notification is sent to the AP chip;
[0215] When receiving a heartbeat proxy stop request from the AP chip in response to the abnormality notification, the heartbeat proxy is stopped.
[0216] To sum up, in the embodiments of the present application, when the baseband chip performs the heartbeat packet receiving and sending function based on the heartbeat proxy request of the AP chip, it can receive heartbeat packets without waking up the AP chip, that is, the heartbeat packet receiving and sending can be completed independently by the baseband chip, which saves the power consumption of the AP chip side and helps to reduce the overall power consumption of the heartbeat packet transmission; and, in the heartbeat proxy process, the baseband chip does not send heartbeat packets according to a fixed packet sending cycle and at a fixed packet sending time, but can dynamically adjust the packet sending cycle and / or packet sending time of the heartbeat packet, for example, it can extend the packet sending cycle, or send the heartbeat packet in advance within the packet sending cycle, which can further reduce the power consumption of the heartbeat packet transmission while improving the flexibility of the heartbeat packet transmission.
[0217] See also Fig.11 , Fig.1111 is a schematic diagram of a terminal structure provided by an exemplary embodiment of the present application. The terminal may also include one or more of the following components: a processor 1110 and a memory 1120.
[0218] Optionally, the processor 1110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA).
[0219] The processor 1110 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), a neural network processor (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch screen; the NPU is used to implement artificial intelligence (AI) functions; and the baseband chip is used to process wireless communications. It is understandable that the above-mentioned baseband chip may not be integrated into the processor 1110, but may be implemented by a single chip.
[0220] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the following various method embodiments, etc.; the data storage area may store data created according to the use of the electronic device, etc.
[0221] In addition, those skilled in the art will understand that the structure of the terminal shown in the above figures does not constitute a limitation on the terminal, and the terminal may include more (such as a power supply component, a display component, a sensor component) or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0222] An embodiment of the present application also provides a baseband chip, which includes a programmable logic circuit, and the programmable logic circuit is used to implement the heartbeat packet transmission method described in the above embodiment.
[0223] An embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the heartbeat packet transmission method as described in the above embodiment.
[0224] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium; a processor reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to implement the heartbeat packet transmission method described in the above embodiment.
[0225] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0226] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A heartbeat packet transmission method, characterized in that: The method is used for a baseband chip, and the method comprises: Receive a heartbeat proxy request from an AP chip, where the heartbeat proxy request is used to request the baseband chip to perform a heartbeat packet receiving and sending function; Based on the heartbeat proxy request, sending and receiving the heartbeat packet in a heartbeat proxy process, wherein during the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet; In the heartbeat proxy process, at least one of a packet sending period of the heartbeat packet and a packet sending time within the packet sending period is dynamically adjusted.
2. The method according to claim 1, characterized in that: In the heartbeat proxy process, dynamically adjusting at least one of the heartbeat packet sending period and the packet sending time within the packet sending period includes at least one of the following: In the heartbeat proxy process, based on the sending and receiving conditions of the heartbeat packets, the sending period of the heartbeat packets is dynamically adjusted; In the heartbeat proxy process, based on the packet sending period of the heartbeat packet and the RRC connection establishment status within the packet sending period, the packet sending time within the packet sending period is dynamically adjusted.
3. The method according to claim 2, characterized in that In the heartbeat proxy process, dynamically adjusting the packet sending period of the heartbeat packet based on the sending and receiving status of the heartbeat packet includes: In the heartbeat proxy process, when the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches a number threshold, the packet sending cycle of the heartbeat packet is extended based on the cycle extension step on the basis of the current packet sending cycle; or, In the case where a heartbeat packet timeout exception exists in the current packet sending cycle, the packet sending cycle of the heartbeat packet is shortened based on the cycle extension step on the basis of the current packet sending cycle.
4. The method according to claim 3, characterized in that When the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches a number threshold, extending the packet sending cycle of the heartbeat packet based on the cycle extension step on the basis of the current packet sending cycle, comprises: When the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches the number threshold, and the current packet sending cycle does not reach the upper limit of the packet sending cycle, on the basis of the current packet sending cycle, the packet sending cycle of the heartbeat packet is extended based on the cycle extension step; The method further comprises: When the number of consecutive successful sending and receiving of the heartbeat packet in the current packet sending cycle reaches the number threshold and the current packet sending cycle reaches the upper limit of the packet sending cycle, the current packet sending cycle is maintained.
5. The method according to claim 4, characterized in that The method further comprises: Receive a dynamic cycle adjustment parameter sent by the AP chip, where the dynamic cycle adjustment parameter includes at least one of an initial packet transmission period, an upper limit of the packet transmission period, a cycle extension step, and a number threshold, and the dynamic cycle adjustment parameter is dynamically determined by the AP chip based on a scenario.
6. The method according to claim 2, characterized in that In the heartbeat proxy process, dynamically adjusting the packet sending time within the packet sending period based on the packet sending period of the heartbeat packet and the RRC connection pull-up status within the packet sending period includes: In the heartbeat proxy process, if there is an RRC connection pulled up by a non-heartbeat packet within the packet sending period of the heartbeat packet, and the heartbeat packet meets the piggyback packet sending condition, the packet sending time within the packet sending period is dynamically adjusted.
7. The method according to claim 6, characterized in that The method dynamically adjusts the packet sending time within the packet sending period when there is an RRC connection initiated by a non-heartbeat packet within the packet sending period and the heartbeat packet meets the packet sending condition of the ride, including: Based on the packet sending period and window duration of the heartbeat packet, determining a ride-sharing packet sending window within the packet sending period; In the case where the RRC connection initiated by the non-heartbeat packet exists within the ride-hailing packet sending window, the heartbeat packet is sent based on the RRC connection initiated by the non-heartbeat packet within the packet sending period.
8. The method according to claim 7, characterized in that The method further comprises: In the case that there is no RRC connection established by the non-heartbeat packet within the ride-hailing packet sending window, the RRC connection is established and the heartbeat packet is sent when the packet sending period is reached.
9. The method according to claim 8, characterized in that After the RRC connection is established and the heartbeat packet is sent when the packet transmission period is reached, the method further includes: Based on the packet sending cycle, the initial heartbeat packet sending time and the last heartbeat packet sending time, the next heartbeat packet sending time is determined, and the interval between the next heartbeat packet sending time and the initial heartbeat packet sending time is an integer multiple of the packet sending cycle.
10. The method according to claim 8, characterized in that The method further comprises: Receive dynamic ride-hailing packet sending parameters sent by the AP chip, where the dynamic ride-hailing packet sending parameters include at least one of the packet sending period and the window duration, and the dynamic ride-hailing packet sending parameters are dynamically determined by the AP chip based on a scenario.
11. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: In the heartbeat proxy process, the RRC idle timer of the RRC connection initiated by the heartbeat packet is set to a first timer duration, the RRC idle timer is a timer that triggers the release of the RRC connection, and the first timer duration is less than a second timer duration, the second timer duration is the timer duration of the RRC idle timer of the RRC connection initiated by the non-heartbeat packet.
12. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: In the heartbeat proxy process, when a non-heartbeat packet is received, the non-heartbeat packet is sent to the AP chip, and sending of the heartbeat packet is suspended. The AP chip is used to synchronize the sequence number based on the non-heartbeat packet.
13. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: Receiving a heartbeat proxy pause request from the AP chip; The heartbeat proxy is paused based on the heartbeat proxy pause request, and serial number synchronization is performed with the AP chip, wherein after the serial number synchronization, the serial numbers of the AP chip and the baseband chip remain consistent.
14. The method according to any one of claims 1 to 10, characterized in that: The method further comprises: During the heartbeat proxy process, when there is a network side connection abnormality, an abnormality notification is sent to the AP chip; When receiving a heartbeat proxy stop request from the AP chip in response to the abnormality notification, the heartbeat proxy is stopped.
15. A heartbeat packet transmission device, characterized in that: The device is used for a baseband chip, and the device comprises: A request receiving module, used to receive a heartbeat proxy request from an AP chip, wherein the heartbeat proxy request is used to request the baseband chip to perform a heartbeat packet receiving and sending function; A heartbeat proxy module, configured to send and receive the heartbeat packet in a heartbeat proxy process based on the heartbeat proxy request, wherein in the heartbeat proxy process, the baseband chip does not wake up the AP chip when sending and receiving the heartbeat packet; The adjustment module is used to dynamically adjust at least one of the packet sending period of the heartbeat packet and the packet sending time within the packet sending period during the heartbeat proxy process.
16. A baseband chip, characterized in that: The baseband chip includes a programmable logic circuit, and the programmable logic circuit is used to implement the heartbeat packet transmission method as described in any one of claims 1 to 14.
17. A terminal, characterized in that: The terminal includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the heartbeat packet transmission method according to any one of claims 1 to 14.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer instruction, and the at least one computer instruction is used to be executed by a processor to implement the heartbeat packet transmission method according to any one of claims 1 to 14.
