Vehicle end large file uploading method and device, electronic equipment and readable storage medium

By performing periodic merge checksum missing shard detection during the uploading of large files on the vehicle, the problem of inefficient uploading caused by waiting for the last shard is solved, and the complete and efficient upload of large files is achieved.

CN119299448APending Publication Date: 2025-01-10ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411418226.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In the prior art, when uploading vehicle data, it is necessary to wait for the last shard to synthesize large files, resulting in inefficient uploading. If the last shard is lost, it will affect the entire uploading process.

Method used

By performing periodic merge verification when receiving shards, actively detect missing shards, and retransmit missing shards in time to avoid waiting for the last shard, and improve the effectiveness of shard reception and upload efficiency.

Benefits of technology

It realizes the completeness and accuracy of large file shard reception, avoids file end loss, and improves the efficiency and reliability of uploading large files on the vehicle side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299448A_ABST
    Figure CN119299448A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle end large file uploading method and device, electronic equipment and a readable storage medium. The method comprises the following steps: receiving fragments obtained by segmenting a large file uploaded by a vehicle end and the total number of the fragments; the fragment has a fragment identifier capable of representing the position of the fragment in the large file; based on the fragment identifiers of the received fragments and the total number of the fragments, after a file beginning of a large file uploaded by the vehicle end is received, periodically carrying out merging verification on the received fragments, and determining whether all current fragments of the received fragments are missing or not; if yes, determining a fragment identifier of the missing fragment; issuing an uploading instruction of the missing fragments to the vehicle end; the uploading instruction comprises an identifier of the missing fragment, so that the vehicle end finds the missing fragment based on the identifier of the missing fragment of the uploading instruction; and receiving the missing fragments uploaded by the vehicle end according to the uploading instruction to obtain the large file. In this way, the last fragment does not need to be passively waited, and then uploading of the large file is not affected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of file uploading, and in particular to a vehicle-side large file uploading method, device, electronic device and readable storage medium. Background Art

[0002] With the development and popularization of Internet of Vehicles technology, the amount of data generated by vehicles is also increasing. The data generated by these vehicles includes the vehicle's operating status, location information, sensor data, etc., which are of great significance for vehicle monitoring, management and optimization. However, due to the particularity of the vehicle environment and the limitations of network conditions, these large files need to be uploaded to the cloud stably and quickly.

[0003] The implementation scheme of the related art of multi-segment upload is to divide a large file into segments and upload each segment separately. After the last segment is uploaded, the cloud will synthesize the large file again to check whether there is any missing.

[0004] However, the cloud needs to wait for the last fragment to synthesize the large file, which will affect the upload of large files. Summary of the invention

[0005] The present application provides an improved vehicle-side large file uploading method, device, electronic device and readable storage medium.

[0006] This application provides a method for uploading large files on a vehicle, including:

[0007] The large file uploaded by the receiving vehicle is divided into segments and the total number of segments; the segments have segment identifiers that can represent their positions in the large file;

[0008] Based on the fragment identifier of the received fragment and the total number of fragments, after receiving the beginning of the large file uploaded by the vehicle, periodically merge and verify the received fragments to determine whether all current fragments of the received fragments are missing fragments;

[0009] If yes, determine the shard identifier of the missing shard;

[0010] Sending an upload instruction of the missing slice to the vehicle end; the upload instruction includes an identifier of the missing slice, so that the vehicle end can find the missing slice based on the identifier of the missing slice in the upload instruction;

[0011] Receive the missing segments uploaded by the vehicle end in response to the upload instruction to obtain the large file.

[0012] Furthermore, the periodic period duration is determined according to the total number of slices and the average transmission duration of each slice;

[0013] The periodically performing a merge check on the received fragments to determine whether all current fragments of the received fragments are missing fragments includes:

[0014] Performing a combined check on the received fragments within the periodic period duration, and determining whether all current fragments of the received fragments have not received the tail of the file;

[0015] If so, determining the fragment identifier of the missing fragment includes:

[0016] If so, the fragment identifiers of all the fragments that have not been received are used as the fragment identifiers of the missing fragments.

[0017] Furthermore, the periodic cycle duration decreases as the number of received fragments increases; the starting value of the periodic cycle duration is determined according to the total number of fragments and the average transmission time of each fragment; the starting value of the periodic cycle duration starts from the beginning of the large file being received.

[0018] Furthermore, the method further comprises:

[0019] Sending a configuration instruction carrying configuration information to the vehicle end, so that the vehicle end obtains an optimal fragment size based on the configuration information and performs configuration record; the fragment size is determined and uploaded according to the optimal fragment size;

[0020] Receiving a configuration response message returned by the vehicle end in response to the configuration instruction;

[0021] Among them, the configuration information includes the number of upload threads to be configured and the number of shards to be configured; the number of upload threads to be configured corresponds to the number of cores of the processor on the vehicle side; the number of shards to be configured is dynamically determined according to the communication method and information transmission rate.

[0022] Furthermore, before sending the configuration instruction carrying the configuration information to the vehicle end, the method further includes:

[0023] receiving update information of vehicle hardware configuration update sent by the vehicle end; the update information includes update data of the number of cores of the processor of the vehicle end;

[0024] According to the updated data of the number of cores, the number of upload threads to be configured corresponding to the updated data of the number of cores is obtained.

