Data classification method and device, electronic equipment and computer readable storage medium
By writing type-encoded characters into the data stream and converting it into a serial data stream, the problem of low data classification efficiency in existing technologies is solved, and fast data stream type identification and classification are achieved.
Patent Information
- Application Number
- CN202410933395.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-13
AI Technical Summary
Existing data encoding methods have low efficiency in data classification after decoding in a single communication link, mainly due to the lack of control codes for distinguishing data types.
Type-encoded characters are written into data streams of different data types, and the encoded data streams are converted into serial data streams and sent to the receiving end. The receiving end decodes and classifies the data based on the type-encoded characters.
It improves the efficiency of data classification after decoding in a single communication link, and enables rapid data stream type identification and classification.
Smart Images

Figure CN121333481A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a data classification method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] Existing data encoding methods primarily involve FPGA1 (Field-Programmable Gate Array) mapping parallel 8-bit data to 10-bit codes using an 8b / 10b encoding table, and then serializing it into single signal pairs via SERDES (Serializer / Deserializer) before outputting it to FPGA2. FPGA2 receives the 10-bit serial data, converts it into parallel data in SERDES, and then decodes each data byte back into parallel 8-bit data according to the 8b / 10b mapping table. However, existing data classification methods only utilize special control codes for transmitting synchronization and error detection information, resulting in low data classification efficiency in a single communication link after decoding. Summary of the Invention
[0003] This application provides a data classification method, apparatus, electronic device, and computer-readable storage medium, which can improve the data classification efficiency of decoded data in a single communication link.
[0004] In a first aspect, embodiments of this application provide a data classification method applied at a sending end, the data classification method comprising:
[0005] Acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0006] Write the type encoding character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0007] The encoded data stream is converted into a serial data stream and sent to the receiving end, so that the receiving end performs deserialization processing on the serial data stream to obtain multiple parallel second data streams, and extracts the type-encoded character from each second data stream to determine the data type of each second data stream.
[0008] Secondly, embodiments of this application provide a data classification method applied at a receiving end, the data classification method comprising:
[0009] Receive the serial data stream sent by the transmitting end;
[0010] The serial data stream is deserialized to obtain a second, parallel data stream after deserialization.
[0011] Extract type-encoded characters from each of the second data streams;
[0012] Based on the type-encoded characters extracted from each of the second data streams, the data type of each of the second data streams is determined.
[0013] Thirdly, embodiments of this application provide a data classification device applied at a sending end, comprising:
[0014] An acquisition module is used to acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0015] The encoding module is used to write the type encoding character corresponding to the data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0016] The sending module is used to convert the encoded data stream into a serial data stream and send it to the receiving end, so that the receiving end can deserialize the serial data stream to obtain multiple parallel second data streams, and extract the type-encoded characters from each second data stream to determine the data type of each second data stream.
[0017] Fourthly, embodiments of this application provide a data classification device applied at a receiving end, comprising:
[0018] The receiving module is used to receive the serial data stream sent by the transmitting end;
[0019] A decoding module is used to deserialize the serial data stream to obtain a second, parallel data stream after deserialization.
[0020] The extraction module is used to extract type-encoded characters from each of the second data streams;
[0021] The classification module is used to determine the data type of each second data stream based on the type-encoded characters extracted from each second data stream.
[0022] Fifthly, embodiments of this application also provide an electronic device, including a memory storing multiple computer programs; a processor loads the computer programs from the memory to execute any of the data classification methods provided in embodiments of this application.
[0023] Sixthly, embodiments of this application also provide a computer-readable storage medium storing multiple computer programs adapted for loading by a processor to execute any of the data classification methods provided in embodiments of this application.
[0024] In a seventh aspect, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements any of the data classification methods provided in embodiments of this application.
[0025] The data classification method provided in this application involves the sending end writing the corresponding type encoding characters into the data streams of different data types, and converting the encoded data streams into serial data streams to be sent to the receiving end. Therefore, after receiving the serial data streams sent by the sending end, the receiving end decodes them and quickly classifies each data stream in the decoded data according to the type encoding characters, thereby improving the data classification efficiency of the decoded data in a single communication link. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is one of the flowcharts illustrating the data classification method provided in the embodiments of this application;
[0028] Figure 2 This is the second flowchart illustrating the data classification method provided in the embodiments of this application;
[0029] Figure 3 This is a flowchart illustrating the encoding and decoding process provided in the embodiments of this application;
[0030] Figure 4 This is one of the structural schematic diagrams of the data classification device provided in the embodiments of this application;
[0031] Figure 5 This is the second schematic diagram of the structure of the data classification device provided in the embodiments of this application;
[0032] Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0034] This application provides a data classification method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application will be described from the perspective of a data classification apparatus, which can be integrated into an electronic device, meaning the data classification method of this application can be executed by an electronic device. Optionally, the electronic device includes a terminal device. The terminal device can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, smart interactive whiteboard, or personal computer (PC), etc. Optionally, the electronic device includes a server, which can be an independent server, a server network, or a server cluster, including but not limited to computers, network hosts, single network servers, sets of network servers, or cloud servers composed of servers. The cloud server consists of a large number of computers or network servers based on cloud computing.
[0035] It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the figures.
[0036] Existing data encoding methods primarily involve the transmitter mapping each byte of parallel 8-bit data to a 10-bit code using an 8b / 10b encoding mapping table, and then serializing it into a single signal pair via SERDES before outputting it to the receiver. The receiver receives the 10-bit serial data, converts it back to parallel data in SERDES, and then decodes each data byte into parallel 8-bit data according to the 8b / 10b mapping table. Current data classification methods only utilize special control codes for transmitting synchronization and error detection information, resulting in low data classification efficiency for decoded data within a single communication link.
[0037] To address the problems in the prior art, the inventors of this application propose a data classification method using type-encoded characters. The sending end writes the corresponding type-encoded characters into data streams of different data types and converts the encoded data streams into serial data streams before sending them to the receiving end. Therefore, the receiving end decodes the serial data streams sent by the sending end and quickly classifies each data stream in the decoded data based on the type-encoded characters, thus improving the data classification efficiency of the decoded data in a single communication link.
[0038] Optionally, this application embodiment uses the sending end as the execution subject for illustration. The following detailed description is provided in conjunction with the accompanying drawings. (Reference) Figure 1 , Figure 1 This is one of the flowcharts illustrating the data classification method provided in this application embodiment. The specific flow of the data classification method provided in this application embodiment may include the following steps 10 to 30, wherein:
[0039] Step 10: Obtain the multimedia data to be transmitted.
[0040] Optionally, the sending end receives multimedia data to be transmitted. This multimedia data can be transmitted from the user terminal to the sending end, obtained by the sending end from the cloud, or dragged into the sending end by the user from a database. In this embodiment, the multimedia data is parallel data, meaning it includes at least two parallel first data streams. These first data streams can be text data streams, image data streams, audio data streams, video data streams, command data streams, and status data streams.
[0041] Text data streams refer to the continuous flow and transmission of text information within a system or network. Examples include real-time text messages, emails, and news updates transmitted over a network. Image data streams refer to the transmission of images or pictures within a system or network. This can include image data transmitted from cameras, scanners, or storage devices, or image files sent over a network via transport protocols such as HTTP. Audio data streams refer to the transmission of audio signals within a system or network. Examples include real-time audio streams transmitted over a network (such as VoIP calls and audio chat), music streaming, or audio data recorded from a microphone. Video data streams refer to the transmission of video signals within a system or network. Examples include real-time video streams acquired from cameras or video devices, and video files transmitted over the internet (such as video conferencing, live streaming, and video sharing platforms). A command data stream is a data stream used to control and guide multimedia processing. It contains various commands, computer programs, or control signals that instruct the multimedia system on how to perform operations such as data processing, playback, and recording. A status data stream transmits status information from the multimedia system, including the system's current state, parameter settings, error messages, and other data, reflecting the system's operational status.
[0042] Step 20: Write the type encoding character corresponding to the data type into each of the first data streams to obtain the multi-encoded data streams.
[0043] Optionally, the sending end obtains the data type of each first data stream and matches it in the character mapping table according to the data type of each first data stream to obtain the type-encoded character corresponding to each first data stream. The character mapping table is a mapping table constructed according to the preset data type and its corresponding type-encoded character. Different data types correspond to different type-encoded characters.
[0044] Optionally, the type-encoded character is a data type identifier that can indicate which type the data belongs to; for example, the type-encoded character is a K code.
[0045] In data encoding, K-code is a specific encoding method or identifier. K-code can be used to represent specific categories and types of data. Therefore, different types of data can be distinguished based on K-code. The character mapping table is shown in Table 1, and the K-codes in Table 1 are K28.0, K28.1, K28.2, K28.3, K28.4, and K28.5.
[0046] Table 1 Character Mapping Table
[0047] Data types Type-encoded characters Type Encoding audio type K28.0 00011100 Video type K28.1 00111100 Command type K28.2 01011100 State type K28.3 01111100 Text type K28.4 10011100 Image type K28.5 10111100
[0048] Furthermore, the sending end writes the type encoding character corresponding to its data type into each first data stream to obtain a multi-encoded data stream, as described in steps 201 to 202.
[0049] For example, multimedia data includes data stream 1, data stream 2, and data stream 3. Data stream 1 is an audio data stream, data stream 2 is a video data stream, and data stream 3 is a command data stream. Therefore, matching the data type of data stream 1 in the character mapping table yields the type encoding character K28.0. Matching the data type of data stream 2 yields the type encoding character K28.1. Matching the data type of data stream 3 yields the type encoding character K28.2. Writing the type encoding character K28.0 to data stream 1, K28.1 to data stream 2, and K28.2 to data stream 3 results in multiplexed data streams of {data stream 1, K28.0}, {data stream 2, K28.1}, and {data stream 3, K28.2}.
[0050] For example, the type encoding of each first data stream can be written into the type encoding character corresponding to its data type to obtain a multi-encoded data stream. Therefore, continuing with the above embodiment, the multi-encoded data streams are {data stream 1, 00011100}, {data stream 2, 00111100}, and {data stream 3, 01011100}.
[0051] Step 30: Convert the encoded data stream into a serial data stream and send it to the receiving end, so that the receiving end can deserialize the serial data stream to obtain multiple parallel second data streams, and extract the type-encoded characters from each second data stream to determine the data type of each second data stream.
[0052] Optionally, the sending end converts the encoded data stream into a serial data stream and transmits the serial data stream to the receiving end. The transmission method can be fiber optic transmission, communication interface transmission, wireless transmission, etc.
[0053] Furthermore, the receiving end receives the serial data stream, performs deserialization on the serial data stream, and obtains a parallel multi-channel second data stream after deserialization of the serial data stream.
[0054] Furthermore, the receiving end obtains the type encoding character of each of the parallel multiple second data streams, and classifies the data of each second data stream according to the type encoding character of each second data stream to obtain the data type of each second data stream, as described in steps 40 to 70.
[0055] In this embodiment, the sending end writes the corresponding type encoding characters into the data streams of different data types, and converts the encoded data streams into serial data streams and sends them to the receiving end. Therefore, after receiving the serial data streams sent by the sending end, the receiving end decodes them and quickly classifies each data stream in the decoded data according to the type encoding characters, thereby improving the data classification efficiency of the decoded data in a single communication link.
[0056] Furthermore, the description of steps 201 to 202 includes:
[0057] Step 201: Based on the encoding protocol, obtain the type encoding character corresponding to the data type of each first data stream, and determine the character position written in the corresponding data stream for each type encoding character;
[0058] Step 202: Based on the character position, write the type-encoded character corresponding to its data type into each of the first data streams to obtain the encoded data stream.
[0059] Optionally, the sending end obtains the encoding protocol of the data encoding, wherein the encoding protocol specifies the type encoding character corresponding to each data type, and the character position of each type encoding character written in each data stream. For example, the encoding protocol can be as shown in Table 2.
[0060] Table 2 Encoding Protocol
[0061] Data types Type-encoded characters Character position audio type K28.0 Prefix position Video type K28.1 Prefix position Command type K28.2 Suffix position State type K28.3 Suffix position Text type K28.4 Middle position Image type K28.5 Middle position
[0062] The prefix position is the starting position of the data stream, and the suffix position is the ending position of the data stream.
[0063] Furthermore, the sending end matches the data type of each first data stream according to the encoding protocol to obtain the type encoding character corresponding to the data type of each first data stream, and determines the character position written in the corresponding data stream for each type encoding character.
[0064] Furthermore, the sending end writes the type-encoded character corresponding to its data type into each first data stream according to the character position, thereby obtaining the encoded data stream corresponding to each first data stream.
[0065] For example, multimedia data includes data stream 1, data stream 2, and data stream 3. Data stream 1 is an audio data stream, data stream 2 is a video data stream, and data stream 3 is a command data stream. Therefore, by matching the data type of data stream 1 according to the encoding protocol, the type encoding character of data stream 1 is obtained as K28.0, with the character position being the prefix position. By matching the data type of data stream 2 according to the encoding protocol, the type encoding character of data stream 2 is obtained as K28.1, with the character position being the prefix position. By matching the data type of data stream 3 according to the encoding protocol, the type encoding character of data stream 3 is obtained as K28.2, with the character position being the suffix position. Write the type-encoded character K28.0 into data stream 1 according to the prefix position, resulting in the encoded data stream K28.0-data stream 1. Write the type-encoded character K28.1 into data stream 2 according to the prefix position, resulting in the encoded data stream K28.1-data stream 2. Write the type-encoded character K28.2 into data stream 3 according to the suffix position, resulting in the encoded data stream 3-K28.2.
[0066] In this embodiment, the sending end writes the corresponding type encoding characters into the data streams of different data types, and converts the encoded data streams into serial data streams and sends them to the receiving end. Therefore, after receiving the serial data streams sent by the sending end, the receiving end decodes them and quickly classifies each data stream in the decoded data according to the type encoding characters, thereby improving the data classification efficiency of the decoded data in a single communication link.
[0067] Further, the first data stream is a data stream encoded using a first encoding method, and the encoding method for the type-encoded characters is the first encoding method, where the first encoding method is, for example, an 8-bit encoding method. Therefore, before converting the encoded data stream into a serial data stream and sending it to the receiving end, and before the receiving end deserializes the serial data stream to obtain parallel multi-channel second data streams, the process further includes:
[0068] Step a: Encode the encoded data stream corresponding to the first encoding method to obtain the encoded data stream corresponding to the second encoding method.
[0069] Optionally, the sending end encodes the encoded data stream corresponding to the first encoding method to obtain the encoded data stream corresponding to the second encoding method. The second encoding method is, for example, the 10-bit encoding method. Therefore, it can be understood that the sending end encodes the 8-bit encoded data stream to obtain the 10-bit encoded data stream.
[0070] In other words, the first data stream is a data stream encoded using the first encoding method, and the type encoding characters in the first data stream are also encoded using the first encoding method. When converting the first data stream under the first encoding method into a first data stream under the second encoding method, it is also necessary to convert the type encoding characters in the first data stream under the first encoding method into type encoding characters under the second encoding method.
[0071] Furthermore, the first data stream is a data stream encoded using the second encoding method, and the type-encoded character is encoded using the second encoding method, such as a 10-bit encoding method. Therefore, the data classification method in this embodiment further includes:
[0072] Step b: Obtain the original multimedia data to be transmitted, wherein the original multimedia data includes at least two parallel third data streams, and the encoding method of the third data streams is the first encoding method;
[0073] Step c: Encode the third data stream to obtain at least two first data streams under the second encoding method;
[0074] Optionally, the sending end acquires the original multimedia data to be transmitted, wherein the original multimedia data includes at least two parallel third data streams, and the encoding method of the third data streams is the first encoding method.
[0075] Furthermore, the sending end parses the original multimedia data to obtain at least two parallel third data streams using the first encoding method, that is, at least two parallel 8-bit third data streams.
[0076] Furthermore, the sending end encodes the third data stream of the first encoding method using the second encoding method to obtain at least two first data streams under the second encoding method. In other words, it transforms at least two parallel 8-bit third data streams into at least two 10-bit first data streams.
[0077] Therefore, when writing the type encoding character corresponding to the data type to each first data stream, it is only necessary to write the type encoding character of the second encoding method corresponding to each first data stream to each first data stream. Thus, based on the encoding protocol, obtaining the type encoding character corresponding to the data type of each first data stream includes:
[0078] Based on the encoding protocol, the type-encoded character corresponding to the data type of each of the first data streams is obtained from the characters encoded by the second encoding method.
[0079] Optionally, the sending end obtains the encoding protocol for the data encoding, wherein the encoding protocol also specifies the type encoding character under the second encoding method corresponding to each data type. Therefore, the sending end matches the data type of each first data stream according to the encoding protocol, and obtains the type encoding character corresponding to the data type of each first data stream from the characters encoded by the second encoding method.
[0080] The embodiments of this application can convert the type-encoded characters in the first data stream under the first encoding method to the second encoding method, or directly write the type-encoded characters under the second encoding method into the first data stream under the second encoding method, thereby improving the encoding flexibility of the type-encoded characters.
[0081] Optionally, this application embodiment uses the receiving end as the execution subject for illustration. The following detailed description is provided in conjunction with the accompanying drawings. (Reference) Figure 2 , Figure 2 This is the second flowchart illustrating the data classification method provided in this application embodiment. The specific flow of the data classification method provided in this application embodiment may include the following steps 40 to 70, wherein:
[0082] Step 40: Receive the serial data stream sent by the transmitting end;
[0083] Step 50: Deserialize the serial data stream to obtain a second, parallel data stream after deserialization;
[0084] Step 60: Extract type-encoded characters from each of the second data streams;
[0085] Step 70: Determine the data type of each second data stream based on the type-encoded characters extracted from each second data stream.
[0086] Optionally, the receiving end receives the serial data stream sent by the sending end. The serial data stream is a data stream obtained by the sending end after writing the type encoding character corresponding to its data type into each data stream, and then serializing the multi-encoded data stream.
[0087] Therefore, the receiving end performs deserialization on the received serial data stream to obtain deserialized data. The deserialized data includes a second data stream that runs in parallel. Thus, it can be understood that the received serial data stream is deserialized to obtain a second data stream that runs in parallel.
[0088] Furthermore, the receiving end extracts the type encoding character of the second data stream from each second data stream, as described in steps 601 to 602.
[0089] Furthermore, the receiving end matches the type-encoded characters extracted from each second data stream in the character mapping table to obtain the data type corresponding to the type-encoded characters of each second data stream, and uses the obtained data type corresponding to the type-encoded characters of each second data stream as the data type of each second data stream. The character mapping table is shown in Table 1 of the embodiment in step 20.
[0090] For example, deserializing a serial data stream yields a second, multi-parallel data stream: {K28.0 - Data Stream 1}, {K28.1 - Data Stream 2}, and {Data Stream 3 - K28.2}. Therefore, the type encoding character for Data Stream 1 is K28.0, for Data Stream 2 it is K28.1, and for Data Stream 3 it is K28.2. Matching this character with a character mapping table reveals that Data Stream 1 is an audio data stream, Data Stream 2 is a video data stream, and Data Stream 3 is a command data stream.
[0091] The embodiments of this application can quickly classify various data streams in multimedia data according to type-encoded characters, thereby improving the data classification efficiency of decoded data in a single communication link.
[0092] Further, the description of steps 601 to 602 includes:
[0093] Step 601: Determine the character position of the type-encoded character in the second data stream based on the decoding protocol;
[0094] Step 602: Extract the corresponding type-encoded character from each of the second data streams based on the character position.
[0095] Optionally, the receiving end obtains the encoding protocol used by the sending end during the data encoding process, and obtains the corresponding decoding protocol according to the encoding protocol. The encoding protocol specifies the character position written for each type of encoded character in each data stream. Therefore, the decoding protocol specifies the character position extracted for each type of encoded character in each data stream. For example, the decoding protocol can be as shown in Table 3.
[0096] Table 3 Decoding Protocol
[0097] Data types Character position audio type Prefix position Video type Prefix position Command type Suffix position State type Suffix position Text type Middle position Image type Middle position
[0098] Furthermore, the receiving end parses each second data stream according to the decoding protocol to obtain the character position of the type-encoded character in the second data stream. Further, the receiving end extracts the corresponding type-encoded character from each second data stream based on the character position.
[0099] The embodiments of this application can extract the corresponding type-encoded characters from each second data stream. Therefore, the various data streams in the multimedia data can be quickly classified according to the type-encoded characters, which improves the data classification efficiency of the decoded data in a single communication link.
[0100] In an alternative embodiment, refer to Figure 3 , Figure 3 This is a flowchart illustrating the encoding and decoding process provided in the embodiments of this application. Taking multimedia data as parallel 8-bit audio and video data, and the data encoding and decoding type as 8b / 10b encoding and decoding type as an example, the specific process is as follows:
[0101] The sending end parses the parallel 8-bit audio and video data to obtain the data type of each audio and video data stream in the parallel 8-bit audio and video data. Based on the data type and encoding protocol of each audio and video data stream, it determines the K code of each audio and video data stream, as well as the writing character position of the K code of each audio and video data stream in each audio and video data stream.
[0102] Furthermore, the sending end writes the K code of each audio and video data stream into each audio and video data stream according to the character position, thus obtaining the encoded data stream of each audio and video data stream.
[0103] Furthermore, the transmitting end performs 8b / 10b encoding on the multi-channel encoded data stream, that is, converts each encoded data stream from 8-bit data code to 10-bit data code.
[0104] After completing 8b / 10b encoding, the transmitting end serializes the multi-encoded data stream into a 10-bit serial data stream through the SERDES serializer. The 10-bit serial data stream is the serial 10-bit audio and video data.
[0105] The other end of the transmitter is connected to the receiver via optical fiber. Therefore, the transmitter outputs a 10-bit serial data stream to the receiver via optical fiber.
[0106] Furthermore, after receiving the 10-bit serial data stream sent by the transmitter, the receiver converts the 10-bit serial data stream into a parallel 10-bit audio and video data stream using a SERDES deserializer. Then, it decodes the parallel 10-bit audio and video data stream into a parallel 8-bit audio and video data stream according to the 8b / 10b protocol. Finally, it decodes the parallel 8-bit audio and video data stream according to the decoding protocol to obtain the K code of each audio and video data stream in the parallel 8-bit audio and video data stream.
[0107] Furthermore, the receiving end matches the K-code of each audio / video data stream in the character mapping table to obtain the data type of each audio / video data stream, thereby classifying each audio / video data stream.
[0108] The data classification apparatus provided in the embodiments of this application will be described below. The data classification apparatus described below and the data classification method described above can be referred to in correspondence with each other.
[0109] Reference Figure 4 As shown, Figure 4 This is a schematic diagram of the structure of the data classification device provided in the embodiments of this application. The data classification device may include:
[0110] The acquisition module 401 is used to acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0111] Encoding module 402 is used to write the type encoding character corresponding to the data type in each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0112] The sending module 403 is used to convert the encoded data stream into a serial data stream and send it to the receiving end, so that the receiving end can deserialize the serial data stream to obtain multiple parallel second data streams, and extract the type-encoded character from each second data stream to determine the data type of each second data stream.
[0113] In this embodiment, the corresponding type encoding characters are written into the data streams of different data types, and the encoded data streams are converted into serial data streams and sent to the receiving end. Therefore, after receiving the serial data streams sent by the sending end, the receiving end decodes them and quickly classifies each data stream in the decoded data according to the type encoding characters, thereby improving the data classification efficiency of the decoded data in a single communication link.
[0114] In an optional example, encoding module 402 is also used for:
[0115] Based on the encoding protocol, obtain the type encoding character corresponding to the data type of each first data stream, and determine the character position written in the corresponding data stream for each type encoding character;
[0116] Based on the character position, the type-encoded character corresponding to its data type is written into each of the first data streams to obtain the encoded data stream.
[0117] In an optional example, encoding module 402 is also used for:
[0118] The encoded data stream corresponding to the first encoding method is encoded to obtain the encoded data stream corresponding to the second encoding method.
[0119] In an optional example, module 401 is also used for:
[0120] Acquire the original multimedia data to be transmitted, wherein the original multimedia data includes at least two parallel third data streams, and the encoding method of the third data streams is the first encoding method;
[0121] The third data stream is encoded to obtain at least two first data streams under the second encoding method;
[0122] The step of obtaining the type-encoded character corresponding to the data type of each of the first data streams based on the encoding protocol includes:
[0123] Based on the encoding protocol, the type-encoded character corresponding to the data type of each of the first data streams is obtained from the characters encoded by the second encoding method.
[0124] The specific embodiments of the data classification device provided in this application are basically the same as the embodiments of the data classification method, and will not be described in detail here.
[0125] Reference Figure 5 As shown, Figure 5 This is a schematic diagram of the structure of the data classification device provided in the embodiments of this application. The data classification device may include:
[0126] The receiving module 501 is used to receive the serial data stream sent by the transmitting end;
[0127] Decoding module 502 is used to deserialize the serial data stream to obtain a second data stream that is deserialized and parallel.
[0128] Extraction module 503 is used to extract type-encoded characters from each of the second data streams;
[0129] The classification module 504 is used to determine the data type of each of the second data streams based on the type-encoded characters extracted from each of the second data streams.
[0130] This application embodiment decodes the serial data stream sent by the transmitting end and quickly classifies each data stream in the decoded data according to the type encoding character, thereby improving the data classification efficiency of the decoded data in a single communication link.
[0131] In an optional example, extraction module 503 is also used for:
[0132] Based on the decoding protocol, the character position of the type-encoded character in the second data stream is determined;
[0133] Based on the character position, the corresponding type-encoded character is extracted from each of the second data streams.
[0134] The specific embodiments of the data classification device provided in this application are basically the same as the embodiments of the data classification method, and will not be described in detail here.
[0135] Optional, such as Figure 6 As shown, Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may include: a processor 610, a communication interface 620, a memory 630, and a communication bus 640, wherein the processor 610, the communication interface 620, and the memory 630 communicate with each other via the communication bus 640. The processor 610 can call a computer program in the memory 630 to execute steps of a data classification method, such as:
[0136] Acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0137] Write the type encoding character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0138] The encoded data stream is converted into a serial data stream and sent to the receiving end, so that the receiving end performs deserialization processing on the serial data stream to obtain multiple parallel second data streams, and extracts the type-encoded character from each second data stream to determine the data type of each second data stream.
[0139] Alternatively, the steps for performing a data classification method may include, for example:
[0140] Receive the serial data stream sent by the transmitting end;
[0141] The serial data stream is deserialized to obtain a second, parallel data stream after deserialization.
[0142] Extract type-encoded characters from each of the second data streams;
[0143] Based on the type-encoded characters extracted from each of the second data streams, the data type of each of the second data streams is determined.
[0144] Furthermore, the logical computer program in the aforementioned memory 630 can be implemented as a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several computer programs to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0145] On the other hand, embodiments of this application also provide a non-transitory computer-readable storage medium, which includes a computer program. The computer program can be stored on the non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the data classification method provided in the above embodiments, such as including:
[0146] Acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0147] Write the type encoding character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0148] The encoded data stream is converted into a serial data stream and sent to the receiving end, so that the receiving end performs deserialization processing on the serial data stream to obtain multiple parallel second data streams, and extracts the type-encoded character from each second data stream to determine the data type of each second data stream.
[0149] Alternatively, the steps for performing a data classification method may include, for example:
[0150] Receive the serial data stream sent by the transmitting end;
[0151] The serial data stream is deserialized to obtain a second, parallel data stream after deserialization.
[0152] Extract type-encoded characters from each of the second data streams;
[0153] Based on the type-encoded characters extracted from each of the second data streams, the data type of each of the second data streams is determined.
[0154] In another aspect, embodiments of this application also provide a computer product, which includes a computer program. The computer program can be stored on the computer product, and when the computer program is executed by a processor, the computer can perform the steps of the data classification method provided in the above embodiments, such as including:
[0155] Acquire multimedia data to be transmitted; the multimedia data includes at least two types of multimedia data streams;
[0156] Acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams;
[0157] Write the type encoding character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different;
[0158] The encoded data stream is converted into a serial data stream and sent to the receiving end, so that the receiving end performs deserialization processing on the serial data stream to obtain multiple parallel second data streams, and extracts the type-encoded character from each second data stream to determine the data type of each second data stream.
[0159] Alternatively, the steps for performing a data classification method may include, for example:
[0160] Receive the serial data stream sent by the transmitting end;
[0161] The serial data stream is deserialized to obtain a second, parallel data stream after deserialization.
[0162] Extract type-encoded characters from each of the second data streams;
[0163] Based on the type-encoded characters extracted from each of the second data streams, the data type of each of the second data streams is determined.
[0164] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0165] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several computer programs to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A data classification method, characterized in that, Applied to the sending end, the data classification method includes: Acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams; Write the type encoding character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different; The encoded data stream is converted into a serial data stream and sent to the receiving end, so that the receiving end performs deserialization processing on the serial data stream to obtain multiple parallel second data streams, and extracts the type-encoded character from each second data stream to determine the data type of each second data stream.
2. The data classification method according to claim 1, characterized in that, The step of writing the type-encoded character corresponding to its data type into each of the first data streams to obtain a multi-encoded data stream includes: Based on the encoding protocol, obtain the type encoding character corresponding to the data type of each first data stream, and determine the character position written in the corresponding data stream for each type encoding character; Based on the character position, the type-encoded character corresponding to its data type is written into each of the first data streams to obtain the encoded data stream.
3. The data classification method according to claim 2, characterized in that, The first data stream is a data stream encoded using a first encoding method, and the encoding method for the type-encoded characters is the first encoding method; Before the step of converting the encoded data stream into a serial data stream and sending it to the receiving end, so that the receiving end can deserialize the serial data stream to obtain parallel multi-channel second data streams, the method further includes: The encoded data stream corresponding to the first encoding method is encoded to obtain the encoded data stream corresponding to the second encoding method.
4. The data classification method according to claim 3, characterized in that, The data classification method also includes: Acquire the original multimedia data to be transmitted, wherein the original multimedia data includes at least two parallel third data streams, and the encoding method of the third data streams is the first encoding method; The third data stream is encoded to obtain at least two first data streams under the second encoding method; The step of obtaining the type-encoded character corresponding to the data type of each of the first data streams based on the encoding protocol includes: Based on the encoding protocol, the type-encoded character corresponding to the data type of each of the first data streams is obtained from the characters encoded by the second encoding method.
5. A data classification method, characterized in that, Applied to the receiving end, the data classification method includes: Receive the serial data stream sent by the transmitting end; The serial data stream is deserialized to obtain a second, parallel data stream after deserialization. Extract type-encoded characters from each of the second data streams; Based on the type-encoded characters extracted from each of the second data streams, the data type of each of the second data streams is determined.
6. The data classification method according to claim 5, characterized in that, The extraction of type-encoded characters from each of the second data streams includes: Based on the decoding protocol, the character position of the type-encoded character in the second data stream is determined; Based on the character position, the corresponding type-encoded character is extracted from each of the second data streams.
7. A data classification device, characterized in that, Applied to the sending end, including: An acquisition module is used to acquire multimedia data to be transmitted, the multimedia data including at least two parallel first data streams; The encoding module is used to write the type encoding character corresponding to the data type into each of the first data streams to obtain a multi-encoded data stream, wherein the type encoding characters corresponding to different data types are different; The sending module is used to convert the encoded data stream into a serial data stream and send it to the receiving end, so that the receiving end can deserialize the serial data stream to obtain multiple parallel second data streams, and extract the type-encoded characters from each second data stream to determine the data type of each second data stream.
8. A data classification device, characterized in that, Applied to the receiving end, including: The receiving module is used to receive the serial data stream sent by the transmitting end; A decoding module is used to deserialize the serial data stream to obtain a second, parallel data stream after deserialization. The extraction module is used to extract type-encoded characters from each of the second data streams; The classification module is used to determine the data type of each second data stream based on the type-encoded characters extracted from each second data stream.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing multiple computer programs; the processor loads the computer programs from the memory to perform the data classification method as described in any one of claims 1 to 4, or 5 to 6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of computer programs adapted for loading by a processor to perform the data classification method as described in any one of claims 1 to 4, or 5 to 6.
Citation Information
Patent Citations
Audio data processing and transmitting method and device
CN105321522A
Method and system for determining the data type of a stream of data
US5784544A