Multi-identity data control method, apparatus, device, medium and product

CN122601591APending Publication Date: 2026-08-18SPREADTRUM SEMICON(CHENGDU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610555691.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-23
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

由于固件侧接收的缓存空间可能被某一身份全部或者大部分占用,致使其它身份可用的缓存空间过少,进而导致多身份之间的吞吐量不足

Benefits of technology

[0027] In a fifth aspect, embodiments of this disclosure provide a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps in the multi-identity data control method described above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122601591A_ABST
    Figure CN122601591A_ABST
Patent Text Reader

Abstract

This disclosure relates to the technical field of communication, specifically to a multi-identity data control method, apparatus, device, medium, and product, applied to a terminal device including a main processor chip and a communication chip. The main processor chip runs a driver program, and the communication chip runs firmware. The method includes: before channel switching, the firmware sending synchronization information to the driver program; wherein the synchronization information includes the length of a time window for sending data for the current communication identity, the transmission rate of the current communication identity, and the amount of data not transmitted before the last channel switch; determining the total duration for sending data for the current communication identity based on the time window length, transmission rate, and data amount; after the total duration is reached, stopping data transmission for the current communication identity and switching to sending data for the next communication identity; wherein the termination time for sending data for the current communication identity is earlier than the time when the firmware executes channel switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and more specifically, to a multi-identity data control method, apparatus, device, medium, and product. Background Technology

[0002] The main processor chip and the external communication chip (e.g., WIFI) are often connected using a high-speed interface. The host and slave sides of the high-speed interface usually have their own independent cache space. The firmware needs to attach the cache space to the high-speed interface in advance so that the driver of the communication chip can use the high-speed interface to send data.

[0003] In related technologies, when a communication chip supports a multi-identity, multi-frequency operating mode and multi-identity services employ a time-division scheduling strategy, the radio frequency will switch back and forth between different channels. Since the buffer space received by the firmware may be entirely or mostly occupied by one identity, the available buffer space for other identities is insufficient, leading to inadequate throughput among multiple identities. Summary of the Invention

[0004] This disclosure is made in view of the above-mentioned problems. This disclosure provides a method, apparatus, device, medium, and product for controlling data with multiple identities.

[0005] In a first aspect, embodiments of this disclosure provide a multi-identity data control method, applied to a terminal device including a main processor chip and a communication chip, wherein a driver program runs on the main processor chip and firmware runs on the communication chip, including:

[0006] Before the channel switch, the firmware sends synchronization information to the driver; the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switch.

[0007] The total duration for sending data for the current communication identity is determined based on the time window length, sending rate, and data volume.

[0008] After the total duration is reached, data transmission for the current communication identity stops, and data transmission switches to the next communication identity; the termination time for data transmission for the current communication identity is earlier than the time when the firmware performs channel switching.

[0009] In one embodiment of the first aspect, determining the total duration for sending data for the current communication identity based on the time window length, transmission rate, and data volume includes: If the synchronization information is determined to be valid, the first time is calculated based on the transmission rate; where the first time is the estimated time for the firmware program to clear the maximum cache data.

[0010] The second time is determined based on the amount of data; where the second time is the time at which the first time is calibrated.

[0011] Determine the estimated third time from when the synchronization information is uploaded from the firmware to when the driver processing is complete.

[0012] The time window length, the first time, the second time, and the third time are calculated to obtain the total duration.

[0013] In one embodiment of the first aspect, calculations are performed on the time window length, the first time, the second time, and the third time to obtain the total duration, including: Calculate the first difference between the time window length and the first time.

[0014] Calculate the second difference between the first difference and the third time.

[0015] Calculate the sum of the second difference and the second time to obtain the total duration.

[0016] In one embodiment of the first aspect, calculating the first time based on the transmission rate includes: Determine the maximum amount of cached data in the firmware program.

[0017] Calculate the ratio between the maximum buffered data size and the sending rate to obtain the first time.

[0018] In one embodiment of the first aspect, determining the second time based on the amount of data includes: If the amount of data not transmitted before the last channel switch is zero, the second time is determined to be a specified value less than or equal to zero.

[0019] If the amount of untransmitted data before the last channel switch is greater than zero, calculate the ratio between the amount of untransmitted data and the transmission rate to obtain the second time.

[0020] In one embodiment of the first aspect, the method further includes: If the operating mode of the communication chip is determined to be multi-channel switching mode based on the synchronization information, or if the time window length is greater than or equal to a preset threshold, the synchronization information is determined to be valid information.

[0021] In one embodiment of the first aspect, the driver uses a timer to count the total duration, and after the timer expires, stops sending data for the current communication identity and switches to the next communication identity to send data.

[0022] In a second aspect, embodiments of this disclosure provide a multi-identity data control device, disposed in a terminal device including a main processor chip and a communication chip, wherein a driver program runs on the main processor chip and firmware program runs on the communication chip, including: The information sending unit is used to send synchronization information from the firmware program to the driver program before channel switching; wherein, the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switching.

[0023] The determining unit is used to determine the total duration for sending data for the current communication identity based on the time window length, transmission rate, and data volume.

[0024] The identity switching unit is used to stop sending data for the current communication identity and switch to the next communication identity after the total duration has been reached; wherein, the termination time for sending data for the current communication identity is earlier than the time when the firmware program executes the channel switching.

[0025] In a third aspect, embodiments of this disclosure provide an electronic device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and when the machine-readable instructions are executed by the processor, the steps in the above-described multi-identity data control method are performed.

[0026] In a fourth aspect, embodiments of this disclosure provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the aforementioned multi-identity data control method.

[0027] In a fifth aspect, embodiments of this disclosure provide a computer program product stored in a storage medium, the program product being executed by at least one processor to implement the steps in the multi-identity data control method described above.

[0028] As will be described in detail below, a multi-identity data control method, apparatus, device, medium, and product according to embodiments of this disclosure are disclosed. In embodiments of this disclosure, a terminal device including a main processor chip and a communication chip sends synchronization information to a driver program running on the main processor chip via firmware running on the communication chip before channel switching. This synchronization information includes the length of a time window for sending data for the current communication identity, the transmission rate of the current communication identity, and the amount of data not transmitted before the last channel switch. Then, the driver program determines the total duration for sending data for the current communication identity based on the time window length, transmission rate, and data amount. Finally, after the total duration is reached, data transmission for the current communication identity stops, and data transmission switches to the next communication identity. The termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching. By employing the above processing method, the total duration of data sent by the current communication identity is accurately calculated using three data points: the time window length for sending data to the current communication identity, the sending rate of the current communication identity, and the amount of data not sent before the last channel switch. Once the total duration is reached, the driver stops sending data to the current communication identity. This can prevent the current communication identity from continuing to occupy buffer space to a certain extent. Moreover, the termination time is earlier than the channel switch time, so as to release the buffer space in advance and ensure that the data is passed to the next communication identity after the buffer space is cleared. This effectively improves the throughput between multiple identities and avoids interruptions or performance degradation caused by insufficient buffer.

[0029] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0030] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0031] Figure 1 This is a flowchart of a multi-identity data control method according to an embodiment of the present disclosure.

