Data transmission method and apparatus

By combining multiple target data into data blocks for transmission, the problem of low efficiency caused by small data packets in wireless transmission is solved, improving overall transmission efficiency and reducing resource consumption.

CN115714992BActive Publication Date: 2026-02-13BEIJING ESWIN COMPUTING TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211255067.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2026-02-13
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

During wireless transmission, when the data packet size is small, the data transmission efficiency between electronic devices is low, resulting in limited overall transmission efficiency.

Method used

Multiple target data are combined into data blocks according to preset rules, and the data blocks are sent to the target end for processing. The target end includes the main chip end and the wireless transmission end.

Benefits of technology

It improves data transmission efficiency, avoids the problem of low transmission efficiency caused by small target data volume, and reduces the resource occupation and consumption of the target end when receiving data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115714992B_ABST
    Figure CN115714992B_ABST
Patent Text Reader

Abstract

The application discloses a data transmission method and device, and relates to the technical field of communication. The method comprises the following steps: acquiring a plurality of target data to be transmitted; combining the plurality of target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used for limiting the number of target data when the data block is combined; and sending the data block to a target end, so that the target end processes the data block, wherein the target end comprises a main chip end and a wireless transmission end.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a data transmission method and device. BACKGROUND

[0002] With the development of science and technology, the wireless transmission technology of electronic devices also progresses. In the process of transmitting data using wireless transmission technology, the specific sending and receiving are generally performed by the wireless transmission module built-in in the electronic device, that is, the wireless transmission end. That is to say, when the main chip end processes the data and obtains the data to be transmitted, the data to be transmitted is first sent to the wireless transmission end, and then the wireless transmission end transmits the data to be transmitted to other electronic devices by using the wireless transmission mode. Conversely, when the electronic device receives data based on the wireless transmission technology, the wireless transmission end first receives the data, and then transmits the data to the main chip end for processing.

[0003] At present, in the process of transmitting data by using the wireless transmission technology, multiple different data need to be divided into different data packets and transmitted between the main chip end and the wireless transmission end in turn. When the data amount of each data packet is small, for example, the data amount of each data packet is 1 kb or 2 kb, the transmission between the electronic devices is performed at the speed of kilobyte level, so that the data transmission efficiency between the electronic devices is low. SUMMARY

[0004] Embodiments of the present application provide a data transmission method and device, and the main purpose is to implement a data transmission method, which aims to improve the efficiency of data transmission in the wireless transmission process.

[0005] To solve the above technical problems, embodiments of the present application provide the following technical solutions:

[0006] In a first aspect, the present application provides a data transmission method, which comprises:

[0007] obtaining multiple target data to be transmitted;

[0008] combining the multiple target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used to limit the number of target data when the data block is combined;

[0009] sending the data block to a target end so that the target end processes the data block, wherein the target end includes a main chip end and a wireless transmission end.

[0010] Optionally, the obtaining of the multiple target data to be transmitted comprises:

[0011] when it is determined that there are multiple target data, the multiple target data are obtained based on a preset time period.

[0012] Optionally, the acquiring the target data based on the preset time period when it is determined that there are multiple target data comprises:

[0013] starting timing when the first target data is detected, and recording the starting time;

[0014] determining whether there is next target data in the process from the starting time to the ending time, wherein the ending time is determined based on the starting time and the preset time period;

[0015] if there is, re-timing until the target data is not detected within the preset time period, and acquiring the target data detected within multiple preset time periods.

[0016] Optionally, the combining the target data according to the preset rule to obtain the data block comprises:

[0017] combining the target data, and adding data block header information to obtain the data block; wherein the data block header information is used to represent the number of the target data contained in the data block and attribute information of each target data; the attribute information at least includes data length and processing priority.

[0018] Optionally, the combining the target data comprises:

[0019] determining a first transmission limit value, and determining the combination number of the target data when the data block is combined based on the first transmission limit value, wherein the first transmission limit value is used to represent the maximum data amount allowed in single transmission;

[0020] combining the target data corresponding to the combination number.

[0021] Optionally, the determining the first transmission limit value and determining the combination number of the target data when the data block is combined based on the first transmission limit value comprises:

[0022] acquiring attribute information of a transmission channel, and determining the first transmission limit value of the transmission channel based on the attribute information;

[0023] determining the combination number based on the first transmission limit value and the data amount of the target data.

[0024] Optionally, the combining the target data comprises:

[0025] obtaining a second transmission limit value, and determining the second transmission limit value as the combination number, wherein the second transmission limit value is a number of target data allowed for single transmission based on a preset instruction;

[0026] combining the target data corresponding to the combination number.

[0027] Optionally, the combining the target data includes:

[0028] obtaining a performance parameter of a target end, the performance parameter being used to represent a number of target data processed simultaneously;

[0029] determining the combination number according to the performance parameter, and combining the target data corresponding to the combination number.

[0030] Optionally, the obtaining the performance parameter of the target end includes:

[0031] obtaining memory information of the target end, and determining the performance parameter based on the memory information and a data amount of the target data, the memory information being used to represent a maximum data amount allowed to be processed simultaneously by the main chip end.

