Method and device for high-speed transmission of large files from PC (Personal Computer) to Android equipment based on serial port protocol

By optimizing block size and rate through LZ4 real-time compression, mixed verification, and dynamic baud rate negotiation, the problems of low transmission efficiency and poor compatibility in large file transfers from PC to Android devices are solved, achieving efficient and reliable large file transfer.

CN121367697AActive Publication Date: 2026-01-20YILIAN ZHONGYIWEI TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202511957007.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-01-20
Estimated Expiration
2045-12-23

AI Technical Summary

Technical Problem

Existing PC-to-Android device large file transfer solutions based on serial port protocols suffer from low transfer efficiency, high data redundancy, poor compatibility, and inability to adapt to various scenario requirements. In particular, they have not effectively addressed issues related to file type compatibility, baud rate adjustment, verification mechanisms, and resource consumption.

Method used

It employs LZ4 real-time compression, a hybrid verification mechanism, dynamic baud rate negotiation rules, and a block compression pipeline protocol. By combining file type, transmission status, and hardware resources, it dynamically adjusts transmission parameters to optimize block size and rate, generates adaptation information, and performs hybrid verification.

Benefits of technology

It improves transmission efficiency and reliability, solves the problems of inefficiency, redundancy and poor compatibility in traditional solutions, and achieves efficient and reliable large file transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121367697A_ABST
    Figure CN121367697A_ABST
Patent Text Reader

Abstract

The invention provides a method and equipment for high-speed transmission of a large file from a PC (Personal Computer) to an Android device based on a serial port protocol, and is applied to the technical field of data processing. The invention relates to a high-speed transmission scheme of a serial port large file between a PC and an Android device, which comprises the following steps: firstly, receiving a transmission demand and serial port basic configuration, and generating protocol starting and dynamic resource configuration setting; then LZ4 real-time compression and hybrid verification are started in sequence, and initial file blocks and serial port rate original data are obtained; processing the data by using a pre-stored rule, and generating a standard compression block and a rate comparison reference; then generating a rate adjustment signal and verification adaptation information according to a baud rate negotiation rule, and generating verification hierarchy and control operation information in combination with a hardware state; and finally, transmission actions are converted according to transmission requirements and error code feedback, classification information is extracted, adaptive parameters and calibration rules are generated, the problems of low efficiency, redundancy and the like of a traditional serial port are solved, and the transmission efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data processing, in particular to a PC-to-Android device large file high-speed transmission method and device based on a serial port protocol. BACKGROUND

[0002] The existing PC-to-Android device large file transmission scheme based on a serial port protocol has significant technical defects, and it is difficult to meet the efficient and reliable transmission requirements. The traditional scheme does not optimize the blocking strategy for file types, and the blocking size is fixed, resulting in poor transmission adaptability of text and binary files. The compression mechanism lacks pertinence, and efficient algorithms are not selected in combination with the characteristics of serial port transmission, resulting in high data redundancy and low transmission efficiency. The baud rate is mostly a fixed value, which cannot be dynamically adjusted according to the transmission state, and is prone to packet loss or lag caused by rate mismatch. The check mechanism is single, relying only on a single level check, and it is difficult to balance the check accuracy and calculation overhead, and the data integrity is not guaranteed. At the same time, no linkage mechanism is established between transmission parameters and serial hardware resources and file specifications, and the resource occupation is unreasonable, the compatibility is poor, and it cannot adapt to the large file transmission requirements in multiple scenarios.

[0003] It should be noted that the information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore includes information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0004] According to one aspect of the present application, a PC-to-Android device large file high-speed transmission method based on a serial port protocol is provided, comprising: receiving PC and Android device large file transmission demand instructions and serial communication basic configuration information, generating transmission protocol start and dynamic resource configuration basic setting information; based on the transmission protocol start instruction and the dynamic resource configuration setting, starting the LZ4 real-time compression function and triggering the mixed check mechanism to enable, generating file initial blocking information and serial real-time transmission rate raw data; receiving pre-stored blocking compression pipeline protocol and rate data processing rules, processing the file initial blocking information and the serial real-time transmission rate raw data, generating standard compression data block information and transmission rate comparison benchmark information; based on the dynamic baud rate negotiation rule, processing the standard compression data block information and the transmission rate comparison benchmark information, generating rate adjustment signals and check mechanism adaptation information; processing the check mechanism adaptation information and the device serial hardware resource state information, generating mixed check level and file transmission specification matching control operation information; based on the pre-set large file transmission mode operation requirement and the real-time bit error rate feedback, converting the control operation information into actual file transmission actions, extracting and classifying the transmission mode requirement, the bit error rate feedback, the control operation information and the serial hardware attributes, and generating transmission mode adaptation parameters, rate calibration rules, resource occupation thresholds, file transmission and serial port protocol linkage mapping information.

[0005] In another aspect of the present application, a PC-to-Android device large file high-speed transmission device based on a serial port protocol comprises: an acquisition module configured to receive a PC-to-Android device large file transmission requirement instruction and serial port communication basic configuration information, and generate transmission protocol start and dynamic resource configuration basic setting information; a processing module configured to start an LZ4 real-time compression function and trigger a mixed verification mechanism based on the transmission protocol start instruction and the dynamic resource configuration setting, generate file initial block information and serial port real-time transmission rate raw data, receive pre-stored block compression pipeline protocol and rate data processing rules, process the file initial block information and the serial port real-time transmission rate raw data, generate standard compression data block information and transmission rate comparison benchmark information, process the standard compression data block information and the transmission rate comparison benchmark information based on a dynamic baud rate negotiation rule, generate a rate adjustment signal and verification mechanism adaptation information, process the verification mechanism adaptation information and device serial port hardware resource state information, and generate a mixed verification level and file transmission specification matching control operation information; and based on pre-set large file transmission mode operation requirements and real-time bit error rate feedback, the control operation information is converted into actual file transmission actions, and transmission mode requirements, bit error rate feedback, control operation information and serial port hardware attributes are extracted and classified to generate transmission mode adaptation parameters, rate calibration rules, resource occupation thresholds, and file transmission and serial port protocol linkage mapping information.

[0006] According to still another aspect of the present application, a computer readable storage medium is provided, which stores a computer program. When the computer program is executed by a second processor, the PC-to-Android device large file high-speed transmission method based on a serial port protocol is implemented.

[0007] The PC-to-Android device large file high-speed transmission method and device based on a serial port protocol provided by the present application can solve the pain points of PC-to-Android device serial port large file transmission. The server first receives transmission requirements and serial port configurations, generates protocol start and resource configuration settings, starts LZ4 real-time compression and mixed verification, generates adaptive blocks and rate raw data in combination with file types, obtains standard compression blocks and rate comparison benchmarks through pre-stored rule processing, generates rate adjustment signals and verification adaptation information through dynamic baud rate negotiation, determines mixed verification levels and control operation information in combination with hardware states, and finally converts transmission actions and generates adaptation parameters, calibration rules, etc. according to transmission mode requirements and bit error feedback. The scheme solves the problems of low efficiency, redundancy and poor compatibility of traditional schemes through block optimization, dynamic rate negotiation and mixed verification, and improves transmission efficiency and reliability.

[0008] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0009] Figure 1 A flow chart of a PC-to-Android device large file high-speed transmission method based on a serial port protocol according to an embodiment of the present application is shown.

[0010] Figure 2 A structural schematic diagram of a PC-to-Android device large file high-speed transmission device based on a serial port protocol according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0011] The preferred embodiments of the present application are described below in detail with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to explain and illustrate the present application, and are not used to limit the present application.

[0012] The PC-to-Android device large file high-speed transmission method based on a serial port protocol according to the exemplary embodiments of the present application is described below with reference to the accompanying drawings. Figure 1 In one embodiment, the present application also proposes a PC-to-Android device large file high-speed transmission method and device based on a serial port protocol. As shown in Figure 1 the method is applied to a server and includes:

[0013] S101, receiving a PC-to-Android device large file transmission demand instruction and serial port communication basic configuration information, and generating transmission protocol start and dynamic resource configuration basic setting information.

