CN115604123A - Data processing method, device, storage medium and chip system - Google Patents

Data processing method, device, storage medium and chip system Download PDF

Info

Publication number
CN115604123A
CN115604123A CN202110785349.0A CN202110785349A CN115604123A CN 115604123 A CN115604123 A CN 115604123A CN 202110785349 A CN202110785349 A CN 202110785349A CN 115604123 A CN115604123 A CN 115604123A
Authority
CN
China
Prior art keywords
data
bandwidth
service
service flow
flow data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110785349.0A
Other languages
Chinese (zh)
Inventor
何剑鸿
李小伟
金俊浩
韦志贵
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110785349.0A priority Critical patent/CN115604123A/en
Publication of CN115604123A publication Critical patent/CN115604123A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0896Bandwidth or capacity management, i.e. automatically increasing or decreasing capacities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a data processing method, data processing equipment, a storage medium and a chip system, relates to the technical field of data transmission, and can realize concurrent transmission of multi-stream services. The method comprises the following steps: determining bandwidth units corresponding to a plurality of items of service flow data to be processed respectively; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes; obtaining at least two data blocks with data size corresponding to the at least two bandwidth units according to the at least two bandwidth units; and integrating at least two data blocks to obtain an integrated target data stream.

Description

Data processing method, device, storage medium and chip system
Technical Field
The present application relates to the field of data transmission technologies, and in particular, to a data processing method, device, storage medium, and chip system.
Background
At present, high-speed data transmission interfaces such as Universal Serial BUS (USB) interfaces, DP (DisplayPort) interfaces, high Definition Multimedia Interfaces (HDMI) are widely used, and people not only have higher requirements on the transmission rate of the interfaces, but also expect that the same Interface can complete the transmission of multiple items or even multiple types of data. When multiple service flow data of different service classes are transmitted through the same interface at the same time, the total bandwidth of the link needs to be shared, and how to effectively distribute the link bandwidth among the multiple service flow data becomes one of the technical problems to be solved by the technical personnel in the field.
Disclosure of Invention
The application provides a data processing method, a device, a storage medium and a chip system, which can effectively allocate link bandwidth and realize multi-stream concurrent transmission of service stream data.
In a first aspect, the present technical solution provides a data processing method, which is applied to a first device, where the first device is configured to send data through a data transmission interface; the method comprises the following steps: determining bandwidth units respectively corresponding to a plurality of items of service flow data to be processed; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes; obtaining at least two data blocks with data size corresponding to the at least two bandwidth units according to the at least two bandwidth units; at least two data blocks are obtained based on a plurality of service flow data; and integrating at least two data blocks to obtain an integrated target data stream. The bandwidth units with different sizes are distributed aiming at multiple service flow data, so that different requirements of service flow data of different service types on the bandwidth under a multi-flow concurrent transmission scene can be met, and the reasonable distribution of bandwidth resources is realized.
In a possible implementation manner, determining bandwidth units respectively corresponding to multiple items of service flow data to be processed includes: identifying service types respectively corresponding to a plurality of items of service flow data; and determining a bandwidth unit corresponding to a service type corresponding to any service flow data in the multiple service flow data as a bandwidth unit corresponding to any service flow data. The bandwidth unit of the service flow data is determined based on the service class to which the service flow data belongs, a plurality of service flow data can be divided from the dimension of the service class, and the corresponding bandwidth unit is configured for the service class so as to meet different requirements of services of different service classes on bandwidth resources.
In one possible implementation, the plurality of traffic classes includes: at least two of audio service, video service, USB service, including, for example, audio service and video service; the USB service comprises at least one of various services supported by the USB interface.
In one possible implementation, the data size of the bandwidth unit corresponding to the audio service is 8 bits; the data volume of the bandwidth unit corresponding to the video service and the USB service is 128 bits. The bandwidth unit corresponding to the audio service is set to be 8 bits, so that the requirement of most audio services on the transmission rate can be met, and the occupation of bandwidth resources can be reduced on the premise of not influencing the audio playing fluency of the sink equipment; the bandwidth unit corresponding to the video service is set to be 128 bits, the encoding system can be compatible, and compared with the bandwidth unit with the size of 8 bits in DP2.0, the data volume transmitted in a single Time Slot is larger, and compared with DP2.0, under the condition of the total bandwidth resource with the same size, the scheme can transmit more data volume with fewer data blocks, thereby reducing the overhead of data block management and reducing the transmission delay.
In a possible implementation manner, before the integrating the at least two data blocks, the method further includes: determining the bandwidth numbers corresponding to the multiple items of service flow data respectively at least based on the target bandwidth, the total number of the data blocks in a cycle period and the effective bandwidth corresponding to the multiple items of service flow data respectively; the effective bandwidth is a bandwidth for transmitting a plurality of items of service flow data. In a possible implementation manner, integrating at least two data blocks to obtain a target data stream to be sent includes: integrating at least two data blocks according to the bandwidth number to obtain a target data stream comprising at least one cycle period; the number of data blocks corresponding to any service flow data in one cycle period is equal to the bandwidth number corresponding to any service flow data. The more the bandwidth number allocated to one service flow data in one cycle, the larger the data volume for transmitting the service flow data in unit time, so that the allocation of bandwidth resources among multiple service flow data can be further controlled through the setting of the bandwidth number, different requirements of different service flow data on the bandwidth resources are further matched, and the regulation and control of more dimensions of the bandwidth resources are realized.
In one possible implementation, integrating at least two data blocks includes: acquiring numbers corresponding to a plurality of service flow data respectively; in a cycle period, sequentially arranging data blocks corresponding to a plurality of items of service flow data respectively according to the serial numbers to obtain a data block sequence; the data block sequence comprises a plurality of first data block combinations which appear in a circulating mode, wherein the first data blocks in the first data block combinations are derived from at least two items of service flow data and are arranged according to the number sequence of the at least two items of service flow data. The arrangement mode is easy to realize and convenient to manage.
In one possible implementation, in the first data block combination, any two adjacent first data blocks are derived from different items of traffic flow data. The data blocks of the different service flow data are sequentially arranged at intervals, and the arrangement mode that the same service flow data continuously occupies a plurality of data blocks is avoided, so that the data blocks of the service flow data have equal priority in the arrangement sequence, the transmission delay caused by the arrangement mode of partial services is avoided, and compared with the mode that a plurality of data blocks of the same service flow data are continuously arranged in a cycle period in DP2.0, the arrangement mode provided by the embodiment of the application can ensure the concurrent transmission of the service flow data, and the delay of partial services is reduced.
In a possible implementation manner, the data block sequence further includes a second data block combination; in the data block sequence, a second data block combination is arranged after a plurality of first data block combinations, and the second data block in the second data block combination is derived from the same service flow data.
In a possible implementation manner, a port flow table is stored in the first device, and the port flow table is used to record at least one of a service type, a bandwidth number, and a number corresponding to multiple pieces of service flow data. The port flow meter can be arranged to facilitate maintenance of data transmission of each port (i.e. data transmission interface).
In a possible implementation manner, after determining bandwidth units respectively corresponding to multiple items of service flow data to be processed, the method further includes: generating a message header, wherein the message header carries number information, service type information, bandwidth unit information and bandwidth number information which correspond to a plurality of items of service flow data respectively; a header is encapsulated in the target data stream. The encapsulation message header can realize the synchronization of information such as bandwidth units and the like among different devices.
In one possible implementation, encapsulating the header in the target data stream includes: in the target data stream, a message header is encapsulated every N cycle periods, wherein N is a positive integer greater than or equal to 1.
In one possible implementation, one cycle period includes 125 data blocks.
In a possible implementation manner, before determining bandwidth units respectively corresponding to multiple items of service flow data to be processed, the method further includes: acquiring service parameters corresponding to a plurality of service categories respectively; the service parameter comprises at least one of a target bandwidth and a transmission frequency; the transmission frequency is the frequency of transmitting a plurality of items of service flow data of the same service class through a data transmission interface in a preset time period; and determining bandwidth units corresponding to the plurality of service categories respectively according to the service parameters. The target bandwidth is the bandwidth applied by the service to the system, the target bandwidth reflects the requirement of the service flow data on the single transmission rate, the transmission frequency reflects the required frequency of the sink device on the service flow data, and the target bandwidth and the transmission frequency can represent the required degree of the service flow data on the bandwidth, so that the bandwidth unit is allocated based on the two service parameters, and the corresponding bandwidth requirement can be effectively matched.
In a possible implementation manner, determining, according to the service parameter, bandwidth units corresponding to a plurality of service classes respectively includes: determining a first service class with the minimum first target bandwidth according to first target bandwidths respectively corresponding to the service classes; determining a first bandwidth unit corresponding to a first service class; of the at least two types of bandwidth units, the first bandwidth unit has the smallest amount of data.
In a possible implementation manner, after determining that the first service class corresponds to the first bandwidth unit, the method further includes: and determining that at least one service class except the first service class in the plurality of service classes corresponds to the same bandwidth unit with the same data volume size. The bandwidth unit distribution mode is easy to implement, and the complexity of data management and maintenance is low.
In a possible implementation manner, before determining that at least one traffic class of the multiple traffic classes except the first traffic class corresponds to the same bandwidth unit with the same data size, the method further includes: determining a data amount of a minimum data object for encoding a target data stream; determining that at least one service class except the first service class in a plurality of service classes corresponds to the same bandwidth unit with the same data size, comprising the following steps: and determining that at least one service class except the first service class in the plurality of service classes corresponds to the same bandwidth unit with the same data volume, and the data volume of the same bandwidth unit is the same as that of the minimum data object. Because encoding is needed in most cases after the target data stream is obtained, and the encoding is carried out through a physical link, the size of the bandwidth unit is consistent with the data volume of the minimum data object during encoding in the bandwidth unit allocation mode, the encoding system can be compatible, and the workload of adaptively changing the encoding system is reduced.
In a possible implementation manner, after determining that the first service class corresponds to the first bandwidth unit, the method further includes: at least two traffic classes, except the first traffic class, of the multiple traffic classes are determined, corresponding to at least two bandwidth units with different data volume sizes. Compared with the mode that only two bandwidth units are allocated to all service classes, the bandwidth unit allocation mode can better meet different requirements of different service classes. The more the variety of bandwidth units, the more overhead in terms of data block management and maintenance, and the possibility of adapting the coding system may also be required.
In a possible implementation manner, after determining a bandwidth unit corresponding to a service class corresponding to any service flow data in the multiple service flow data as a bandwidth unit corresponding to any service flow data, the method further includes: acquiring second target bandwidths corresponding to the multiple service flow data respectively; and under the condition that the difference value between the second target bandwidth corresponding to any service flow data and the first target bandwidth corresponding to the service type corresponding to any service flow data exceeds a preset threshold value, adjusting the bandwidth unit corresponding to any service flow data.
In a possible implementation manner, in the case that the service class corresponding to any service stream data is an audio service, the target bandwidth is determined based on at least one of an audio sampling rate, an audio sampling bit width, and a channel number; and/or, in the case that the service type corresponding to any service flow data is a video service, determining the target bandwidth based on at least one of the video resolution, the refresh rate and the color depth. The method can accurately obtain the target bandwidth required by the video service or the audio service.
In one possible implementation, the data amount of a single data block obtained based on any service flow data is the same as the data amount of a bandwidth unit corresponding to any service flow data.
In a possible implementation manner, the first device is configured to send data to the second device or the routing device through the data transmission interface; after determining the bandwidth units respectively corresponding to the multiple items of service flow data to be processed, the method further comprises the following steps: generating a notification message, wherein the notification message carries number information, service type information and bandwidth unit information which are respectively corresponding to at least one item of service flow data; transmitting a notification message to the routing device or the second device through the first link to synchronize the bandwidth unit information; the first link is a physical link connected between the first device and the second device or the routing device. The mode provides more diversified synchronization mechanisms of information such as bandwidth units and the like, avoids the problem that data cannot be transmitted due to failure of a single synchronization mechanism, and improves the stability of the system.
In one possible implementation, the first link is an SB link or an AUX channel.
In a second aspect, the present technical solution provides a data processing method, which is applied to a second device, where the second device is configured to receive data through a data transmission interface; the method comprises the following steps: receiving a target data stream; the target data stream comprises at least two data blocks, and the at least two data blocks are obtained based on a plurality of items of service stream data; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes; determining bandwidth units corresponding to a plurality of items of service flow data respectively; splitting a target data stream at least according to bandwidth units respectively corresponding to a plurality of items of service stream data to obtain a plurality of data blocks respectively corresponding to the plurality of items of service stream data; and integrating a plurality of data blocks corresponding to the same service flow data into corresponding service flow data to obtain a plurality of restored service flow data.
In a third aspect, the present technical solution provides a data processing method, which is applied to a routing device, where the routing device is configured to forward data through a data transmission interface; the method comprises the following steps: receiving a target data stream; in the target data stream, a plurality of service stream data of different service classes correspond to at least two bandwidth units with different data volumes; determining bandwidth units corresponding to a plurality of items of service flow data respectively; splitting a target data stream at least according to bandwidth units respectively corresponding to a plurality of items of service stream data to obtain a plurality of data blocks respectively corresponding to the plurality of items of service stream data; determining destination addresses corresponding to a plurality of items of service flow data respectively; integrating a plurality of data blocks corresponding to at least one item of service flow data corresponding to the same destination address to obtain sub-data flows respectively corresponding to at least one item of destination address, and respectively forwarding the sub-data flows.
In a possible implementation manner, determining bandwidth units corresponding to multiple items of service stream data respectively includes: acquiring a message header encapsulated in a target data stream, and determining bandwidth units respectively corresponding to a plurality of items of service stream data at least according to bandwidth unit information carried in the message header.
In a possible implementation manner, determining bandwidth units corresponding to multiple items of service stream data respectively includes: and identifying the service types corresponding to the plurality of items of service flow data respectively, and determining the bandwidth unit corresponding to the service type corresponding to any item of service flow data as the bandwidth unit corresponding to any item of service flow data.
In a possible implementation manner, after determining a bandwidth unit corresponding to a service class corresponding to any service flow data as a bandwidth unit corresponding to any service flow data, the method further includes: receiving a notification message; the notification message carries at least one item of service flow data respectively corresponding number, service type and bandwidth unit information; the notification message is transmitted through a first link; the first link is a physical link connected between the first device and the routing device; and modifying the bandwidth units corresponding to the service flow data with the corresponding numbers according to the bandwidth units corresponding to at least one item of service flow data recorded in the notification message.
In a possible implementation manner, the header of the packet carries bandwidth numbers corresponding to a plurality of items of service flow data respectively; the target data stream comprises at least one cycle period, wherein the number of data blocks corresponding to any item of service stream data in one cycle period is equal to the bandwidth number corresponding to any item of service stream data; the method further comprises the following steps: acquiring bandwidth resource information of a second link; the second link is a physical link connected between the routing device and the second device or connected between different routing devices; and adjusting the bandwidth number respectively corresponding to at least one item of service flow data based on the bandwidth resource information.
In a fourth aspect, the present technical solution further provides a data transmission system, including: a first device for performing the method of any one of the above first aspects; a second device for performing the method of any one of the second aspects as described above; a physical link, configured to transmit a target data stream according to any one of the methods in the first or second aspects, or configured to transmit a plurality of data blocks corresponding to at least one item of traffic flow data corresponding to a same destination address according to any one of the methods in the third aspect.
In a fifth aspect, the present technical solution further provides a data transmission interface, configured to transmit a target data stream according to any one of the methods in the first or second aspects, or configured to transmit a plurality of data blocks corresponding to at least one item of service flow data corresponding to a same destination address according to any one of the methods in the third aspects.
In a sixth aspect, the present technical solution further provides a physical link, configured to transmit a target data stream according to any one of the methods in the first or second aspects, or to transmit a plurality of data blocks corresponding to at least one item of traffic flow data corresponding to a same destination address according to any one of the methods in the third aspects.
Wherein, a plurality of data blocks corresponding to at least one item of service flow data corresponding to the same destination address are integrated to obtain a sub-data stream, so that the physical link or the data transmission interface may be used to transmit the sub-data stream according to the third aspect.
In a seventh aspect, a technical solution of the present application further provides an electronic device, configured to send data through a data transmission interface, where the electronic device includes: one or more processors; a memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of the first to third aspects as described above.
In an eighth aspect, the present technical solution also provides a storage medium, including computer instructions, which, when run on an electronic device, cause the electronic device to perform the method according to any one of the first to third aspects.
In a ninth aspect, a chip system is further provided in the present technical solution, including: a communication interface for inputting and/or outputting data; a processor configured to execute the computer-executable program to cause a device having a system-on-chip installed thereon to perform the method according to any one of the first to third aspects.
In a tenth aspect, the present technical solution also provides a software program product, which includes program instructions that, when run on an electronic device, cause the electronic device to perform the method according to any one of the first to third aspects.
According to the data processing method, the data processing equipment, the storage medium and the chip system, bandwidth units of different specifications are allocated according to the service flow data of different service types, data are segmented and integrated according to the data size of the bandwidth units, the service flow data of different service types are processed into one service flow for transmission, and effective allocation and management of bandwidth resources under the scene of concurrent transmission of multiple service flow data are achieved. Different types of service flow data are allocated with different bandwidth units, so that the difference of bandwidth requirements of different types of service flow data in the transmission process can be adapted, and different requirements of different types of services on transmission speed can be met.
Drawings
Fig. 1 is an exemplary diagram of an application scenario of a data processing method provided in an embodiment of the present application;
FIG. 2 is an exemplary graph of DP2.0 for one cycle period in the related art;
fig. 3 is an exemplary diagram of a related art DP2.0 in which traffic stream data 2 is not sufficient to fill one TimeSlot;
FIG. 4 is a diagram illustrating data transmission according to priority in the related art USB 4.0;
FIG. 5 is a system architecture diagram of a data processing method provided by an embodiment of the present application;
fig. 6 is an exemplary diagram of an application scenario with a routing device in a data processing method according to an embodiment of the present application;
FIG. 7 is a flowchart of a data processing method provided in an embodiment of the present application;
fig. 8 is a schematic diagram of a service class classification of a data processing method provided in an embodiment of the present application;
FIG. 9 is a schematic diagram illustrating data slicing and integration in an embodiment of a data processing method according to an embodiment of the present application;
FIG. 10 is a diagram illustrating padding data at the end of a loop period in an embodiment of a data processing method according to the present application;
fig. 11 is a hardware architecture diagram of a source device provided by an embodiment of the present application;
fig. 12 is a schematic hardware architecture diagram of a sink device provided in an embodiment of the present application;
fig. 13 is a hardware architecture diagram of a routing device according to an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
The data processing scheme provided by the embodiment of the application can be applied to various application scenarios of data transmission from a source device to a sink device, wherein the source device is a data sending party and the sink device is a data receiving party. The source device (i.e., the first device) may be any device storing data content (e.g., media data such as audio and Video), and as shown in fig. 1, a host 101 of a computer, a notebook computer 102, a Digital Video converter Box (STB, set Top Box) 103, a DVD (Digital Video Disc) 104, and the like may be used as the source device; the sink device (i.e. the second device) may be any device having data (e.g. media data) expression capability, for example, it may be a display 105, a display screen (e.g. a television display screen or a smart screen such as a smart screen), a sound box 107, etc., and it may also be an Augmented Reality (AR) device, a Virtual Reality (VR) device, a projector, etc., which are not temporarily shown in fig. 1.
And the source device and the sink device carry out data transmission through a data transmission interface and a matched physical link. The data transmission interface may be a DP (for example, DP 2.0) interface, a USB interface, an HDMI interface, or a brand new interface designed to implement the data processing method provided in the embodiment of the present application.
In the prior art, in a scheme for performing multi-stream data concurrent transmission based on a high-speed data transmission interface, differences of different types of services (i.e., different service classes) on transmission speed requirements are not considered, different requirements of different types of services on bandwidth cannot be met, and problems of large workload of data segmentation, excessive waste of bandwidth, service transmission delay and the like may be caused.
For example, taking DP2.0 (displayport 2.0) as an example, it sets up a bandwidth allocation mechanism for a Multi-service transmission scenario to support a Multi-Stream transmission (MST) mode, as shown in fig. 2, during Multi-Stream transmission, a total bandwidth of a link is divided into bandwidth units with fixed size, which are called Time slots (Time slots), where 1 small cell in fig. 2 is 1Time Slot. The data amount of the minimum bandwidth that can be allocated to each service is the data amount of one bandwidth unit, that is, the data amount corresponding to 1Time Slot. For example, in the current protocol standard DP2.0, the data size of one Time Slot is 8 bits (bit), and when bandwidth is allocated, the data sizes of bandwidth units corresponding to different classes of services are all 8 bits. During transmission, each 64 Time slots form a cycle period, and each cycle always starts with a Multi-stream Transport Packet Header (MTPH).
In this way, different types of traffic stream data are allocated with bandwidth units of the same size, that is, common bandwidth units, and if the data size of each common bandwidth unit is small, for example, 8 bits, then when upper-layer data blocks are sliced, in order to match the smaller common bandwidth units, large data needs to be forcibly sliced into smaller blocks, which increases extra workload of slicing, and more overhead may be needed in a data header to manage each small data block. A bandwidth unit may also be referred to as a bandwidth unit.
If the data amount of the common bandwidth unit is adjusted to be high, the bandwidth resource may be wasted for the traffic type with low requirement on the transmission rate (i.e. the bandwidth, which represents the data amount transmitted in a unit time). For example, assuming that a 1 second Time is split into N Time slots, with a total bandwidth of Y carried by the N Time slots, then each Time Slot transmits a bandwidth of Y/N Gbps. If a certain audio service needs to occupy the bandwidth of X Mbps, the number of Time slots to be allocated in each N Time slots is (N × X)/(Y1024), where N is the number of Time slots in 1s, and is a constant, and since the number of Time slots is rounded up when calculating the number of Time slots, when (N × X)/1024 < Y, the audio service is rounded up, and 1Time Slot is allocated, and the smaller X is, the larger the remaining space in the 1Time Slot is, which causes waste of bandwidth resources. For example, it is assumed that the audio service needs to occupy a bandwidth of 1.1Mbps, the total link bandwidth Y =16.2Gbps, the larger the data amount corresponding to each Time Slot, the smaller N, and when N is less than 1024, the audio service needs to occupy less than 0.07 Time Slot obtained by calculation, and rounding up to obtain 1. Wherein at least 0.93 Time slots correspond to wasted bandwidth resources. The wasted part should be actually transmitted with padding data inserted.
Therefore, for the service type with low requirement on transmission rate, the data amount of the required bandwidth unit is much smaller than that of the established common bandwidth unit, that is, the data amount required to be actually transmitted by each Time Slot is not enough to fill the data space of 1Time Slot, so that there is serious bandwidth waste. For example, refer to fig. 3, where service flow data 2 is a service class with a low bandwidth requirement, and the data amount of a single data block is not enough to fill a Time Slot, which causes a waste of bandwidth resources; traffic flow data 1 is a traffic type with a relatively high bandwidth requirement. If in order to reduce waste, when data blocks are sliced in an upper layer, in order to match a larger common bandwidth unit, a plurality of small data blocks are forcedly accumulated and spliced into a larger data block to adapt to the size of a Time Slot, so that extra workload of splicing is generated, and meanwhile, transmission delay is increased.
Regarding USB 4.0, referring to fig. 4, USB 4.0 supports multi-stream transmission, before each service is transmitted, a bandwidth is independently applied, and after scheduling and arbitration by a mechanism with a three-layer structure, the service with the highest priority is transmitted preferentially, and other service streams with low priorities are waiting for transmission. And releasing the bandwidth after the transmission of the service with the highest priority is finished, and transmitting other services according to a similar principle. The USB4 1.0 does not perform bandwidth allocation, and it can be considered that there is no multi-stream time sharing concurrence, and microscopically, the transmission is exclusive, that is, the highest priority traffic is transmitted preferentially, which may cause a larger delay in response to other low priority traffic.
In view of this, in order to reduce the occurrence of the foregoing problems, embodiments of the present application provide a new bandwidth allocation mechanism in a scenario of multi-stream concurrent transmission, and a data processing method implemented based on the bandwidth allocation mechanism, where different bandwidth units are set for different service types, for example, different bandwidth units are flexibly (dynamically and statically) set according to a service type, an actually required bandwidth, a transmission behavior, and the like of each to-be-transmitted service stream, where the different service types correspond to at least two bandwidth units with different data sizes. The scheme meets different requirements of different service classes on the bandwidth, and reasonably distributes the bandwidth resources. Moreover, since the bandwidth unit does not adopt an equal division mode any more, for the service type (i.e. service class) with high requirement on transmission speed, a larger bandwidth unit can be set, so as to reduce the number of times of segmenting the large block data in the service type data and reduce the overhead of segmenting and managing. Moreover, the data integration scheme adopted in some embodiments of the method can reduce the transmission delay time of some services, and realize multi-stream concurrence in a macroscopic angle. In addition, the data size of the bandwidth unit is adjusted, so that the bandwidth waste can be reduced to a certain extent.
Referring to fig. 5, the data processing scheme provided in the embodiment of the present application may be implemented based on the system architecture (which is only an example) shown in fig. 5. After being subjected to multi-stream processing, each service flow (i.e., each service flow data) in the source device is transmitted to the sink device through a physical link, and the data is restored to each service flow after being integrated in the sink device. The data processing method provided in the embodiment of the present application may be used in the multi-stream processing process.
In one possible implementation, the physical Link may include a main Link and an auxiliary Link, and the auxiliary Link may be an SB Link (Sideband Link). The main link is used for transmitting various service flows, such as video service flows, audio service flows, USB service flows and other various service flows; the SB Link is a full duplex Link with low-speed communication capability, and is used to control information interaction between devices. For example, the SB Link may be used to control information interaction between a source device and a sink device, or between a source device and a routing device, or between a routing device and a routing device, and between a routing device and a sink device.
As shown in fig. 5, the source device and the sink device may be connected by one-stage physical link or multiple-stage physical links. If the link is a first-level physical link, the source device is directly connected with the sink device, and a typical example of the direct connection is that the set-top box outputs audio and video contents on a display or a television through a media interface; if the physical link is a multi-level physical link, each level of physical link between the source device and the sink device is connected through the routing device. For example, taking a home scenario as an example, referring to fig. 6, a source device in a living room may be connected to a sink device display and a sound box in a bedroom via a routing device. The number of routing devices between the source device and the sink device may be plural. In practical applications, the routing device may be connected to single or multiple source devices, single or multiple sink devices, and single or multiple upstream routing devices, or single or multiple downstream routing devices, and is responsible for forwarding each traffic flow. In fig. 6, please refer to the secondary physical link shown in fig. 5 for the connection links between the source device and the routing device and between the speaker and the display.
The routing equipment can prolong the transmission distance, distribute the path and expand the interface. For example, in fig. 5, 4 ports are provided on the routing device between the source device and the sink device, and the source device has only two ports, and thus the routing device expands the number of ports; under the current technical condition, under the condition of copper cable transmission of a physical link, the effective transmission distance of a general high-speed data transmission interface is limited within a range of 20 meters, and the transmission distance can be prolonged by the arrangement of routing equipment; on the other hand, when there are a plurality of sink devices that need to receive the source device data, a routing device needs to be set to distribute the data. For example, the same set-top box is used as a source device, and needs to be connected to a display and a sound box in a bedroom, the display receives video data, the sound box receives audio data, and the routing device needs to split a service stream sent by the source device, integrate the service stream into a corresponding video service stream and a corresponding audio service stream, and send the video service stream and the audio service stream to the display and the sound box, respectively.
Referring to fig. 7, the implementation of one data transmission process requires the cooperative implementation of three parts, including a transmitting end, a physical link and a receiving end. The sending end may be a source device or a routing device; the receiving end may be a sink device or a routing device. If the sending end is the source device, the sending end comprises a plurality of service sources and data processing modules, and if the sending end is the routing device, the sending end does not comprise the service sources and only comprises the data processing modules. If the receiving end is a sink device, the receiving end comprises a plurality of service sinks and a data processing module; if the receiving end is a routing device, the receiving end does not include a service sink and only includes a data processing module. The physical Link comprises a main Link and an SB Link, is positioned between the sending end and the receiving end and is used for transmitting data.
The data processing method provided by the embodiment of the present application is explained in detail below. The flow of the data processing method provided in the embodiment of the present application may include bandwidth allocation, data slicing and data integration. The step of bandwidth allocation may be performed in advance, that is, bandwidth units corresponding to multiple items of service flow data to be processed respectively are determined, where the multiple items of service flow data correspond to at least two service categories, and the multiple items of service flow data of different service categories correspond to at least two bandwidth units with different data volumes, then each item of service flow data is divided according to the data volume of the bandwidth unit corresponding to each item of service flow data, so as to obtain data blocks with data volumes corresponding to the corresponding bandwidth units, and the data blocks corresponding to different categories have different sizes, and then the data blocks of different specifications are integrated, so as to obtain a target data flow to be transmitted.
It should be noted that, the bandwidth occupied by the service stream data reflects the requirement of the service stream data on the transmission rate from a macroscopic perspective, and the bandwidth unit actually equally divides the unit time into a plurality of smaller time slots, and the larger the data amount transmitted in each time slot is, the more data is transmitted in the unit time, that is, the bandwidth unit in the embodiment of the present application reflects the bandwidth resource occupied by the service stream data in the transmission process from a microscopic perspective. The larger the data amount of the bandwidth unit is, the more bandwidth resources are allocated to the service class or the service flow data.
In one possible implementation, referring to fig. 7, data adaptation and buffering may be performed before data segmentation. Specifically, the data output by various service sources are adapted and then enter corresponding cache regions, and after data slicing and data integration, all the data are transmitted to a receiving end through a physical link. The adaptation means receiving data sent by various service sources, arranging various service flow data according to a certain rule, and completing data encapsulation. And caching, namely storing various service flow data and providing input for data block cutting.
It should be noted that the service source shown in fig. 7 is shown by service class to express the concurrent transmission of multiple service flow data, and in practical application, the service source may be multiple service flow data, and multiple service flow data may have multiple items belonging to one service class. For example, the service sources in the actual data processing are audio service stream data 0, video service stream data 1, video service stream data 2, video service stream data 3, and USB3 service stream data 4, where 0 to 4 are numbers corresponding to each item of service stream data, one number corresponds to one item of service stream data, and one service class may correspond to multiple items of service stream data.
It should be noted that, in the embodiment of the present application, the service stream data may be a continuous data stream corresponding to a service object (for example, a file) to be transmitted; or may be one or more non-continuous data blocks corresponding to the service object to be transmitted. In some embodiments, one piece of traffic stream data corresponds to one file to be transmitted.
Because the data block size is needed to be cut out according to the data size of the corresponding bandwidth unit in the data block cutting process, the bandwidth allocation process needs to be executed before the data block cutting, and the two steps of bandwidth allocation, adaptation and caching are not defined in definite sequence in the execution time sequence. After determining the bandwidth unit of each service stream data, the subsequent data processing flows such as adaptation and cache may be performed.
Specifically, the bandwidth allocation may be based on service classes, and it is necessary to determine a plurality of service classes first, and then determine bandwidth units corresponding to the service classes respectively. As shown in fig. 8, as an implementation manner, in the embodiment of the present application, service stream data in multiple data formats is divided into an audio service, a video service, a USB service, and other service categories, and the other service categories may be set by a user, for example, image data, text data, and the like. The USB service refers to one or more of various services supported by the USB interface, that is, a data format capable of being transmitted through the USB interface, and may be divided into USB services. For ease of understanding and description, the following description will take 3 classes of audio service, video service and USB service as examples.
The audio service category may include any one or more of the following audio file formats: a Moving Picture Experts compression standard Audio Layer3 (MP 3) or MP3 Pro format; moving Picture Experts Group (MPEG) formats such as MPEG-1, MPEG-2, MPEG-Layer3, MPEG-4, etc.; WMA (Windows Media Audio) format; advanced Audio Coding (AAC) format; the RealAudio format, etc.
The video traffic category may include any one or more of the following audio file formats: the RealVideo format; FLV (FLASH VIDEO) format; MPEG-4 format; WMV (Windows Media Video); audio Video Interleaved (AVI); advanced Streaming Format (ASF); MOV (i.e., quickTime encapsulation format); third Generation Partnership Project (3 rd Generation Partnership Project, 3GPP or 3GP for short) file formats; the DivX format; the XviD format; FLV (Flash Video) format, etc.
The USB service class is set to be compatible with the current USB interface, that is, the data processing scheme provided in the embodiment of the present application may be applicable to the USB interface, or the data transmission interface based on the scheme is a new interface compatible with the USB service.
Specifically, the following method may be adopted to determine the bandwidth units corresponding to the multiple service classes respectively:
and acquiring service parameters corresponding to a plurality of service types, and determining a bandwidth unit corresponding to the corresponding service type according to the service parameters. For example, service parameters corresponding to an audio service, a video service, and a USB service are obtained. The traffic parameter may be a parameter capable of characterizing a degree of demand of the traffic stream data for the bandwidth resource when transmitting, and for example, a target transmission rate (i.e., a target bandwidth), a transmission behavior, and the like may be used as the traffic parameter. The transmission behavior may be various behaviors of multiple items of data in the same service class in a historical transmission process, and the degree of the requirement of the service class on the bandwidth resource may be summarized according to the historical behaviors of a certain class of services. For example, the transmission behavior may include a transmission frequency.
Specifically, the service parameter may be a target bandwidth, which is a target value or an expected value of a bandwidth that the service stream data of the service category needs to occupy when being transmitted, that is, an expected value of a data amount that needs to be transmitted in a unit time, where the target value or the expected value enables that, in the case of playing while transmitting, the playing fluency on the side of the sink device is not affected, for example, the target bandwidth of transmitting video data to the liquid crystal display of the television by the set-top box should ensure that the liquid crystal display of the television can smoothly play video.
Illustratively, the traffic parameters of the video data may include a video resolution, a refresh rate and a color depth, i.e., the target bandwidth of the video data may be determined based on at least one of the video resolution, the refresh rate and the color depth of the video data. Generally, the higher the video resolution, the refresh rate and the color depth, the larger the bandwidth that needs to be occupied when the video data is transmitted, that is, the target bandwidth of the video data is positively correlated with the video resolution, the refresh rate and the color depth. As an implementation manner, the data amount of the target bandwidth of the video data may be obtained by performing a multiplication operation of the video resolution, the refresh rate, and the color depth. For example, a common video resolution may be 960P/1080P/2K/4K/8K, a refresh rate of 24/30/60/120fps, and a color depth of 24/30/36/48bpp, so that when the video resolution is 8K, the refresh rate is 60fps, and the color depth is 24bpp, high-quality video can be played, and a target bandwidth corresponding to video data of such specification is about 57Gbps (8k 60fps × 24bpp).
Illustratively, the traffic parameters of the audio data may include an audio sampling rate, an audio sampling bit width, and a channel number of the audio data, i.e., the target bandwidth of the audio data should be determined based on at least one of the audio sampling rate, the audio sampling bit width, and the channel number of the audio data. Generally, the higher the audio sampling rate, the larger the audio sampling bit width, or the larger the number of channels, the larger the bandwidth that needs to be occupied when transmitting the audio data, that is, the target bandwidth of the audio data is positively correlated to the audio sampling rate, the audio sampling bit width, and the number of channels. As an implementation manner, the data amount of the target bandwidth of the audio data can be obtained by performing a product operation of the audio sampling rate, the audio sampling bit width, and the channel number, for example, a common audio sampling rate of the audio data is generally 32/44.1/48/88.2/96/192kHz, the audio sampling bit width can be 8/16/24/32bit, the channel number can be 1 to 32 channels, a bandwidth of 196Mbps (192khz 32bit 32channel) is required for extremely high-quality audio, a maximum value of the target bandwidth of the audio data is 196Mbps, and a minimum target bandwidth is 256kbps (32khz 8bit 1channel).
It should be noted that the above parameters such as the audio sampling rate and the color depth for determining the target bandwidth are only an example, and audio files or video files with different formats may correspond to different parameters, and may be specifically determined according to a specific data format.
Generally, the target bandwidth corresponding to video data (i.e. traffic data with a traffic class of video traffic) is greater than the target bandwidth corresponding to audio data (i.e. traffic data with a traffic class of audio traffic), i.e. the required transmission rate for video data is generally greater than the required transmission rate for audio data, while the required transmission rate for USB traffic data (i.e. traffic data with a traffic class of USB traffic) may be less than video data and greater than audio data.
Specifically, as an implementation, since the actual data format corresponding to the USB service is not determined, the data amount of the target bandwidth of the USB service may be set between the data amounts of the target bandwidths corresponding to the audio service and the video service, respectively. For example, if the target bandwidth corresponding to the audio service is xMbps, and the target bandwidth corresponding to the video service is ybbps, the target bandwidth of the USB service may be set between xMbps and ybbps.
In another implementable manner, the traffic parameter may also be a transmission frequency. The transmission frequency, i.e. the number of times that the traffic stream data in the same traffic class is transmitted in a predetermined time period, for example, the number of times that the traffic stream data in a certain class is transmitted exceeds 100 times in the past one week time period, then the transmission frequency is higher, which indicates that the data in the traffic class has a higher demand for bandwidth resources, and thus more bandwidth can be allocated to the traffic in the class.
It should be noted that, when allocating bandwidth resources according to the service parameters, two or more parameters in the service parameters may be combined. For example, the service parameter may include both the target bandwidth and the transmission frequency, and when the parameter value of any one of them is higher, the larger the data amount of the bandwidth unit allocated to the service flow data of the category is; or, only when the target bandwidth and the transmission frequency are both high, allocating a bandwidth unit with a large data volume for the service class. For example, in consideration of the fact that the audio service is transmitted in a small amount and infrequently, the data amount of the bandwidth unit of the audio service is set to be minimum, for example, 8 bits, 16 bits, and the like, so as to reduce the waste of the bandwidth; considering that the video service and the USB3 service have large data transmission amount and are transmitted more frequently, the bandwidth unit of such service is set to 128 bits or 256 bits, etc. to meet the requirement of continuous transmission, and the number of chunks and the overhead of chunks when the data chunks are fragmented are reduced.
Specifically, one feasible rule for determining the bandwidth units corresponding to the multiple service classes according to the service parameters is as follows: determining a first service class with the minimum target bandwidth according to the target bandwidths respectively corresponding to the plurality of service classes; determining that the first service class corresponds to a first bandwidth unit; of the at least two types of bandwidth units, the first bandwidth unit has the smallest amount of data. That is, the traffic class with the smallest target bandwidth corresponds to the bandwidth unit with the smallest allocated data amount, and the data amount of the bandwidth unit allocated to the traffic class other than the first traffic class in the multiple traffic classes is larger than the data amount of the first bandwidth unit. For example, when the first service class is an audio service, the data size of the corresponding first bandwidth unit may be 8 bits, and the data size of other service classes is greater than 8 bits. One possibility is that the other traffic classes correspond to the same bandwidth unit of the same size of data volume.
Alternatively, from another perspective, the following rule should be satisfied for any two classes of traffic flow data to be allocated: and under the condition that the target bandwidth or transmission frequency corresponding to the first service class is smaller than the target bandwidth or transmission frequency corresponding to the second service class, determining the data volume of a first bandwidth unit corresponding to the first service class to be smaller than the data volume of a second bandwidth unit corresponding to the second service class.
The more the specification types of the bandwidth units are, the more complicated management mechanism needs to be designed to manage the bandwidth units with different specifications, so that the data management overhead is increased; in addition, after the target data stream is obtained, it generally needs to be processed by communication coding and the like and then transmitted through a physical link, for example, a 128bit/132bit coding method is adopted in DP2.0, and too many bandwidth units with different specifications may cause incompatibility with subsequent communication coding. In order to be better compatible with a subsequent encoding mechanism, as an implementation manner, the data volume information of the minimum data object for encoding the target data stream in the subsequent encoding process may be obtained first, and the data volumes of the bandwidth units corresponding to the other service classes except the first service class are set to be the same as the data volume of the minimum data object in the encoding process. For example, in an existing communication coding method, if coding is performed every 128 bits, the data size of bandwidth units of the same specification corresponding to other traffic classes except the first traffic class may be set to 128 bits. If encoding is performed every 132 bits in the communication encoding method, other service classes all correspond to bandwidth units with a data volume of 132 bits.
Therefore, referring to fig. 9, one possible way of allocating bandwidth is that the bandwidth unit corresponding to the audio service is 8 bits (abbreviated as b), and the data amount of the bandwidth units allocated to other service classes is 128 bits (b). That is, for the non-audio service stream, a larger bandwidth unit is set, and the corresponding service stream data is arranged into a 128-bit structure for transmission, and for the audio service stream, a smaller bandwidth unit is set, and the corresponding audio data is arranged into an 8-bit structure for transmission.
Optionally, as another implementation manner, to better meet different bandwidth requirements of different service classes, at least two bandwidth units with different data sizes are allocated for at least two service classes except for the first service class in the multiple service classes. For example, audio traffic corresponds to 8-bit allocated bandwidth units, usb traffic corresponds to 128-bit allocated bandwidth units, and video traffic corresponds to 256-bit allocated bandwidth units. The advantage of this approach is that it can better match different bandwidth requirements of different service classes, but this solution needs to solve the problem of incompatibility with the coding system to overcome the difference between bandwidth units of different specifications and the subsequent communication coding process, and a feasible approach is to adjust the subsequent coding mechanism, that is, the size of data amount coded each time in the communication coding process can be changed to adapt to the bandwidth units of different specifications. Alternatively, the encoding system is not changed.
It should be noted that the bandwidth allocation mechanism provided in the embodiment of the present application may include a static allocation manner and a dynamic allocation manner. The static allocation mode is that before actual application, the data volume of the bandwidth unit of each possible service type is determined, and a bandwidth information table is generated, wherein each service type is recorded in the bandwidth information table, and the data volume of the bandwidth unit corresponding to each service type is generated; when the service flow data to be sent sends a transmission request, responding to the request, the source device firstly identifies the service type corresponding to the service flow data, then inquires the data volume of the bandwidth unit corresponding to the service type in the bandwidth information table, then marks the data volume of the inquired bandwidth unit as the data volume of the bandwidth unit corresponding to the service flow data, and when the data is sliced, carries out slicing according to the data volume of the corresponding bandwidth unit. The dynamic allocation mode can be that after each item of service flow data sends out a transmission request, service parameters corresponding to each item of service flow data are obtained, and bandwidth units are temporarily allocated to each item of service flow data according to the service parameters; or, another feasible manner is that the dynamic allocation manner may be combined with the static allocation manner, and after the bandwidth unit corresponding to each service type is found out according to the static bandwidth information table and the bandwidth unit corresponding to the service type corresponding to any service flow data is determined as the bandwidth unit corresponding to the service flow data, the service parameter information of each service flow data is further obtained, so as to adjust the bandwidth unit corresponding to the service flow data according to the service parameter. For example, the target bandwidths corresponding to a plurality of items of traffic flow data may be acquired, and in a case where a difference between a target bandwidth (second target bandwidth) corresponding to any item of traffic flow data and a target bandwidth (first target bandwidth) corresponding to a traffic class corresponding to the item of traffic flow data exceeds a predetermined threshold, the bandwidth unit corresponding to the item of traffic flow data may be adjusted. In order to prevent confusion and clear description, the target bandwidth corresponding to the service class is defined as a first target bandwidth, and the target bandwidth corresponding to each service flow data is defined as a second target bandwidth. For example, the first target bandwidth corresponding to the video service is generally in the order of Gbps, and if, in practical application, a certain item of service stream data in a video format to be transmitted is detected, and the order of the required second target bandwidth is only in the order of Mbps, the data volume of the bandwidth unit corresponding to the item of video service stream data may be reduced.
Or, in the case that a target bandwidth or a transmission frequency corresponding to first business data business flow data in the multiple items of business flow data is smaller than a target bandwidth or a fourth transmission frequency corresponding to second business flow data, and a third bandwidth unit corresponding to the first business flow data is larger than a fourth bandwidth unit corresponding to the second business flow data, the data amount of the third bandwidth unit and/or the fourth bandwidth unit may be dynamically modified based on a preset adjustment rule. The adjustment rule may be that the higher the target bandwidth or the transmission frequency is, the larger the data amount of the corresponding bandwidth unit is.
Therefore, in the scheme provided by the embodiment of the application, when multiple service flows are transmitted, multiple different bandwidth units exist, and different service flows allocate bandwidth resources according to the bandwidth units of the service flows, so that different bandwidth requirements of different services are met.
After determining the bandwidth units corresponding to the various service stream data, the data stream of the various service stream data can be adapted and cached, and then segmented, as shown in fig. 9, a file in an audio format can be used as an audio service stream data and segmented into a plurality of data blocks with the size of 8 bits, an equal segmentation mode is adopted during segmentation, the remaining data volume may be less than 8 bits, and the remaining data volume also serves as an independent data block; a file in a video format can be used as video service stream data and is segmented into a plurality of data blocks with the size of 128 bits, an equal segmentation mode is adopted during segmentation, and the residual data with the size less than 128 bits are independently used as a data block. The USB service flow data is also correspondingly divided into a plurality of 128-bit data blocks. As mentioned above, one possible way is to keep the size of the sliced data block consistent with the data amount of the corresponding bandwidth unit, which is not described herein again. In another possible way, it may also be set that a predetermined mapping relationship exists between the size of the data block cut out from any kind of service flow data and the data amount of the bandwidth unit corresponding to the any kind of service flow data, for example, the size of the data block may be several times of the data amount of the bandwidth unit, and so on, and thus, the magnification information between the data block and the bandwidth unit may also be recorded in the bandwidth information table. For example, one data block corresponds to two bandwidth units, and so on.
After the data segmentation, each item of service flow data is respectively segmented into a plurality of data blocks, and different services correspond to the data blocks with at least two sizes. And then integrating the separated data blocks, and integrating a plurality of service flows into one service flow to be transmitted.
In DP2.0, each 64 Time slots constitutes a cycle period. The cycle period is a set of data sets for every M Time slots in the data stream for management, e.g., for encapsulation. In the embodiment of the application, M is more than or equal to 16 and less than 999, and one message header can be encapsulated in each cycle period or a plurality of cycle periods. One cycle period may include 125 Time slots.
The service flow after integration may include multiple cycle periods, and before integration, the number of Time slots corresponding to each item of service flow data in one cycle period needs to be determined, that is, the number of bandwidths allocated to different items of service flow data. The bandwidth number is the number of Time slots occupied by each item of service flow data in one cycle period in the service flow after integration, or may be understood as the number of bandwidth units corresponding to each item of service flow data in one cycle period. The larger the number of bandwidths, the larger the amount of data transmitted per unit time. Therefore, the allocation of the bandwidth number is to allocate bandwidth resources between different items of service flow data from another dimension. One bandwidth unit determines the amount of data filled in a single Time Slot, and the bandwidth number determines the number of Time slots allocated to each service stream data in one cycle period.
One possible implementation of allocating the bandwidth number is to allocate the bandwidth number to different service flow data, where the bandwidth number is used to determine the number of data blocks corresponding to one service flow data in one cycle period. For example, audio traffic allocates a first number of bandwidth units, video traffic allocates a second number of bandwidth units, and USB traffic allocates a third number of bandwidth units, illustratively, the first number < the third number < the second number; or, another feasible bandwidth number allocation manner is that the bandwidth number is allocated based on the service item, that is, one file to be transmitted can serve as one service item, and the bandwidth number is allocated among different files, where the different files may correspond to the same service category.
Specifically, the bandwidth number may be allocated as follows:
and determining the bandwidth numbers respectively corresponding to the plurality of items of service flow data at least based on the target bandwidth, the total number of the data blocks in one cycle period and the effective bandwidth respectively corresponding to the plurality of items of service flow data. The effective bandwidth is a bandwidth used for transmitting service stream data, and = the number of link channels × the transmission rate of the link channel × the ratio of the effective bandwidth.
Assuming that the transmission bandwidth (i.e. target bandwidth) applied by one service stream data to be currently transmitted is B Gbps, and the total number of data blocks in one cycle period is M, for a non-audio service stream, the bandwidth applied by the service stream is: (M × B)/(number of link channels × transmission rate of link channels × effective bandwidth ratio), and then rounding up the above bandwidth number to obtain the final result. For an audio service stream, because the data volume is small, the bandwidth number division of the audio service is more fine, for example, under the condition that the size of a bandwidth unit corresponding to the audio service is 8 bits and the size of a bandwidth unit corresponding to the video service is 128 bits, the bandwidth number applied by the audio service stream is (M × 16 × B)/(the number of link channels × the transmission rate of the link channels × the effective bandwidth ratio), and then the bandwidth number is rounded up to obtain a final result. The constant 16 in (M × 16 × B) is only an example, and the constant may be determined according to a multiple between two bandwidth units corresponding to the video service and the audio service, that is, a value of the constant may be equal to a ratio of a data amount of a bandwidth unit corresponding to the video service to a data amount of a bandwidth unit corresponding to the audio service, and for example, in a case where a size of a bandwidth unit corresponding to the audio service is 16 bits, and a size of a bandwidth unit corresponding to the video service is 128 bits, the constant may be 8. Where the number of Time slots (or data blocks) in a cycle period is M, for example, if a cycle period includes 125 data blocks, M =125; the "number of link channels × link channel transmission rate" is the total bandwidth of the main link, i.e., the number of link channels is the number of channels of the main link, and the link channel transmission rate is the main link channel transmission rate, not the number of channels or the channel transmission rate of the auxiliary link. For example, if the main link has 6 lanes at 16Gbps per lane, the total bandwidth of the main link is 96Gbps. Due to the overhead of the message header, the management data, the check information, and the like, the total bandwidth of the main link cannot be used for service transmission by 100%, so that the effective bandwidth ratio, that is, the percentage of the bandwidth used for service transmission in the total bandwidth, may occur. When the bandwidth unit corresponding to the non-audio service (for example, a video service and a USB service) is 128bit, the bandwidth number corresponding to the non-audio service indicates the number of 128-bit data blocks allocated by the non-audio service (1 Time Slot fills with 128-bit data), and the bandwidth number corresponding to the audio service indicates the number of 8-bit data blocks allocated by the audio service (1 Time Slot fills with 8-bit data, or may also fill with null service data).
In a possible implementation, the traffic class and bandwidth number information of each traffic stream data may be maintained through a port flow table. The port flow table may be stored in the first device or the routing device, so as to record one or more items of the service type, the bandwidth number, and the number corresponding to the multiple items of service flow data, respectively.
Illustratively, the port flow meter may be as shown in table 1 below:
TABLE 1
Stream numbering Significant bit Class of stream Number of bandwidths
0 1 0x1 (Audio service flow) 0x0001 (Audio bandwidth number)
1 1 0x2 (video traffic stream) 0x0015 (non-audio frequency bandwidth number)
2 1 0x2 (video traffic stream) 0x002D (non-audio frequency bandwidth number)
3 1 0x2 (video traffic stream) 0x000F (non-audio bandwidth number)
4 1 0x3 (USB 3 traffic) 0x0005 (non-audio bandwidth number)
5 0 0x0 (null traffic stream) NA
The stream number represents the number of each service stream data, namely, one service stream data is used as one service stream and is used for numbering and distinguishing different service streams; the valid bit indicates whether the traffic flow is transmitted on the current port, 0 indicates no transmission, and 1 indicates transmission. The setting of the valid bit can enable the routing device to control which service flow data is sent by each port and which service flow data is not sent by setting the valid bit when shunting, so that the routing device can also configure a port flow table in advance, and one port can correspond to one port flow table and is used for maintaining information such as bandwidth number required by data transmission from the corresponding port. The stream type represents the type of the service stream corresponding to the current stream number, and can include various service streams such as an empty service stream, an audio service stream, a video service stream, a USB3 service stream and the like; the bandwidth number indicates the number of bandwidth units allocated to a current traffic stream corresponding to the stream number in one cycle period, where the number of bandwidths corresponding to an audio traffic stream with a number of 0 and a stream type (i.e., traffic type) of 0x1 is 1, the number of bandwidths corresponding to a video traffic stream with a number of 2 and a stream type (i.e., traffic type) of 0x2 is 45, and the number of bandwidths corresponding to a USB traffic stream with a number of 4 and a stream type (i.e., traffic type) of 0x3 is 5.
After the bandwidth number is determined, an integration step may be performed to integrate at least two types of size data blocks (e.g., 8bit and 128 bit) cut from the multiple items of traffic stream data, so as to obtain a target data stream to be transmitted. And obtaining a target data stream comprising at least one cycle period by referring to the bandwidth number of each item of service stream data during integration. The number of data blocks corresponding to any service flow data in one cycle period is equal to the bandwidth number corresponding to any service flow data.
In particular, the integration of data blocks may be implemented in the following manner:
the numbers corresponding to the multiple items of service flow data are obtained, for example, the number information of the various items of service flow data is obtained by inquiring the port flow table. Then, in a cycle period, data blocks corresponding to multiple pieces of service stream data are sequentially arranged according to the numbers, and a data block sequence is obtained. For example, the port performs multi-stream transmission according to the port flow table shown in table 1, all the effective service flows allocate contents corresponding to 1 bandwidth number to the channel each time according to the sequence of increasing stream numbers, and after completing allocation of the effective service flow with the largest number, the port returns to the effective service flow with the smallest number and to be allocated continuously, and performs cyclic allocation according to the above rules to obtain a data block sequence.
Specifically, the queue of data blocks includes a plurality of first data block combinations that appear cyclically, and the plurality of first data blocks in the first data block combinations are derived from at least two items of service stream data and are arranged according to the numbering sequence of the at least two items of service stream data. For example, taking table 1 as an example, the port has 5 valid traffic streams, the number of which is from 0 to 4, as shown in fig. 10 (the inside of the rectangular dashed line box in fig. 10 is the target data stream), the 5 pieces of traffic stream data are sequentially arranged according to the number order of 0 to 4, the 1 st first data block combination is formed from the traffic stream data with the number of 0 to the traffic stream data with the number of 4, and then, the traffic stream data with the number of 0 is returned to, and the traffic stream data is sequentially arranged again, so that the 2 nd first data block combination is obtained until the bandwidth number of each piece of traffic stream data in one cycle is completely allocated. The number of each data block shown in fig. 9 is the number of the corresponding traffic flow data (traffic flow).
It should be noted that, in practical applications, it is likely that the remaining Time Slot corresponds to the same service stream data within one cycle period, and for convenience of description and distinction, in the embodiment of the present application, a service stream local combination that only includes a data block corresponding to one service stream data (with the same number) is defined as a second data block combination, where the second data block in the second data block combination is derived from the same service stream data; while a partial combination of data blocks containing different items of traffic flow data (different numbers) is defined as a first data block combination. For example, in fig. 9, the first data block combination includes 5 different numbered data blocks of 0-4, while the second data block combination includes only the data block numbered 2.
It should be noted that, the embodiment of the present application proposes the following integration mechanism: as a possible implementation manner, in a cycle, the second data block combination is arranged after the first data block combination, and in the first data block combination, any two adjacent first data blocks are derived from different pieces of traffic data, that is, in each first data block combination, only one bandwidth unit is allocated to each numbered traffic data item, but the same numbered traffic data is not allowed to continuously occupy multiple adjacent bandwidth units. To facilitate understanding of the improvement of the method provided in the embodiment of the present application, please refer to fig. 3, where fig. 3 is a schematic diagram illustrating a service flow after data integration is performed in DP2.0 in the prior art, and as can be seen from the diagram, a plurality of Time slots are continuously occupied by service flow data 1, whereas in the embodiment of the present application, as shown in fig. 9, in a data block sequence located at a front position in a cycle period, data blocks with different numbers are sequentially arranged at intervals, and there is no case that data blocks with the same number are continuously arranged, that is, adjacent data blocks in a first data block combination are derived from different service flow data; and if the data blocks of one service flow data are remained, the data blocks can be continuously arranged and correspond to the second data block combination. The effect of this design is that the services with different numbers are transmitted as concurrently as possible, that is, the concurrent transmission of different items of service flow data (for example, 5 items of service flow data with numbers 0 to 4) is controlled at a microscopic angle, so that the effect of concurrent transmission of multiple items of service flow data can be shown at a macroscopic view, and the delay of other service flow data caused by the preferential transmission of one type of service flow data is avoided. For the service type with higher requirement on transmission speed, in a cycle period, the remaining data blocks in the service stream data with larger bandwidth number may be distributed later, and the bandwidth number occupied by the service stream data in a cycle period is the largest, so from a macroscopic view, the transmission speed of the service stream data with larger bandwidth number is not affected.
It should be noted that, in the scheme provided in this embodiment of the present application, during the actual processing, part of padding data may be added according to the coding requirement, for example, the coding system requires to process 128-bit data each time, and for convenience of management and analysis by the receiving end, the padding processing may be performed on data blocks that are less than 128 bits. For example, for the 1 st Time Slot in a cycle period, that is, the traffic flow 0, the Slot may be filled to 128 bits, which is convenient for the encoding process of the subsequent encoding module. When the data amount in a single Time Slot exceeds 128 bits in the prior art, the embodiments of the present application provide that even in the case of performing data padding, bandwidth waste can be reduced comparatively.
In other implementations, padding may not be performed. Or, in order to reduce the bandwidth waste, a plurality of data blocks with the size of 8 bits are spliced so as to facilitate the encoding and decoding. For example, if a plurality of small services actually wait to be transmitted, the small services can be subjected to fragmentation management and spliced, so that the bandwidth utilization rate is further improved; and the data can be sent according to the actual bandwidth unit without accumulating splicing data, so that the splicing workload is reduced, and the transmission delay is brought.
Further, illustratively, referring to fig. 10, one cycle period may include 125 pieces, wherein when the remaining amount of data of each piece of traffic stream data is not enough to fill up one cycle period, data 0 may be filled in the remaining Time Slot of the cycle period.
In the embodiment of the present application, synchronization of bandwidth allocation information needs to be performed between the source device and the sink device as well as between the source device and the routing device, so that a service stream sent by the source device can be decoded and split by the sink device. Under a static bandwidth resource allocation mode, uniform bandwidth allocation information may be stored in the source device, the sink device, and the routing device, that is, at least bandwidth unit information corresponding to various service categories is stored in advance, or bandwidth number information corresponding to each service category may also be stored, that is, the bandwidth allocation information may be written into a corresponding hardware device as a factory default parameter of a product, or may be written in uniformly when software upgrade is performed on the source device and the sink device. If the bandwidth unit is dynamically set, the source device at the sending end should inform the receiving end (routing device or sink device) of the information such as the types of the traffic streams and the dynamically set bandwidth unit thereof in real time. At this time, the transmitting end may synchronize these information to the receiving end through the auxiliary link or by setting some fields in the target data stream, so that the receiving end can distinguish the bandwidth units corresponding to each service.
Specifically, the synchronization of the bandwidth information can be achieved in two ways:
the method I comprises the following steps: a notification message is sent over the secondary link prior to data transmission.
After determining the bandwidth unit information corresponding to each item of service flow data, the source device generates a notification message, where the notification message carries at least the number information, the service type information, and the bandwidth unit information corresponding to one or more items of service flow data. Then, the notification message is transmitted to the routing device or the sink device through the first link to synchronize the bandwidth unit information. The first link is a physical link connected between the first device and the second device or the routing device. Illustratively, the first link may be an SB link or an AUX channel.
Taking the SB Link as an example, the SB Link is a full duplex Link with a low-speed communication capability, and can implement a plurality of functions such as plug detection, positive and negative plug identification, control information interaction, topology discovery, network establishment, and the like. The control information interaction can be used for realizing the information synchronization of the sending end and the receiving end, therefore, when the bandwidth unit is dynamically set, the sending end can package information such as each service flow type and the corresponding bandwidth unit, and the like, and the receiving end is told in advance through the SB Link, so that the receiving end can immediately and correctly analyze the received data. As an implementation manner, the packet is shown in table 2 below, in which information such as each traffic stream type and the corresponding dynamically configured bandwidth unit can be encapsulated from the 8 th Byte to the last Byte.
TABLE 2
Figure BDA0003159037960000161
Figure BDA0003159037960000171
It can be seen from the table that, in a possible implementation manner, the notification message may only include information of the bandwidth unit of the adjusted service flow, that is, the synchronization manner is equivalent to performing dynamic adjustment on the basis of a static bandwidth allocation manner, and when one or more of the bandwidth units determined according to the service type is found to be unreasonable, the data amount of the bandwidth unit corresponding to the service flow data may be dynamically adjusted. For example, the data format in the USB service is uncertain, so that for the USB service, the bandwidth unit determined in advance according to the type may not be suitable for the data type to be currently transmitted and classified under the USB service, and therefore, the data format of the specific service stream data under the USB service type may be identified, and when the bandwidth unit corresponding to the predetermined USB service type cannot meet the requirement of the data format for the transmission speed, the bandwidth unit with a larger data size may be allocated to the service stream data in the data format again, and the changed service stream data is notified to the receiving end (routing device or sink device) through the notification message.
The second method comprises the following steps: the relevant fields are set in the target data stream to synchronize the bandwidth information.
Specifically, after determining information such as bandwidth unit information and bandwidth number corresponding to each item of service stream data, a packet header is generated, where the packet header should carry necessary bandwidth allocation information that is required by a receiving end and can be decoded and split, for example, the packet header may carry number information, service category information, bandwidth unit information, and bandwidth number information corresponding to each item of service stream data, and then the packet header is encapsulated in a target data stream. The message header may be generated by a sending end, and is generally generated by a source device or a routing device, where after the source device obtains an integrated target data stream, a message header may be encapsulated before service stream data to record types and bandwidth units of various service stream data in subsequent data. Illustratively, referring to table 3 below, table 3 is an example of the format of information carried in a traffic stream header (packet header).
TABLE 3
Figure BDA0003159037960000172
Figure BDA0003159037960000181
Illustratively, all necessary information related to bandwidth resource allocation can be encapsulated into the above table 3, table 3 may also be called a Character Delimitation table, and the table is composed of 4 128-bit data, including 1 Delimitation Character (predetermined special Character string), CD (charcter Delimitation) and 3 bandwidth allocation characters LC0, LC1, LC2 (Link Count), and can be transmitted as a data header. Wherein, flowid represents the number of each Type of service flow, type represents the Type of service flow, control represents the operation Type (for example, whether to send) to the service flow, and bw _ cnt represents the number of bandwidth allocated to the service flow corresponding to the number. When the receiving end receives the data header, the receiving end can synchronize the bandwidth information with the sending end through the flow, the type and the bw _ cnt. As can be seen from the figure, LC0, LC1, LC2 correspond to 12 items of traffic flow data, and in actual operation, the number of items of traffic flow data maintained by the table is not limited to 12 items, since the table is dynamically updatable.
It should be noted that, the packet header or the data header carrying the information shown in table 3 may be encapsulated in the target data stream, where one packet header is encapsulated every several cycles, that is, the encapsulation is performed every N cycle periods, and N is a positive integer greater than or equal to 1. For example, N =3, one packet header is encapsulated every 3 cycle periods, and the packet header carries the bandwidth resource allocation information of the 3 cycle periods. The information of N, i.e. the number information of several cycle periods corresponding to one header, may be included in the delimiter character shown in table 3, or may be added as a separate field to table 3 or table 2.
It should be noted that, the above tables 2 and 3 are only an example, table 3 may also only carry information of bandwidth units corresponding to one or several changed service stream data, table 2 may also carry information of bandwidth units of various service stream data, that is, if a dynamic maintenance mode is adopted based on a static allocation mode, a bandwidth unit of each service stream data may not be set dynamically, and corresponding bandwidth units may be set in advance for different types of services, when one or several of the services need to be adjusted, the sending end informs the receiving end through an SB Link or a field in which a service stream type needs to be set in the service stream data, and after the receiving end receives the type of each service stream, the data is analyzed according to the bandwidth unit that is set in advance. If a fully dynamic bandwidth allocation method is adopted, the information such as bandwidth units of all items of traffic stream data needs to be carried in table 2 or table 3.
Therefore, bandwidth allocation information, delimitation information (such as delimitation characters) and other information can be added to the integrated service flow, and the information can be added before the data are integrated or can be added at an appointed position after the data are integrated. In addition, routing information should be added so that the receiving end can parse the data normally. The routing information at least contains destination address information of the receiving end.
The foregoing embodiments are mainly explained from the perspective of the source device side, and embodiments of the present application further provide a data processing method executed by the sink device (second device), where the method at least includes the following procedures:
receiving a target data stream sent by a source device or a routing device, wherein the target data stream includes at least two data blocks, and the at least two data blocks are obtained based on multiple items of traffic flow data, that is, the at least two data blocks are derived from the multiple items of traffic flow data; the multiple items of service flow data correspond to at least two service types and correspond to at least two bandwidth units with different data volume sizes; then, determining bandwidth units corresponding to multiple items of service flow data respectively, splitting a target data flow at least according to the bandwidth units corresponding to the multiple items of service flow data respectively to obtain multiple data blocks corresponding to the multiple items of service flow data respectively, integrating the multiple data blocks corresponding to the same item of service flow data into corresponding service flow data, and obtaining restored multiple items of service flow data.
Specifically, referring to fig. 7, the data splitting process performed at the sink device side may include: the data is split into the inverse process of the data integration executed at the side of the source equipment, the data blocks with corresponding sizes are split from the target data stream according to the information of bandwidth units and the like corresponding to all the service stream data and the size of the bandwidth unit corresponding to all the service stream data, and a plurality of data blocks (namely, the data blocks corresponding to the same service stream data number) derived from the same service stream data are integrated, so that all the service stream data are restored.
The embodiment of the present application further provides a data processing method, which is applied to the routing device, that is, in the embodiment of the present application, a corresponding improvement is also performed on one side of the routing device. In particular, the routing device is at least configured to perform the following steps: receiving a target data stream; as above, the target data stream includes at least two data blocks, and the at least two data blocks are obtained based on the multiple items of traffic stream data; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes; then determining bandwidth units corresponding to the multiple items of service flow data respectively, and then splitting a target data flow at least according to the bandwidth units corresponding to the various items of service flow data respectively to obtain multiple data blocks corresponding to the various items of service flow data respectively; then determining destination addresses corresponding to various service flow data respectively; integrating a plurality of data blocks corresponding to at least one item of service flow data corresponding to the same destination address to obtain corresponding sub-data flows; and forwarding at least one sub-data stream to respective destination addresses. The destination address may be a destination port address, for example, an ID (Identity document) of the destination port.
As an implementable manner, it is obvious that the routing device may determine the bandwidth unit information corresponding to each item of traffic flow data through a header of a message transmitted by the primary link or a notification message transmitted by the secondary link.
If a static bandwidth allocation manner is adopted, the routing device may store a bandwidth information table in advance, and then dynamically modify bandwidth allocation information (including bandwidth units and/or bandwidth numbers) of individual service stream data according to the notification packet or the packet header encapsulated in the service stream. Specifically, the following manner may be adopted:
and receiving a notification message, and modifying the bandwidth units corresponding to the service flow data with the corresponding numbers according to the bandwidth units corresponding to at least one service flow data recorded in the notification message.
In the embodiment of the present application, the dynamic allocation of the bandwidth unit is initiated by the source device, and the routing device may modify the bandwidth number. Specifically, the packet header also carries bandwidth number information corresponding to each item of service flow data, and the routing device obtains bandwidth resource information of a second link after receiving the packet header, where the second link is a physical link connected between the routing device and the second device or between different routing devices. And the routing equipment adjusts the bandwidth number respectively corresponding to at least one item of service flow data according to the bandwidth resource information corresponding to the second link. For example, the transmission capacity of the physical link (first link) from the source device to the routing device reaches 100Gbps, while the transmission capacity of the physical link (second link) connecting the routing device and the sink device is only 100Mbps, so the original bandwidth allocation scheme is obviously not applicable to the second link, and the routing device is required to adjust the bandwidth.
It should be noted that, compared to the source device, the routing device does not need to perform the steps of adaptation, caching, bandwidth allocation, and the like, but the routing device may perform the steps of integration, bandwidth number adjustment, and the like. For example, the service flow sent by the source device includes service flow data of different destination addresses, which needs to be split by the routing device and then integrated, that is, split, to be distributed to the respective corresponding sink devices.
In the dynamic allocation mode, in the same service flow, in the transmission process, the source device may dynamically adjust the minimum bandwidth unit, and transmit the bandwidth unit to the receiver in real time through a field in the service flow data or notify the routing device through the SB Link before the transmission starts, so that the routing device may also perform data blocking. For example, after the source device sends the target data stream, it notifies the routing device to modify some service stream data, and then the routing device needs to split and restore the service stream into various service stream data, and then split and integrate the service stream data according to the modified bandwidth unit information. For the specific splitting and integrating steps, please refer to the description of the method at the source device side, which is not described herein again.
An embodiment of the present application further provides a data transmission system, including: a first device, i.e., a source device, for executing the data processing method executed by the source device; a second device, that is, a sink device, for executing the data processing method executed by the above-mentioned sink device; and the physical link is used for transmitting a target data stream or a sub-data stream sent by the routing device, wherein the sub-data stream is a data stream obtained by integrating a plurality of data blocks corresponding to at least one item of service flow data corresponding to the same destination address.
The embodiment of the present application further provides a data transmission interface, configured to transmit a target data stream or a sub-data stream sent by a routing device.
The embodiment of the present application further provides a physical link, which is used for transmitting a target data stream or a sub-data stream sent by a routing device. The physical link comprises a main link and an auxiliary link, wherein the main link is used for transmitting a target data stream; and the auxiliary link is used for transmitting the notification message. Specifically, the main link is used for transmitting the integrated high-speed data, and may include a plurality of transmission channels, which may support a plurality of transmission rates. The SB Link, a full-duplex Link with low-speed communication capability, includes only two transmission channels, one transmission channel is used to send low-speed data, and the other transmission channel is used to receive low-speed data, and is used to control information interaction between a source device and a sink device. The sending end sets information of different bandwidth units for different types of services, and can inform the receiving end in advance through the SB Link before service transmission so that the receiving end can analyze data normally.
An embodiment of the present application further provides an electronic device, which may include: a processor; a memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions. Wherein the instructions, when executed, enable the terminal device to perform any of the methods described above in the embodiments as performed based on the source device.
An embodiment of the present application further provides an electronic device, which may include: a processor; a memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions. Wherein the electronic device, when the instructions are executed, may perform the method as performed above based on the sink device.
An embodiment of the present application further provides a routing device, where the routing device includes: one or more processors; a memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions that, when executed by the routing device, cause the routing device to perform the above-described routing device-based method.
In summary, according to the bandwidth allocation scheme provided in the embodiment of the present application, for a service flow type that is rarely transmitted and has a very small data amount during each transmission, a sending end may set a small bandwidth unit to reduce the waste of bandwidth. If a plurality of small bandwidth unit services are transmitted, the transmitting end can perform fragmentation management and splicing, so that the bandwidth utilization rate is further improved, and data can be transmitted according to the actual bandwidth units without performing accumulated splicing of the data, so that the splicing workload is reduced, and the transmission delay is brought. For the service flow types which are frequently transmitted and have extremely large data volume during each transmission, a transmitting end can set a large bandwidth unit, so that the requirement of continuous transmission of a large amount of data is met, and the number of data blocks and the cost can be reduced.
As shown in fig. 11, a possible product hardware architecture of an electronic device (source device) 110 provided in the embodiment of the present application may include:
the one or more first data transmission interfaces 111 may use a hardware structure of an existing interface such as a DP interface and a USB interface (host device interface), or may be an interface that is different from a conventional interface and is designed by using a brand new hardware.
The first processor 112, includes one or more processing units. For example: the first processor 112 may include an Application Processor (AP), a modem processor, a Graphic Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a Digital Signal Processor (DSP), and the like. Wherein, the different processing units may be independent devices or may be integrated in one or more processors.
A first memory 113 for storing the above computer instructions for implementing data processing and various items of traffic stream data, such as audio data, video data and USB traffic stream data. The first memory 113 may be an external memory independent from the first processor 112, or may be disposed in the first processor 112. For example, in some embodiments, the memory built into the first processor 112 may be a cache memory for holding instructions or data that have just been used or recycled by the first processor 112. If the first processor 112 needs to use the instruction or data again, it can be called directly from the cache. Avoiding repeated accesses reduces the latency of the first processor 112.
The memory may be a read-only memory (ROM), other types of static storage devices that may store static information and instructions, a Random Access Memory (RAM), or other types of dynamic storage devices that may store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact disc, laser disc, optical disc, digital versatile disc, blu-ray disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, etc.
The first power management module 114 receives the input of the battery and/or the charge management module and supplies power to the first processor 112 and the first memory 113. The first power management module 114 may also be used to monitor parameters such as battery capacity, battery cycle number, battery state of health (leakage, impedance), etc. In other embodiments, the first power management module 114 may also be disposed in the first processor 112. In other embodiments, the first power management module 114 and the charging management module may be disposed in the same device.
It is to be understood that the structures illustrated in the drawings in the embodiments of the present application do not limit the electronic device 110. In other embodiments of the present application, the electronic device 110 may include more or fewer components than illustrated, or combine certain components, or split certain components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
One possible product hardware architecture of the electronic device (sink device) 120 provided by the embodiment of the present application is shown in fig. 12, where the hardware architecture of the sink device 120 may include:
the one or more second data transmission interfaces 121 may also use a hardware structure of an existing interface such as a DP interface and a USB interface (slave device interface), or may be an interface that is different from a conventional interface and is designed by a completely new hardware. The interface 121 is adapted to the interface 111.
A second processor 122 comprising one or more processing units. For example: the second processor 122 may include an Application Processor (AP), a modem processor, a Graphic Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a Digital Signal Processor (DSP), and the like. The different processing units may be separate devices or may be integrated into one or more processors.
And a display screen 123 for playing the received video data. In particular, the display screen 123 may include a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 120 may include at least one display screen 123.
It should be noted that the display screen 123 is an optional component of the electronic device, and is not a necessary component, and in most embodiments, the display screen needs to be configured to express video data; in some embodiments, the sink device may not have a display screen, for example, when the sink device is a sound box, the display screen is not provided, and fig. 12 is only an exemplary structure and is not to be construed as a necessary limitation to the sink device.
A speaker 124, and an audio circuit 125, the speaker 124 being connected to the second processor 122 through the audio circuit for playing audio data.
An input unit 126 for a user to control the playing of media data such as video or audio. Specifically, as one implementation, the input unit 126 may be integrated with the display screen 123 into a touch display screen; the input unit 126 may also include a pressure sensor (not shown in fig. 12), which senses a pressure signal generated by a user and converts the pressure signal into an electrical signal to complete user command input. In some embodiments, the pressure sensor may be disposed on the display screen 123.
The sink device may also include a second power management module 127.
In one implementation, the second processor 122 or the first processor 112 may also include other interface(s). The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a general-purpose input/output (GPIO) interface, and/or a Universal Serial Bus (USB) interface, etc.
Any processor may include multiple I2C buses, and the processor may be coupled to the sensor group 112, the power management module 115, and the flash 120 through different I2C bus interfaces. For example: the processor may be coupled to the display screen 123 via an I2C interface, allowing the processor and display screen 123 to communicate via an I2C bus interface.
In one implementation, the processor may include multiple sets of I2S buses and the I2S interface may be used for audio communication. The processor may be coupled to the audio circuitry 125 via an I2S bus to enable communication between the processor and the audio circuitry 125 to enable controlled sounding of the speaker 124.
One possible product hardware architecture for the routing device 130 is shown in fig. 13 and may include: one or more third data transfer interfaces 131, a third processor 132, a second memory 133, and a third power management module 134. For each hardware description, reference is made to corresponding devices in the source device, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, which includes computer instructions, when the computer instructions are executed on an electronic device, cause the electronic device to perform the method according to any one of the above.
An embodiment of the present application further provides a chip system, including: a communication interface for inputting and/or outputting information; a processor for executing a computer executable program to cause a device on which the system-on-chip is installed to perform the method as described in any one of the above.
It should be understood that, in the embodiments of the present application, "first", "second", etc. are only intended to refer to different objects, and do not mean other limitations on the objects referred to.
It should be understood that the term "unit" in the embodiments of the present application may be implemented in software and/or hardware, and is not particularly limited thereto. For example, a "unit" may be a software program, a hardware circuit, or a combination of both that implement the above-described functions. The hardware circuitry may include an Application Specific Integrated Circuit (ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality.
Thus, the units of each example described in the embodiments of the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, and means that there may be three relationships, for example, a and/or B, and may mean that a exists alone, a and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" and the like, refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein can be implemented as electronic hardware, computer software, or combinations of electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and all of them should be covered by the protection scope of the present application. The protection scope of the present application shall be subject to the protection scope of the claims.

Claims (35)

1. A data processing method is applied to a first device, wherein the first device is used for sending data through a data transmission interface; the method comprises the following steps:
determining bandwidth units respectively corresponding to a plurality of items of service flow data to be processed; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes;
obtaining at least two data blocks with data size corresponding to the at least two bandwidth units according to the at least two bandwidth units; the at least two data blocks are obtained based on the multiple items of service flow data;
and integrating the at least two data blocks to obtain an integrated target data stream.
2. The method of claim 1, wherein the determining the bandwidth units respectively corresponding to the plurality of items of traffic flow data to be processed comprises:
identifying service types respectively corresponding to the plurality of items of service flow data;
and determining a bandwidth unit corresponding to a service type corresponding to any service flow data in the plurality of service flow data as a bandwidth unit corresponding to any service flow data.
3. The method of claim 2, wherein the plurality of traffic classes includes audio traffic and video traffic; the data volume of the bandwidth unit corresponding to the audio service is 8 bits; the data volume of the bandwidth unit corresponding to the video service is 128 bits.
4. The method of claim 1, wherein prior to the integrating the at least two data chunks, the method further comprises:
determining the bandwidth numbers respectively corresponding to the plurality of items of service flow data at least based on the target bandwidth, the total number of data blocks in a cycle period and the effective bandwidth respectively corresponding to the plurality of items of service flow data; wherein the effective bandwidth is a bandwidth for transmitting the plurality of items of service flow data.
5. The method of claim 4, wherein the integrating the at least two data blocks to obtain the target data stream to be transmitted comprises:
integrating the at least two data blocks according to the bandwidth number to obtain a target data stream comprising at least one cycle period; the number of data blocks corresponding to any service flow data in one cycle period is equal to the bandwidth number corresponding to any service flow data.
6. The method of claim 5, wherein the integrating the at least two data chunks comprises:
acquiring numbers corresponding to the plurality of items of service flow data respectively;
in the cycle period, sequentially arranging data blocks corresponding to the plurality of items of service flow data respectively according to the serial numbers to obtain a data block sequence;
the data block sequence comprises a plurality of first data block combinations which appear in a circulating mode, wherein the first data blocks in the first data block combinations are derived from at least two items of service flow data and are arranged according to the number sequence of the at least two items of service flow data.
7. The method of claim 6,
in the first data block combination, any two adjacent first data blocks are derived from different items of service flow data.
8. The method of claim 6,
the data block sequence further comprises a second data block combination;
in the data block sequence, the second data block combination is arranged after the plurality of first data block combinations, and a second data block in the second data block combination is derived from the same service flow data.
9. The method according to claim 4, wherein a port flow table is stored in the first device, and the port flow table is used for recording at least one of a traffic class, a bandwidth number, and a number corresponding to each of the plurality of items of traffic flow data.
10. The method of claim 4, wherein after determining the bandwidth units respectively corresponding to the plurality of items of service flow data to be processed, the method further comprises:
generating a message header, wherein the message header carries number information, service category information, bandwidth unit information and bandwidth number information respectively corresponding to the plurality of items of service flow data;
and encapsulating the message header in the target data stream.
11. The method of claim 10, wherein said encapsulating said message header in said target data stream comprises:
and encapsulating one message header in each N cycle periods in the target data stream, wherein N is a positive integer greater than or equal to 1.
12. A method according to any of claims 4-11, wherein a cycle comprises 125 data blocks.
13. The method of claim 2, wherein before determining the bandwidth units respectively corresponding to the plurality of items of traffic flow data to be processed, the method further comprises:
acquiring service parameters respectively corresponding to the plurality of service types; the traffic parameter comprises at least one of a target bandwidth and a transmission frequency; the transmission frequency is the frequency of transmitting a plurality of items of service flow data of the same service class through the data transmission interface in a preset time period;
and determining bandwidth units respectively corresponding to the service classes according to the service parameters.
14. The method of claim 13, wherein the determining the bandwidth units corresponding to the service classes according to the service parameters comprises:
determining a first service class with the minimum first target bandwidth according to the first target bandwidths respectively corresponding to the service classes;
determining a first bandwidth unit corresponding to a first service class; of the at least two types of bandwidth units, the first bandwidth unit has a smallest amount of data.
15. The method of claim 14, wherein after determining that the first traffic class corresponds to the first bandwidth unit, the method further comprises:
determining that at least one of the plurality of traffic classes other than the first traffic class corresponds to the same bandwidth unit with the same data volume size.
16. The method of claim 15, wherein before the determining that at least one traffic class of the plurality of traffic classes other than the first traffic class corresponds to a same bandwidth unit of a same size of data volume, the method further comprises:
determining a data amount of a smallest data object encoding the target data stream;
the determining that at least one of the traffic classes other than the first traffic class corresponds to the same bandwidth unit with the same data size includes:
determining that at least one traffic class of the plurality of traffic classes except the first traffic class corresponds to a same bandwidth unit with the same data volume, and the data volume of the same bandwidth unit is the same as the data volume of the minimum data object.
17. The method of claim 14, wherein after determining that the first traffic class corresponds to the first bandwidth unit, the method further comprises:
and determining at least two service classes except the first service class in the plurality of service classes, wherein the at least two service classes correspond to at least two bandwidth units with different data volume sizes.
18. The method of claim 13, wherein after determining a bandwidth unit corresponding to a traffic class corresponding to any traffic flow data in the plurality of traffic flow data as a bandwidth unit corresponding to the any traffic flow data, the method further comprises:
acquiring second target bandwidths corresponding to the multiple items of service flow data respectively;
and when the difference value between the second target bandwidth corresponding to any service flow data and the first target bandwidth corresponding to the service type corresponding to any service flow data exceeds a preset threshold value, adjusting the bandwidth unit corresponding to any service flow data.
19. The method of any one of claims 13-18,
under the condition that the service type corresponding to any service flow data is an audio service, the target bandwidth is determined based on at least one of an audio sampling rate, an audio sampling bit width and a channel number;
and/or the presence of a gas in the gas,
and under the condition that the service type corresponding to any service flow data is a video service, determining the target bandwidth based on at least one of video resolution, refresh rate and color depth.
20. The method of claim 1,
the data quantity of a single data block obtained based on any service flow data is the same as that of a bandwidth unit corresponding to any service flow data.
21. The method of claim 1,
the first equipment is used for sending data to the second equipment or the routing equipment through the data transmission interface;
after determining the bandwidth units respectively corresponding to the multiple items of service flow data to be processed, the method further includes:
generating a notification message, wherein the notification message carries number information, service type information and bandwidth unit information which are respectively corresponding to at least one item of service flow data;
transmitting the notification message to the routing device or a second device through a first link to synchronize bandwidth unit information; the first link is a physical link connected between the first device and the second device or the routing device.
22. The method of claim 21, wherein the first link is an SB link or an AUX channel.
23. A data processing method is applied to a second device, wherein the second device is used for receiving data through a data transmission interface; the method comprises the following steps:
receiving a target data stream; the target data stream comprises at least two data blocks, and the at least two data blocks are obtained based on a plurality of items of service flow data; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes;
determining bandwidth units corresponding to the multiple items of service flow data respectively;
splitting the target data stream at least according to the bandwidth units respectively corresponding to the plurality of items of service stream data to obtain a plurality of data blocks respectively corresponding to the plurality of items of service stream data;
integrating a plurality of data blocks corresponding to the same service flow data into corresponding service flow data to obtain the restored service flow data.
24. A data processing method is characterized in that the method is applied to a routing device, and the routing device is used for forwarding data through a data transmission interface; the method comprises the following steps:
receiving a target data stream; the target data stream comprises at least two data blocks, and the at least two data blocks are obtained based on a plurality of items of service flow data; the multiple items of service flow data correspond to at least two service types, and the multiple items of service flow data correspond to at least two bandwidth units with different data volume sizes;
determining bandwidth units corresponding to the plurality of items of service flow data respectively;
splitting the target data stream at least according to bandwidth units respectively corresponding to the multiple items of service stream data to obtain multiple data blocks respectively corresponding to the multiple items of service stream data;
determining destination addresses corresponding to the plurality of items of service flow data respectively; integrating a plurality of data blocks corresponding to at least one item of service flow data corresponding to the same destination address, and respectively forwarding.
25. The method of claim 24, wherein the determining the bandwidth units corresponding to the plurality of items of traffic flow data respectively comprises:
and acquiring a message header encapsulated in the target data stream, and determining bandwidth units corresponding to the multiple pieces of service stream data respectively at least according to bandwidth unit information carried in the message header.
26. The method of claim 24,
the determining the bandwidth units corresponding to the plurality of items of service flow data respectively includes:
and identifying the service types corresponding to the plurality of items of service flow data respectively, and determining the bandwidth unit corresponding to the service type corresponding to any item of service flow data as the bandwidth unit corresponding to any item of service flow data.
27. The method of claim 26, wherein after determining a bandwidth unit corresponding to a traffic class corresponding to any traffic stream data as a bandwidth unit corresponding to any traffic stream data, the method further comprises:
receiving a notification message; the notification message carries at least one item of service flow data respectively corresponding number, service type and bandwidth unit information; the notification message is transmitted through a first link; the first link is a physical link connected between the first device and the routing device;
and modifying the bandwidth units corresponding to the service flow data with the corresponding numbers according to the bandwidth units corresponding to at least one item of service flow data recorded in the notification message.
28. The method of claim 25,
the message header carries the bandwidth numbers respectively corresponding to the multiple items of service flow data;
the target data stream comprises at least one cycle period, wherein the number of data blocks corresponding to any item of service flow data in one cycle period is equal to the bandwidth number corresponding to any item of service flow data;
the method further comprises the following steps:
acquiring bandwidth resource information of a second link; the second link is a physical link connected between the routing device and the second device or connected between different routing devices;
and adjusting the bandwidth number respectively corresponding to at least one item of service flow data based on the bandwidth resource information.
29. A data transmission system, comprising:
a first device for performing the method of any one of claims 1-22;
a second device for performing the method of claim 23;
physical link for transmitting a target data stream according to the method of any of claims 1 to 22 or 23 or for transmitting a plurality of data blocks corresponding to at least one traffic stream data corresponding to the same destination address according to the method of any of claims 24 to 28.
30. A data transmission interface for transmitting a target data stream according to the method of any one of claims 1 to 22 or 23 or for transmitting a plurality of data blocks corresponding to at least one item of traffic stream data corresponding to a same destination address according to any one of claims 24 to 28.
31. A physical link for transmitting a target data stream according to any one of claims 1-22 or 23 or for transmitting a plurality of data blocks corresponding to at least one traffic stream data corresponding to a same destination address according to any one of claims 24-28.
32. An electronic device configured to transmit data via a data transmission interface, the electronic device comprising:
one or more processors; a memory; at least one application program; and one or more computer programs, wherein the one or more computer programs are stored in the memory, the one or more computer programs comprising instructions which, when executed by the electronic device, cause the electronic device to perform the method of any of claims 1-22 or 23 or 24-28.
33. A storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method of any of claims 1-22 or 23 or 24-28.
34. A chip system, comprising:
a communication interface for inputting and/or outputting data;
a processor for executing a computer executable program for causing a device on which the system-on-chip is installed to perform the method of any one of claims 1-22 or 23 or 24-28.
35. A software program product, characterized in that it comprises program instructions which, when run on an electronic device, cause the electronic device to carry out the method according to any one of claims 1-22 or 23 or 24-28.
CN202110785349.0A 2021-07-12 2021-07-12 Data processing method, device, storage medium and chip system Pending CN115604123A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110785349.0A CN115604123A (en) 2021-07-12 2021-07-12 Data processing method, device, storage medium and chip system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110785349.0A CN115604123A (en) 2021-07-12 2021-07-12 Data processing method, device, storage medium and chip system

Publications (1)

Publication Number Publication Date
CN115604123A true CN115604123A (en) 2023-01-13

Family

ID=84840935

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110785349.0A Pending CN115604123A (en) 2021-07-12 2021-07-12 Data processing method, device, storage medium and chip system

Country Status (1)

Country Link
CN (1) CN115604123A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610268A (en) * 2023-07-20 2023-08-18 江苏华存电子科技有限公司 Data processing method and system for improving access speed

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116610268A (en) * 2023-07-20 2023-08-18 江苏华存电子科技有限公司 Data processing method and system for improving access speed
CN116610268B (en) * 2023-07-20 2023-11-14 江苏华存电子科技有限公司 Data processing method and system for improving access speed

Similar Documents

Publication Publication Date Title
US9413697B2 (en) All delivered network adaptor
US9025457B2 (en) Router and chip circuit
US8730992B2 (en) System and method for transmitting network packets adapted for multimedia streams
JP5405625B2 (en) Stream control method and apparatus for parallel data reception
US20080288638A1 (en) Method and system for managing network resources in audio/video bridging enabled networks
US7450610B2 (en) Apparatus and method for allocating channel time to applications in wireless PAN
US20210297468A1 (en) Technologies for end of frame detection in streaming content
US20040030712A1 (en) Efficient routing of packet data in a scalable processing resource
WO2014162243A1 (en) Methods, apparatus, and computer program products for allocating bandwidth for push and pull content requests in a content delivery network
CN104219229A (en) Virtual desktop data transmission method and device
CN102594676A (en) Bridge port expansion network and congestion control method thereof, port expander (PE) and control bridge
US20190166058A1 (en) Packet processing method and router
JP2018520434A (en) Method and system for USB 2.0 bandwidth reservation
CN115604123A (en) Data processing method, device, storage medium and chip system
JP2009213138A (en) Data transport container for transferring data in high speed internet protocol network
TW201445989A (en) System and method for encoding and decoding data
CN106487711A (en) A kind of method of caching dynamically distributes and system
US8724621B2 (en) Electronic apparatus and method for sharing ethernet circuit between plurality of ports
CN111385223A (en) Flow control method, device, system and storage medium
CN206024025U (en) A kind of home gateway
CN102685107B (en) Method and system for providing enhanced reverse link packet via transmission link
WO2014205691A1 (en) Data packet processing method and data packet processing device and system
CN111182024B (en) Data synchronization method, device and storage medium
CN110225289B (en) Conference terminal and interface signal conversion method
CN101796776B (en) A packet structure for a mobile display digital interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination