Search

CN-122001875-A - TBox log uploading method and system based on dynamic configuration of fragment number

CN122001875ACN 122001875 ACN122001875 ACN 122001875ACN-122001875-A

Abstract

The invention provides a TBox log uploading method and system based on dynamic configuration of fragment numbers, which belong to the technical field of Internet of vehicles, wherein the method comprises the steps of responding to a TBox log uploading instruction, acquiring network parameters of an environment where a target vehicle is located acquired through an operating system network interface, and acquiring equipment operation parameters acquired through a TBox hardware monitoring interface; and obtaining a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to a cloud according to the pre-signed addresses. The invention can ensure that the log data is uploaded in the optimal fragment size, thereby maximally utilizing network resources and reducing the time required by uploading. The fragmented uploading allows multiple data blocks to be processed in parallel, so that the overall uploading speed is further increased, and the advantage is more obvious especially in a high-speed network environment.

Inventors

  • GAO XINPENG
  • Zhu Danhe
  • ZHANG RUI
  • YU ZHONGYU
  • XIE YU

Assignees

  • 东风汽车集团股份有限公司

Dates

Publication Date
20260508
Application Date
20260108

Claims (10)

  1. 1. A method for uploading a TBox log based on dynamically configuring a fragment number, comprising: Responding to a TBox log uploading instruction, acquiring network parameters of the environment where the target vehicle is located acquired through an operating system network interface, and acquiring equipment operation parameters acquired through a TBox hardware monitoring interface; Calculating the optimal fragment number according to the network parameters and the equipment operation parameters; And obtaining a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to a cloud according to the pre-signed addresses.
  2. 2. The method according to claim 1, wherein in the step of acquiring network parameters of the environment where the target vehicle is located acquired through the operating system network interface and acquiring device operation parameters acquired through the TBox hardware monitoring interface in response to the TBox log uploading instruction, the method further comprises the step of: The network parameters comprise at least one of available bandwidth, network delay, signal strength and network type; the equipment operation parameters comprise at least one of CPU occupancy rate, memory occupancy rate and storage residual space.
  3. 3. The method of claim 2, wherein the step of calculating an optimal number of slices based on the network parameters and the device operating parameters comprises: Calculating a network score according to the network parameters; Calculating a device score according to the device operating parameters; And calculating the optimal fragment number according to the network score and the equipment score.
  4. 4. The method of claim 3, wherein calculating a network score based on the network parameters comprises quantifying a network state using a normalization formula to generate a network score , The value range is 0-1: (1), in the formula (1), the components are as follows, The method comprises the steps of (1) obtaining a weight coefficient, wherein B is an available bandwidth, D is network delay, and P is signal strength; a preset threshold value; the step of calculating the equipment scoring according to the equipment operation parameters comprises the steps of quantifying equipment resource occupation conditions by adopting a normalization formula to generate equipment scoring , The value range is 0-1: (2), in the formula (2), the amino acid sequence of the compound, The method is characterized by comprising the steps of taking the weight coefficient as a weight coefficient, taking the CPU occupancy rate as C, taking the memory occupancy rate as M, and taking the memory occupancy rate as S; a preset threshold value; the step of calculating the optimal number of fragments according to the network score and the equipment score comprises the steps of dynamically determining the optimal number of fragments N according to the network score and the equipment score: (3), in the formula (3), the amino acid sequence of the compound, As a base slicing coefficient; The total size of the TBox log file to be uploaded is; the reference slice size; () Is rounded downwards.
  5. 5. The method according to claim 4, wherein the obtaining a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to the cloud according to the pre-signed addresses: Calling a pre-signature subsection uploading address query interface of the cloud, and applying for a corresponding number of temporary uploading addresses as pre-signature addresses according to the optimal number N of fragments; Cutting the TBox log file into a corresponding number of fragments according to the optimal fragment number N, and adding metadata for each fragment; the pre-signed address of each fragment is associated with a unique fragment ID.
  6. 6. The method according to claim 5, wherein the obtaining a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to the cloud according to the pre-signed addresses: When the network scores When the threshold value is larger than the preset threshold value, starting multithreading parallel uploading; when the slicing is a preset high-priority slicing, the transmission channel is preferentially occupied for the high-priority slicing; When the uploading of the target fragments fails, recording the failed fragment ID, automatically retransmitting after delaying the preset time, continuously failing fragments for preset times, triggering fragment strategy adjustment, wherein the fragment strategy adjustment comprises the steps of reducing the fragment size or switching network interfaces.
  7. 7. The method as recited in claim 1, further comprising: And after all the fragments are uploaded, notifying the cloud to execute automatic merging of the fragment data so as to generate a complete TBox log file.
  8. 8. A system for TBox log upload based on dynamically configured shards, configured to enable the method of any one of claims 1 to 7, the system comprising: The acquisition module is used for responding to the TBox log uploading instruction, acquiring network parameters of the environment where the target vehicle is located acquired through the network interface of the operating system, and acquiring equipment operation parameters acquired through the TBox hardware monitoring interface; The optimal fragment number calculation module is used for calculating the optimal fragment number according to the network parameters and the equipment operation parameters; And the uploading log file module is used for acquiring a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to the cloud according to the pre-signed addresses.
  9. 9. An electronic device, comprising: One or more processors; a memory for storing one or more programs; When executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1 to 7.
  10. 10. A computer readable medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method according to any of claims 1 to 7.