[0014] In one embodiment, the large file transmission demand instruction needs to specify the transmission core parameters to ensure consistency of the two ends. The file related information includes the file type (such as text file, binary industrial control data file, vehicle-mounted recorder video file, etc.), file total size (such as 100MB text data, 2GB vehicle-mounted video data), and transmission priority (such as industrial control instruction file with high priority, and ordinary log file with regular priority). According to the transmission performance requirements, the minimum transmission speed threshold (such as not less than 300KB / s), the maximum acceptable delay (such as not more than 1s in industrial scenarios), and the data integrity requirement (such as no data loss and tampering) are specified. The specific use scenarios (such as industrial control device data upload and vehicle-mounted recorder data export) are marked to provide a basis for subsequent resource configuration. The PC end sends the transmission demand instruction to the Android vehicle-mounted recorder, and the content is "transmission type: binary vehicle-mounted video file; file size: 1.8GB; transmission priority: high; minimum transmission speed: 350KB / s; maximum delay: 0.8s; data integrity: no loss and no tampering; application scenario: vehicle-mounted data export".

[0015] The serial communication basic configuration information covers the core parameters of hardware and software layers, and guarantees the basic connectivity of the communication link. For the hardware connection parameters, the serial interface type (such as UART interface), pin definition (such as TX / RX pin correspondence), and physical connection mode (such as wired direct connection) are specified. The initial communication parameters include the default baud rate (such as 115200 bps, as the initial rate before negotiation), data bits (such as 8 bits), stop bits (such as 1 bit), and check bits (such as no check bits, and the mixed check mechanism is used instead later). For the device hardware capability, the PC end needs to provide the maximum supported baud rate of the serial port (such as 1.5 Mbps for the serial port of i7-11800H processor), and the Android device needs to provide the serial port hardware processing capability (such as the serial port data buffer capacity and maximum concurrent processing capability of Snapdragon 888 chip). The Android car recorders feedback the serial communication basic configuration information, which includes "interface type: UART; pin definition: TX->PC_RX, RX->PC_TX; initial baud rate: 115200 bps; data bits: 8 bits; stop bits: 1 bit; check bits: none; maximum supported baud rate: 1.5 Mbps; serial port buffer capacity: 64 KB; maximum concurrent processing capability: supports 32 data blocks parallel reception".

[0016] Based on the above two types of information, the basic settings that can be directly executed are generated, which lays the foundation for the subsequent transmission process. For the transmission protocol startup parameters, the block compression pipeline protocol designed in the present application is enabled, the protocol version (such as V1.0) is specified, the frame structure standard (such as the frame header containing file type identification, block number, and CRC8 check bits) is specified, and the data transmission mode (batch transmission) is specified.

[0017] The dynamic resource configuration basic rules are as follows. For the baud rate negotiation rule, the baud rate detection sequence (1500000 bps→921600 bps→460800 bps→230400 bps→115200 bps) is set, and the response time judgment threshold (0.1 second) is set, i.e. if the response time is less than 0.1 second at the current baud rate during detection, the initial working baud rate is determined. For the block size preset rule, the block reference is preset according to the file type (4 KB / block for text files and 64 KB / block for binary files), which can be fine-tuned according to the actual transmission situation later. For the resource allocation rule, hardware resources are allocated for compression function and check function (such as 20% CPU resources for LZ4 real-time compression and 15% CPU resources for mixed check calculation in Android device), and the data buffer allocation size is set (such as 32 KB for text file transmission and 256 KB for binary file transmission).

[0018] For example, in combination with the above-mentioned requirement instructions and configuration information, the basic setting information is generated, and the content is "transmission protocol: chunked compression pipeline protocol V1.0; frame structure: frame header (file type identification 2 bytes + block number 4 bytes + CRC8 check 1 byte) + data block + frame tail (CRC32 check 4 bytes); baud rate negotiation sequence: 1500000 bps→921600 bps→460800 bps→230400 bps→115200 bps; response time threshold: 0.1 seconds; chunk preset: binary file 64 KB / block; resource allocation: LZ4 compression CPU ratio 20%, hybrid check CPU ratio 15%, buffer size 256 KB".

[0019] In S102, based on the transmission protocol start instruction and dynamic resource configuration setting, the LZ4 real-time compression function is started and the hybrid check mechanism is triggered to enable, and the file initial chunk information and serial real-time transmission rate original data are generated.

[0020] In an embodiment, the chunk parameters corresponding to the file types are grouped and classified according to the preset chunking rules, and the chunking mode corresponding to the text and binary classes and the 4KB / 64KB associated processing parameter information are generated. The preset chunking rule takes file data characteristics and transmission efficiency as the core, clearly defines the chunking logic of different types of files, and ensures that the chunking size is adapted to the data structure and transmission scenario. For text files (such as industrial control log files and configuration text files), the data redundancy of such files is high and the length of a single data is short, and the preset chunking size is 4KB / block. The associated processing parameters include block number encoding format (using 4-byte binary encoding), block boundary identifier (using "0x0A0D" as block end marker), and data padding rule (when the block data is less than 4KB, fill it to full block with 0x00 to avoid frame structure disorder). For binary files (such as vehicle-mounted recorder video files and industrial device firmware files), the data density of such files is high and the continuity is strong, and the preset chunking size is 64KB / block. The associated processing parameters include block number encoding format (4-byte binary encoding), block boundary identifier (using "0x1F2E" as block end marker), and data slicing rule (slicing according to file storage physical sector alignment to reduce I / O read / write times).

[0021] For example, the PC terminal to be transmitted file is an industrial control log text file (size 20MB), which is classified as a text type according to the rules, the block mode is set to 4KB / block, and the associated processing parameters are "block number: 4-byte binary encoding; block boundary identifier: 0x0A0D; data padding: less than 4KB filled with 0x00". Finally, it is divided into 5000 data blocks (20MB ÷ 4KB = 5000); another to-be-transmitted file is a vehicle-mounted 1080P video file (size 1.2GB), which is classified as a binary type, the block mode is set to 64KB / block, and the associated processing parameters are "block number: 4-byte binary encoding; block boundary identifier: 0x1F2E; fragmentation rule: aligned by sector". Finally, it is divided into 18750 data blocks (1.2GB ÷ 64KB = 18750).

[0022] Based on the transmission requirements of large files, the content of the LZ4 real-time compression function is arranged and designed to obtain compression enablement standards, compression data types, and compression range information, and generate compression function enablement design information. The enablement design of the LZ4 real-time compression function needs to be consistent with the transmission requirements, balance the compression efficiency and system overhead, and ensure that the real-time performance of the transmission is not affected. For the compression enablement standard, double trigger conditions are set, and compression is enabled when any condition is met. One is the file single-block data redundancy threshold (text file redundancy ≥ 30%, binary file redundancy ≥ 20%, redundancy is obtained by sampling and analyzing 1KB data in the file header); two is the transmission rate requirement condition (when the minimum rate in the transmission requirement is ≥ 200KB / s, compression is forced to be enabled to reduce the data volume). The compression data type is clear, and only the effective data in the data block is compressed, excluding control fields such as block boundary identifier and block number, to avoid distortion of control information caused by compression. The compression range adopts the "single-block independent compression" mode, that is, each data block is independently compressed by LZ4, and the control field association relationship of the original block is preserved after compression, to ensure that the receiving end can independently decompress and reassemble.

[0023] For the above-mentioned 20MB industrial control log text file, the minimum rate in the transmission requirement is 300KB / s, and the file redundancy obtained by sampling and analysis is 45%, which meets the compression enablement standard. The generated compression function enablement design information is "enablement standard: redundancy ≥ 30% or minimum transmission rate ≥ 200KB / s; compression data type: data block effective data (excluding block number and boundary identifier); compression range: single-block independent compression, and control field association is preserved". For the 1.2GB vehicle-mounted video file, the minimum rate in the transmission requirement is 350KB / s, and the redundancy obtained by sampling and analysis is 25%, and the enablement design information is "enablement standard: redundancy ≥ 20% or minimum transmission rate ≥ 200KB / s; compression data type: data block effective data; compression range: single-block independent compression".

[0024] In combination with the operation planning and verification monitoring requirements of large file transmission mode, the corresponding CRC8 fast verification node is set for the design information of each block rule compression function. The setting of CRC8 fast verification node needs to cover the key link of transmission to ensure that fast verification can be realized before and after data compression, before transmission, and data anomalies can be found in time. For the verification node corresponding to the text file (4KB / block), first, the pre-compression verification node, after the data block is divided into blocks according to the rules, before the LZ4 compression is performed, the CRC8 check value of the 4KB original data is calculated, which is used to compare with the check value of the decompressed data after compression to verify whether the compression and decompression process has damaged the data. Second, the pre-transmission verification node, after the data block is compressed, before the frame structure is packaged and sent, the CRC8 check value of the compressed data block (including valid data and padding field) is calculated and sent to the receiving end with the frame. For the verification node corresponding to the binary file (64KB / block), the same as the text file, two verification nodes before compression and before transmission are set. Because the data volume of the binary file is larger, the calculation time of the verification node is parallel to the pipeline process of data blocking and compression, that is, CRC8 calculation is started immediately after blocking is completed, while compression operation is prepared synchronously, avoiding additional transmission time occupied by verification.

