Priority slice file transmission method and device based on information entropy
Through the priority slicing file transfer method based on information entropy, important data blocks are identified and transmitted first, which solves the problem of low efficiency in traditional file transfer methods and realizes efficient and reliable transmission in scenarios with limited network bandwidth.
Patent Information
- Application Number
- CN202511114937.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-08-11
AI Technical Summary
Traditional file transfer methods are unable to effectively identify differences in data importance when faced with files with complex content and diverse structures, resulting in low transmission efficiency and a poor user experience, especially in scenarios with limited network bandwidth.
An information entropy-based priority slicing file transmission method is adopted. The target file is divided into continuous data blocks, which are segmented according to the information entropy size to form file slices of variable size. The transmission priority is marked based on the information entropy size, and the transmission order is dynamically adjusted to give priority to sending important data blocks.
It improves the overall efficiency and reliability of file transfer, ensures the reliable transmission of important data, and enhances the user experience.
Smart Images

Figure CN120614352A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of file transmission technology, and in particular to a method and device for priority slice file transmission based on information entropy. Background Art
[0002] In the modern information society, file transfer, as an essential component of data communications, is widely used in cloud computing, big data transmission, remote backup, multimedia streaming services, and other fields. With the surge in data volumes and the diversification of network environments, efficient and reliable file transfer has become a pressing issue.
[0003] Traditional file transfer methods typically use a fixed-size segmentation strategy, dividing files into equal-length segments for transmission. While this approach is simple to implement and manage, it often fails to effectively identify differences in data importance when dealing with complex and diverse files, resulting in low transmission efficiency and a poor user experience, especially in scenarios with limited network bandwidth.
[0004] Currently, no effective solution has been proposed to address the problems of poor file transfer performance and stability in related technologies. Summary of the Invention
[0005] In this embodiment, a priority slice file transmission method and device based on information entropy are provided to solve the problems of poor file transmission performance and stability in related technologies.
[0006] In a first aspect, this embodiment provides a method for transmitting priority slice files based on information entropy, which is applied to a sending end. The method includes:
[0007] Divide the target file into consecutive data blocks;
[0008] Based on the information entropy of the data block, the target file is segmented to obtain a plurality of file slices of variable size;
[0009] Based on the information entropy of the file slice, marking the corresponding transmission priority of the file slice;
[0010] The corresponding file slices are sent to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
[0011] In some embodiments, the target file is segmented based on the information entropy of the data blocks to form file slices of variable sizes, including:
[0012] For each of the data blocks, calculating the information entropy of the data block based on the frequency at which each byte appears in the data block;
[0013] Based on the information entropy, the data blocks are integrated to form file slices of variable size.
[0014] In some embodiments, the data blocks are integrated based on the information entropy to form file slices of variable size, including:
[0015] Traversing all of the data blocks;
[0016] If the information entropy of the current data block is greater than or equal to a preset first threshold, the current data block is separately defined as a high entropy slice;
[0017] If the information entropy of the current data block is less than the first threshold, then within the preset slice size range, the current data block and the subsequent data blocks whose information entropy is less than the first threshold are merged into a medium-low entropy slice.
[0018] In some embodiments, before sending the file slices to the receiving end in sequence based on the transmission priority, the method further includes:
[0019] In response to the high entropy slice retransmission request sent by the receiving end, the high entropy slice with transmission abnormality is inserted at the first place of the sending order so as to be sent to the receiving end with priority.
[0020] In some embodiments, sending the file slices to the receiving end sequentially based on the transmission priority includes:
[0021] Get real-time network status information;
[0022] Dynamically updating the sending order of the file slices based on the network status information, the transmission priority, and the size of the file slices;
[0023] The file slices are sent to the receiving end in sequence based on the sending order.
[0024] In a second aspect, this embodiment provides a priority slice file transmission device based on information entropy, which is applied to a sending end, and the device includes:
[0025] A block module is used to divide the target file into continuous data blocks;
[0026] A slicing module, configured to slice the target file based on the information entropy of the data block to form file slices of variable size;
[0027] a marking module, configured to mark the file slice with a corresponding transmission priority based on the information entropy of the file slice;
[0028] A sending module is used to send the file slices to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
[0029] In a third aspect, this embodiment provides a priority slice file transmission method based on information entropy, which is applied to a receiving end. The method includes:
[0030] Receiving a file slice transmitted by a sending end; the file slice is formed by continuous data blocks divided from a target file; the transmission priority of the file slice is determined based on the information entropy of the file slice;
[0031] splicing the file slices in sequence based on the order of the transmission priorities from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file;
[0032] The output data is updated in real time based on the file slices that have been spliced.
[0033] In some embodiments, splicing the received file slices includes:
[0034] Extracting a first hash value from the file slice; the first hash value is calculated by the sending end based on the content of the data to be sent;
[0035] Calculating a second hash value based on the data content of the file slice;
[0036] Based on a comparison result of the first hash value and the second hash value, determining whether the file slice is complete;
[0037] The received complete file slices are spliced together.
[0038] In some embodiments, the method further comprises:
[0039] In response to the file slice transmission exception, a retransmission request is sent to the sending end, and part of the lost data is recovered based on redundant information in the file slices adjacent to the lost file slice.
[0040] In a fourth aspect, this embodiment provides a priority slice file transmission device based on information entropy, which is applied to a receiving end, and the device includes:
[0041] a receiving module configured to receive file slices transmitted by a sending end; the file slices being formed by continuous data blocks divided from a target file; and the transmission priority of the file slices being determined based on the information entropy of the file slices;
[0042] a reassembly module, configured to sequentially splice the file slices based on the order of the transmission priorities from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file;
[0043] The output module is used to update the output data in real time based on the spliced file slices.
[0044] Compared with the related art, the information entropy-based priority slicing file transmission method and device provided in this embodiment divides the target file into continuous data blocks at the sending end; based on the information entropy of the data blocks, the target file is sliced to obtain multiple file slices of variable size; based on the information entropy size of the file slice, the corresponding transmission priority of the file slice is labeled; based on the transmission priority, the corresponding file slices are sent to the receiving end in sequence, so that the receiving end can restore the target file based on the received file slices, thereby solving the problems of poor file transmission performance and stability, and can identify the importance of data based on information entropy, adaptively divide data slices, and dynamically adjust the transmission strategy accordingly, thereby improving the overall transmission efficiency and reliability.
[0045] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0047] Figure 1 This is a hardware structure block diagram of a terminal for a method for transmitting priority slice files based on information entropy in an embodiment of the present application;
[0048] Figure 2 Schematic diagram of the flow of the information entropy-based priority slice file transmission method applied to the sending end in an embodiment of the present application;
[0049] Figure 3 Schematic diagram of the process of the information entropy-based priority slice file transmission method applied to the receiving end in an embodiment of the present application;
[0050] Figure 4 Schematic diagram of the flow of a priority slice file transmission method based on information entropy in a preferred embodiment of the present application;
[0051] Figure 5 This is a flow chart of entropy analysis in a preferred embodiment of the present application;
[0052] Figure 6 This is a structural block diagram of a priority slice file transmission device based on information entropy applied to a sending end in an embodiment of the present application;
[0053] Figure 7 This is a structural block diagram of the information entropy-based priority slice file transmission device applied to the receiving end in an embodiment of the present application.
[0054] Figure numerals: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 61, blocking module; 62, fragmentation module; 63, marking module; 64, sending module; 71, receiving module; 72, reassembly module; 73, output module. DETAILED DESCRIPTION
[0055] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0056] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include unlisted steps or modules (units) or other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0057] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 : is a hardware structure diagram of a terminal of the information entropy-based priority slice file transmission method of this embodiment. Figure 1As shown, the terminal may include one or more ( Figure 1 The processor 102 (only one is shown) and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The terminal may also include a transmission device 106 for communication functions and an input / output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0058] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the priority slice file transmission method based on information entropy in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0059] Transmission device 106 is used to receive or transmit data via a network. This network may include a wireless network provided by the terminal's communications provider. In one embodiment, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0060] In this embodiment, a priority slice file transmission method based on information entropy is provided. Figure 2 This is a flow chart of the priority slice file transmission method based on information entropy of this embodiment. Figure 2 As shown, the process is applied to the sending end and includes the following process steps:
[0061] Step S210: Divide the target file into continuous data blocks.
[0062] Specifically, a data block is a continuous sequence of bytes of any fixed size. A data block serves as a logical analysis unit for analyzing the information complexity of the target file. This is achieved by calculating the information entropy of each data block. A high entropy indicates a high level of information complexity within the data block, while a low entropy indicates a low level of information complexity.
[0063] Step S220 : Slice the target file based on the information entropy of the data blocks to obtain a plurality of file slices of variable sizes.
[0064] Specifically, a file slice is a transmission unit that is divided when the file is actually transmitted. It is composed of data blocks. The specific implementation method is to combine or split the data blocks to form corresponding file slices. When combining, data blocks with the same or similar information entropy are selected. The size of the file slice can be set according to the specific transmission scenario and task requirements, such as 100KB, or 500KB. In addition, when the target file is segmented, the information of each file slice is recorded to ensure that the data is identifiable, reorganizable, retransmittable and verifiable. The information of the file slice includes the slice ID, slice index (index) and original offset (offset). The slice index represents the serial number of the slice, and the original offset represents the starting offset address of the slice in the original target file.
[0065] Step S230: Based on the information entropy of the file slice, the corresponding transmission priority of the file slice is marked.
[0066] Specifically, the information entropy of a file slice can be determined based on the data blocks contained in it, thereby reflecting the complexity of the file slice. The greater the information entropy of a file slice, the more complex it is and the more critical information it contains. The smaller the information entropy of a file slice, the less complex it is and the less critical information it contains. For example, in video data, file slices are often static frames. Therefore, when transmitting, file slices with high information entropy are assigned a higher transmission priority.
[0067] In step S240 , the corresponding file slices are sent to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
[0068] Specifically, file slices can be sent in order based on the priority order, i.e., the higher the priority, the earlier it is sent. During streaming, the transmission order can also be adjusted based on the current network status, taking into account the priority and file slice size, giving priority to sending file slices with high information entropy and small slices.
[0069] In this embodiment, the target file is divided into continuous data blocks at the sending end; based on the information entropy of the data blocks, the target file is segmented to obtain multiple file slices of variable size; based on the information entropy of the file slices, the corresponding transmission priority of the file slices is labeled; and based on the transmission priority, the corresponding file slices are sequentially sent to the receiving end, so that the receiving end can restore the target file based on the received file slices. This embodiment can identify the importance of data based on information entropy, adaptively divide the data slices, and dynamically adjust the transmission strategy accordingly, thereby improving overall transmission efficiency and reliability. This embodiment is suitable for the transmission of files such as text, audio, and video. In addition, the information entropy of the file slices is not defined by the video coding structure (I / P / B frames), but is adaptively segmented and prioritized based on information entropy. This makes it more flexible and adaptable to various scenarios to ensure the reliable transmission of important data.
[0070] In some embodiments, the target file is segmented based on the information entropy of the data blocks to form file slices of variable size, including:
[0071] Step S221 : For each data block, the information entropy of the data block is calculated based on the frequency of occurrence of each byte in the data block.
[0072] Specifically, the calculation formula for the information entropy of a data block is as follows:
[0073] ;
[0074] Among them, x i Indicates possible byte values (0~255); P(x i ) represents byte x i Frequency in the data block (number of occurrences / total number of bytes); H(X) represents the information entropy of the data block (bit / byte).
[0075] If most bytes in a 64KB block are repeated (for example, all 0x00), the entropy value is close to 0. If the bytes are very evenly distributed, the entropy value is close to 8, indicating that the data is complex and has poor compressibility.
[0076] Step S222: Based on the information entropy, the data blocks are integrated to form file slices of variable size.
[0077] In this embodiment, the computational complexity of information entropy is low and the file slicing efficiency is higher.
[0078] In some embodiments, data blocks are aggregated based on information entropy to form file slices of variable size, including:
[0079] Step S222-A, traverse all data blocks.
[0080] Step S222-B: If the information entropy of the current data block is greater than or equal to a preset first threshold, the current data block is defined as a high entropy slice.
[0081] Step S222-C: If the information entropy of the current data block is less than the first threshold, then within a preset slice size range, the current data block and multiple subsequent data blocks with information entropy less than the first threshold are merged into a medium-low entropy slice. The slice size of the medium-low entropy slice is larger than the slice size of the high-entropy slice.
[0082] Specifically, the first threshold is set to 7, and data blocks with information entropy greater than or equal to 7 are individually treated as small slices (for example, 100KB). When the information entropy is less than 7, a second threshold can be further set, for example, to 5. If the information entropy is greater than or equal to 5 but less than 7, the data blocks are merged to form medium-entropy slices, with the first slice size (for example, 300KB) as the limit. If the information entropy is less than 5, the data blocks are merged to form low-entropy slices, with the second slice size (for example, 500KB) as the limit. Therefore, in this embodiment, in terms of data complexity: high-entropy slices > medium-entropy slices > low-entropy slices; in terms of slice size: high-entropy slices < medium-entropy slices < low-entropy slices.
[0083] In some of the embodiments, the data block merging logic is as follows: initialize a cache pool buffer, traverse all data blocks, and if the information entropy of the data block is less than a first threshold (i.e., a low entropy block), add the low entropy block to the buffer; when the total length of the buffer reaches an upper limit (such as 500KB), output a file slice.
[0084] In this embodiment, high entropy segments are sliced into smaller blocks to reduce the probability of packet loss during transmission; while medium and low entropy segments can be integrated into larger blocks to reduce the protocol overhead caused by small packet transmission and improve overall bandwidth utilization.
[0085] In some embodiments, before sending the file slices to the receiving end in sequence based on the transmission priority, the method further includes:
[0086] Step S222-D, in response to the high entropy slice retransmission request sent by the receiving end, the high entropy slice with transmission abnormality is inserted at the first place in the sending order so as to be sent to the receiving end first.
[0087] Specifically, high-entropy slices are marked with a high priority, and the receiver can use this priority to identify lost file slices as high-entropy slices. During the transmission process, if an interruption or packet loss occurs, the receiver will automatically call the fault tolerance and recovery module to re-request the missing high-priority slice to ensure the complete transmission of important data.
[0088] In some embodiments, the file slices are sequentially sent to the receiving end based on the transmission priority, including:
[0089] Step S241: Acquire network status information in real time.
[0090] Step S242: Dynamically update the order in which the file slices are sent based on the network status information, the transmission priority, and the size of the file slices.
[0091] Step S243: Send the file slices to the receiving end in sequence based on the sending order.
[0092] Specifically, slices are transmitted piecemeal using streaming technologies (such as HTTP / 2 or WebSocket). During transmission, the order of slice transmission is dynamically adjusted based on real-time network conditions, ensuring that high-priority slices with small data volumes are sent first, thereby improving overall transmission efficiency and user experience. The order of slice transmission is further dynamically adjusted based on real-time network conditions and feedback from the receiving end.
[0093] In this embodiment, a priority slice file transmission method based on information entropy is provided. Figure 3 This is a flow chart of the priority slice file transmission method based on information entropy of this embodiment. Figure 3 As shown, the process is applied to the receiving end and includes the following process steps:
[0094] Step S310, receiving a file slice transmitted by a sending end; the file slice is formed by continuous data blocks divided from a target file; the transmission priority of the file slice is determined based on the information entropy of the file slice.
[0095] Specifically, the sender can generate and send file slices based on any of the above-mentioned information entropy-based priority slicing file transmission methods applied to the sender. The received file slices are marked with a transmission priority, and the receiver preferentially receives and processes file slices with higher transmission priorities. Slices with lower transmission priorities are received and processed after the transmission of slices with higher transmission priorities is completed. The transmission priority design can be two-level, three-level, or even multi-level numerical priority, depending on the sophistication of the system composed of the sender and receiver.
[0096] Step S320 , splicing the file slices in sequence based on the transmission priority from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file.
[0097] Specifically, the receiving end verifies, decodes, and writes the received file slices to disk / cache in descending order of transmission priority. In particular, in real-time decoding scenarios (such as video and simultaneous downloading), the file slices marked with the highest transmission priority are prioritized for splicing and use. During splicing, multiple file slices of the same priority are sorted and reassembled by their original offset (or slice index) to ensure that the data restored from the file slices conforms to the order of the original target file. The original offset (offset) records the starting position of the slice in the original file; the slice index is derived based on the slice sequence number.
[0098] Step S330: updating the output data in real time based on the spliced file slices.
[0099] Specifically, in the scenario of video transmission, the output display screen is updated in real time, and the user can see the screen update in time.
[0100] In this embodiment, information entropy analysis technology is used to dynamically adjust the content and transmission order of file slices to ensure priority sending and receiving of important data, avoid screen freezes due to packet loss of important data, and improve user experience.
[0101] In some embodiments, splicing the received file slices includes:
[0102] Step S321: extract a first hash value from the file slice; the first hash value is calculated by the sending end based on the content of the data to be sent.
[0103] Step S322: Calculate a second hash value based on the data content of the file slice.
[0104] Step S323: Based on the comparison result of the first hash value and the second hash value, determine whether the file slice is complete.
[0105] Specifically, if the file slice is complete, that is, it passes the integrity check, the result of successful transmission is returned to the sender, and the subsequent step S324 is continued; if the file slice is incomplete, that is, the integrity check fails, the fault recovery mechanism is triggered, and a request for retransmission is made to the sender, and the fault information is recorded.
[0106] Step S324: splicing the received complete file slices.
[0107] In this embodiment, in order to ensure the accuracy and integrity of the data, a hash check code (SHA-256) is used to verify the integrity of the received slices to improve the reliability of file transmission.
[0108] In some embodiments, the method further comprises:
[0109] Step S340 , in response to the file slice transmission exception, a retransmission request is sent to the sending end, and part of the lost data is recovered based on redundant information in the file slices adjacent to the lost file slice.
[0110] Specifically, file slice transmission anomalies include integrity check failure, which triggers the fault recovery mechanism. Under the fault recovery mechanism, the receiving end automatically requests retransmission of the file slice and uses redundant information to recover some lost data to avoid retransmission of the entire file.
[0111] In this embodiment, the efficiency and integrity of transmission are ensured, and the reliable arrival of important data is guaranteed even under poor network conditions.
[0112] The following describes and illustrates the preferred embodiment by taking the transmission task of a video file as an example. The video file to be transmitted (i.e., the target file) contains multiple high-frequency and low-frequency image contents. Figure 4 The priority slice file transmission method based on information entropy in this preferred embodiment includes the following process:
[0113] 1. Entropy analysis and slice generation: The sender responds to the target file transfer request initiated by the user and divides the target file into continuous data blocks; calculates the information entropy of each data block. Entropy analysis is started based on information entropy, see Figure 5 , according to the information entropy of the data block, it is judged whether the data block belongs to the high entropy area or the low entropy area to identify the key frames and static frames in the video file; the key frames are divided into 100KB file slices (high entropy slices), and multiple static frames are integrated into 500KB file slices (low entropy slices).
[0114] 2. Priority allocation: The sender marks the corresponding transmission priority of the file slice based on the information entropy of the file slice. The transmission priority includes high priority and low priority. Among them, the transmission priority of the high entropy slice is high priority, and the transmission priority of the low entropy slice is low priority.
[0115] 3. Streaming transmission mechanism: The sender and receiver communicate using the WebSocket protocol. The sender starts transmitting files in descending order of priority. If the network bandwidth is unstable during the transmission process, the receiver adjusts the transmission order of subsequent file slices based on the receiver's feedback information to ensure that high-priority file slices are always processed first.
[0116] 4. Reconstruction at the Receiver: After receiving the slices, the receiver first verifies the high-priority file slice. To ensure data accuracy and integrity, a hash checksum (SHA-256) is used to verify the integrity of the received target slice. Each file slice is sent with a corresponding hash value. When reconstructing the data, the receiver verifies the calculated hash value by comparing it with the received hash value. Once verified, the file slice is reassembled based on its original offset and index, ensuring that users can see the updated image in real time while watching the video. Lower-priority file slices are processed gradually after the transmission of the higher-priority file slices is completed.
[0117] 5. Fault recovery mechanism: If some high-priority file slices are lost during the transmission process, the receiving end will automatically request retransmission and use redundant information to recover some of the lost data to avoid retransmitting the entire file.
[0118] In this preferred embodiment, information entropy analysis technology is used to dynamically adjust the size and content of file slices and assign corresponding transmission priorities to ensure that data blocks in high entropy areas are transmitted first, which significantly improves the transmission speed of large files in different network environments, reduces the risk of important data loss, and ensures the reliable arrival of video files.
[0119] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0120] In this embodiment, a priority slice file transmission device based on information entropy is also provided, which is used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been described will not be repeated. The terms "module", "unit", "sub-unit", etc. used below can implement a combination of software and / or hardware that implements the predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0121] Figure 6 This is a structural block diagram of the information entropy-based priority slice file transmission device applied to the sending end of this embodiment, such as Figure 6 As shown, the device includes: a blocking module 61, a slicing module 62, a marking module 63 and a sending module 64.
[0122] The block division module 61 is used to divide the target file into continuous data blocks.
[0123] The slicing module 62 is used to slice the target file based on the information entropy of the data blocks to form file slices of variable size.
[0124] The marking module 63 is used to mark the file slices with corresponding transmission priorities based on the information entropy of the file slices.
[0125] The sending module 64 is used to send the file slices to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
[0126] Figure 7 This is a structural block diagram of the information entropy-based priority slice file transmission device applied to the receiving end of this embodiment, such as Figure 7 As shown, the device includes: a receiving module 71, a reassembly module 72 and an output module 73.
[0127] The receiving module 71 is used to receive file slices transmitted by the sending end; the file slices are formed by continuous data blocks divided from the target file; the transmission priority of the file slices is determined based on the information entropy of the file slices.
[0128] The reassembly module 72 is configured to sequentially splice the file slices based on the order of transmission priority from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file.
[0129] Output module 73 is used to update output data in real time based on the spliced file slices. It should be noted that each of the above modules can be a functional module or a program module, and can be implemented via software or hardware. For modules implemented via hardware, each of the above modules can be located in the same processor; alternatively, each of the above modules can be located in different processors in any combination.
[0130] This embodiment further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0131] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0132] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0133] In addition, in conjunction with the information entropy-based priority slice file transmission method provided in the above embodiments, a storage medium may also be provided in this embodiment for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, it implements any of the information entropy-based priority slice file transmission methods in the above embodiments.
[0134] It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0135] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.
[0136] The term "embodiment" as used in this application refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily mean that the embodiment is the same, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is understood, either explicitly or implicitly, by those skilled in the art that the embodiments described in this application can be combined with other embodiments when there is no conflict.
[0137] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A priority slice file transmission method based on information entropy, characterized in that: Applied to a sending end, the method includes: Divide the target file into consecutive data blocks; Based on the information entropy of the data block, the target file is segmented to obtain a plurality of file slices of variable size; Based on the information entropy of the file slice, marking the corresponding transmission priority of the file slice; The corresponding file slices are sent to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
2. The method for transmitting priority slice files based on information entropy according to claim 1, characterized in that: Slicing the target file based on the information entropy of the data block to form file slices of variable size includes: For each of the data blocks, calculating the information entropy of the data block based on the frequency at which each byte appears in the data block; Based on the information entropy, the data blocks are integrated to form file slices of variable size.
3. The method for transmitting priority slice files based on information entropy according to claim 2, characterized in that: Based on the information entropy, the data blocks are integrated to form file slices of variable size, including: Traversing all of the data blocks; If the information entropy of the current data block is greater than or equal to a preset first threshold, the current data block is separately defined as a high entropy slice; If the information entropy of the current data block is less than the first threshold, then within a preset slice size range, the current data block and subsequent data blocks whose information entropy is less than the first threshold are merged into a medium-low entropy slice.
4. The method for transmitting priority slice files based on information entropy according to claim 3, characterized in that: Before sending the file slices to the receiving end in sequence based on the transmission priority, the method further includes: In response to the high entropy slice retransmission request sent by the receiving end, the high entropy slice with transmission abnormality is inserted at the first place of the sending order so as to be sent to the receiving end with priority.
5. The method for transmitting priority slice files based on information entropy according to claim 1, characterized in that: The method includes sending the file slices to the receiving end in sequence based on the transmission priority, including: Get real-time network status information; Dynamically updating the sending order of the file slices based on the network status information, the transmission priority, and the size of the file slices; The file slices are sent to the receiving end in sequence based on the sending order.
6. A priority slice file transmission device based on information entropy, characterized in that: Applied to a transmitting end, the device includes: A block module is used to divide the target file into continuous data blocks; A slicing module, configured to slice the target file based on the information entropy of the data block to form file slices of variable size; a marking module, configured to mark the file slice with a corresponding transmission priority based on the information entropy of the file slice; A sending module is used to send the file slices to the receiving end in sequence based on the transmission priority, so that the receiving end can restore the target file based on the received file slices.
7. A priority slice file transmission method based on information entropy, characterized in that: Applied to a receiving end, the method includes: Receiving a file slice transmitted by a sending end; the file slice is formed by continuous data blocks divided from a target file; the transmission priority of the file slice is determined based on the information entropy of the file slice; splicing the file slices in sequence based on the order of the transmission priorities from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file; The output data is updated in real time based on the file slices that have been spliced.
8. The method for transmitting priority slice files based on information entropy according to claim 7, characterized in that: Based on the order of the transmission priorities from high to low, the file slices are sequentially spliced, including: Extracting a first hash value from the file slice; the first hash value is calculated by the sending end based on the content of the data to be sent; Calculating a second hash value based on the data content of the file slice; Based on a comparison result of the first hash value and the second hash value, determining whether the file slice is complete; Based on the order of the transmission priorities from high to low, the complete file slices are spliced in sequence.
9. The method for transmitting priority slice files based on information entropy according to claim 7, characterized in that: The method further comprises: In response to the file slice transmission exception, a retransmission request is sent to the sending end, and part of the lost data is recovered based on redundant information in the file slices adjacent to the lost file slice.
10. A priority slice file transmission device based on information entropy, characterized in that: Applied to a receiving end, the device includes: a receiving module configured to receive file slices transmitted by a sending end; the file slices being formed by continuous data blocks divided from a target file; and the transmission priority of the file slices being determined based on the information entropy of the file slices; a reassembly module, configured to sequentially splice the file slices based on the order of the transmission priorities from high to low; wherein the splicing positions of the file slices are determined based on the original positions of the file slices in the target file; The output module is used to update the output data in real time based on the spliced file slices.
Citation Information
Patent Citations
File identification method and device and computer readable storage medium
CN110210217A
Remote sensing image rapid encryption method based on texture complexity classification
CN113949783A
Data sharing method and device, computer equipment, chip and readable storage medium
CN117725619A
Parallel synchronization method and system for unstructured files
CN119513057A
Multi-channel firmware upgrading method and system supporting breakpoint resume
CN119556960A