[0025] Further, the sending of an upload instruction of the missing slice to the vehicle end; the upload instruction including the identifier of the missing slice, comprises: judging whether the vehicle end is online; when the vehicle end is online, sending an upload instruction of the missing slice to the vehicle end; when the vehicle end is not online, waiting and detecting that the vehicle end is online and transmitting normally, sending an upload instruction of the missing slice to the vehicle end;

[0026] and / or,

[0027] The sending of the upload instruction of the missing slices to the vehicle end includes: generating an upload instruction for each missing slice of the missing slices; and sending the upload instruction of each missing slice to the vehicle end respectively, so that the vehicle end uploads each missing slice respectively according to the upload instruction of each missing slice.

[0028] Furthermore, the vehicle-side processor includes a multi-core processor;

[0029] The receiving vehicle-end uploaded large files are segmented into segments and the total number of segments, including:

[0030] Receive the large file uploaded by the vehicle end through multiple threads and divide it into segments and the total number of segments.

[0031] Furthermore, before receiving the number of shards and the total number of shards for the large file uploaded by the vehicle, the method further includes: issuing a file query instruction to the vehicle; the file query instruction includes a query time range; receiving a target file list within the query time range returned by the vehicle in response to the file query instruction; the target file list belongs to files stored by the vehicle; the files stored by the vehicle include files that exceed a preset time length from vehicle startup to vehicle shutdown; receiving a target file selected by a user for the target file list, and generating and issuing a file upload instruction;

[0032] or,

[0033] Before receiving the large file uploaded by the vehicle and dividing it into segments and the total number of segments, the method also includes: sending a file upload instruction to the vehicle; the file upload instruction includes a unique identifier of the file; receiving the large file uploaded by the vehicle and dividing it into segments and the total number of segments includes: receiving the segments uploaded by the vehicle in response to the file upload instruction and the total number of segments.

[0034] Further, the receiving the missing segments uploaded by the vehicle end in response to the upload instruction to obtain the large file includes:

[0035] Based on the fragment identifiers of the received fragments and the total number of fragments, periodically merge and verify the received fragments to determine whether all current fragments of the received fragments are missing fragments, until no fragments are missing;

[0036] In the case that all current fragments of the received fragments are no longer missing fragments, the received fragments are merged into the large file based on the fragment identifiers of the received fragments and the total number of fragments.

[0037] The present application provides a vehicle-side large file uploading device, comprising:

[0038] A fragment information receiving module, used for receiving the fragments and the total number of fragments of the large file uploaded by the vehicle end; the fragment has a fragment identifier that can represent its position in the large file;

[0039] A missing fragment judgment module is used to periodically merge and verify the received fragments based on the fragment identifiers of the received fragments and the total number of fragments after receiving the beginning of the large file uploaded by the vehicle end, to determine whether all the current fragments of the received fragments are missing fragments;

[0040] A missing shard identification determination module, used for determining the shard identification of the missing shard;

[0041] A sending module, used for sending an upload instruction of the missing slice to the vehicle end; the upload instruction includes an identifier of the missing slice, so that the vehicle end can find the missing slice based on the identifier of the missing slice in the upload instruction;

[0042] The missing fragment receiving module is used to receive the missing fragments uploaded by the vehicle end in response to the upload instruction to obtain the large file.

[0043] The present application provides an electronic device, comprising one or more processors, for implementing any of the methods described above.

[0044] The present application provides a computer-readable storage medium having a program stored thereon. When the program is executed by a processor, the method described in any one of the above items is implemented.

[0045] The present application provides a computer program product, comprising a computer program / instruction, which implements any of the above methods when executed by a processor.

[0046] In some embodiments, the vehicle-side large file uploading method of the present application can actively detect missing fragments by slicing large files and periodically merging and verifying the received fragments, so that missing fragments, such as the last fragment that cannot be received, can be uploaded in time. In this way, the loss of the end of the file is avoided, the effectiveness of receiving large file fragments is improved, and there is no need to passively wait for the last fragment, which does not affect the upload of large files. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a structural schematic diagram of a vehicle-side large file uploading method according to an embodiment of the present application applied to a vehicle-side large file uploading system;

[0048] Figure 2 Shown Figure 1 The schematic diagram of the process of storing large files on the vehicle side is shown;

[0049] Figure 3 The figure is a flow chart of a method for uploading large files on a vehicle side according to an embodiment of the present application;

[0050] Figure 4 The diagram shows a process diagram of the vehicle-side large file uploading method including parameter configuration from the cloud to the vehicle-side in an embodiment of the present application;

[0051] Figure 5 The diagram shows the main process flow of uploading large files in the vehicle-side large file uploading method according to the embodiment of the present application;

[0052] Figure 6 The figure is a schematic diagram of the structure of a vehicle-side large file uploading device according to an embodiment of the present application;

[0053] Figure 7 Shown is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of the present specification as detailed in the appended claims.

[0055] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0056] In the related art, the cloud needs to wait for the last fragment to synthesize the large file. However, when the last fragment is lost, the cloud will always be in a state of waiting for the last fragment, which will affect the upload of the large file.