[0025] For the 4KB / block industrial control log file, the CRC8 fast verification node information set is "verification node 1 (before compression): after blocking is completed, CRC8 is calculated for 4KB original data, the polynomial is 0x31, and the initial value is 0xFF; verification node 2 (before transmission): after compression is completed, CRC8 is calculated for the compressed data block (including padding field), the polynomial and initial value are the same as verification node 1"; for the 64KB / block vehicle video file, the verification node information is "verification node 1 (before compression): CRC8 is calculated in parallel after blocking is completed, the polynomial is 0x31, and the initial value is 0xFF; verification node 2 (before transmission): CRC8 is calculated for the complete data block after compression, the parameters are the same as before, and verification and frame structure packaging are performed in parallel".

[0026] The file block grouping result, LZ4 compression function enabling design information and CRC8 check node are processed to generate file initial block information containing block rule grouping information, compression function enabling scheme and CRC8 check standard and serial real-time transmission rate original data. The core information of the first three steps is integrated to form initial data which can be directly used for transmission execution, and the original collection data of serial real-time transmission rate is recorded to provide a basis for subsequent rate optimization. The block rule grouping information (file type, block size, associated processing parameter), compression function enabling scheme (enabling standard, compression type, range), CRC8 check standard (check node, polynomial, initial value) are summarized, and a unique identification (block number + file identification) is allocated to each data block to clearly define the frame structure packaging rule (frame header = file identification 2 bytes + block number 4 bytes + CRC8 check value 1 byte, frame tail = block boundary identification 2 bytes). At the same time of starting block transmission, the actual transmission rate data is collected at a frequency of 10 ms / time through the rate monitoring module of the serial hardware interface, and the time stamp of each collection, the current transmission block number and the instantaneous rate value are recorded to form the original rate data set which is not subjected to any filtering or optimization processing to ensure data authenticity.

[0027] For example, after integration, the initial chunking information of a 20MB industrial control log file is "chunking rule: text type, 4KB per chunk, 4-byte binary encoding of chunk number, boundary identifier 0x0A0D; compression scheme: enabled, redundancy ≥ 30% or rate ≥ 200KB / s trigger, compressed valid data, single chunk independent compression; CRC8 check standard: double-node check, polynomial 0x31, initial value 0xFF, frame header containing check value; frame structure: file identifier (0x0102) + chunk number + CRC8 + valid data + padding field + boundary identifier"; the serial real-time transmission rate raw data is "timestamp 1698765432100ms, chunk number 0001, instantaneous rate 280KB / s; timestamp 1698765432110ms, chunk number 0001, instantaneous rate 295KB / s;... " (continuously collected until the end of file transmission). The initial chunking information of a 1.2GB vehicle-mounted video file is "chunking rule: binary type, 64KB per chunk, 4-byte binary encoding of chunk number, boundary identifier 0x1F2E; compression scheme: enabled, redundancy ≥ 20% or rate ≥ 200KB / s trigger, compressed valid data, single chunk independent compression; CRC8 check standard: double-node check, polynomial 0x31, initial value 0xFF, frame header containing check value; frame structure: file identifier (0x0304) + chunk number + CRC8 + valid data + boundary identifier"; the serial real-time transmission rate raw data is "timestamp 1698765500000ms, chunk number 0001, instantaneous rate 330KB / s; timestamp 1698765500010ms, chunk number 0001, instantaneous rate 342KB / s;...".

[0028] S103, receiving pre-stored chunking compression pipeline protocol and rate data processing rules, processing the initial chunking information of the file and the serial real-time transmission rate raw data to generate standard compression data block information and transmission rate comparison benchmark information.

[0029] In an embodiment, the chunked compression pipeline protocol is imported into the transmission data processing system for adaptive analysis, extraction of windowed acknowledgment mechanism, rate level switching logic, simulation of transmission efficiency and data integrity of different file type chunks combined with LZ4 compression, and generation of chunked compression adaptation simulation data. The transmission data processing system has protocol analysis and scenario simulation functions, first performs in-depth adaptive analysis on the imported rules, and then generates simulation data close to actual transmission through scenario simulation. The core of the chunked compression pipeline protocol includes data block transmission timing and frame interaction logic, and the rate data processing rule specifies the rate adjustment threshold and adaptation conditions. After system analysis, two key logics are extracted: one is the windowed acknowledgment mechanism, that is, the receiving end performs batch confirmation every 32 data blocks, replacing the traditional single frame response and reducing 80% of the response frames; the other is the rate level switching logic, which is switched dynamically according to the bit error rate according to the levels of 1500000bps→921600bps→460800bps→230400bps→115200bps, and the speed is triggered to be reduced when three consecutive data block verification fails. The combination of simulation text class (4KB / block) and binary class (64KB / block) files and LZ4 compression is tested in low bit error rate ( ), medium bit error rate ( ), and high bit error rate ( ) environments. The transmission efficiency (unit time transmission data volume) and data integrity (block passing rate) are recorded, and chunked compression adaptation simulation data is generated.

[0030] The extracted windowed acknowledgment mechanism after analysis is "the receiving end caches 32 consecutive data blocks, generates a batch confirmation frame containing all block numbers, and feeds back to the sending end at a time"; and the rate level switching logic is "three consecutive data blocks CRC8 verification fails at the current baud rate, immediately switches to the next level baud rate, and enables FEC encoding". In the simulation test, the text class file (4KB / block) has a LZ4 compression rate of 60% in a low bit error rate environment, a transmission efficiency of 350KB / s, and a data integrity of 99.99%; the binary class file (64KB / block) has a compression rate of 55% in a medium bit error rate environment, a transmission efficiency of 330KB / s, and a data integrity of 99.98%, and the above data are included in the chunked compression adaptation simulation data.

[0031] The block identification mapping algorithm is used to subdivide the correspondence between the compressed blocks and the transmission rate in the block compression adaptive simulation data, and a standardized data processing model is generated. The block identification mapping algorithm decomposes the data processing logic from block type identification, compression efficiency matching, and rate adaptation, and establishes mapping rules for different scenarios such as fast transmission of small text files, efficient compression of large binary files, and rate stability targets. The block identification mapping algorithm focuses on the accurate matching of compressed blocks and transmission rates, and through multi-dimensional decomposition logic, it establishes mapping rules that adapt to different scenarios and forms a standardized processing model. The mapping relationship is constructed from three core dimensions. The block type identification dimension distinguishes file types through the 2-byte identification in the data block header (0x0102 for text and 0x0304 for binary); the compression efficiency matching dimension divides the compression rate into high, medium, and low levels according to the LZ4 compression rate (50%-70%), corresponding to different rate adaptation priorities; and the rate adaptation dimension determines the optimal transmission rate interval based on the current baud rate level and error rate.

[0032] For the fast transmission scenario of small text files, the high baud rate level (1.5 Mbps / 921600 bps) is prioritized, and when the compression efficiency is ≥60%, the maximum transmission rate is used to ensure the minimum transmission delay. For the efficient compression scenario of large binary files, the rate and stability are balanced, and when the compression efficiency is ≥55%, the peak rate of the corresponding baud rate level is used, and when the compression efficiency is less than 55%, the speed is appropriately reduced to avoid data loss. Based on the above rules, a standardized data processing model is generated that includes block identification, compression efficiency, rate interval, and adaptation scenario.

[0033] The block identification mapping algorithm processes a certain text compression block (identification 0x0102, compression rate 65%) and identifies it as a high-priority fast transmission scenario, mapping it to the 1.5 Mbps baud rate interval with a rate adaptation range of 1450 KB / s-1500 KB / s. For a certain binary compression block (identification 0x0304, compression rate 53%), it is identified as a high-efficiency compression and stable transmission scenario, mapped to the 921600 bps baud rate interval with a rate adaptation range of 880 KB / s-920 KB / s. Integrating all mapping results, a standardized data processing model is generated, which clearly defines the rate adaptation scheme corresponding to different block identification combinations.