[0032] In a second aspect, the present application further provides a data transmission method, the method including:

[0033] an obtaining unit, configured to obtain a plurality of target data to be transmitted;

[0034] a combining unit, configured to combine the target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used to limit a number of target data when the data block is combined;

[0035] a sending unit, configured to send the data block to a target end, so that the target end processes the data block, wherein the target end includes a main chip end and a wireless transmission end.

[0036] Optionally, the obtaining unit is specifically configured to obtain the target data based on a preset time period when it is determined that there are a plurality of target data.

[0037] Optionally, the obtaining unit includes:

[0038] a timing module, configured to start timing when a first target data is detected, and record a starting time;

[0039] a judging module, configured to judge whether there is a next target data in a process from the starting time to a stopping time, wherein the stopping time is determined based on the starting time and the preset time period.

[0040] The acquisition module is configured to acquire the target data detected in the plurality of preset time periods if it is determined that the next target data exists in the process from the start time to the end time.

[0041] Optionally, the combination unit is specifically configured to combine the plurality of target data, and obtain the data block by adding data block header information, wherein the data block header information is used to represent the number of the target data contained in the data block and attribute information of each target data; and the attribute information at least includes data length and processing priority.

[0042] Optionally, the combination unit includes:

[0043] The first determination module is configured to determine a first transmission limit value, and determine the combination number of the target data when the data block is combined based on the first transmission limit value, wherein the first transmission limit value is used to represent the maximum data amount allowed in single transmission.

[0044] The combination module is configured to combine the target data corresponding to the combination number.

[0045] Optionally, the first determination module includes:

[0046] The first determination submodule is configured to acquire attribute information of a transmission channel, and determine the first transmission limit value of the transmission channel based on the attribute information.

[0047] The second determination submodule is configured to determine the combination number based on the first transmission limit value and the data amount of the target data.

[0048] Optionally, the combination unit further includes:

[0049] The second determination module is configured to acquire a second transmission limit value, and determine the second transmission limit value as the combination number, wherein the second transmission limit value is the number of target data allowed in single transmission based on a preset instruction.

[0050] The combination module is further configured to combine the target data corresponding to the combination number.

[0051] Optionally, the combination unit further includes:

[0052] The acquisition module is configured to acquire a performance parameter of a target end, wherein the performance parameter is used to represent the number of target data processed at the same time.

[0053] A third determining module is configured to determine the combination number according to the performance parameter, and combine the target data corresponding to the combination number.

[0054] Optionally, the obtaining module is specifically configured to obtain memory information of the target end, and determine the performance parameter based on the memory information and a data amount of the target data, wherein the memory information is used to represent a maximum data amount allowed to be processed simultaneously by the master chip end.

[0055] In a third aspect, the present application further provides a computer readable storage medium, which comprises a stored program, wherein the program controls a device where the computer readable storage medium is located to perform the data transmission method in the first aspect when the program is running.

[0056] In a fourth aspect, the present application further provides a chip, which comprises a computer readable storage medium and one or more processors, wherein the computer readable storage medium is coupled with the processor, the processor is configured to execute program instructions stored in the computer readable storage medium, and the program instructions perform the data transmission method in any one of the first aspect when running.

[0057] By means of the above technical solution, the technical solution provided by the present application has at least the following advantages:

[0058] The application provides a data transmission method and device. The application can obtain multiple target data to be transmitted, combine the multiple target data according to a preset rule to obtain a data block, and send the data block to a target end to process the data block, thereby realizing the data transmission function. Compared with the prior art, in the data transmission process, the data block contains two or more target data, which ensures that when there are two or more target data, the target data is not transmitted sequentially but combined into a data block for transmission at one time, thereby avoiding the problem of low transmission efficiency caused by transmitting a single target data each time when the data amount of the target data is small, and improving the data transmission efficiency. Meanwhile, the target end includes a main chip end and a wireless transmission end, that is, the application can ensure that whether the data is transmitted from the main chip end to the wireless transmission end or the data is received by the wireless transmission end and then transmitted to the main chip end, the target data can be combined into a data block for transmission according to the above method, thereby ensuring that whether the electronic device transmits data or receives data, the problem of slow data transmission between the main chip end and the wireless transmission end restricting the overall wireless transmission efficiency can be avoided, thereby improving the efficiency of receiving and transmitting data. In addition, the target end will not trigger a receiving event in the process of receiving the target data each time, thereby reducing the number of receiving events that the target end needs to process when receiving data, and reducing the resource occupation and consumption of the target end.

[0059] The above description is only a summary of the technical scheme of the application. In order to more clearly understand the technical means of the application, the application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the application more obvious and easy to understand, the following specific embodiments of the application are described. BRIEF DESCRIPTION OF DRAWINGS

[0060] The above and other objects, features and advantages of the exemplary embodiments of the present application will be more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which several embodiments of the present application are shown by way of example, and wherein like or corresponding elements refer to like or corresponding parts thereof. In the drawings:

[0061] Figure 1 A flow chart of a data transmission method provided by an embodiment of the application is shown;

[0062] Figure 2 A schematic diagram of a data transmission method provided by an embodiment of the application in a specific application scenario is shown;