[0057] In order to solve the technical problems that affect the upload of large files, the embodiment of the present application provides a vehicle-side large file upload method, which combines the slicing of large files with periodic merge verification of received segments, and can actively detect missing segments, so that missing segments, such as the last segment that cannot be received, can be uploaded in time. In this way, the loss of the end of the file is avoided, the effectiveness of receiving large file segments is improved, and there is no need to passively wait for the last segment, which does not affect the upload of large files.

[0058] Figure 1 The figure is a structural schematic diagram of the vehicle-side large file upload method of an embodiment of the present application applied to the vehicle-side large file upload system.

[0059] like Figure 1 As shown, the vehicle-side large file uploading system applied by the vehicle-side large file uploading method may include but is not limited to the vehicle-side as a client and an electronic device as a cloud-side (referred to as a server-side).

[0060] The vehicle end collects information such as the vehicle's operating status, location information, sensor data, etc., generates a large file, and stores it in the SD (Secure Digital) card of the TBOX (Telematics Box, vehicle-mounted remote communication box).

[0061] The vehicle side can send large files in the SD (Secure Digital) card to the above-mentioned electronic devices through the communication methods supported by TBOX (such as 4G / 5G / LAN). Specifically, T-Box periodically sends heartbeat messages to electronic devices to report their online status and health status. Electronic devices use heartbeat messages to confirm the activity status of T-TBOX. Electronic devices can send updated large files or configuration information to T-Box, and T-Box will apply these updates to the vehicle side.

[0062] The electronic device can execute the method provided in the embodiments of this document. Specifically, the electronic device can be: a desktop computer, a tablet computer or a laptop computer, a portable computer, an intelligent mobile terminal, a server, a PDA (Personal Digital Assistant) and a handheld terminal.

[0063] Figure 2 Shown Figure 1 The flowchart of large file storage on the vehicle side is shown.

[0064] like Figure 2 As shown, starting from the vehicle (called the vehicle end), TBOX creates a large file to obtain all signals of the CAN (Controller Area Network) bus and records them in the SD card; this large file ends and the creation of the next large file is based on two judgment conditions: ①. If it is found that the recording time exceeds 0.5H or 300M of the large file stored, the storage of this large file is terminated and the next large file is started. The large file can be an asc (object storage system) file, and the asc file is compressed into a zip format file. Among them, the large file stored in the SD card exceeds 0.5 hours, which is usually used to describe the vehicle data obtained by detection or monitoring, and the generated file. ②. If the vehicle is turned off or a new instruction is obtained, the storage of this large file is terminated. The data of these large files includes the operating status, location information and / or sensor data of the vehicle.

[0065] Continue as Figure 2 As shown, the steps of determining the space size in the above vehicle-side large file storage process are as follows: Determine whether the storage space size is sufficient for storage. If it is determined to be no, that is, the storage space size is not sufficient for storage, then overwrite the first file (the oldest large file) for storage. If it is determined to be yes, that is, the storage space size is sufficient for storage, then the suffix is ​​stored.

[0066] Figure 3 The figure is a flow chart of the vehicle-side large file uploading method according to an embodiment of the present application.

[0067] like Figure 3 As shown, the vehicle-side large file uploading method may include but is not limited to the following steps 110 to 150:

[0068] Step 110, receiving the large file uploaded by the vehicle end, dividing it into segments and the total number of segments; each segment has a segment identifier that can represent its position in the large file.

[0069] Step 120, based on the fragment identifier and the total number of fragments of the received fragments, after receiving the file beginning of the large file uploaded by the vehicle end, periodically merge and verify the received fragments to determine whether all current fragments of the received fragments are missing fragments.

[0070] In this step 120, based on the fragment identification and the total number of fragments of the received fragments, the received fragments are periodically merged and checked to determine whether all current fragments of the received fragments are missing fragments, until no fragments are missing, and based on the fragment identification and the total number of fragments of the received fragments, the received fragments are merged into a large file.

[0071] The periodic merge check of the received fragments in step 120 is used to verify not only whether the data of each fragment is complete, but also whether the total number of fragments is missing. In this way, through the verification and automatic retransmission or supplementary transmission mechanism, it is possible to more accurately detect and correct the errors of the fragments during transmission, thereby enhancing the robustness of the entire system. At the same time, the periodic merge check changes the passive reception into active detection, avoiding the loss of the end of the file and the system waiting for a large file that cannot be restored, thereby improving the effectiveness of fragment reception.

[0072] Accordingly, the missing fragments in this article are used to reflect that the fragment itself or the total number of fragments is missing. For example, the missing fragments include fragments that have not been received and fragments that have received missing data. In this way, the received fragments not only have correct data without missing data, but also, through all fragments with correct data without missing data, a large file with correct data without missing data is finally obtained. At the same time, when a fragment is found to be damaged or lost, this article automatically retransmits or retransmits it to ensure that all fragments can be successfully uploaded, ensuring the integrity and accuracy of the large file.

[0073] The above periodicity is used to eliminate the need for continuous merging and checking of received fragments. By using a periodic period to perform merging and checking, the processing burden of the system can be reduced.

[0074] The above-mentioned periodic cycle duration may start from the time when the file upload instruction is issued. The above-mentioned periodic cycle duration may also start from the time when the beginning of the large file uploaded by the vehicle end is received.

[0075] Step 130: If yes, determine the fragment identifier of the missing fragment.