[0032] Figure 2 This is a schematic diagram illustrating an information reporting time according to an embodiment of this disclosure.

[0033] Figure 3 This is an overall flowchart of a multi-identity data control process according to an embodiment of the present disclosure.

[0034] Figure 4This is a schematic diagram of a multi-identity data control device according to an embodiment of the present disclosure.

[0035] Figure 5 This is a schematic diagram of an electronic device according to an embodiment of the present disclosure.

[0036] Figure 6 This is a schematic diagram of a computer program product according to an embodiment of the present disclosure. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0038] Research has revealed that the main processor chip and external communication chips (such as Wi-Fi) are often connected using a high-speed interface. The host and slave sides of the high-speed interface usually have their own independent cache space. The firmware needs to attach the cache space to the high-speed interface in advance so that the driver of the communication chip can use the high-speed interface to send data.

[0039] In related technologies, when a communication chip supports a multi-identity, multi-frequency operating mode and multi-identity services employ a time-division scheduling strategy, the radio frequency will switch back and forth between different channels. Since the buffer space received by the firmware may be entirely or mostly occupied by one identity, the available buffer space for other identities is insufficient, leading to inadequate throughput among multiple identities.

[0040] For example, 2.4G (identity A) and 5G (identity B) can simultaneously perform WIFI data interaction. The WIFI driver receives messages sent by the protocol stack and sends them to the firmware through the Secure Digital Input and Output (SDIO) interface.