[0063] Figure 3 a constituent block diagram of a data transmission apparatus provided by an embodiment of the present application is shown;

[0064] Figure 4 a constituent block diagram of another data transmission apparatus provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0065] Exemplary embodiments of the present application will be described in detail with reference to the drawings. Although exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the application to those skilled in the art.

[0066] It should be noted that, unless otherwise specified, technical terms or scientific terms used in the present application should be understood as their common meanings to those skilled in the art to which the present application pertains.

[0067] An embodiment of the present application provides a flowchart of a data transmission method, which is applied to a slave device, such as a wireless transmission end in an electronic device. Figure 1 As shown in the figure, the method comprises the following steps.

[0068] 101. Obtain a plurality of target data to be transmitted.

[0069] In the present embodiment, the method is applied to a data transmission process between a master chip end and a wireless transmission end in an electronic device, which includes a process of transmitting data from the internal master chip end to the wireless transmission end when the electronic device sends data to the outside world, and a process of transmitting data from the internal wireless transmission end to the master chip end when the electronic device receives data sent by the outside world. Therefore, based on different processes, the execution subject of the present embodiment is also different.

[0070] Here, in order to facilitate description, the method of the present embodiment is applied to the process of sending data to the outside world by the electronic device, so that the execution subject of the present embodiment is the master chip end. Based on this, in the present step, when the master chip end obtains data that needs to be transmitted to the outside world after processing, it needs to determine which data is the target data that needs to be sent to the wireless transmission end, and obtain the target data.

[0071] 102. Combine the plurality of target data according to a preset rule to obtain a data block.

[0072] Among them, the data block contains two or more target data; the preset rule is used to limit the number of target data when combining the data block.

[0073] After the above steps obtain multiple target data, the multiple target data blocks need to be combined. The combination process selects a certain number of target data according to a preset rule. The method described in the embodiment is mainly to improve the efficiency of data transmission, so the number of selected target data is greater than or equal to two or more, that is, when there are multiple target data, at least two target data are selected to form a data block. In addition, it should be noted that the number of target data defined by the preset rule in the embodiment can be selected based on the needs of the user, and of course, the transmission bandwidth of the transmission channel between the main chip end and the wireless transmission end should also be considered to avoid the problem that the overall data amount of the data block composed of too much target data is too large to be sent at a time.

[0074] 103. Transmitting the data block to the target end for processing by the target end.

[0075] The target end includes a main chip end and a wireless transmission end.

[0076] After the multiple target data are combined into a data block, the data block can be directly transmitted to the target end, that is, the wireless transmission end. The specific transmission method can be selected according to the transmission channel between the main chip end and the wireless transmission end, which includes but is not limited to a USB channel (Universal Serial Bus, USB for short), a PCIE channel (peripheral component interconnect express, PCIE for short), and an SDIO channel (Secure Digital Input and Output, SDIO for short). In this way, it is ensured that multiple target data can be transmitted in the form of a data block during data transmission, avoiding the waste of transmission channel bandwidth caused by transmitting one target data at a time, and improving the data transmission efficiency. Moreover, after the target end receives the data block, it is parsed, which is equivalent to receiving multiple target data at the same time, avoiding the process of triggering a receiving event and processing each time when the target end receives target data in a conventional manner, thereby avoiding the problem of resource occupation and consumption of the target end caused by processing these events.

[0077] In an optional implementation, the method described in the embodiment can be applied to a system as shown in FIG. 1. Figure 2The system architecture shown. Among them, when the embodiment of the method is applied to the scene of the smart TV interacting with the router, the execution subject of the above-mentioned method of the embodiment can be HOST (i.e. the main chip end), and the target end is SLAVE wireless transmission module (i.e. the wireless transmission end) at this time. When it is detected that there is target data, the main chip end (HOST) combines multiple target data to obtain a data block, and then sends the data block to the target end (SLAVE wireless transmission module) through the USB channel. After that, the target end sends the data block to the external router through the wireless transmission technology, so as to realize the data transmission function with the external network. Similarly, when the external network sends target data to the smart TV through the router, the execution subject of the above-mentioned method can be SLAVE wireless transmission module (i.e. the wireless transmission end) at this time, and the target end is HOST (i.e. the main chip end). At this time, the SLAVE wireless transmission module combines multiple target data into a data block, and then sends the data block to the target end HOST through the USB channel, so that the target end HOST processes it. In this way, through the above-mentioned interaction process, the communication function between the smart TV and the external network is realized, and the normal video playing effect is realized.

[0078] Based on this, the embodiment provides a data transmission method. Compared with the prior art, in the data transmission process, since the data block contains two or more target data, it can be ensured that when there are two or more target data during data transmission, they do not need to be sent one by one, but can be combined into a data block for transmission at one time, thereby avoiding the problem of low transmission efficiency caused by transmitting a single target data each time when the data amount of the target data is small. The efficiency of data transmission can be improved. At the same time, since the target end includes the main chip end and the wireless transmission end, that is, during the execution of the application, whether the data is transmitted from the main chip end to the wireless transmission end or the data is received by the wireless transmission end and then transmitted to the main chip end, the target data can be combined into a data block for transmission according to the above-mentioned method, so that the problem of slow data transmission between the main chip end and the wireless transmission end can be avoided, thereby improving the efficiency of receiving and transmitting data. In addition, since the transmission data is no longer transmitted one by one, the target end can avoid triggering the receiving event during the process of receiving the target data each time, thereby reducing the number of receiving events that need to be processed by the target end when receiving data, and further reducing the resource occupation and consumption of the target end.

[0079] In some embodiments, the acquiring of the plurality of target data to be transmitted in step 101 of the foregoing embodiments, when executed, can include: when it is determined that there are a plurality of target data, acquiring the plurality of target data based on a preset time period.

[0080] Since some data needs to be guaranteed to be effective during transmission, in this embodiment, the process of acquiring the plurality of target data to be transmitted also needs to consider acquiring according to a preset time period, that is, when there are a plurality of target data, it is necessary to determine which of these target data belong to data that need to be transmitted urgently and acquire such data based on the preset time period set by the user in advance. In this way, when there are a large number of target data, the data that need to be transmitted urgently can be selected based on the preset time period, so as to ensure that when there are a large number of target data, the data that need to be transmitted urgently can be selected based on the preset time period, so as to ensure the timeliness of the data.

[0081] In addition, during the execution of this step, real-time judgment can also be made based on the preset time period to determine whether new target data to be transmitted has appeared, and judgment is made based on the preset time period. When no new target data to be transmitted appears within the preset time period, the target data that have been determined are acquired for subsequent steps to combine data blocks, so as to avoid the problem of affecting timeliness due to waiting for other target data for too long.

[0082] In some embodiments, when it is determined that there are a plurality of target data in the foregoing steps, the plurality of target data are acquired based on a preset time period, which, when executed, can include:

[0083] When the first target data is detected, the timing starts, which is recorded as a starting time;

[0084] determining whether there is a next target data from the starting time to a termination time, wherein the termination time is determined based on the starting time and the preset time period;

[0085] If there is, the timing is restarted until the target data is not detected within the preset time period, and the target data detected within a plurality of preset time periods are acquired.

[0086] In practical applications, target data does not appear all at once but rather sequentially. For example, when the target device is the main chip, the execution entity of the method in this embodiment is the wireless transmission device. In this case, the target data is received by the electronic device from an external source. The target data is transmitted sequentially by other external devices via wireless transmission and acquired one by one by the wireless transmission device. Therefore, according to the method of this embodiment, after detecting data A transmitted from the external source (i.e., the first target data), a timer is started. The current time is 6:21:15 (i.e., the start time). In this example, the preset time period is 1 minute, which determines the end time as 6:22:15. Then, it is determined whether the next target data can be detected between the detection of data A and 6:22:15. If data B is detected during this process, that is, the next target data is detected, and the current time is determined to be 6:22:03, then the timer is restarted, and it is determined whether another target data can be detected between 6:22:03 and 6:23:03 (the new end time). If the target data is not detected again by 6:23:03, it means that no data was sent from the outside after data B was detected. At this time, the detected data A and data B can be retrieved.

[0087] By timing the process after detecting the first target data and determining whether there is another target data between the start and end times based on a preset time period, the system ensures that the timeliness of data transmission is not affected by waiting for subsequent target data. This ensures that the data processed by the main chip can be sent out in a timely manner, or that the external data received by the wireless transmission terminal can be sent to the main chip for processing in a timely manner, so that the data processing process is not affected by the "data waiting" problem.

[0088] In some embodiments, step 102 of the foregoing embodiments, which combines multiple target data according to preset rules to obtain a data block, may include the following during execution:

[0089] Multiple target data sets are combined, and data block header information is added to obtain the data block. The data block header information is used to characterize the number of target data sets contained in the data block, and the attribute information of each target data set; the attribute information includes at least the data length and processing priority.

[0090] Since the data block formed in the process of combining multiple target data needs to be parsed and restored into the original target data for processing in sequence after being transmitted to the target end, in order to ensure successful data parsing, some related information and parameters of the target data need to be added in the process of combining the data block to enable the target end to parse successfully subsequently. The related information and parameters in this step can be understood as the data block header information mentioned above, which not only represents the number of target data in the current data block, but also involves the attribute information of each target data, which indicates the data length of each target data and the processing priority required for subsequent processing. In this way, the target end can parse and split based on the number of target data and the data length of each target data determined in the data block header information after receiving the data block, thereby ensuring the accuracy of restoring the data block into target data. At the same time, the processing priority in the attribute information of each target data can provide a basis for processing which target data first in the target end operation, ensuring the effect of processing urgent data first.

[0091] In some embodiments, in the foregoing step, combining the plurality of target data comprises:

[0092] determining a first transmission limit value, and determining the combination number of the target data when combining the data block based on the first transmission limit value, the first transmission limit value being used to represent the maximum data amount allowed in single transmission;

[0093] combining the target data corresponding to the combination number.

[0094] In the data transmission process, the number of target data selected for combination when the target data is combined into a data block is not unlimited, so the number of target data selected for combination needs to be determined when combining. In this embodiment, the combination number is determined based on the maximum data amount allowed in single transmission of the transmission channel, that is, based on the first transmission limit value.