[0076] The method further includes, if not, merging the received fragments into a large file based on the fragment identifiers of the received fragments and the total number of fragments when all current fragments of the received fragments are no longer missing fragments.

[0077] Step 140, sending an upload instruction of the missing segment to the vehicle end; the upload instruction includes an identifier of the missing segment, so that the vehicle end can find the missing segment based on the identifier of the missing segment in the upload instruction.

[0078] Step 150, receiving the missing segments uploaded by the vehicle side in response to the upload instruction, and obtaining a large file.

[0079] Continue as Figure 3 As shown, in some optional embodiments, the above step 150 may further include the following two steps: the first step is to periodically merge and verify the received slices based on the slice identifiers and the total number of slices of the received slices to determine whether all the current slices of the received slices are missing slices, until no slices are missing. The second step is to merge the received slices into a large file based on the slice identifiers and the total number of slices of the received slices when no slices are missing among all the current slices of the received slices. In this way, all the received slices are merged into a large file, ensuring the integrity of the large file data.

[0080] In the embodiment of the present application, a large file is processed into pieces and each piece is verified. By calculating and comparing the verification values ​​on the client and the server, the transmission status of the file can be effectively detected to avoid the loss or repeated uploading of pieces.

[0081] continue Figure 3 As shown, the above step 120 may adopt the following optional embodiments to determine the periodic period duration:

[0082] In a first optional embodiment, the above-mentioned periodic cycle duration is a fixed duration. The periodic cycle duration may be, for example, half a day or a day. Alternatively, the periodic cycle duration may be, for example, greater than or equal to 10 hours and less than or equal to 24 hours. In this way, the merge verification of the received fragments is regularly checked according to the fixed duration.

[0083] In a second optional embodiment, the periodic cycle duration decreases as the number of received fragments increases; the starting value of the periodic cycle duration is determined according to the total number of fragments and the average transmission time of each fragment; the starting value of the periodic cycle duration is to start timing after the beginning of the large file is received. The starting value of the periodic cycle duration refers to the value for starting timing. In this way, as the number of fragments that have not yet been received decreases, the periodic cycle duration is reduced, and the reception efficiency can be improved.

[0084] In a third optional embodiment, the periodic cycle duration is determined according to the total number of slices and the average transmission duration of each slice.

[0085] For example, the value obtained by dividing the total number of fragments by the average transmission time of each fragment is used as the periodic cycle time.

[0086] For another example, the value obtained by dividing the total number of fragments by the average transmission duration of each fragment is rounded up to be used as the periodic cycle duration.

[0087] For another example, the value obtained by dividing the total number of fragments by the average transmission time of each fragment is rounded down to be used as the periodic cycle time.

[0088] The periodic cycle duration in this article has the same time unit as the average transmission duration of each fragment mentioned above.

[0089] Combination Figure 3 As shown, the above step 120 and the above step 130 can be implemented in at least two optional ways as follows:

[0090] In an optional manner, the above step 120 may further include, based on the fragment identifier and the total number of fragments of the received fragments, after receiving the file beginning of the large file uploaded by the vehicle end, merging and verifying the received fragments within a periodic period, and determining whether all current fragments of the received fragments have not received the file tail.

[0091] The above step 130 may further include if, that is, if it is determined that all current fragments of the received fragments are missing fragments, then the fragment identifiers of all unreceived fragments are used as the fragment identifiers of the missing fragments. In this way, all missing fragments can be obtained based on the fragment identifiers of all missing fragments between the fragment identifier of the unreceived file tail and the fragment identifier of the received fragment.

[0092] The above-mentioned slice identification may include but is not limited to a text identification or a slice number. In some examples, the slice numbers may be numbered according to a single discrete value. For example, the slice numbers are 1, 2, 3, 4, 5..., N. N represents the total number of slices. In another example, the slice numbers may be numbered according to segmented values. For example, the slice numbers are 0 to 1, 1 to 2, 2 to 3, 3 to 4, 4 to 5...N-1 to N.

[0093] In this article, the total number of fragments and the received fragments are both known, and the fragment number of the total number of fragments and the fragment number of the received fragments is only the corresponding fragment number as the fragment identifier of the missing fragment. In this way, according to the fragment number, it is easier to determine the fragment identifier of the missing fragment.

[0094] Continue to see Figure 3 As shown, the above step 110 may include but is not limited to the following steps 1 to 3:

[0095] The first step is to determine whether the vehicle is online.

[0096] The vehicle end being online is used to reflect that data can be transmitted normally. The vehicle end being offline (also called offline) is used to indicate that data cannot be transmitted normally.

[0097] In the above step 1, whether the vehicle end is online can be determined by at least one of the following optional methods:

[0098] In an optional manner, the vehicle periodically sends heartbeat messages to the server. The server receives and processes the heartbeat messages from the vehicle, stores the received heartbeat messages, and updates the online status of the vehicle. When the heartbeat message is not received within the time period that the vehicle periodically sends, it is determined that the vehicle is not online, indicating that the data on the vehicle cannot be transmitted normally. When the heartbeat message is received within the time period that the vehicle periodically sends, it is determined that the vehicle is online, indicating that the data on the vehicle can be transmitted normally. In this way, based on the heartbeat mechanism, it is monitored whether the vehicle is online. In this way, the connection status of the vehicle can be detected in time to enable communication and interaction between the server and the vehicle.