Description

TBox log uploading method and system based on dynamic configuration of fragment number Technical Field The invention relates to the technical field of Internet of vehicles, in particular to a TBox log uploading method and system based on dynamic configuration of fragment numbers. Background With the rapid development of the technology of the internet of vehicles, TBox is taken as an important bridge for communication between vehicles and the outside, and the generated log data has important significance for vehicle state monitoring, fault diagnosis, remote service and the like. However, the existing TBox log uploading method often has some problems, and the problems seriously restrict the timely and accurate transmission of log data. On the one hand, because the TBox log data volume is huge, a single complete uploading of a large amount of data easily causes network congestion, so that the uploading time is prolonged, and uploading failure can be caused by too high network load. On the other hand, the network environment where the vehicle is located is often complex and variable. There may be significant differences in network conditions in city centers, highways, or remote areas. This network instability poses a significant challenge to TBox log upload efficiency and stability. The traditional uploading method cannot respond in time when facing network fluctuation, and the uploading process is interrupted or fails. In addition, the single uploading mode lacks flexibility, cannot be dynamically adjusted according to the change of network conditions and data volume, and further reduces uploading efficiency. Disclosure of Invention The invention aims to solve at least one of the technical problems in the prior art, and provides an improved technical scheme for uploading TBox logs, wherein the changes of different network environments and log data volumes are adapted by dynamically adjusting the number of fragments, so that the high efficiency and stability of the log uploading process are ensured. In a first aspect, an embodiment of the present invention provides a method for uploading a TBox log based on dynamically configuring a partition number, including: Responding to a TBox log uploading instruction, acquiring network parameters of the environment where the target vehicle is located acquired through an operating system network interface, and acquiring equipment operation parameters acquired through a TBox hardware monitoring interface; Calculating the optimal fragment number according to the network parameters and the equipment operation parameters; And obtaining a corresponding number of pre-signed addresses according to the optimal number of fragments, cutting the TBox log file into a corresponding number of fragments according to the optimal number of fragments, and uploading the fragments to a cloud according to the pre-signed addresses. In a preferred embodiment, in the step of acquiring the network parameters of the environment where the target vehicle is located acquired through the network interface of the operating system and acquiring the device operation parameters acquired through the hardware monitoring interface of the TBox in response to the TBox log uploading instruction: The network parameters comprise at least one of available bandwidth, network delay, signal strength and network type; the equipment operation parameters comprise at least one of CPU occupancy rate, memory occupancy rate and storage residual space. In a preferred embodiment, the step of calculating an optimal number of slices based on the network parameters and the device operating parameters comprises: Calculating a network score according to the network parameters; Calculating a device score according to the device operating parameters; And calculating the optimal fragment number according to the network score and the equipment score. In a preferred embodiment, the step of calculating the network score based on the network parameters includes quantifying the network state using a normalization formula to generate a network score,The value range is 0-1: (1), in the formula (1), the components are as follows, The method comprises the steps of (1) obtaining a weight coefficient, wherein B is an available bandwidth, D is network delay, and P is signal strength; a preset threshold value; the step of calculating the equipment scoring according to the equipment operation parameters comprises the steps of quantifying equipment resource occupation conditions by adopting a normalization formula to generate equipment scoring ,The value range is 0-1: (2), in the formula (2), the amino acid sequence of the compound, The method is characterized by comprising the steps of taking the weight coefficient as a weight coefficient, taking the CPU occupancy rate as C, taking the memory occupancy rate as M, and taking the memory occupancy rate as S; a preset threshold value; the step of calculating the optimal number of fragments according t