[0095] Since the combination number is determined based on the maximum data amount allowed in single transmission in this embodiment, it is ensured that the combination number can be selected based on the performance threshold of single transmission of the transmission channel in the data transmission process, thereby avoiding the problem that the combined data block exceeds the maximum data amount allowed in single transmission when the combination number of the target data is too large, avoiding the problem that the data block is too large to cause the transmission process to be split and transmitted again, and ensuring the transmission efficiency.

[0096] In some embodiments, since the first transmission limit value represents the maximum data amount allowed in a single transmission, and the maximum data amount is actually different based on different transmission channels. Based on this, the determination of the first transmission limit value in the foregoing step, and the determination of the combination number of the target data when combining the data blocks based on the first transmission limit value, when executed, can include:

[0097] First, the attribute information of the transmission channel is obtained, and the first transmission limit value of the transmission channel is determined based on the attribute information;

[0098] Then, based on the first transmission limit value and the data amount of the target data, the combination number is determined.

[0099] Since in actual applications, the transmission channels are different, the ways and protocols of transmitting data are also different, for example, the maximum data amount allowed in a single transmission is different between USB channels and PCIE channels.

[0100] Based on this, in the present embodiment, it is necessary to first obtain the attribute information of the transmission channel, and determine the maximum data amount allowed in a single data transmission of the current transmission channel based on the attribute information, that is, the first transmission limit value. In this way, in the manner of determining the combination number based on the first transmission limit value determined by the attribute information of the transmission channel, the size of the data amount of the combined data blocks can be limited from the perspective of the data amount, so as to ensure that the transmitted data blocks can avoid exceeding the first transmission limit, and also ensure that the bandwidth of the transmission channel is utilized as much as possible, and the transmission efficiency is improved.

[0101] In some embodiments, in order to ensure flexible control in the data transmission process, the combination number of the data blocks in the transmission can also be limited based on the user's instruction, that is, the number of target data allowed in a single transmission can also be directly set as the combination number based on the user's instruction.

[0102] Based on this, in the foregoing step, combining the plurality of target data includes:

[0103] Obtaining a second transmission limit value, and determining the second transmission limit value as the combination number, wherein the second transmission limit value is the number of target data allowed in a single transmission based on a preset instruction;

[0104] Combining the target data corresponding to the combination number.

[0105] In this step, the user can set the number of target data allowed for single transmission in advance through preset instructions to obtain a second transmission limit value, and in this case, the second transmission limit value can be directly determined as the combination number in the process of combining target data, so that the user can control the combination number of target data when combining data blocks based on instructions, thereby achieving the effect of flexible control of the transmission process.

[0106] In some embodiments, the combining of the plurality of target data in the foregoing step comprises:

[0107] Obtaining a performance parameter of the target end, the performance parameter being used to represent the number of target data processed simultaneously;

[0108] Determining the combination number according to the performance parameter, and combining the target data corresponding to the combination number.

[0109] As can be known from the embodiment step 101, when the target end is the main chip end, the execution subject of the method of the embodiment is the wireless transmission end, and then in the process of transmitting data to the main chip end, the processing capability of the main chip, that is, the performance parameter, needs to be considered, and then the combination number is determined based on the performance parameter, that is, when the main chip end can process four target data simultaneously, the combination number is four, so that in the process of combining data blocks each time, the processing capability of the main chip end can be used to select an adaptive number of target data for the combination of data blocks, thereby avoiding the problem that the main chip end cannot process the target data combined in excess simultaneously, resulting in data accumulation, and also avoiding the problem that the main chip end cannot fully exert its performance due to too few target data, thereby wasting the processing resources of the main chip end.

[0110] In some embodiments, since the performance of the target end is mainly determined based on the memory thereof, the performance parameter of the main chip end can be determined based on the memory information in the process of determining the performance parameter.

[0111] Based on this, the performance parameter of the target end obtained in the foregoing step comprises:

[0112] Obtaining the memory information of the target end, and determining the performance parameter based on the memory information and the data amount of the target data, the memory information being used to represent the maximum data amount allowed to be processed simultaneously by the main chip end.

[0113] For example, when the target end is the wireless transmission end and the memory information thereof is 1 MB, and when the data amount of the target data is determined to be 100 KB, the performance parameter 10 can be determined based on the method of this step, that is, the number of target data that can be processed simultaneously by the target end is 10.

[0114] Further, as to the above Figure 1In order to achieve the method, another embodiment of the present application further provides a data transmission device. The device embodiment corresponds to the foregoing method embodiment, and for the sake of reading, the details of the foregoing method embodiment will not be described one by one, but it should be clear that the device in the embodiment can correspondingly implement all the contents in the foregoing method embodiment. In order to implement a data transmission method, the device aims to improve the efficiency of data transmission in the wireless transmission process, and specifically as Figure 3 As shown, the device comprises:

[0115] The acquisition unit 21 can be used to acquire a plurality of target data to be transmitted.

[0116] The combination unit 22 can be used to combine a plurality of target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule can be used to limit the number of target data when combining the data block.