[0034] The compressed data block verification pass rate, serial rate real-time fluctuation value, and batch transmission delay characteristic parameters under different transmission scenarios are collected to build a block compression transmission characteristic library, and data processing constraint data is generated. The block compression transmission characteristic library customizes parameters for low error rate scenario rate optimization requirements, high redundancy data scenario compression efficiency requirements, and multi-block continuous transmission scenario confirmation mechanism requirements. Through multi-scenario parameter collection, a characteristic library covering different transmission requirements is established to provide clear constraints for data processing, ensuring compliance and efficiency in the transmission process. For low error rate (≤ ), high redundancy data (redundancy ≥ 40%), and multi-block continuous transmission (single transmission ≥ 100 blocks) three core scenarios, and key characteristic parameters are collected. In the low error rate scenario, the compression data block check pass rate and the baud rate stable maintenance time are collected; in the high redundancy data scenario, the LZ4 compression rate and compression time consumption are collected; in the multi-block continuous transmission scenario, the batch transmission delay and confirmation frame feedback time consumption are collected.

[0035] The characteristic library customizes parameter standards according to scenarios. The low error rate scenario focuses on rate optimization, with the constraint condition being “check pass rate ≥ 99.99%, baud rate stable maintenance time ≥ 10s”; the high redundancy data scenario focuses on compression efficiency, with the constraint condition being “LZ4 compression rate ≥ 60%, single block compression time consumption ≤ 1ms”; and the multi-block continuous transmission scenario focuses on the confirmation mechanism, with the constraint condition being “batch transmission delay ≤ 50ms, confirmation frame feedback time consumption ≤ 10ms”. Based on these constraints, constraint data for data processing is generated, and the parameter boundaries in each scenario are clearly defined. The low error rate scenario (industrial control environment, error rate ) collected a check pass rate of 99.995% and a baud rate stable maintenance time of 15s, and the constraint data was set to “check pass rate ≥ 99.99%, baud rate stable ≥ 10s”; the high redundancy data scenario (log file transmission, redundancy 45%) collected a compression rate of 68% and a single block compression time consumption of 0.8ms, and the constraint data was set to “compression rate ≥ 60%, compression time consumption ≤ 1ms”; and the multi-block continuous transmission scenario (vehicle-mounted video batch transmission, single time 1000 blocks) collected a batch transmission delay of 42ms and a confirmation frame feedback time consumption of 8ms, and the constraint data was set to “transmission delay ≤ 50ms, feedback time consumption ≤ 10ms”, and all the data was entered into the block compression transmission characteristic library.

[0036] The standardized data processing model and the data processing constraint data are fused to construct a block compression-rate adaptation coupling processing model, and through model iteration optimization, standard compression data block information and transmission rate comparison benchmark information are generated. Through model fusion and iteration optimization, dynamic coordination of compression block processing and rate adaptation is realized, and standardized data and rate comparison benchmarks are output, providing a basis for subsequent transmission adjustment. The mapping rules in the standardized data processing model are taken as the core logic, and the parameter boundaries in the data processing constraint data are embedded to construct the coupling processing model. The model includes a data input layer (compression block information, current rate data), a logical processing layer (mapping rule matching, constraint condition verification), and an output layer (standard data block, rate benchmark), realizing the full-process automatic processing of “input-matching-verification-output”.

[0037] Based on the block compression adaptation simulation data is iterated for multiple rounds, and the fitting degree of the output results and the constraint conditions is compared after each iteration to optimize the mapping rules and parameter weights. After iteration, the compression block information of the model output meets the "block structure compliance, compression rate standard", and the rate benchmark meets the "adaptation to scene demand, fluctuation within the constraint range". Finally, the final result is generated. The standard compression data block information includes block identification, compression rate, check value, frame structure, and other standardized parameters; the transmission rate benchmark information sets the standard rate interval, fluctuation threshold, and adjustment trigger condition in different scenarios.

[0038] The coupling processing model constructed after fusion inputs certain binary compression block information (identification 0x0304, original size 64KB, compression rate 58%) and current rate data (921600bps, bit error rate ), which is matched and adapted to the 921600bps rate interval through the mapping rule. The constraint check shows that the compression rate and the rate meet the requirements, and the output standard compression data block information is "block identification 0x0304, compressed size 35.84KB, CRC8 check value 0x7A, CRC32 check value 0x12345678, frame header containing block number + check value, frame tail containing boundary identifier"; the transmission rate benchmark information is "standard rate interval 880KB / s-920KB / s, rate fluctuation threshold ±5%, continuous 3 times fluctuation exceeding threshold triggering rate adjustment". After 10 rounds of iteration optimization, the constraint fitting degree of the model output result is improved from 92% to 99.5%, and the standard compression data block information and the transmission rate benchmark information are finally determined.

[0039] In S104, the standard compression data block information and the transmission rate benchmark information are processed based on the dynamic baud rate negotiation rule to generate rate adjustment signals and check mechanism adaptation information.

[0040] In an embodiment, the standard compression data block information and the transmission rate benchmark information are obtained based on the dynamic baud rate negotiation rule, and the compression block integrity, current baud rate adaptability, and bit error rate stability features are extracted. The dynamic baud rate negotiation rule clearly defines the data extraction dimension and feature judgment standard, accurately captures the key features affecting transmission quality from the two types of core information, and provides a basis for subsequent processing. The standard compression data block information includes block identification, compression rate, check value, frame structure, and other standardized parameters; the transmission rate benchmark information covers the standard rate interval, fluctuation threshold, and adjustment trigger condition in different scenarios. According to the rule, three core features are extracted from the two types of information: compression block integrity (whether the data block is received completely, and whether the compression and decompression are normal), current baud rate adaptability (the matching degree of the current 1.5Mbps / 921600bps level rate with the transmission demand), and bit error rate stability (the fluctuation range and abnormal risk of the bit error rate in continuous transmission process).

[0041] The standard compressed data block information (block identifier 0x0304, compression rate 58%, CRC8 check value 0x7A) of a certain binary class file is compared with the transmission rate reference information (standard rate range 880KB / s-920KB / s, fluctuation threshold ±5%). The extracted features are: compression block integrity (100 data blocks have been received, no obvious missing marks), current baud rate adaptability (921600bps rate is currently used, the minimum transmission rate is 350KB / s), and error code rate stability (the error code rate fluctuation in the transmitted data blocks is between and ).

[0042] The compression block integrity feature is checked to identify data block loss and compression and decompression abnormality problems, and a block integrity coefficient is generated. The compression block integrity is quantified by combining block-by-block checking and abnormality identification, and the coefficient value range is 0-1. The closer the value is to 1, the better the integrity. First, check the block number continuity of the received data blocks to determine whether there is a missing block (for example, if the block numbers are from 0001-0100, and the 0056 block is missing, it is determined that the data block is missing); then, decompression test is performed on each data block, and the CRC8 check values of the decompressed data and the original data are compared. If they are not consistent, it is determined that the compression and decompression are abnormal. Block integrity coefficient = (number of normally received and decompressed blocks ÷ total number of blocks that should be received) × 100%.

[0043] For example, a certain text class file should receive a total of 500 data blocks, and after checking, it is found that 3 blocks (numbers 0210, 0356, and 0489) are missing, and 2 blocks have inconsistent check values after decompression (numbers 0123 and 0301), and the number of normal blocks is 495. Block integrity coefficient = (495 ÷ 500) × 100% = 0.99, indicating that the compression block integrity is good.

[0044] The current baud rate adaptability feature is verified, the matching deviation of the 1.5Mbps / 921600bps level rate and the file transmission requirement is checked, and a rate adaptation accuracy factor is generated. The minimum rate in the file transmission requirement is used as the core reference to calculate the adaptation deviation of the current level rate, and the accuracy factor value range is 0-1. The closer the value is to 1, the better the adaptability. The actual transmission rate corresponding to the current baud rate level (1.5Mbps or 921600bps) is calculated based on the real-time transmission rate original data, and is compared with the minimum rate in the transmission requirement to calculate the deviation rate. The factor is calculated as follows: rate adaptation accuracy factor = 1-|(current actual average rate-demand minimum rate) ÷ demand minimum rate|, if the current actual average rate ≥ demand minimum rate, the deviation rate is taken as 0, and the factor is 1.

[0045] For example, a vehicle video file transfer requires a minimum rate of 350KB / s. Currently using a baud rate of 921600bps, the actual average transfer rate is 342KB / s. The deviation rate = |(342-350)÷350|≈0.023, and the rate matching accuracy factor = 1-0.023=0.977, indicating good baud rate compatibility. If a 1.5Mbps baud rate is currently used, the actual average transfer rate is 400KB / s. Since 400KB / s ≥ 350KB / s, the rate matching accuracy factor = 1, resulting in optimal compatibility.