[0041] When the channel is operating at 2.4G, the firmware can send messages for identity A normally, but identity B cannot send packets. In this scenario, the driver side may send a large number of messages for identity A to the firmware. If the channel suddenly switches to 5G, most of the memory blocks of cached data on SDIO will be occupied by identity A and cannot be released, resulting in identity B being unable to send messages to the firmware through the SDIO interface.

[0042] To facilitate understanding of this embodiment, a multi-identity data control method disclosed in this disclosure will be described in detail first. This disclosure can be applied to communication processor chips, chip modules, mobile terminals, etc. The products used generally adopt an architecture of main processor chip with external communication processing chip, support multi-identity inter-frequency working mode, and multi-identity services adopt time-sharing scheduling strategy, that is, multi-channel time-sharing switching MCC (Multiple channel change), and high-speed interfaces such as SDIO are used between chips for data transmission.

[0043] See Figure 1 The diagram shows a flowchart of a multi-identity data control method provided in this embodiment of the present disclosure. It is applied to a terminal device containing a main processor chip and a communication chip. A driver program runs on the main processor chip, and firmware runs on the communication chip. The method includes steps S101 to S103, wherein: Step S101: Before channel switching, the firmware program sends synchronization information to the driver program; wherein, the synchronization information includes the time window length for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data not sent before the last channel switching.

[0044] In this embodiment of the disclosure, the firmware program sends synchronization information to the driver program before each channel switch according to the business logic. The synchronization information includes an information exchange header, the working mode of the communication chip, the current communication identity, the currently used channel, the time window length for sending data for the current communication identity, the sending rate or maximum transmission rate of the current communication identity, and the amount of data not sent before the last channel switch.

[0045] Step S102: Determine the total duration for sending data for the current communication identity based on the time window length, the sending rate, and the data volume.

[0046] Step S103: After the total duration is reached, stop sending data for the current communication identity and switch to sending data for the next communication identity; wherein, the termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching.

[0047] Here, communication identity can refer to different service connections supported by the communication Wi-Fi chip. Communication identity can be different operating frequency bands (e.g., 2.4GHz, 5GHz) or different network roles. For example, through software control, the terminal device of the wireless LAN can also have the function of a hotspot.

[0048] This disclosure also includes a timer, in which the driver calculates the total duration for sending data to the current communication identity based on the length of the time window for sending data to the current communication identity, the sending rate of the current communication identity, and the amount of data not sent before the last channel switch, and starts the timer after calculating the total duration for sending data to the current communication identity.

[0049] Then, the total duration is set as the timeout time of the timer. The driver sends data for the current communication identity, the timer starts counting, and if the timer counts to the total duration, it intercepts the data of the current communication identity and caches the intercepted data. Finally, it switches to the next communication identity to send data.

[0050] The timer can be a hardware timer inside the main processor chip or a software timer corresponding to the operating system; this disclosure does not require either.

[0051] In the above implementation, the total duration of data sent by the current communication identity is accurately calculated by using three data points: the time window length for sending data to the current communication identity, the sending rate of the current communication identity, and the amount of data not sent before the last channel switch. After the total duration is reached, the driver stops sending data to the current communication identity. This can prevent the current communication identity from continuing to occupy the buffer space to a certain extent. Moreover, the termination time is earlier than the channel switch time, so as to release the buffer space in advance and ensure that the data is passed to the next communication identity after the buffer space is cleared. This effectively improves the throughput between multiple identities and avoids interruptions or performance degradation caused by insufficient buffer.

[0052] In an optional implementation, the above steps determine the total duration for sending data by the current communication identity based on the time window length, the transmission rate, and the data volume, specifically including the following steps: If the synchronization information is determined to be valid, a first time is calculated based on the transmission rate; wherein, the first time is the estimated time for the firmware program to clear the maximum cache data; A second time is determined based on the amount of data; wherein, the second time is the time during which the first time is calibrated. Determine the estimated third time from when the synchronization information is uploaded from the firmware program to when the driver processing is completed; The total duration is obtained by performing calculations on the time window length, the first time, the second time, and the third time.