[0117] The sending unit 23 can be used to send the data block to a target end, so that the target end processes the data block, and the target end includes a main chip end and a wireless transmission end.

[0118] Further, as shown, Figure 4 The acquisition unit 21 can be specifically used to acquire a plurality of target data based on a preset time period when it is determined that there are a plurality of target data.

[0119] Further, as shown, Figure 4 The acquisition unit 21 comprises:

[0120] The timing module 211 can be used to start timing when the first target data is detected, and the starting time is recorded.

[0121] The judgment module 212 can be used to judge whether there is a next target data from the starting time to the ending time, wherein the ending time is determined based on the starting time and the preset time period.

[0122] The acquisition module 213 can be used to acquire the target data detected in a plurality of preset time periods if it is judged that there is a next target data from the starting time to the ending time, and then restart timing until the target data is not detected within the preset time period.

[0123] Further, as shown, Figure 4As shown, the combination unit 22 can be specifically configured to combine a plurality of target data, and add data block header information to obtain the data block; wherein the data block header information can be used to represent the number of target data contained in the data block, and attribute information of each target data; the attribute information at least includes data length and processing priority.

[0124] Further, as shown in the figure, Figure 4 The combination unit 22 includes:

[0125] The first determination module 221 can be configured to determine a first transmission limit value, and determine the combination number of the target data when combining the data block based on the first transmission limit value; the first transmission limit value can be used to represent the maximum data amount allowed in single transmission;

[0126] The combination module 222 can be configured to combine the target data corresponding to the combination number.

[0127] Further, as shown in the figure, Figure 4 The first determination module 221 includes:

[0128] The first determination sub-module 2211 can be configured to obtain attribute information of a transmission channel, and determine the first transmission limit value of the transmission channel based on the attribute information;

[0129] The second determination sub-module 2212 can be configured to determine the combination number based on the first transmission limit value and the data amount of the target data.

[0130] Further, as shown in the figure, Figure 4 The combination unit 22 further includes:

[0131] The second determination module 223 can be configured to obtain a second transmission limit value, and determine the second transmission limit value as the combination number; wherein the second transmission limit value is the number of target data allowed in single transmission based on a preset instruction;

[0132] The combination module 222 can be further configured to combine the target data corresponding to the combination number.

[0133] Further, as shown in the figure, Figure 4 The combination unit 22 further includes:

[0134] The acquisition module 224 can be configured to obtain a performance parameter of a target end, the performance parameter can be used to represent the number of target data processed at the same time;

[0135] The third determining module 225 can be used for determining the combination number according to the performance parameter, and combining the target data corresponding to the combination number.

[0136] Further, as shown in Figure 4 The obtaining module 224 can be specifically used for obtaining memory information of the target end, and determining the performance parameter based on the memory information and the data amount of the target data. The memory information can be used for representing the maximum data amount allowed to be processed simultaneously by the host chip end.

[0137] In order to achieve the above-mentioned purpose, according to another aspect of the present application, the embodiments of the present application further provide a computer readable storage medium, the computer readable storage medium includes stored programs, wherein the programs control the device where the computer readable storage medium is located to execute the data transmission method described above when the programs run.

[0138] In order to achieve the above-mentioned purpose, according to another aspect of the present application, the embodiments of the present application further provide a data transmission device, the device includes a computer readable storage medium; and one or more processors, the computer readable storage medium is coupled with the processor, the processor is configured to execute the program instructions stored in the computer readable storage medium; the program instructions run to execute the data transmission method described above.

[0139] The embodiment of the present application provides a data transmission method and device, the embodiment of the present application can obtain a plurality of target data to be transmitted, the plurality of target data is combined according to a preset rule to obtain a data block, and the data block is sent to a target end, so that the target end processes the data block, thereby realizing the data transmission function. Compared with the prior art, in the data transmission process, the data block contains two or more target data, which can ensure that when two or more target data exist in the data transmission process, the target data is not transmitted sequentially, but combined into a data block for transmission at a time, thereby avoiding the problem of low transmission efficiency caused by transmitting a single target data each time when the data amount of the target data is small. The efficiency of data transmission can be improved. At the same time, since the target end includes a main chip end and a wireless transmission end, that is, the execution process of the present application can ensure that whether the data is transmitted from the main chip end to the wireless transmission end or the data is transmitted from the wireless transmission end to the main chip end after being received, the target data can be combined into a data block for transmission according to the above method, so that the problem of slow data transmission between the main chip end and the wireless transmission end can be avoided, thereby improving the efficiency of receiving and transmitting data. In addition, since the transmission data is no longer transmitted sequentially, the target end can avoid triggering the receiving event in the process of receiving the target data each time, thereby reducing the number of receiving events that need to be processed by the target end when receiving data, and then reducing the resource occupation and consumption of the target end.

[0140] The data transmission device includes a processor and a memory, and the acquisition unit, the combination unit and the sending unit are all stored in the memory as program units, and the corresponding functions are realized by the processor executing the program units stored in the memory.

[0141] The processor includes a core, and the core retrieves the corresponding program unit from the memory. The core can be set to one or more, and the efficiency of data transmission in the wireless transmission process is improved by adjusting the core parameters.