[0046] The bit error rate stability characteristics are verified to confirm whether the bit error rate is controlled within the target range during continuous transmission and whether there is a risk of three consecutive data block verification failures. A bit error rate stability coefficient is then generated. The bit error rate (BER) stability is evaluated using a dual standard: a BER threshold of 3 blocks and a consecutive check failure threshold. The coefficient ranges from 0 to 1, with values ​​closer to 1 indicating better stability. The BER of each block in 100 consecutively transmitted data blocks is statistically analyzed to determine if it is consistently controlled within the acceptable range. Within; simultaneously track the continuity of failed verification blocks, checking for two consecutive failed blocks (if present, it is considered a risk of triggering three consecutive failures). Error rate stability coefficient = (length of continuous transmission segments with acceptable error rate and no two consecutive failed blocks ÷ total continuous transmission length) × 100%.

[0047] For example, an industrial control log file continuously transmits 1000 data blocks, of which 998 blocks have a bit error rate of ≤ Only two blocks had excessive bit error rates (blocks 300 and 650, respectively, not consecutively), and there were no instances of two consecutive block check failures. The bit error rate stability coefficient = (1000 ÷ 1000) × 100% = 1.0, indicating excellent bit error rate stability. If consecutive check failures occur in blocks 401 and 402 during transmission, the bit error rate stability coefficient = (998 ÷ 1000) × 100% = 0.998, indicating a risk of triggering three consecutive failures.

[0048] The block integrity coefficient, rate adaptation precision factor and error code stability coefficient are processed based on a preset baud rate negotiation rule, a dynamic rate switching mechanism is used to adjust the baud rate level, forward error correction coding is used to compensate for errors, and the check node is optimized to improve the checking efficiency, and a rate negotiation preprocessing result is generated. The preset baud rate negotiation rule sets the coefficient threshold and processing logic, and takes targeted optimization measures for different coefficient combinations to form the preprocessing result. The coefficient threshold is set (block integrity coefficient ≥ 0.95, rate adaptation precision factor ≥ 0.9, error code stability coefficient ≥ 0.95). If all the coefficients meet the standard, the current baud rate level is maintained, and the check node execution timing is optimized (such as parallel execution with data compression); if the rate adaptation precision factor is less than 0.9, the dynamic rate switching mechanism is started, and the baud rate is upgraded to a higher level (such as from 921600bps to 1.5Mbps); if the error code stability coefficient is less than 0.95, forward error correction (FEC) coding is enabled to compensate for errors; if the block integrity coefficient is less than 0.95, the check node detection accuracy is optimized (such as adding a secondary check of compressed data).

[0049] The block integrity coefficient of a certain file transmission is 0.99, the rate adaptation precision factor is 0.88, and the error code stability coefficient is 0.98. Because the rate adaptation precision factor does not meet the standard, the dynamic rate switching mechanism is started, and the baud rate is upgraded from 921600bps to 1.5Mbps; at the same time, the check node timing is optimized, and it is executed in parallel with LZ4 compression. The generated rate negotiation preprocessing result is "rate level switching: 921600bps→1.5Mbps; check node optimization: executed in parallel with compression; FEC coding: not enabled".

[0050] The rate negotiation preprocessing result is integrated to generate a rate adjustment signal reflecting the block integrity deviation, rate adaptation error and error code risk, as well as check mechanism adaptation information corresponding to the switching of the baud rate level and the enabling of FEC coding. The core optimization measures and problem feedback in the preprocessing result are summarized to generate signals and adaptation information that can be directly triggered for execution, ensuring dynamic adaptation of transmission parameters. The risk level of the quantized deviation of the three core problems is determined, the block integrity deviation = 1-block integrity coefficient, the rate adaptation error = 1-rate adaptation precision factor, and the error code risk level is divided according to the error code stability coefficient (≥0.95 for low risk, 0.9-0.95 for medium risk, and <0.9 for high risk). The check mechanism adaptation information corresponds to the optimization measures in the preprocessing result, and the switching direction of the baud rate level, the enabling state of the FEC coding and the optimization scheme of the check node are determined to ensure the linkage with the rate adjustment signal.

[0051] The pre-processing results are integrated to generate a rate adjustment signal of "block integrity deviation: 0.01 (low deviation); rate adaptation error: 0.12 (medium error); and error code risk level: low risk"; and check mechanism adaptation information of "baud rate level switching: from 921600 bps to 1.5 Mbps; FEC encoding: not enabled; and check node optimization: executed in parallel with LZ4 compression to improve check efficiency". If the stable coefficient of error code of a certain file is 0.89 (medium risk) and the pre-processing result is to enable FEC encoding, the check mechanism adaptation information is "baud rate level: maintain 1.5 Mbps; FEC encoding: enabled; and check node optimization: increase secondary check after compression", and the error code risk level in the rate adjustment signal is marked as medium risk.

[0052] In S105, the check mechanism adaptation information and the device serial port hardware resource state information are processed to generate hybrid check level and file transfer specification matching control operation information.

[0053] In an embodiment, the check mechanism adaptation information, the device serial port hardware resource state information, and the file transfer specification data are integrated, the hybrid check execution priority is determined based on the serial port hardware processing capacity, and the data block transmission urgency and the check calculation overhead threshold are superimposed to generate an intermediate processing data set containing check level selection logic, check timing control standard, and initial scheme of different file types. The check mechanism adaptation information, the serial port hardware resource state information, and the file transfer specification data are first summarized, the hardware capacity is taken as the core, the transmission urgency and the check overhead are combined, the check core rules and the initial scheme are determined, and the intermediate processing data set is formed. The check mechanism adaptation information includes the baud rate level, the FEC encoding enabled state, and the check node optimization scheme; the device serial port hardware resource state information covers the CPU processing capacity, the cache capacity, and the maximum concurrent processing number (such as the serial port CPU of Snapdragon 888 chip occupying an upper limit of 30%, the cache being 64 KB, and the maximum concurrency being 32 blocks); and the file transfer specification data includes the file type, the block size, the transmission priority, and the minimum rate requirement.

[0054] The priority is divided according to the processing capacity of serial port hardware. When the hardware resources are sufficient (CPU occupancy ≤20%, cache remaining ≥50%), the mixed verification priority is set to "high", and the verification integrity is preferentially guaranteed; when the hardware resources are tight (CPU occupancy 20%-30%, cache remaining 30%-50%), the priority is set to "medium", balancing verification and transmission efficiency; when the hardware resources are scarce (CPU occupancy >30%, cache remaining <30%), the priority is set to "low", and the transmission continuity is preferentially guaranteed. The data block transmission urgency is divided according to the transmission priority (industrial control instruction is "urgent", vehicle-mounted video is "regular", and log file is "low"). The verification priority of urgent data block is automatically promoted by one level; the verification calculation overhead threshold is set to single block verification time ≤1ms (CRC8 ≤0.2ms, CRC32 ≤0.8ms), and the verification process is simplified when it is exceeded.

[0055] The verification level selection logic (preferential CRC8 fast verification, failure triggering CRC32 deep verification), verification timing control standard (parallel execution with data compression / transmission, without additional delay), and different file type verification initial scheme (text type 4KB block: double node verification + fast retransmission; binary type 64KB block: double node verification + parallel retransmission) are determined.

[0056] The related data of a certain industrial control instruction file (text type 4KB / block, transmission priority "urgent") is integrated, the hardware state is CPU occupancy 15% and cache remaining 40% (sufficient resources), and the verification mechanism adaptation information is "Baud rate 1.5Mbps, FEC not enabled". The mixed verification execution priority is determined to be "high", and the priority remains "high" after superimposing the urgency. The verification calculation overhead threshold is set to ≤1ms per block. The generated intermediate processing data set is "verification level selection logic: CRC8 priority, failure triggering CRC32; verification timing: parallel execution with LZ4 compression; text type verification initial scheme: double node verification (before compression + before sending), retransmission triggered within 10ms after verification failure; verification overhead threshold: single block verification ≤1ms".