[0099] In another optional way, the server periodically sends a "detection PING" message to the vehicle, and the server receives a "response PONG" message returned by the vehicle. If the vehicle times out and does not receive a response, it is considered that the vehicle is not online. The server can send a "detection PING" message to the vehicle as a request, and the vehicle needs to return a "response PONG" message, then the vehicle is considered online. In this way, the server can determine the availability and communication capabilities of the vehicle to enable communication and interaction between the server and the vehicle.

[0100] Step 2: When the vehicle is online, send the upload instruction of the missing fragments to the vehicle.

[0101] Step 3: When the vehicle is not online, wait and detect that the vehicle is online and transmitting normally, and send the upload instruction of the missing fragments to the vehicle.

[0102] Exemplarily, the remaining two segments are cloud-marked and need to be re-uploaded. For example, first, among the segments with segment numbers 1 to 8, there are two segments corresponding to the segment numbers 3 and 5 that have not been uploaded. Then, an upload instruction containing two packages indicating the segment numbers 3 and 5 for re-uploading is sent to the vehicle end, and the re-upload is performed according to the long transmission instruction. Finally, all the segments are received in the cloud and integrated into a complete large file.

[0103] In the embodiment of the present application, the vehicle side is allowed to disconnect and / or pause due to force majeure, and the connection can be restarted in time after the force majeure disconnection or pause (also called a reconnection mechanism), and then the missing fragments such as the last fragment can be uploaded by receiving the upload instruction. In this way, there is no need to passively wait for the last fragment, and it does not affect the upload of large files.

[0104] continue Figure 3 As shown, in some optional embodiments, the above step 140 may further include but is not limited to the following two steps: Step 1, generating an upload instruction for each missing segment of the missing segments. Step 2, sending the upload instructions of each missing segment to the vehicle end, so that the vehicle end uploads each missing segment according to the upload instructions of each missing segment. In this way, the vehicle end distinguishes and transmits each missing segment separately according to the upload instructions of each missing segment, avoids omissions, and improves the effectiveness of segment retransmission.

[0105] Continue as Figure 3 As shown, the above step 110 can be implemented by the following multiple optional embodiments:

[0106] In the optional first embodiment of the above step 110, the processor of the vehicle side includes a multi-core processor. The above step 110 further receives the shards and the total number of shards of the large file uploaded by the vehicle side in multi-threading. In this way, the uploading of shards in a multi-threaded or asynchronous manner can make full use of the network bandwidth, improve the upload efficiency, and avoid network congestion and delay. In this way, the network bandwidth can be more fully utilized, greatly improving the upload efficiency of large files.

[0107] In the optional second embodiment of step 110, the cloud sends the default shard size to the vehicle end, and receives the shards and the total number of shards uploaded by the vehicle end according to the default shard size. In this way, the default shard size is used as the optimal shard size, which is convenient for unified configuration and unified management.

[0108] In the third embodiment of the above step 110, the vehicle side obtains the optimal slice size based on the configuration information. The vehicle side implementation scheme is as follows:

[0109] (1) Sending a configuration instruction carrying configuration information to the vehicle end, so that the vehicle end obtains the optimal fragment size based on the configuration information and performs configuration record; the fragment size is determined and uploaded according to the optimal fragment size.

[0110] Furthermore, the number of shards to be configured is multiplied by the number of upload threads to be configured to obtain a product; and the ratio of the total file size to the product is used as the optimal shard size.

[0111] For example, the cloud generates configuration instructions for modifying the configuration information of the vehicle. Specifically, set the shard size of the SD card read by TBOX. The default is 1M, and upload is done by a single-threaded program to ensure the stability of TBOX in low versions. When TBOX has a high configuration and a high version, it is allowed to configure the number of shards and the number of upload threads.

[0112] According to the following formula: optimal fragment size = total file size / (number of fragments to be configured * number of upload threads to be configured) to obtain the optimal fragment size.

[0113] The total file size, the number of shards to be configured, and the number of upload threads to be configured are all known. Under normal circumstances, the number of shards can be set to 2 to 4. At the same time, the size of the shards cannot be too small, otherwise it will increase the upload burden and network delay. Generally, the number of shards allowed is set between 1MB and 10MB.

[0114] Then, the large file is segmented according to the optimal segment size to generate segments, and a segment identifier is generated for each segment to obtain each segment.

[0115] (2) Receive the configuration response message returned by the vehicle side in response to the configuration instruction. The configuration information includes the number of upload threads to be configured and the number of shards to be configured; the number of upload threads to be configured corresponds to the number of cores of the vehicle side processor; the number of shards to be configured is dynamically determined according to the communication method and information transmission rate. In this way, the upload burden and network delay are reduced, and the effectiveness of uploading shards is improved.

[0116] Figure 4 The figure shows a flow chart of the method for uploading large files on the vehicle side in an embodiment of the present application, which includes parameter configuration from the cloud side to the vehicle side.

[0117] like Figure 4 In the example shown, a large file in the SD card of a TBOX (Telematics Box) is uploaded in pieces according to the configuration information.