[0053] In this embodiment of the disclosure, it can be determined first whether the synchronization information is valid information. As mentioned above, the synchronization information includes the time window length for sending data for the current communication identity. This disclosure can set a preset threshold for the time window length. If the time window length is greater than or equal to the preset threshold, the synchronization information is determined to be valid information; if the time window length is less than the preset threshold, the synchronization information is determined to be invalid information.

[0054] In addition, if the synchronization information determines that the communication chip's operating mode is multi-channel switching mode, then the synchronization information is determined to be valid; if the synchronization information determines that the communication chip's operating mode is single-channel switching mode (SCC), then the synchronization information is determined to be invalid. That is, the synchronization information is determined to be valid only when the synchronization information determines that the communication chip's operating mode is multi-channel switching mode, or when the time window length is greater than or equal to a preset threshold.

[0055] After confirming that the synchronization information is valid, the estimated time (first time) for the firmware to clear the maximum cache data is calculated based on the sending rate of the current communication identity. Then, the time for calibrating this estimated time is calculated based on the amount of data not sent before the last channel switch (second time). The estimated third time for the synchronization information to be uploaded from the firmware to the driver processing completion is then determined. Finally, the total duration for the current communication identity to send data is determined based on the time window length, the first time, the second time, and the third time.

[0056] like Figure 2 The diagram illustrates an information reporting timeline provided in this embodiment. t1 represents the time when synchronization information is uploaded from the firmware program; t2 represents the time when the firmware program switches the current communication identity from the current channel to another channel; t3 represents the time when the driver processes the synchronization information; t4 represents the time when data transmission for the current communication identity stops; t5 represents the time when the firmware program sends the last data packet to the current communication identity; and t6 represents the time when the firmware program completes sending the last data packet to the current communication identity. The time window length (t6-t2) for data transmission by the current communication identity is represented by t6-t2.

[0057] The third time is the difference between t3 and t1. This third time can be a preset fixed value, which can be estimated in advance based on hardware performance parameters such as CPU processing speed and SDIO interface clock frequency.

[0058] In the above implementation, the synchronous switching between the driver and firmware is achieved through the first and third time, and a closed-loop feedback mechanism is introduced through the second time, enabling the system to have adaptive adjustment capabilities and ensuring long-term operational stability. This achieves fair use of cache and balanced improvement of throughput in multi-identity scenarios, effectively solving the problem of throughput reduction or interruption caused by cache contention in multi-channel switching mode.

[0059] Regarding the first time, in one optional implementation of this disclosure, the above steps calculate the first time based on the transmission rate, specifically including the following steps: Determine the maximum amount of cached data in the firmware program; The first time is obtained by calculating the ratio between the maximum buffered data size and the sending rate.

[0060] The calculation process for the first moment is shown in the following formula: ,in, Maximum cached data size The sending rate of the current communication identity.

[0061] In this embodiment of the disclosure, the maximum cached data volume of the firmware program can be obtained, and the maximum cached data volume and the transmission rate are calculated to obtain a first time. This first time is used to characterize the estimated time required for the firmware program to clear its maximum cached data at the current rate. This provides the basis for clearing the cached data just before channel switching, thereby providing an adaptive reference time, maximizing channel utilization and ensuring smooth switching between multiple identities.

[0062] Regarding the second time, in one optional implementation of this disclosure, the above steps determine the second time based on the amount of data, specifically including the following steps: If the amount of data not transmitted before the last channel switch is zero, the second time is determined to be a specified value less than or equal to zero; If the amount of untransmitted data before the last channel switch is greater than zero, the ratio between the amount of untransmitted data and the transmission rate is calculated to obtain the second time.

[0063] In this embodiment of the disclosure, the amount of data that was not sent for the current communication identity before the last channel switch can be obtained first. If the amount of data that was not sent before the last channel switch is zero, then the second time is a specified value that is less than or equal to zero. This indication value can be adaptively adjusted as needed. If the amount of data that was not sent before the last channel switch is greater than zero, then the second time can be calculated by the following formula.

[0064] The calculation process for the second time is shown in the following formula: ,in, The amount of data not sent. The sending rate of the current communication identity.