[0057] The verification level conflicts in the intermediate processing data set are marked and screened based on the verification efficiency requirements of the intermediate processing data set, the hardware resource occupation standards, and the verification rules of different file types, to generate verification adaptation exception records. The core standards of the intermediate processing data set are checked to investigate the conflicts between the verification level and the actual scene, to determine the exception type and the cause, and to form traceable exception records. The conflict judgment dimensions are as follows: verification efficiency requirement (single block verification time ≤1 ms, batch verification does not affect transmission rate), hardware resource occupation standard (CPU occupation ≤30%, cache occupation ≤50%), and different file type verification rule (text type double node verification, binary type double node verification + parallel retransmission). If the binary type 64 KB block adopts double node verification, the single block verification time reaches 1.2 ms (exceeding the threshold), which is determined as "verification efficiency conflict"; if the hardware CPU occupation is 35% (exceeding the upper limit), the high priority verification is still performed, which is determined as "hardware resource conflict"; if the text type file needs to skip CRC8 and directly perform CRC32 due to the transmission urgency, which conflicts with the "CRC8 priority" logic, it is determined as "verification level selection conflict". Each exception record contains the file type, block size, conflict type, conflict reason, current parameter, and constraint standard, to ensure that the subsequent parameters can be accurately corrected.

[0058] For example, the intermediate processing data set of a certain vehicle video file (binary type 64 KB / block, transmission priority "regular") requires "double node verification + parallel retransmission", the actual hardware CPU occupation is 32% (exceeding the upper limit of 30%), and the CPU occupation rises to 45% after performing verification, resulting in a 10% decrease in transmission rate, which is determined as "hardware resource conflict". The generated verification adaptation exception record is "file type: binary type; block size: 64 KB; conflict type: hardware resource conflict; conflict reason: CPU occupation exceeds the threshold (45%>30%) after performing double node verification; current parameter: double node verification + parallel retransmission, CPU occupation 45%; constraint standard: CPU occupation ≤30%".

[0059] The intermediate processing data set and the verification adaptation exception record are verified and fused, the mixed verification calculation overhead and hardware resource adaptation constraint, the reasonable range constraint of different file type verification accuracy, the conflict of verification level is modified and the mixed verification execution logic is improved, and the mixed verification level and control operation information adapting to different file transmission specifications are generated. By applying multiple constraints, the verification logic is optimized, the conflict problem is corrected, the standardized control operation information adapting to different file transmission specifications is formed, and the verification and transmission are coordinated efficiently. Apply core constraints, mixed verification calculation overhead constraints (single block verification time ≤1 ms, CRC8 and CRC32 collaborative allocation time consumption), hardware resource adaptation constraints (CPU occupancy ≤30%, cache occupancy ≤50%, dynamically adjust verification parallelism according to hardware state), verification accuracy constraints (text type ≥99.99%, binary type ≥99.98%).

[0060] Conflict correction logic, for verification efficiency conflict, simplify CRC32 calculation process (use fast polynomial algorithm) or reduce deep verification proportion (only 30% of CRC8 verification failed blocks are CRC32 verified); for hardware resource conflict, reduce verification priority (high to medium) or use "polling verification" (every 2 blocks verify 1); for verification level selection conflict, keep the core verification logic, temporarily adjust the trigger condition (CRC32 is triggered within 5 ms after the CRC8 verification of emergency data block fails).

[0061] The verification process under different scenarios is clear (hardware sufficient: double node verification + full retransmission; hardware is tight: double node verification + sampling retransmission; hardware is scarce: single node CRC8 verification + on-demand retransmission), retransmission mechanism (parallel retransmission maximum concurrency = 32, linked with windowed confirmation mechanism), verification and transmission coordination logic (verification results are fed back to the transmission module in real time, and the transmission rate is dynamically adjusted). The final information includes mixed verification level (high / medium / low), adapted file transmission specification (file type, block size, transmission priority), specific control operation (verification node enabled / disabled, verification algorithm selection, retransmission trigger condition, hardware resource allocation proportion).

[0062] To solve the hardware resource conflict of the vehicle-mounted video file, the conflict is revised after applying constraints: the mixed check priority is reduced from "medium" to "low", the "double node check + sampling retransmission" is adopted (only 20% of the CRC8 failed blocks are checked by CRC32), and the hardware resource allocation ratio is adjusted (check CPU occupancy ≤ 25%, cache occupancy ≤ 40%). The improved mixed check execution logic is "CRC8 fast check in parallel with transmission, record BlockID after failure, feedback check results in batches of 32 blocks, only 20% of the failed blocks are checked by CRC32 deep check, and the maximum number of concurrent retransmission is 16". The generated mixed check level and control operation information is "mixed check level: low; adaptive specification: binary type 64KB / block, regular priority; control operation: enable CRC8 pre-check node, disable pre-compression check node, record BlockID after CRC8 failure, perform CRC32 check on 20% of the failed blocks during batch confirmation, concurrent retransmission number 16, check CPU occupancy ≤ 25%, cache occupancy ≤ 40%, check accuracy ≥ 99.98%".

[0063] In S106, based on the preset large file transmission mode operation requirement and real-time error rate feedback, the control operation information is converted into actual file transmission action, the transmission mode requirement, error rate feedback, control operation information and serial port hardware attributes are extracted and classified, and transmission mode adaptive parameters, rate calibration rules, resource occupancy thresholds, file transmission and serial port protocol linkage mapping information are generated.

[0064] In an embodiment, a transmission parameter correlation algorithm is used to perform key influence factor screening processing on the preset large file transmission mode operation requirement, real-time error rate feedback, mixed check control operation information and serial port hardware attribute data, and a key influence factor set containing baud rate adaptation degree, compression efficiency, check overhead and hardware carrying capacity is generated. The transmission parameter correlation algorithm accurately selects the core factors that determine the transmission quality by quantitatively analyzing the correlation between each data, and provides core inputs for subsequent modeling. The preset large file transmission mode operation requirement (such as transmission rate ≥ 350KB / s, delay ≤ 0.8s), real-time error rate feedback (such as current error rate ), mixed check control operation information (such as check level, retransmission strategy), serial port hardware attribute data (such as CPU processing capability, cache capacity, maximum baud rate) are used as inputs, the correlation coefficients of each parameter and transmission efficiency, reliability are calculated, and the parameters with correlation coefficient ≥ 0.7 are selected as key influence factors.

[0065] The factors are defined as follows: baud rate adaptation: the degree of matching between the current baud rate and the file transfer requirements, quantified as a value between 0 and 1 (1 for complete adaptation); compression efficiency: the actual compression ratio of the LZ4 compression algorithm (50%-70%), directly affecting the data transmission volume; verification overhead: the calculation time of the hybrid verification mechanism (single block verification ≤1 ms), associated with the hardware resource occupation; hardware carrying capacity: the CPU occupation upper limit, cache capacity, and maximum concurrent processing number of the serial port hardware (such as Snapdragon 888 chip serial port CPU occupation ≤30%, cache 64KB, maximum concurrent 32 blocks).

[0066] For a certain vehicle-mounted video file (binary type 64KB / block, transmission requirement rate ≥350KB / s, delay ≤0.8s), the relevant data is screened, the real-time bit error rate feedback is , the hybrid verification control operation information is "low-level verification + parallel retransmission", and the hardware attribute data is "CPU occupation 25%, cache remaining 40%, maximum baud rate 1.5Mbps". Through the transmission parameter association algorithm calculation, the baud rate adaptation (association coefficient 0.85), compression efficiency (association coefficient 0.82), verification overhead (association coefficient 0.78), and hardware carrying capacity (association coefficient 0.73) all meet the threshold requirements, and the generated key influence factor set is "baud rate adaptation: 0.92 (1.5Mbps matches the requirement of 350KB / s); compression efficiency: 62%; verification overhead: 0.8ms / block; hardware carrying capacity: CPU occupation 25%, cache remaining 40%, maximum concurrent 32 blocks".

[0067] The key influence factor set, serial port transmission speed threshold, bit error rate control standard, and device compatibility requirement information are processed to establish the association mapping relationship between the elements, and a fused feature data set is generated. The key influence factors are fused with the core constraint standards to determine the linkage relationship between the elements, forming a structured feature data set, providing complete input for model construction. The key influence factor set is the core, superimposed with the serial port transmission speed threshold (such as text type ≥300KB / s, binary type ≥350KB / s), bit error rate control standard (≤ ), and device compatibility requirement (supporting Android 5.0 and above, no need for Root permission). When establishing the mapping relationship, the baud rate adaptation needs to be linked with the transmission speed threshold (adaptation ≥0.9 corresponds to speed compliance), the compression efficiency needs to meet the data volume reduction requirement (≥50%), the verification overhead needs to be controlled within the hardware carrying range (≤1ms / block), and the hardware carrying capacity needs to meet the compatibility requirement (CPU occupation ≤30%). The fused feature data set includes factor quantization value, constraint standard, mapping relationship identifier, and scene label (such as "vehicle-mounted video - regular priority"), ensuring that each feature is traceable and calculable.