[0118] Divide the large file into N pieces, upload the pieces through EMQ (Erlang Message Queue), and the cloud receives the uploaded pieces as received pieces. If it is found that the piece identifiers of m to m+1 are missing, re-issue the upload instruction containing the piece identifiers of m to m+1 pieces. The upload instruction is re-obtained by TBOX to upload the m to m+1 pieces of files, and the cloud completes the missing files. m represents the piece identifier of any piece in the total number of pieces N.

[0119] The first embodiment of step 110 can be implemented independently. The first embodiment of step 110 can also be implemented in combination with the second embodiment of step 110 and the third embodiment of step 110, respectively, and will not be described in detail again.

[0120] Continue as Figure 4As shown, the vehicle side obtains the configuration instruction and needs to determine whether the configuration conditions are met. If the configuration conditions are met, it determines whether the configuration is successful. Specifically, if the vehicle side allows the configuration to be executed, it returns an "ACK" to the cloud to indicate that the TBOX has received the configuration instruction. If the vehicle side fails to record the configuration information, it will report the configuration failure to the cloud. If the vehicle side successfully records the configuration information, it will report the configuration success to the cloud.

[0121] In some embodiments, before sending a configuration instruction carrying configuration information to the vehicle side, the above method may further include the following two steps: the first step is to receive update information of the vehicle hardware configuration update sent by the vehicle side; the update information includes update data of the number of cores of the processor on the vehicle side; the second step is to obtain the number of upload threads to be configured corresponding to the update data of the number of cores based on the update data of the number of cores. For example, if the number of cores of the processor changes from one core to multiple cores, the data is updated and the number of upload threads to be configured is updated at the same time. In this way, the cloud can timely grasp the vehicle hardware configuration, and then obtain the latest number of upload threads, determine the number of upload threads to be configured, thereby improving the effectiveness of the optimal shard size, and then uploading the shards more efficiently.

[0122] Figure 5 The diagram shown is a main process diagram of large file uploading method on the vehicle side including large file uploading in an embodiment of the present application.

[0123] Combination Figure 3 and Figure 5 As shown, the query file list is divided into two contents: TBOX records the vehicle-side CAN bus data and writes it to the SD card; the platform side queries the file list under TBOX according to the protocol.

[0124] In such Figure 5 In the illustrated embodiment, before the above step 110, the above method may also include but is not limited to:

[0125] <1> , send a file query instruction to the vehicle end; the file query instruction includes a query time range.

[0126] The above query time range can be set according to user needs.

[0127] <2> , Get the target file list: receive the target file list returned by the vehicle end in response to the file query instruction within the query time range; the target file list belongs to the files stored on the vehicle end; the files stored on the vehicle end include files that exceed the preset time length from the time the vehicle is started to the time the vehicle is turned off;

[0128] The file list saved on both the client and the server. The target file list refers to the file list corresponding to the query time range in the saved file list.

[0129] <3> , Get target file: Receive the target file selected by the user from the target file list, generate and issue a file upload instruction. The above target file refers to the file selected in the target file list, which can also be called the above large file.

[0130] In this way, the cloud sends a file query instruction, and TBOX returns a list of target files that exist within the time range of the SD. And, the target file list is provided to the cloud, and the user selects the target file in the target file list as the above-mentioned large file. The cloud sends a file upload instruction to the vehicle. Here, the user can use the unique identifier of the target file, such as the name, as the basis for selection.

[0131] In another embodiment, before the above step 110, the above method may also include but is not limited to: issuing a file upload instruction to the vehicle end; the file upload instruction includes a unique identifier of the file. Accordingly, the above step 110 may further include receiving the segments and the total number of segments uploaded by the vehicle end in response to the file upload instruction. In this way, the user knows which files are needed, and then directly issues the file upload instruction, thereby improving the efficiency of uploading segments.

[0132] In some optional embodiments, the above-mentioned vehicle-side large file upload may also include but is not limited to: sending a file list to the vehicle-side; the sent file list includes a file list name; so that the vehicle-side compares the sent file list name with the local file list name, and if the sent file list name already exists, skipping receiving the sent file list.

[0133] In the embodiment of the present application, in order to avoid repeatedly sending the same small file, a list of sent files is saved on both the client and the server. When the client receives the file list sent by the server, it compares them with the local sent file list. If a repeated file is found, the reception of the file is directly skipped. In this article, an automatic retransmission and supplementary transmission mechanism is adopted, which greatly reduces the need for manual intervention and reduces maintenance costs.

[0134] In this paper, (1) large files can be transmitted in pieces to make full use of network bandwidth and improve transmission efficiency. 2) multi-threaded or asynchronous transmission can avoid network congestion and delay. 3) each piece can be verified and merged to ensure the integrity and accuracy of the file. 4) if a piece is damaged or lost, it can be retransmitted or re-transmitted to ensure the integrity of the file.

[0135] Based on the same application concept as the above method, the embodiment of the present application also proposes a vehicle-side large file uploading device, such as Figure 6 As shown, the device may include but is not limited to the following modules:

[0136] The fragment information receiving module 31 is used to receive the fragments and the total number of fragments of the large file uploaded by the vehicle end; the fragment has a fragment identifier that can represent its position in the large file;