[0065] In the above embodiments, when the amount of unsent data is zero, this disclosure sets the second time to a value less than or equal to zero, thereby increasing the total data transmission time for the current communication identity and avoiding wasting channel bandwidth due to premature stopping. Correspondingly, when the amount of unsent data is greater than zero, this disclosure calculates the ratio between the amount of unsent data and the transmission rate as the second time, thereby effectively reducing the total data transmission time for the current communication identity and reserving more sufficient cache clearing time for the firmware program.

[0066] In an optional implementation, the above steps calculate the time window length, the first time, the second time, and the third time to obtain the total duration, specifically including the following steps: Calculate the first difference between the time window length and the first time. Calculate the second difference between the first difference and the third time; The total duration is obtained by calculating the sum of the second difference and the second time.

[0067] The process for handling the total duration is shown in the following formula: ,in, Total duration The length of the time window. To be the first, For the third time, This is the second time.

[0068] In this embodiment of the disclosure, the difference between the time window length for sending data for the current communication identity and the estimated time for clearing the maximum cache data of the firmware program is first calculated. Then, the difference between the difference and the estimated time for the synchronization information to be uploaded from the firmware program to the driver program is calculated. Finally, the sum between the difference and the time for calibrating the first time is calculated to obtain the total duration for sending data for the current communication identity.

[0069] In the above implementation, the first difference measures the time required for the firmware to clear the maximum cache data from the total time window, and the second difference further compensates for the transmission and processing delay caused by the synchronization information being uploaded from the firmware to the driver processing completion. This achieves the ideal state where the cache space is just cleared before the channel switch, thereby maximizing channel utilization and ensuring smooth switching and high throughput performance between multiple identities.

[0070] In an optional implementation, the driver described in the above steps counts the total duration using a timer. After the timer expires, it stops sending data for the current communication identity and switches to sending data for the next communication identity.

[0071] Because the firmware and driver run in parallel and are independent of each other, the timer mechanism described above allows the driver to stop sending data for the current identity at precise times without polling to check the time, saving computing resources. This enables the firmware to accurately know the driver's status, improving the reliability and adaptability of the operating system.

[0072] The following is combined Figure 3 The data control process for the aforementioned multi-identity system is described below: S301: Before channel switching, the firmware sends synchronization information to the driver.

[0073] The synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switch.

[0074] S302: If the synchronization information is determined to be valid, calculate the first time based on the transmission rate.

[0075] The first time is the estimated time for the firmware program to clear the maximum cache data.

[0076] S303: Determine the second time based on the amount of data.

[0077] The second time is the time used to calibrate the first time.

[0078] S304: Determine the estimated third time from when synchronization information is uploaded from the firmware to when driver processing is complete.

[0079] S305: Perform calculations on the time window length, the first time, the second time, and the third time to obtain the total duration for sending data for the current communication identity.

[0080] S306: After the total duration is reached, stop sending data for the current communication identity and switch to the next communication identity to send data.

[0081] The termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching.

[0082] As described above, the firmware reports events to notify the driver of the corresponding synchronization information. After obtaining the information, the driver aligns the packet sending times of each identity, enabling the switching of communication identities to be completed before channel switching. Simultaneously, considering the event reporting and processing delays, a dynamic time calibration mechanism is used to ensure fair and full utilization of the firmware cache space under multiple identities, thereby improving interaction and transmission efficiency and ensuring balanced throughput across multiple identities.

[0083] Reference Figure 4 The diagram shown is a schematic of a multi-identity data control device provided in an embodiment of this disclosure. It is installed in a terminal device including a main processor chip and a communication chip. A driver program runs on the main processor chip, and firmware runs on the communication chip. The device includes: an information sending unit 40, a determining unit 41, and an identity switching unit 42; wherein: An information sending unit is used to send synchronization information from the firmware program to the driver program before channel switching; wherein, the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switching; The determining unit is configured to determine the total duration for sending data for the current communication identity based on the time window length, the sending rate, and the data volume. An identity switching unit is used to stop sending data for the current communication identity and switch to sending data for the next communication identity after the total duration has been reached; wherein the termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching.