[0068] The key influencing factors and constraint standards of the above vehicle-mounted video file are fused, and the transmission speed threshold is 350KB / s, the error rate control standard , and the compatibility requirement is Android10.0 (without Root). The associated mapping relationship established is “Baud rate adaptation degree 0.92→ transmission speed 360KB / s (up to standard); compression efficiency 62%→ data volume reduction 62% (up to standard); check overhead 0.8ms / block→ CPU occupancy 25% (up to standard); hardware bearing capacity→ support Android10.0 (up to standard)”. The generated fusion feature data set is “scene label: vehicle-mounted video-regular priority; baud rate adaptation degree: 0.92 (corresponding speed 360KB / s, threshold 350KB / s); compression efficiency: 62% (threshold ≥50%); check overhead: 0.8ms / block (threshold ≤1ms); hardware bearing capacity: CPU 25% / cache 40% / Android10.0 (all up to standard); error rate current (target )”.

[0069] Based on the fusion feature data set, a dynamic integration model of large file serial port transmission parameters is constructed, taking file transmission specifications as the model input dimension, key influencing factors as the core parameters, and multiple constraint information as the boundary conditions, to generate an initial transmission parameter data set adapted to the current scene. Based on the fusion feature data set, a dynamic model considering multiple constraints is constructed, and the initial transmission parameters adapted to the current scene are output, realizing the preliminary matching of parameters and scenes. The model takes file transmission specifications (file type, block size, transmission priority) as the input dimension, key influencing factors as the core parameters, and multiple constraint information (speed, error rate, compatibility) as the boundary conditions. Through algorithm iteration calculation, the transmission parameters adapted to the current scene are output, including baud rate level, compression rate target, check strategy, and hardware resource allocation ratio. The content of the initial transmission parameter data set: clearly define the core parameters of each transmission link, ensure that there is no conflict between parameters, and meet the constraint requirements.

[0070] Based on the above fusion feature data set, the input dimension is “binary class 64KB / block, regular priority”, the core parameters are baud rate adaptation degree 0.92, compression efficiency 62%, etc., and the boundary conditions are speed ≥350KB / s, error rate ≤ . After model iteration calculation, the generated initial transmission parameter data set is “baud rate level: 1.5Mbps; compression rate target: 65%; check strategy: double-node check (CRC8+CRC32) + parallel retransmission (concurrent number 16); hardware resource allocation: LZ4 compression CPU occupancy 20%, check CPU occupancy 15%, cache allocation 32KB; compatibility adaptation: Android5.0+ without Root”.

[0071] According to the large file transmission requirements of different scenes, the initial transmission parameter data set is decomposed in data dimension, the application priority, adjustment frequency and abnormal response measures of the transmission mode adaptation parameter, rate calibration rule, resource occupation threshold and protocol linkage mapping information are determined, and the transmission mode adaptation parameter, rate calibration rule, resource occupation threshold, file transmission and serial port protocol linkage mapping information suitable for multiple scenes are generated. According to the parameter dimension of different scene requirements, the parameter application rule and abnormal response scheme are determined, and the standardized and implementable transmission configuration information is formed. According to the scene classification (industrial control / vehicle video / log file), the baud rate level, block size and compression rate target (such as industrial control: 1.5 Mbps / 4 KB / 65%; log file: 921600 bps / 4 KB / 55%) are determined. The calibration trigger condition (rate fluctuation ± 5%, continuous 3 block error code) and calibration step (baud rate ± 10%, compression rate ± 5%) are set. According to the hardware state division (sufficient / tight / scarce), the CPU and cache occupation upper limit (such as sufficient: CPU≤30% / cache≤50%; scarce: CPU≤20% / cache≤30%) is set. The linkage logic of block, compression, check and retransmission is determined (such as block 64 KB→compression rate 60%→double node check→parallel retransmission). The priority is sorted as "rate standard>error rate control>resource occupation>compatibility"; the abnormal response measures include increasing baud rate when the rate is insufficient, strengthening check when the error rate is excessive, and reducing compression rate when the resource is tight.

[0072] The initial transmission parameter data set is decomposed, and the final information suitable for multiple scenes is generated. The transmission mode adaptation parameter is industrial control (text 4 KB / 1.5 Mbps / 65% compression), vehicle video (binary 64 KB / 1.5 Mbps / 62% compression) and log file (text 4 KB / 921600 bps / 55% compression); the rate calibration rule is that the calibration is triggered when the fluctuation is ± 5%, the baud rate is adjusted by 10% each time, and the compression rate is adjusted by 5% each time. The resource occupation threshold is as follows: hardware sufficient (CPU≤30% / cache≤50%), tight (CPU≤25% / cache≤40%) and scarce (CPU≤20% / cache≤30%); the protocol linkage mapping information is that text 4 KB→compression rate 55%-65%→double node check→fast retransmission; binary 64 KB→compression rate 50%-62%→double node check→parallel retransmission (concurrent 16); when the rate is less than 350 KB / s, the baud rate is increased to 1.5 Mbps; when the error rate is greater than 1%, FEC encoding is enabled; when the CPU occupation is greater than 30%, the compression rate is reduced to 50%.

[0073] In one embodiment, as shown in Figure 2 The application also provides a PC-to-Android device large file high-speed transmission device based on a serial port protocol, which comprises:

[0074] ​The acquisition module 201 is configured to receive PC and Android device large file transmission demand instructions and serial communication basic configuration information, and generate transmission protocol start and dynamic resource configuration basic setting information.

[0075] The processing module 202 is configured to start the LZ4 real-time compression function and trigger the mixed verification mechanism based on the transmission protocol start instruction and the dynamic resource configuration setting, generate file initial block information and serial real-time transmission rate raw data, receive pre-stored block compression pipeline protocol and rate data processing rules, process the file initial block information and the serial real-time transmission rate raw data, generate standard compression data block information and transmission rate comparison benchmark information, process the standard compression data block information and the transmission rate comparison benchmark information based on the dynamic baud rate negotiation rule, generate rate adjustment signals and verification mechanism adaptation information, process the verification mechanism adaptation information and the device serial port hardware resource state information, generate mixed verification level and file transmission specification matching control operation information, and convert the control operation information into actual file transmission actions based on pre-set large file transmission mode operation requirements and real-time bit error rate feedback, extract and classify transmission mode requirements, bit error rate feedback, control operation information and serial port hardware attributes, and generate transmission mode adaptation parameters, rate calibration rules, resource occupation thresholds, and file transmission and serial port protocol linkage mapping information.

[0076] Each of the embodiments in the present application is described in a related manner, and the same and similar parts of each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the PC-to-Android device large file high-speed transmission method, electronic device, electronic equipment, and readable storage medium embodiments, since they are basically similar to the above-mentioned PC-to-Android device large file high-speed transmission method embodiment based on the serial port protocol, the description is relatively simple, and the relevant parts can be referred to the above-mentioned PC-to-Android device large file high-speed transmission method embodiment based on the serial port protocol.

Claims

1. A method for high-speed transfer of large files from a PC to an Android device based on a serial port protocol, characterized in that, include: Receive large file transfer request commands and basic serial communication configuration information from PC and Android devices, and generate basic settings for transmission protocol startup and dynamic resource configuration. Based on the transmission protocol startup command and dynamic resource configuration settings, the LZ4 real-time compression function is started and the hybrid verification mechanism is triggered to generate the initial file block information and the original data of the serial port real-time transmission rate. It receives pre-stored block compression pipeline protocol and rate data processing rules, processes the initial block information of the file and the raw data of the real-time serial port transmission rate, and generates standard compressed data block information and transmission rate comparison benchmark information. Based on the dynamic baud rate negotiation rule, the standard compressed data block information and the transmission rate ratio are processed to generate the rate adjustment signal and the verification mechanism adaptation information. The verification mechanism adaptation information and device serial port hardware resource status information are processed to generate mixed verification level and file transfer specification matching control operation information; Based on the preset large file transfer mode operation requirements and real-time bit error rate feedback, the control operation information is transformed into actual file transfer actions. The transfer mode requirements, bit error rate feedback, control operation information and serial port hardware attributes are extracted and classified to generate transfer mode adaptation parameters, rate calibration rules, resource usage thresholds, and file transfer and serial port protocol linkage mapping information.