[0137] A missing fragment judgment module 32 is used to periodically merge and verify the received fragments based on the fragment identifiers of the received fragments and the total number of fragments after receiving the beginning of the large file uploaded by the vehicle end, to determine whether all the current fragments of the received fragments are missing fragments;

[0138] A missing slice identification determination module 33, used for determining the slice identification of the missing slice;

[0139] The sending module 34 is used to send an upload instruction of the missing slice to the vehicle end; the upload instruction includes an identifier of the missing slice, so that the vehicle end can find the missing slice based on the identifier of the missing slice in the upload instruction;

[0140] The missing fragment receiving module 35 is used to receive the missing fragments uploaded by the vehicle end in response to the upload instruction to obtain the large file.

[0141] In some embodiments, the above-mentioned device also includes: a configuration instruction sending module, which is used to send configuration instructions carrying configuration information to the vehicle end, so that the vehicle end can obtain the optimal slice size based on the configuration information and make configuration records; the size of the slice is determined and uploaded according to the optimal slice size; a configuration response message receiving module, which is used to receive the configuration response message returned by the vehicle end for the configuration instruction; wherein, the configuration information includes the number of upload threads to be configured and the number of slices to be configured; the number of upload threads to be configured corresponds to the number of cores of the processor of the vehicle end; the number of slices to be configured is dynamically determined according to the communication method and the information transmission rate.

[0142] In some embodiments, the above-mentioned device also includes: an update information receiving module, which is used to receive update information of vehicle hardware configuration update sent by the vehicle end before issuing a configuration instruction carrying the configuration information to the vehicle end; the update information includes updated data on the number of cores of the processor on the vehicle end; an upload thread number determination module, which is used to obtain the number of upload threads to be configured corresponding to the updated data on the number of cores based on the updated data on the number of cores.

[0143] In some embodiments, the above-mentioned device also includes: a file query instruction sending module, which is used to send a file query instruction to the vehicle end before receiving the fragments and the total number of fragments of a large file uploaded by the vehicle end; the file query instruction includes a query time range; a target file list receiving module, which is used to receive a target file list within the query time range returned by the vehicle end in response to the file query instruction; the target file list belongs to files stored on the vehicle end; the files stored on the vehicle end include files that exceed a preset time length from the start of the vehicle to the shutdown of the vehicle; a first file upload instruction sending module, which is used to receive the target file selected by the user for the target file list, and generate and send a file upload instruction.

[0144] or,

[0145] In some embodiments, the above-mentioned device also includes: a second file upload instruction sending module, which is used to send a file upload instruction to the vehicle end before receiving the fragments and the total number of fragments of the large file uploaded by the vehicle end; the file upload instruction includes a unique identifier of the file; a fragment information receiving module 31, which is specifically used to receive the fragments and the total number of fragments uploaded by the vehicle end in response to the file upload instruction.

[0146] The implementation process of the functions and effects of each module / submodule / unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and the same technical effect can be achieved, so it will not be repeated here.

[0147] An embodiment of the present application provides an electronic device, including the above-mentioned vehicle-side large file uploading device.

[0148] Figure 7 Shown is a schematic structural diagram of an electronic device 50 provided in an embodiment of the present application.

[0149] like Figure 7 As shown, the electronic device 50 includes one or more processors 51 for implementing the vehicle-side large file uploading method as described above.

[0150] In some embodiments, the electronic device 50 may include a storage medium 59. For example, the computer-readable storage medium may store a program that can be called by the processor 51, and may include a non-volatile storage medium. In some embodiments, the electronic device 50 may include a memory 58 and an interface 57. In some embodiments, the electronic device 50 may also include other hardware according to actual applications.

[0151] The computer-readable storage medium of the embodiment of the present application stores a program thereon, which, when executed by the processor 51, is used to implement the vehicle-side large file uploading method described above.

[0152] The present application provides a computer program product, comprising a computer program / instruction, which implements any of the above methods when executed by a processor.

[0153] The present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer-readable storage media include but are not limited to: phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0154] The present application also provides a computer program, which is stored in a computer-readable storage medium, such as Figure 7 and when the processor executes the computer program, it causes the processor 71 to execute the method described above.

[0155] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

[0156] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the phrase "includes a ..." defines an element, and does not exclude the presence of other identical elements in the process, method, commodity or device including the element.

Claims

1. A vehicle-side large file uploading method, characterized in that: include: Receive large files uploaded by the vehicle and split them into segments and the total number of segments; The fragment has a fragment identifier capable of characterizing its position in the large file; Based on the fragment identifier of the received fragment and the total number of fragments, after receiving the beginning of the large file uploaded by the vehicle, periodically merge and verify the received fragments to determine whether all current fragments of the received fragments are missing fragments; If yes, determine the shard identifier of the missing shard; Sending an upload instruction of the missing slice to the vehicle end; the upload instruction includes an identifier of the missing slice, so that the vehicle end can find the missing slice based on the identifier of the missing slice in the upload instruction; Receive the missing segments uploaded by the vehicle end in response to the upload instruction to obtain the large file.

2. The vehicle-side large file uploading method as claimed in claim 1, characterized in that: The periodic period duration is determined according to the total number of fragments and the average transmission duration of each fragment; The periodically performing a merge check on the received fragments to determine whether all current fragments of the received fragments are missing fragments includes: Performing a combined check on the received fragments within the periodic period duration, and determining whether all current fragments of the received fragments have not received the tail of the file; If so, determining the fragment identifier of the missing fragment includes: If so, the fragment identifiers of all the fragments that have not been received are used as the fragment identifiers of the missing fragments.