[0084] In one possible implementation, the device is also used for: If the synchronization information is determined to be valid, a first time is calculated based on the transmission rate; wherein, the first time is the estimated time for the firmware program to clear the maximum cache data; A second time is determined based on the amount of data; wherein, the second time is the time during which the first time is calibrated. Determine the estimated third time from when the synchronization information is uploaded from the firmware program to when the driver processing is completed; The total duration is obtained by performing calculations on the time window length, the first time, the second time, and the third time.

[0085] In one possible implementation, the device is also used for: Calculate the first difference between the time window length and the first time. Calculate the second difference between the first difference and the third time; The total duration is obtained by calculating the sum of the second difference and the second time.

[0086] In one possible implementation, the device is also used for: Determine the maximum amount of cached data in the firmware program; The first time is obtained by calculating the ratio between the maximum buffered data size and the sending rate.

[0087] In one possible implementation, the device is also used for: If the amount of data not transmitted before the last channel switch is zero, the second time is determined to be a specified value less than or equal to zero; If the amount of untransmitted data before the last channel switch is greater than zero, the ratio between the amount of untransmitted data and the transmission rate is calculated to obtain the second time.

[0088] In one possible implementation, the device is also used for: If the operating mode of the communication chip is determined to be multi-channel switching mode based on the synchronization information, or if the time window length is greater than or equal to a preset threshold, the synchronization information is determined to be valid information.

[0089] In one possible implementation, the device is also used for: The driver uses a timer to count the total duration. After the timer expires, it stops sending data for the current communication identity and switches to the next communication identity to send data.

[0090] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0091] Corresponding to Figure 1 In addition to the data control method for multiple identities, this disclosure also provides an electronic device 50 such as... Figure 5 The diagram shown is a schematic representation of an electronic device 50 provided in an embodiment of this disclosure, including: The system includes a processor 51, a memory 52, and a bus 53. The memory 52 stores execution instructions and includes main memory 521 and external memory 522. The main memory 521, also called internal memory, temporarily stores the computational data in the processor 51, as well as data exchanged with external memory such as a hard disk. The processor 51 exchanges data with the external memory 522 through the main memory 521. When the electronic device 50 is running, the processor 51 communicates with the memory 52 through the bus 53, causing the processor 51 to execute the following instructions: Before the channel switch, the firmware program sends synchronization information to the driver program; wherein, the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switch; The total duration for sending data by the current communication identity is determined based on the time window length, the transmission rate, and the data volume. After the total duration is reached, data transmission for the current communication identity is stopped, and data transmission is switched to the next communication identity; wherein the termination time for data transmission for the current communication identity is earlier than the time when the firmware program performs channel switching.

[0092] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the multi-identity data control method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0093] This disclosure also provides a computer program product 60, such as... Figure 6 The diagram shown is a schematic diagram of the structure of a computer program product 60 provided in an embodiment of this disclosure. The computer program product 60 carries a computer program 61. The program included in the computer program 61 can be used to execute the steps of the multi-identity data control method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0094] The above description, with reference to the accompanying drawings, outlines a multi-identity data control method, apparatus, device, medium, and product according to embodiments of the present disclosure. In these embodiments, a terminal device comprising a main processor chip and a communication chip sends synchronization information to a driver program running on the main processor chip via firmware running on the communication chip before channel switching. This synchronization information includes the length of a time window for sending data for the current communication identity, the transmission rate of the current communication identity, and the amount of data not transmitted before the last channel switch. Then, the driver program determines the total duration for sending data for the current communication identity based on the time window length, transmission rate, and data amount. Finally, after the total duration is reached, data transmission for the current communication identity stops, and the program switches to sending data for the next communication identity. The termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching. By employing the above processing method, the total duration of data sent by the current communication identity is accurately calculated using three data points: the time window length for sending data to the current communication identity, the sending rate of the current communication identity, and the amount of data not sent before the last channel switch. Once the total duration is reached, the driver stops sending data to the current communication identity. This can prevent the current communication identity from continuing to occupy buffer space to a certain extent. Moreover, the termination time is earlier than the channel switch time, so as to release the buffer space in advance and ensure that the data is passed to the next communication identity after the buffer space is cleared. This effectively improves the throughput between multiple identities and avoids interruptions or performance degradation caused by insufficient buffer.

[0095] The basic principles of this disclosure have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this disclosure are merely examples and not limitations, and should not be considered as essential features of each embodiment of this disclosure. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the scope of this disclosure to the necessity of employing the aforementioned specific details for implementation.