2. The method as described in claim 1, characterized in that, Based on the transmission protocol startup command and dynamic resource configuration settings, the LZ4 real-time compression function is started and the hybrid verification mechanism is triggered, generating initial file block information and raw data of the serial port real-time transmission rate, including: The file types are grouped and classified according to the preset block division rules, generating block division patterns and 4KB / 64KB associated processing parameter information for text and binary classes. Based on the needs of large file transfer, the layout design of the LZ4 real-time compression function is carried out, and the compression activation standard, compression data type and compression range information are obtained to generate compression function activation design information. Based on the operational planning and verification monitoring requirements of the large file transfer mode, the corresponding CRC8 fast verification node is set for the compression function of each block rule using the design information. The file block grouping results, LZ4 compression function enablement design information, and CRC8 check nodes are processed to generate the initial file block information and raw data of serial port real-time transmission rate, which include block grouping information, compression function enablement scheme, and CRC8 check standard.

3. The method as described in claim 1, characterized in that, It receives pre-stored block compression pipeline protocol and rate data processing rules, processes the initial file block information and raw serial port real-time transmission rate data, and generates standard compressed data block information and transmission rate comparison benchmark information, including: The block compression pipeline protocol and rate data processing rules are imported into the transmission data processing system for compatibility analysis. The windowed confirmation mechanism and rate level switching logic are extracted. The transmission efficiency and data integrity of different file type block compression combined with LZ4 compression are simulated to generate block compression adaptation simulation data. A block identifier mapping algorithm is used to subdivide the correspondence between compressed blocks and transmission rates in the block compression adaptation simulation data, and generate a standardized data processing model. The block identifier mapping algorithm decomposes the data processing logic from the dimensions of block type identification, compression efficiency matching, and rate adaptation, and establishes mapping rules for the transmission needs and rate stability goals of different scenarios such as fast transmission of small text files and efficient compression of large binary files. Collect characteristic parameters such as the pass rate of compressed data block verification, the real-time fluctuation value of serial port rate, and the delay of block batch transmission under different transmission scenarios, construct a block compression transmission characteristic library, and generate data processing constraint data. Among them, the block compression transmission characteristic library customizes parameters for the rate optimization requirements of low bit error rate scenarios, the compression efficiency requirements of high redundancy data scenarios, and the confirmation mechanism requirements of multi-block continuous transmission scenarios. By integrating standardized data processing models with data processing constraint data, a block compression-rate adaptation coupled processing model is constructed. Through iterative optimization of the model, standard compressed data block information and transmission rate comparison benchmark information are generated.

4. The method as described in claim 3, characterized in that, Based on the dynamic baud rate negotiation rule, the standard compressed data block information and the transmission rate comparison reference information are processed to generate rate adjustment signals and verification mechanism adaptation information, including: Based on the dynamic baud rate negotiation rules, standard compressed data block information and transmission rate comparison benchmark information are obtained, and features of compressed block integrity, current baud rate adaptability and bit error rate stability are extracted. The integrity characteristics of compressed blocks are verified to identify data block loss and compression / decompression anomalies, and a block integrity coefficient is generated. Verify the current baud rate adaptability characteristics, check the mismatch between the 1.5Mbps / 921600bps hierarchical rate and file transfer requirements, and generate a rate adaptability accuracy factor. Verify the bit error rate stability characteristics to confirm whether the bit error rate is controlled within the target range during continuous transmission and whether there is a risk of three consecutive data block verification failures, and generate a bit error rate stability coefficient. Based on the preset baud rate negotiation rules, the block integrity coefficient, rate adaptation accuracy factor and error stability coefficient are processed. The baud rate level is adjusted by a dynamic rate switching mechanism, the forward error correction coding is used to compensate for errors, and the check node is optimized to improve the check efficiency, thereby generating the rate negotiation preprocessing result. The integrated rate negotiation preprocessing results generate a rate adjustment signal that reflects block integrity deviation, rate adaptation error and bit error risk, as well as corresponding verification mechanism adaptation information for switching baud rate levels and enabling FEC encoding.

5. The method as described in claim 1, characterized in that, The verification mechanism adaptation information and device serial port hardware resource status information are processed to generate mixed verification level and file transfer specification matching control operation information, including: The verification mechanism adaptation information, device serial port hardware resource status information and file transfer specification data are integrated. Based on the serial port hardware processing capability, the execution priority of hybrid verification is determined. At the same time, the urgency of data block transmission and the verification calculation overhead threshold are superimposed to generate an intermediate processing dataset containing verification level selection logic, verification timing control standard and initial verification scheme for different file types. Based on the verification efficiency requirements, hardware resource consumption standards, and verification rules for different file types of the intermediate processing dataset, verification level conflicts in the intermediate processing dataset are marked and filtered to generate verification adaptation anomaly records. The intermediate processing dataset and verification adaptation anomaly records are verified and merged. Constraints are imposed on the computational overhead and hardware resource adaptation of hybrid verification, as well as reasonable range constraints on the verification accuracy of different file types. Conflicts in the verification level are corrected and the hybrid verification execution logic is improved. Hybrid verification level and control operation information adapted to different file transfer specifications are generated.

6. The method as described in claim 5, characterized in that, Based on the preset large file transfer mode operation requirements and real-time bit error rate feedback, control operation information is transformed into actual file transfer actions. The system extracts and categorizes transfer mode requirements, bit error rate feedback, control operation information, and serial port hardware attributes to generate transfer mode adaptation parameters, rate calibration rules, resource usage thresholds, and file transfer and serial port protocol linkage mapping information, including: A transmission parameter correlation algorithm is used to screen key influencing factors such as the operating requirements of the preset large file transmission mode, real-time bit error rate feedback, hybrid check control operation information, and serial port hardware attribute data, generating a set of key influencing factors including baud rate adaptability, compression efficiency, check overhead, and hardware carrying capacity. Data fusion processing is performed on the set of key influencing factors, serial port transmission speed threshold, bit error rate control standard and equipment compatibility requirements, to establish the correlation mapping relationship between the elements and generate a fused feature dataset. A dynamic integration model for large file serial port transmission parameters is constructed based on a fusion feature dataset. The model uses file transmission specifications as the input dimension, key influencing factors as core parameters, and multiple constraint information as boundary conditions to generate an initial transmission parameter dataset adapted to the current scenario. Based on the large file transfer requirements of different scenarios, the initial transfer parameter dataset is decomposed into data dimensions to clarify the application priority, adjustment frequency, and anomaly response measures of transfer mode adaptation parameters, rate calibration rules, resource consumption thresholds, and protocol linkage mapping information. This generates transfer mode adaptation parameters, rate calibration rules, resource consumption thresholds, and file transfer and serial port protocol linkage mapping information that are suitable for multiple scenarios.

7. A high-speed large file transfer device from a PC to an Android device based on a serial port protocol, characterized in that, The device includes: The acquisition module is used to receive large file transfer request instructions and basic serial communication configuration information between PC and Android device, and generate basic setting information for transmission protocol startup and dynamic resource configuration. The processing module is used to initiate the LZ4 real-time compression function and trigger the hybrid verification mechanism based on the transmission protocol start command and dynamic resource configuration settings, generating initial file block information and raw data of real-time serial port transmission rate; receiving pre-stored block compression pipeline protocol and rate data processing rules, processing the initial file block information and raw data of real-time serial port transmission rate, generating standard compressed data block information and transmission rate comparison benchmark information; processing the standard compressed data block information and transmission rate comparison benchmark information based on dynamic baud rate negotiation rules, generating rate adjustment signals and verification mechanism adaptation information; processing the verification mechanism adaptation information and device serial port hardware resource status information, generating hybrid verification level and file transmission specification matching control operation information; based on the preset large file transmission mode operation requirements and real-time bit error rate feedback, converting the control operation information into actual file transmission actions, extracting and classifying transmission mode requirements, bit error rate feedback, control operation information and serial port hardware attributes, generating transmission mode adaptation parameters, rate calibration rules, resource occupancy thresholds, and file transmission and serial port protocol linkage mapping information.

8. An electronic device, characterized in that, include: First processor; and memory for storing executable instructions of the first processor; The first processor is configured to execute the high-speed large file transfer method from PC to Android device based on serial port protocol as described in any one of claims 1 to 6 by executing the executable instructions.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the second processor, it implements the high-speed large file transfer method from PC to Android device based on serial port protocol as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and apparatus for transmitting data by utilizing serial port

    CN107562670A

  • Multi-rate adaptive serial port transmission control system

    CN117318889A

  • Communication protocol optimization method for multiprocessor communication system

    CN120448324A

  • Communication method and system for interconnection and intercommunication between charging platforms

    CN120498694A

  • Anti-interference serial port communication method and system of industrial-grade wireless module

    CN120567702A