3. The vehicle-side large file uploading method as claimed in claim 1, characterized in that: The periodic cycle duration decreases as the number of received fragments increases; the starting value of the periodic cycle duration is determined according to the total number of fragments and the average transmission time of each fragment; the starting value of the periodic cycle duration starts from the beginning of the large file being received.

4. The vehicle-side large file uploading method according to any one of claims 1 to 3, characterized in that: The method further comprises: Sending a configuration instruction carrying configuration information to the vehicle end, so that the vehicle end obtains an optimal fragment size based on the configuration information and performs configuration record; the fragment size is determined and uploaded according to the optimal fragment size; Receiving a configuration response message returned by the vehicle end in response to the configuration instruction; Among them, the configuration information includes the number of upload threads to be configured and the number of shards to be configured; the number of upload threads to be configured corresponds to the number of cores of the processor on the vehicle side; the number of shards to be configured is dynamically determined according to the communication method and information transmission rate.

5. The vehicle-side large file uploading method as claimed in claim 4, characterized in that: Before sending a configuration instruction carrying configuration information to the vehicle end, the method further includes: receiving update information of vehicle hardware configuration update sent by the vehicle end; the update information includes update data of the number of cores of the processor of the vehicle end; According to the updated data of the number of cores, the number of upload threads to be configured corresponding to the updated data of the number of cores is obtained.

6. The vehicle-side large file uploading method according to any one of claims 1 to 3, characterized in that: sending an upload instruction of the missing slices to the vehicle end; The upload instruction includes the identifier of the missing fragment, including: determining whether the vehicle end is online; if the vehicle end is online, sending the upload instruction of the missing fragment to the vehicle end; if the vehicle end is not online, waiting and detecting that the vehicle end is online and transmitting normally, and sending the upload instruction of the missing fragment to the vehicle end; and / or, The sending of the upload instruction of the missing slices to the vehicle end includes: generating an upload instruction for each missing slice of the missing slices; and sending the upload instruction of each missing slice to the vehicle end respectively, so that the vehicle end uploads each missing slice respectively according to the upload instruction of each missing slice.

7. The vehicle-side large file uploading method according to any one of claims 1 to 3, characterized in that: The vehicle-side processor includes a multi-core processor; The receiving vehicle-end uploaded large files are segmented into segments and the total number of segments, including: Receive the large file uploaded by the vehicle end through multiple threads and divide it into segments and the total number of segments.

8. The vehicle-side large file uploading method according to any one of claims 1 to 3, characterized in that: Before receiving the slices and the total number of slices for the large file uploaded by the vehicle, the method further includes: issuing a file query instruction to the vehicle; the file query instruction includes a query time range; receiving a target file list within the query time range returned by the vehicle in response to the file query instruction; the target file list belongs to files stored in the vehicle; the files stored in the vehicle include files exceeding a preset time length from vehicle startup to vehicle shutdown; receiving a target file selected by a user for the target file list, and generating and issuing a file upload instruction; or, Before receiving the large file uploaded by the vehicle and dividing it into segments and the total number of segments, the method also includes: sending a file upload instruction to the vehicle; the file upload instruction includes a unique identifier of the file; receiving the large file uploaded by the vehicle and dividing it into segments and the total number of segments includes: receiving the segments uploaded by the vehicle in response to the file upload instruction and the total number of segments.

9. The vehicle-side large file uploading method according to any one of claims 1 to 3, characterized in that: The receiving the missing segments uploaded by the vehicle end in response to the upload instruction to obtain the large file includes: Based on the fragment identifiers of the received fragments and the total number of fragments, periodically merge and verify the received fragments to determine whether all current fragments of the received fragments are missing fragments, until no fragments are missing; In the case that all current fragments of the received fragments are no longer missing fragments, the received fragments are merged into the large file based on the fragment identifiers of the received fragments and the total number of fragments.

10. A vehicle-side large file uploading device, characterized in that: include: The fragment information receiving module is used to receive the fragments and total number of fragments of the large file uploaded by the vehicle end; The fragment has a fragment identifier capable of characterizing its position in the large file; A missing fragment judgment module is used to periodically merge and verify the received fragments based on the fragment identifiers of the received fragments and the total number of fragments after receiving the beginning of the large file uploaded by the vehicle end, to determine whether all the current fragments of the received fragments are missing fragments; A missing shard identification determination module, used for determining the shard identification of the missing shard; A sending module, used for sending an upload instruction of the missing slice to the vehicle end; the upload instruction includes an identifier of the missing slice, so that the vehicle end can find the missing slice based on the identifier of the missing slice in the upload instruction; The missing fragment receiving module is used to receive the missing fragments uploaded by the vehicle end in response to the upload instruction to obtain the large file.

11. An electronic device, characterized in that: It includes one or more processors for implementing the vehicle-side large file uploading method as described in any one of claims 1-9.

12. A computer-readable storage medium, characterized in that: A program is stored thereon, and when the program is executed by the processor, the vehicle-side large file uploading method as described in any one of claims 1-9 is implemented.