ADC sampling data transmission method and device, electronic equipment and storage medium
By quantizing and encoding the ADC sampled data, packets are generated to reduce the amount of data transmission, the problem of insufficient transmission bus bandwidth is solved and data transmission efficiency is improved.
Patent Information
- Application Number
- CN202411270921.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
With the increase in the sampling frequency of ADC, the bandwidth of the transmission bus is difficult to meet the sampling requirements of ADC, resulting in low data transmission efficiency.
By quantizing the ADC sampled data, quantized reference data is obtained, and encoding is performed based on the data, the first message and the second message are generated, and the data transmission amount is reduced, and the bandwidth requirements for the transmission bus are reduced.
Through the encoded packet transmission, the data transmission amount is reduced, the bandwidth requirements for the transmission bus are reduced, and the data transmission efficiency is improved.
Smart Images

Figure CN119602795A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of ADC sampling technology, and in particular to an ADC sampling data transmission method, device, electronic device and storage medium. Background Art
[0002] ADC is an electronic component that converts analog signals into digital signals. In recent years, with the rapid development of electronic technology, the sampling frequency of ADC is getting higher and higher. At present, the sampling frequency of ADC has rapidly increased from tens of megahertz in the early days to hundreds of megahertz. As the sampling frequency of ADC increases, the bandwidth of the general transmission bus will be difficult to meet the sampling requirements of ADC. Summary of the invention
[0003] The present application aims to propose an ADC sampling data transmission method, device, electronic device and storage medium, which can solve the problem that the transmission bus is difficult to meet the ADC sampling requirements.
[0004] In a first aspect, an embodiment of the present application provides an ADC sampling data transmission method, including a coding strategy applied to a data sending end, wherein the coding strategy includes:
[0005] Quantizing the sampled data to obtain quantized reference data, wherein the sampled data includes a plurality of sampled values, and the quantized reference data includes a plurality of quantized reference values, and the plurality of sampled values corresponds to the plurality of quantized reference values;
[0006] Based on the quantization reference data, the first data is encoded to obtain a first message, wherein the first data includes more than N consecutive sampling values in the sampled data, and the quantization reference value corresponding to each sampling value of the first data is the same. The first message includes a first identifier, a length of the first data and an average value of the first data, and the first identifier is used to indicate the type of the first message; N is an integer greater than 1.
[0007] According to some embodiments of the present application, the encoding strategy further includes:
[0008] Based on the quantization reference data, a second message is generated according to the second data, the second data includes multiple consecutive sampling values in the sampled data, among any N consecutive sampling values of the second data, there are at least two sampling values corresponding to different quantization reference values, the second message includes a second identifier, a length of the second data and the second data, and the second identifier is used to indicate the type of the second message.
[0009] According to some embodiments of the present application, a decoding strategy is also included, and the decoding strategy includes:
[0010] Decoding the received message, and if the message is decoded to obtain a first identifier, confirming that the message is the first message;
[0011] The length of the first data and the average value of the first data are obtained according to the decoding of the first message, and a first decoding result is obtained.
[0012] According to some embodiments of the present application, before obtaining the length of the first data and the average value of the first data by decoding the first message and obtaining the first decoding result, the method further includes:
[0013] A linear calibration process is performed on the average value of the first data obtained by decoding.
[0014] According to some embodiments of the present application, a decoding strategy applied to a data receiving end is also included, and the decoding strategy further includes:
[0015] If the second identifier is obtained by decoding the message, confirming that the message is the second message;
[0016] A second decoding result is obtained according to the length of the second data obtained by decoding the second message and the second data.
[0017] According to some embodiments of the present application, before obtaining a second decoding result based on the length of the second data and the second data obtained by decoding the second message, the method further includes:
[0018] Perform linear calibration processing on the second data obtained by decoding.
[0019] According to some embodiments of the present application, the quantizing the sampled data to obtain quantized reference data includes:
[0020] Determine a plurality of quantization intervals and a plurality of quantization reference values according to the resolution and accuracy index of the ADC, wherein the plurality of quantization intervals correspond to the plurality of quantization reference values;
[0021] The quantization reference data is obtained according to the sampling data, the quantization interval and the quantization reference value.
[0022] In a second aspect, an embodiment of the present application provides an ADC sampling data transmission device, comprising:
[0023] a quantization unit, configured to perform quantization processing on the sampled data to obtain quantization reference data, wherein the sampled data includes a plurality of sampled values, and the quantization reference data includes a plurality of quantization reference values, and the plurality of sampled values correspond to the plurality of quantization reference values;
[0024] A coding unit is used to encode the first data based on the quantization reference data to obtain a first message, wherein the first data includes more than N consecutive sampling values in the sampled data, and the quantization reference value corresponding to each sampling value of the first data is the same. The first message includes a first identifier, a length of the first data and an average value of the first data, and the first identifier is used to indicate the type of the first message; N is an integer greater than 1.
[0025] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0026] at least one processor;
[0027] at least one memory for storing at least one program;
[0028] When at least one of the programs is executed by at least one of the processors, the above-mentioned ADC sampling data transmission method is implemented.
[0029] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the ADC sampling data transmission method as described above when executed by the processor.
[0030] In an embodiment of the present application, quantization reference data is obtained by quantizing the sampled data, and the quantization reference data is used to determine whether there are multiple consecutive sampled values in the sampled data that have the same quantization reference value, that is, to confirm whether there is first data in the sampled data. If the first data exists, the first data is encoded to obtain a first message. The length of the first data in the first message is used to indicate the number of sampled values in the first data, and the average value of the first data in the first message is used to indicate the size of each sampled value in the first data. There is no need to transmit each sampled value in the first data. Sending the first message can reduce the amount of data transmission and reduce the bandwidth requirements for the transmission bus.
[0031] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The present application is further described below with reference to the accompanying drawings and embodiments, wherein:
[0033] Figure 1 A flowchart of the encoding strategy in an embodiment of the ADC sampling data transmission method provided by the present application;
[0034] Figure 2 A schematic diagram of the structure of an embodiment of the ADC sampling data transmission device provided by the present application;
[0035] Figure 3 A schematic diagram of the structure of an embodiment of the electronic device provided in this application.
[0036] Reference numerals:
[0037] ADC sampling data transmission device 100, quantization unit 110, encoding unit 120, electronic device 200, processor 210, memory 220. DETAILED DESCRIPTION
[0038] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0039] In the description of the present application, it should be understood that the descriptions involving orientation, such as the orientation or positional relationship indicated as up, down, etc., are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0040] In the description of this application, "a plurality" means more than two. If there is a description of "first" or "second", it is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features or indicating the order of the indicated technical features.
[0041] In the description of this application, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in this application based on the specific content of the technical solution.
[0042] The embodiment of the present application provides an ADC sampling data transmission method, including a coding strategy applied to a data sending end, such as Figure 1 As shown, the encoding strategy includes:
[0043] Step S100: quantizing the sampled data to obtain quantized reference data, where the sampled data includes a plurality of sampled values, and the quantized reference data includes a plurality of quantized reference values, where the plurality of sampled values correspond to the plurality of quantized reference values;
[0044] Step S200: Based on the quantization reference data, encode the first data to obtain a first message, where the first data includes more than N consecutive sampling values in the sampled data, and each sampling value of the first data corresponds to the same quantization reference value. The first message includes a first identifier, a length of the first data, and an average value of the first data. The first identifier is used to indicate the type of the first message; N is an integer greater than 1.
[0045] In an embodiment of the present application, quantization reference data is obtained by quantizing the sampled data, and the quantization reference data is used to determine whether there are multiple consecutive sampled values in the sampled data that have the same quantization reference value, that is, to confirm whether there is first data in the sampled data. If the first data exists, the first data is encoded to obtain a first message. The length of the first data in the first message is used to indicate the number of sampled values in the first data, and the average value of the first data in the first message is used to indicate the size of each sampled value in the first data. There is no need to transmit each sampled value in the first data, which reduces the amount of data transmission and reduces the bandwidth requirements for the transmission bus.
[0046] In the above step S100, the sampling values in the sampling data are obtained by sampling the analog signal by the ADC and then quantizing it, and the quantized reference data is obtained by further quantizing the sampling data.
[0047] In some implementations of the present application, in the above step S200, the value of N is 3. If there are three or more consecutive sampling values in the sampled data that have the same quantization reference value, these sampling values are encoded to generate a first message. The first identifier is used to indicate that the message is the first message. The format of the first message is shown in Table 1:
[0048] Table 1. Schematic diagram of the first message format
[0049] First logo First data length The average value of the first data
[0050] In one embodiment of the present application, the encoding strategy further includes:
[0051] Step S300: Based on the quantization reference data, a second message is generated according to the second data, the second data includes multiple consecutive sampling values in the sampled data, and among any N consecutive sampling values of the second data, there are at least two sampling values corresponding to different quantization reference values. The second message includes a second identifier, a length of the second data and the second data, and the second identifier is used to indicate the type of the second message.
[0052] In this embodiment, since there are no more than N consecutive sampling values in the second data that correspond to the same quantization reference value, it cannot be encoded into the first message for transmission. Therefore, except for the first data in the sampled data, the rest of the second data is transmitted by generating and sending the second message. That is, the second message needs to transmit each sampling value of the second data. The format of the second message is shown in Table 2:
[0053] Table 2. Schematic diagram of the second message format
[0054] Second mark Second data length Sample value 1 Sample value 2 Sample value 3 …
[0055] An embodiment of the present application further includes a decoding strategy, which includes:
[0056] Step S400: Decode the received message, and if the message is decoded to obtain a first identifier, confirm that the message is a first message;
[0057] Step S500: Obtain the length of the first data and the average value of the first data according to the decoding of the first message, and obtain a first decoding result.
[0058] In this embodiment, when decoding the received message, a first identifier is obtained through decoding, and the type of the message is determined to be a first message. The length and average value of the first data obtained through decoding are further used to determine the number of first data, and the average value is used as the size of each sampling value of the first data. Multiple average values having the same number as the sampling values in the first data are obtained through decoding, and used as the first decoding result of the first message.
[0059] In one embodiment of the present application, before "obtaining the length of the first data and the average value of the first data according to the first message decoding to obtain the first decoding result" in step S500, the method further includes:
[0060] Step S510: performing linear calibration processing on the average value of the first data obtained by decoding.
[0061] In this embodiment, since the sampling value in the sampling data is obtained by quantizing the sampling voltage, rather than the actual magnitude of the sampling voltage, the mapping relationship between the sampling value and the sampling voltage can be used through linear calibration to calculate the magnitude of the sampling voltage according to the sampling value, thereby calibrating the sampling value to the sampling voltage. By performing linear calibration on the average value of the first data obtained by decoding, the average value of the first data can be calibrated to the average value of the sampling voltage, so that the first decoding result is more accurate.
[0062] An embodiment of the present application further includes a decoding strategy applied to a data receiving end, and the decoding strategy further includes:
[0063] Step S600: If the second identifier is obtained by decoding the message, confirm that the message is the second message;
[0064] Step S700: Obtain a second decoding result according to the length of the second data and the second data obtained by decoding the second message.
[0065] In this embodiment, when decoding the received message, a second identifier is obtained by decoding, then the type of the message is determined to be a second message, and the length of the second data obtained by decoding is further used to decode the second data, thereby decoding to obtain multiple sampling values of the second data.
[0066] In one embodiment of the present application, before step S700 of "obtaining a second decoding result according to the length of the second data obtained by decoding the second message and the second data", the following steps are also included:
[0067] Step S710: performing linear calibration processing on the decoded second data.
[0068] In this embodiment, since the sampling value in the sampling data is obtained by quantizing the sampling voltage, rather than the actual magnitude of the sampling voltage, the mapping relationship between the sampling value and the sampling voltage can be used through linear calibration to calculate the magnitude of the sampling voltage according to the sampling value, thereby calibrating the sampling value to the sampling voltage. By performing linear calibration on the sampling value of the decoded second data, the sampling value of the second data can be calibrated to the sampling voltage, making the second decoding result more accurate.
[0069] In one embodiment of the present application, the step S100 of “performing quantization processing on the sampled data to obtain quantized reference data” includes:
[0070] Step S110: determining a plurality of quantization intervals and a plurality of quantization reference values according to the resolution and accuracy index of the ADC, wherein the plurality of quantization intervals correspond to the plurality of quantization reference values;
[0071] Step S120: Obtain quantization reference data according to the sampled data, the quantization interval and the quantization reference value.
[0072] In this embodiment, each quantization interval has a corresponding quantization reference value. The quantization reference value corresponding to the quantization interval is obtained according to which quantization interval the sampled value in the sampled data falls into, thereby completing the quantization processing of the sampled data. Each sampled value can obtain a corresponding quantization reference value through quantization processing. The length of the quantization interval can be determined according to the resolution and accuracy index of the ADC.
[0073] In some implementations of the present application, the quantization reference value may be taken from a corresponding quantization interval, for example, the left endpoint value in the quantization interval is taken as the corresponding quantization reference value.
[0074] For example, when the hardware accuracy index is 0.1% and the ADC is 16 bits, the length of the quantization interval is determined to be 65.535, and the result after rounding the left endpoint value of the quantization interval is used as the quantization reference value.
[0075] The sampling data of ADC is as follows:
[0076] 11, 12, 13, 14... (100 ADC sampling values less than 65.535, i.e., the first data), 32, 34, 35, 36... (100 ADC sampling values less than 65.535, i.e., the first data),
[0077] 78, 80, 98, 77… (100 ADC sampling values greater than 65.535 and less than 131.07, i.e., the first data),
[0078] 10, 90, 80, 50, 600 ... (second data),
[0079] The quantitative reference data obtained after the above sampling data is quantized:
[0080] 0, 0, 0, 0… (the quantization reference value of 200 sampling values less than 65.535 is 0),
[0081] 66, 66, 66, 66… (the quantization reference value of 100 sample values greater than 65.535 and less than 131.07 is 66).
[0082] 0, 66, 66, 0, 594...(quantization reference values corresponding to the second data).
[0083] Therefore, in the above sampled data, the first 200 sampled values are the first data and can be encoded into the first message. The 201st to 300th sampled values are the first data and can be encoded into the first message. The second data starting from the 301st sampled value can generate the second message.
[0084] In addition, the embodiment of the present application provides an ADC sampling data transmission device 100, such as Figure 2 As shown, including:
[0085] The quantization unit 110 is used to perform quantization processing on the sampled data to obtain quantized reference data, where the sampled data includes a plurality of sampled values, and the quantized reference data includes a plurality of quantized reference values, where the plurality of sampled values correspond to the plurality of quantized reference values;
[0086] The encoding unit 120 is used to encode the first data based on the quantization reference data to obtain a first message, where the first data includes more than N consecutive sampling values in the sampled data, and each sampling value of the first data corresponds to the same quantization reference value. The first message includes a first identifier, a length of the first data, and an average value of the first data. The first identifier is used to indicate the type of the first message; N is an integer greater than 1.
[0087] The ADC sampling data transmission device 100 provided in the embodiment of the present application can implement each process implemented in the above-mentioned method embodiment and achieve the same beneficial effects. To avoid repetition, it will not be described again here.
[0088] In addition, the present application embodiment also provides an electronic device 200, such as Figure 3 As shown, including:
[0089] at least one processor 210;
[0090] At least one memory 220, used to store at least one program;
[0091] When at least one program is executed by at least one processor 210 , the ADC sampling data transmission method as described above is implemented.
[0092] The electronic device 200 provided in the embodiment of the present application can implement the various processes implemented in the above-mentioned method embodiment and achieve the same beneficial effects. To avoid repetition, they will not be described here.
[0093] In addition, an embodiment of the present application further provides a computer-readable storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the ADC sampling data transmission method as described above.
[0094] The computer-readable storage medium provided in the embodiment of the present application can implement each process implemented in the above method embodiment and achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0095] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0096] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present application.
Claims
1. An ADC sampling data transmission method, characterized in that: Including a coding strategy applied to the data sending end, the coding strategy includes: Quantizing the sampled data to obtain quantized reference data, wherein the sampled data includes a plurality of sampled values, and the quantized reference data includes a plurality of quantized reference values, and the plurality of sampled values corresponds to the plurality of quantized reference values; Based on the quantization reference data, the first data is encoded to obtain a first message, wherein the first data includes more than N consecutive sampling values in the sampled data, and the quantization reference value corresponding to each sampling value of the first data is the same. The first message includes a first identifier, a length of the first data and an average value of the first data, and the first identifier is used to indicate the type of the first message; N is an integer greater than 1.
2. The ADC sampling data transmission method according to claim 1, characterized in that: The encoding strategy also includes: Based on the quantization reference data, a second message is generated according to the second data, the second data includes multiple consecutive sampling values in the sampled data, among any N consecutive sampling values of the second data, there are at least two sampling values corresponding to different quantization reference values, the second message includes a second identifier, a length of the second data and the second data, and the second identifier is used to indicate the type of the second message.
3. The ADC sampling data transmission method according to claim 2, characterized in that: Also included is a decoding strategy applied to a data receiving end, the decoding strategy comprising: Decoding the received message, and if the message is decoded to obtain a first identifier, confirming that the message is the first message; The length of the first data and the average value of the first data are obtained according to the decoding of the first message, and a first decoding result is obtained.
4. The ADC sampling data transmission method according to claim 3, characterized in that: Before obtaining the length of the first data and the average value of the first data by decoding the first message and obtaining the first decoding result, the method further includes: A linear calibration process is performed on the average value of the first data obtained by decoding.
5. The ADC sampling data transmission method according to claim 3, characterized in that: Also included is a decoding strategy, the decoding strategy further comprising: If the second identifier is obtained by decoding the message, confirming that the message is the second message; A second decoding result is obtained according to the length of the second data obtained by decoding the second message and the second data.
6. The ADC sampling data transmission method according to claim 5, characterized in that: Before obtaining a second decoding result based on the length of the second data and the second data obtained by decoding the second message, the method further includes: Perform linear calibration processing on the second data obtained by decoding.
7. The ADC sampling data transmission method according to claim 1, characterized in that: The quantizing the sampled data to obtain quantized reference data includes: Determine a plurality of quantization intervals and a plurality of quantization reference values according to the resolution and accuracy index of the ADC, wherein the plurality of quantization intervals correspond to the plurality of quantization reference values; The quantization reference data is obtained according to the sampling data, the quantization interval and the quantization reference value.
8. An ADC sampling data transmission device, characterized in that: include: a quantization unit, configured to perform quantization processing on the sampled data to obtain quantization reference data, wherein the sampled data includes a plurality of sampled values, and the quantization reference data includes a plurality of quantization reference values, and the plurality of sampled values correspond to the plurality of quantization reference values; A coding unit is used to encode the first data based on the quantization reference data to obtain a first message, wherein the first data includes more than N consecutive sampling values in the sampled data, and the quantization reference value corresponding to each sampling value of the first data is the same. The first message includes a first identifier, a length of the first data and an average value of the first data, and the first identifier is used to indicate the type of the first message; N is an integer greater than 1.
9. An electronic device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, the ADC sampling data transmission method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: A program executable by a processor is stored therein, and when the program executable by the processor is executed by the processor, it is used to implement the ADC sampling data transmission method according to any one of claims 1 to 7.