[0142] The embodiment of the present application provides a chip, which includes a computer readable storage medium and one or more processors, the computer readable storage medium is coupled with the processor, the processor is configured to execute program instructions stored in the computer readable storage medium, and the program instructions run to execute the data transmission method of any one of the preceding embodiments.

[0143] The embodiment of the present application provides a computer readable storage medium, the computer readable storage medium comprises a stored program, wherein the computer readable storage medium controls the device to execute the data transmission method when the program runs.

[0144] The computer readable storage medium can comprise a non-permanent memory in the computer readable medium, random access memory (RAM) and / or non-volatile memory such as read only memory (ROM) or flash memory (flash RAM), and the memory comprises at least one memory chip.

[0145] The embodiment of the present application provides a device, the device comprises a processor, a memory and a program stored in the memory and executable on the processor, and the processor executes the program to realize the following steps: obtaining a plurality of target data to be transmitted; combining the plurality of target data according to a preset rule to obtain a data block, wherein the data block comprises two or more target data, and the preset rule is used to limit the number of target data when the data block is combined; and sending the data block to a target end, so that the target end processes the data block, and the target end comprises a main chip end and a wireless transmission end.

[0146] Further, the obtaining a plurality of target data to be transmitted comprises:

[0147] When it is determined that there are a plurality of target data, the plurality of target data are obtained based on a preset time period.

[0148] Further, when it is determined that there are a plurality of target data, the plurality of target data are obtained based on a preset time period, comprising:

[0149] When the first target data is detected, the timing starts, and the starting time is recorded;

[0150] It is judged whether there is next target data in the process from the starting time to the ending time, wherein the ending time is determined based on the starting time and the preset time period;

[0151] If there is, the timing is restarted until the target data is not detected within the preset time period, and the target data detected within a plurality of preset time periods is obtained.

[0152] Further, the combining the plurality of target data according to a preset rule to obtain a data block comprises:

[0153] The plurality of target data are combined, and data block header information is added to obtain the data block; wherein the data block header information is used to represent the number of target data contained in the data block and attribute information of each target data; the attribute information at least includes data length and processing priority.

[0154] Further, the combining of the plurality of target data comprises:

[0155] A first transmission limit value is determined, and the combination number of the target data when the data block is combined is determined based on the first transmission limit value; the first transmission limit value is used to represent the maximum data amount allowed in single transmission;

[0156] The target data corresponding to the combination number are combined.

[0157] Further, the determining of the first transmission limit value and the combination number of the target data when the data block is combined based on the first transmission limit value comprises:

[0158] Attribute information of a transmission channel is obtained, and the first transmission limit value of the transmission channel is determined based on the attribute information;

[0159] The combination number is determined based on the first transmission limit value and the data amount of the target data.

[0160] Further, the combining of the plurality of target data comprises:

[0161] A second transmission limit value is obtained, and the second transmission limit value is determined as the combination number; wherein the second transmission limit value is the number of target data allowed in single transmission based on a preset instruction;

[0162] The target data corresponding to the combination number are combined.

[0163] Further, the combining of the plurality of target data comprises:

[0164] A performance parameter of a target end is obtained, and the performance parameter is used to represent the number of target data processed simultaneously;

[0165] The combination number is determined according to the performance parameter, and the target data corresponding to the combination number are combined.

[0166] Further, the obtaining of the performance parameter of the target end comprises:

[0167] acquire memory information of the target end, and determine the performance parameter based on the memory information and a data amount of the target data, the memory information being used to represent a maximum data amount allowed to be processed simultaneously by the host chip end.

[0168] The application further provides a computer program product, which is adapted to execute program code for initializing the following method steps when executed on a data processing device: acquiring a plurality of target data to be transmitted; combining the plurality of target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used to limit the number of target data when the data block is combined; and sending the data block to a target end, so that the target end processes the data block, wherein the target end comprises a host chip end and a wireless transmission end.

[0169] Those skilled in the art should understand that embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer-usable program code.

[0170] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device implemented in the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the function specified in the flow(s) or block(s).

[0171] These computer program instructions can also be stored in a computer-readable memory that can direct the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including instruction apparatus, which implements the flowcharts and / or block diagrams. Figure 1 one or more flows and / or blocks Figure 1 an apparatus that carries out the function specified in the flow(s) or block(s).

[0172] These computer program instructions can also be loaded into a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 Figure 1

[0173] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0174] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM), electrically programmable read only memory (EPROM), electrically erasable programmable read only memory (EEPROM), flash memory, or other memory technologies, about which the processor can execute instructions. The memory is an example of computer readable media.

[0175] Computer readable media includes permanent and non-permanent, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory (ROM), electrically programmable read only memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to computing devices. According to the definition herein, computer readable media does not include transitory media, such as modulated data signals and carrier waves.