[0096] The block diagrams of devices, apparatuses, devices, and systems disclosed herein are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0097] Additionally, as used herein, the "or" used in a list of items beginning with "at least one" indicates a separate list, such that a list of, for example, "at least one of A, B, or C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not imply that the described example is preferred or better than other examples.

[0098] It should also be noted that in the systems and methods of this disclosure, the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered as equivalent solutions to this disclosure.

[0099] Various changes, substitutions, and modifications can be made to the technology described herein without departing from the teachings defined by the appended claims. Furthermore, the scope of the claims of this disclosure is not limited to the specific aspects of the processes, machines, manufactures, events, means, methods, and actions described above. Currently existing or later-developed processes, machines, manufactures, events, means, methods, or actions that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein can be utilized. Therefore, the appended claims include such processes, machines, manufactures, events, means, methods, or actions within their scope.

[0100] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0101] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A data control method for multiple identities, characterized in that, Applied to terminal devices containing a main processor chip and a communication chip, wherein a driver runs on the main processor chip and firmware runs on the communication chip, including: Before the channel switch, the firmware program sends synchronization information to the driver program; wherein, the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switch; The total duration for sending data by the current communication identity is determined based on the time window length, the transmission rate, and the data volume. After the total duration is reached, data transmission for the current communication identity is stopped, and data transmission is switched to the next communication identity; wherein the termination time for data transmission for the current communication identity is earlier than the time when the firmware program performs channel switching.

2. The method according to claim 1, characterized in that, The determination of the total duration for sending data based on the time window length, the transmission rate, and the data volume for the current communication identity includes: If the synchronization information is determined to be valid, a first time is calculated based on the transmission rate; wherein, the first time is the estimated time for the firmware program to clear the maximum cache data; A second time is determined based on the amount of data; wherein, the second time is the time during which the first time is calibrated. Determine the estimated third time from when the synchronization information is uploaded from the firmware program to when the driver processing is completed; The total duration is obtained by performing calculations on the time window length, the first time, the second time, and the third time.

3. The method according to claim 2, characterized in that, The step of performing calculations on the time window length, the first time, the second time, and the third time to obtain the total duration includes: Calculate the first difference between the time window length and the first time. Calculate the second difference between the first difference and the third time; The total duration is obtained by calculating the sum of the second difference and the second time.

4. The method according to claim 2, characterized in that, The calculation of the first time based on the transmission rate includes: Determine the maximum amount of cached data in the firmware program; The first time is obtained by calculating the ratio between the maximum buffered data size and the sending rate.

5. The method according to claim 2, characterized in that, Determining the second time based on the amount of data includes: If the amount of data not transmitted before the last channel switch is zero, the second time is determined to be a specified value less than or equal to zero; If the amount of untransmitted data before the last channel switch is greater than zero, the ratio between the amount of untransmitted data and the transmission rate is calculated to obtain the second time.

6. The method according to claim 2, characterized in that, The method further includes: If the operating mode of the communication chip is determined to be multi-channel switching mode based on the synchronization information, or if the time window length is greater than or equal to a preset threshold, the synchronization information is determined to be valid information.

7. The method according to claim 1, characterized in that, The driver uses a timer to count the total duration. After the timer expires, it stops sending data for the current communication identity and switches to the next communication identity to send data.

8. A multi-identity data control device, characterized in that, This is implemented in a terminal device that includes a main processor chip and a communication chip. The main processor chip runs a driver program, and the communication chip runs firmware, including: An information sending unit is used to send synchronization information from the firmware program to the driver program before channel switching; wherein, the synchronization information includes the length of the time window for sending data for the current communication identity, the sending rate of the current communication identity, and the amount of data that was not sent before the last channel switching; The determining unit is configured to determine the total duration for sending data for the current communication identity based on the time window length, the sending rate, and the data volume. An identity switching unit is used to stop sending data for the current communication identity and switch to sending data for the next communication identity after the total duration has been reached; wherein the termination time for sending data for the current communication identity is earlier than the time when the firmware program performs channel switching.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the multi-identity data control method as described in any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product is stored in a storage medium, and the program product is executed by at least one processor to implement the multi-identity data control method as described in any one of claims 1 to 7.