[0176] It should also be noted that the terms "comprising," "including," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements recited, but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0177] ​​Those skilled in the art will appreciate that embodiments of the present application can be devised for a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer-readable program code thereon for use by or in connection with an instruction execution system. For the purposes of this description, a computer-usable or computer readable storage medium can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The medium can be electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. The computer-usable or computer readable program code can be downloaded from an Internet website, server, or other remote source via a network or a data stream communication path. From the Internet website, server, or other remote source, the code can be downloaded into the instruction execution system, apparatus, or device where execution of the same can take place. The present application is directed to any number and type of computer-usable storage media, apparatuses, and devices self-evidently known to one of ordinary skill in the art.

[0178] The foregoing is merely illustrative of the principles of the application, and various modifications can be made by those skilled in the art. The present application is intended to embrace all such modifications and changes and aspects falling within the spirit and scope of the application. Accordingly, the above description is not intended as limiting, but merely as exemplification of the principles of the application.

Claims

1. A data transmission method, characterized by, The method comprises: acquiring a plurality of target data to be transmitted; combining the plurality of target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used to limit the number of target data when the data block is combined; sending the data block to a target end so that the target end processes the data block, wherein the target end comprises a main chip end and a wireless transmission end; wherein the acquiring a plurality of target data to be transmitted comprises: when it is determined that there are a plurality of target data, acquiring the plurality of target data based on a preset time period, wherein the preset time period is used to represent data that needs to be transmitted urgently; wherein the combining the plurality of target data according to a preset rule to obtain a data block comprises: combining the plurality of target data and adding data block header information to obtain the data block, wherein the data block header information is used to represent the number of target data contained in the data block and the attribute information of each target data; the attribute information at least includes data length and processing priority, so that the target end parses and splits based on the number of target data and the data length of each target data determined in the data block header information after receiving the data block, and the corresponding target data is processed preferentially based on the processing priority in the attribute information of each target data when the target end operates and processes.

2. The method of claim 1, wherein, The acquiring the plurality of target data based on a preset time period when it is determined that there are a plurality of target data comprises: starting timing when the first target data is detected, which is recorded as a starting time; judging whether there is a next target data in the process from the starting time to a termination time, wherein the termination time is determined based on the starting time and the preset time period; if there is, re-timing until the target data is not detected within the preset time period, and then acquiring the target data detected within a plurality of preset time periods.

3. The method of claim 1, wherein, The combining the plurality of target data comprises: determining a first transmission limit value and determining the combination number of target data when combining the data block based on the first transmission limit value, wherein the first transmission limit value is used to represent the maximum data amount allowed in a single transmission; combining the target data corresponding to the combination number.

4. The method of claim 3, wherein, The determining a first transmission limit value and determining the combination number of target data when combining the data block based on the first transmission limit value comprises: acquiring attribute information of a transmission channel and determining the first transmission limit value of the transmission channel based on the attribute information; determining the combination number based on the first transmission limit value and the data amount of the target data.

5. The method of claim 2, wherein, The combining the plurality of target data comprises: acquiring a second transmission limit value and determining the second transmission limit value as the combination number, wherein the second transmission limit value is the number of target data allowed in a single transmission based on a preset instruction; combining the target data corresponding to the combination number.

6. The method of claim 2, wherein, The combining the plurality of target data comprises: Obtaining a performance parameter of a target end, the performance parameter being used to represent a number of data processed simultaneously; Combining the target data corresponding to the combined number according to the performance parameter.

7. The method of claim 6, wherein, The obtaining of the performance parameter of the target end comprises: Obtaining memory information of the target end, and determining the performance parameter based on the memory information and a data amount of the target data, the memory information being used to represent a maximum data amount allowed to be processed simultaneously by the main chip end.

8. A data transmission apparatus, characterized by comprising: The device comprises: An obtaining unit, configured to obtain a plurality of target data to be transmitted; A combining unit, configured to combine the plurality of target data according to a preset rule to obtain a data block, wherein the data block contains two or more target data, and the preset rule is used to limit the number of target data when the data block is combined; A sending unit, configured to send the data block to a target end, so that the target end processes the data block, wherein the target end comprises a main chip end and a wireless transmission end; The obtaining unit is specifically configured to obtain the plurality of target data based on a preset time period when it is determined that there are a plurality of target data, wherein the preset time period is used to represent data urgently needed to be transmitted. The combining unit is specifically configured to combine the plurality of target data, and add data block header information to obtain the data block, wherein the data block header information is used to represent the number of target data contained in the data block and attribute information of each target data; the attribute information at least comprises data length and processing priority, so that the target end parses and splits the data block based on the number of target data and the data length of each target data determined in the data block header information after receiving the data block, and processes the corresponding target data preferentially based on the processing priority in the attribute information of each target data when operating and processing in the target end.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a stored program, wherein the program controls the device where the computer readable storage medium is located to execute the data transmission method in any one of claims 1-7 when the program is running.

10. A chip, characterized by The chip comprises a computer readable storage medium and one or more processors, the computer readable storage medium is coupled with the processor, the processor is configured to execute the program instruction stored in the computer readable storage medium, and the program instruction executes the data transmission method in any one of claims 1-7 when running.

Citation Information

Patent Citations

  • Data transmission method and electronic equipment

    CN112770356A

  • Data transmission method and device, electronic equipment and computer readable medium

    CN114745451A