Vehicle software upgrade method, device and vehicle based on multi-channel data transmission
By adopting multi-channel data transmission and backup channels in vehicle software upgrade, the problems of low efficiency and low success rate of vehicle software upgrades are solved, and a more efficient and reliable software upgrade process is achieved.
Patent Information
- Application Number
- CN202310405940.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-17
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2043-04-17
AI Technical Summary
In the prior art, vehicle software upgrades are inefficient and have low success rate, which cannot meet the user's user experience.
The multi-channel data transmission method is adopted to configure the transmission channels corresponding to each data shard of the data packet, and when an abnormality occurs in the target transmission channel, the data shard is transmitted using the backup channel.
Through the use of multi-channel data transmission and backup channels, the efficiency and success rate of vehicle software upgrades are improved, and the problems of network congestion and data packet transmission time in traditional methods are solved.
Smart Images

Figure CN116755730B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automobile technology, and in particular to a vehicle software upgrade method, device and automobile based on multi-channel data transmission. Background Art
[0002] The traditional vehicle software upgrade method uses only one fixed channel for data packet transmission. However, as the functions of cars become more and more abundant, the data packets become larger and larger, and the network becomes more and more complex, the network congestion competition of the traditional vehicle software upgrade method has intensified. If this method is continued to be used for upgrading, the upgrade time may be too long due to the large data packets, the upgrade efficiency may be low, and the upgrade success rate of this method is also low, which cannot truly meet the user experience. Summary of the invention
[0003] In view of this, an embodiment of the present application provides a vehicle software upgrade method, device and vehicle based on multi-channel data transmission to solve the problems of low efficiency and low success rate of vehicle software upgrade in the prior art.
[0004] A first aspect of an embodiment of the present application provides a vehicle software upgrade method based on multi-channel data transmission, including: configuring a transmission strategy for a data packet in response to an OTA upgrade request, the transmission strategy including transmission channels corresponding to each data segment of the data packet; if there is an abnormality probability of a target transmission channel greater than a first preset threshold, configuring a corresponding backup channel for the target transmission channel, wherein the abnormality probability of the backup channel is lower than that of the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data segment; when using each transmission channel to transmit its corresponding data segment, if an abnormality is detected in the target transmission channel, using the corresponding backup channel to transmit the data segment corresponding to the target transmission channel.
[0005] According to a second aspect of an embodiment of the present application, a vehicle software upgrade device based on multi-channel data transmission is provided, comprising: a first configuration module, configured to configure a transmission strategy for a data packet in response to an OTA upgrade request, the transmission strategy including a transmission channel corresponding to each data fragment of the data packet; a second configuration module, configured to configure a corresponding backup channel for the target transmission channel if the probability of an abnormality in the target transmission channel is greater than a first preset threshold, wherein the probability of an abnormality in the backup channel is lower than that in the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data fragment; a detection module, configured to transmit the data fragment corresponding to the target transmission channel using the corresponding backup channel if an abnormality is detected in the target transmission channel when using each transmission channel to transmit the corresponding data fragment.
[0006] According to a third aspect of an embodiment of the present application, a car is provided, comprising a memory, an upgrade main controller, and a computer program stored in the memory and executable on the upgrade main controller, wherein the steps of the above method are implemented when the upgrade main controller executes the computer program.
[0007] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least: in response to an OTA upgrade request, a transmission strategy is configured for a data packet, the transmission strategy includes the transmission channels corresponding to each data segment of the data packet; if there is an abnormal probability of a target transmission channel greater than a first preset threshold, a corresponding backup channel is configured for the target transmission channel, wherein the abnormal probability of the backup channel is less than the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data segment; when each transmission channel is used to transmit its corresponding data segment, if an abnormality is detected in the target transmission channel, the corresponding backup channel is used to transmit the data segment corresponding to the target transmission channel. Because the embodiments of the present application use multiple transmission channels to transmit data in the vehicle software upgrade, and when an abnormality occurs in the transmission channel, the backup channel is used to transmit the data of the abnormal transmission channel, so the above-mentioned technical means can solve the problems of low efficiency and low success rate of vehicle software upgrade in the prior art, thereby improving the efficiency and success rate of vehicle software upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0009] Figure 1 It is a flowchart of a vehicle software upgrade method based on multi-channel data transmission provided by an embodiment of the present application;
[0010] Figure 2 is a flowchart of another method for determining an alternative channel provided in an embodiment of the present application;
[0011] Figure 3 It is a flowchart of a method for configuring a transmission strategy provided by an embodiment of the present application;
[0012] Figure 4 It is a flowchart of another method for determining an alternative channel provided in an embodiment of the present application;
[0013] Figure 5 It is a structural schematic diagram of a vehicle software upgrade device based on multi-channel data transmission provided by an embodiment of the present application;
[0014] Figure 6 It is a structural schematic diagram of a car provided in an embodiment of the present application. DETAILED DESCRIPTION
[0015] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0016] Figure 1 It is a flow chart of a vehicle software upgrade method based on multi-channel data transmission provided in an embodiment of the present application. Figure 1 The vehicle software upgrade method based on multi-channel data transmission can be executed by an upgrade main controller set in the car. Optionally, Figure 1 The vehicle software upgrade method based on multi-channel data transmission can also be executed by a computer or a server, or software on the computer or the server. Taking the upgrade main controller as an example, the vehicle software upgrade method based on multi-channel data transmission includes:
[0017] S101, in response to an OTA upgrade request, configuring a transmission strategy for a data packet, where the transmission strategy includes a transmission channel corresponding to each data fragment of the data packet;
[0018] S102, if the probability of an abnormality of the target transmission channel is greater than a first preset threshold, configuring a corresponding backup channel for the target transmission channel, wherein the probability of an abnormality of the backup channel is lower than that of the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data shard;
[0019] S103, when using each transmission channel to transmit its corresponding data slice, if it is detected that an abnormality occurs in the target transmission channel, using the corresponding standby channel to transmit the data slice corresponding to the target transmission channel.
[0020] Specifically: an upgrade host and multiple ports are set on the virtual machine of the car, and the upgrade host sends data to the controller on the car through the multiple ports; the OTA upgrade request is a request to upgrade the software of the controller on the car, and after receiving the OTA upgrade request, the upgrade host configures the transmission strategy between itself and the controller; the controller includes: a vehicle controller, a transmission controller, an engine controller, a motor controller, an air-conditioning controller, a battery management system controller, etc.; the data packet includes the data packet of all controllers this time; the abnormal probability of the transmission channel and the backup channel can be determined by a channel transmission estimation model; in order to increase the probability of successful data transmission, the embodiment of the present application configures a corresponding backup channel for a target transmission channel whose abnormal probability is greater than a first preset threshold value. When an abnormality occurs in the target transmission channel, the corresponding backup channel is used to transmit the data fragment corresponding to the target transmission channel.
[0021] According to the technical solution provided in the embodiment of the present application, a transmission strategy is configured for a data packet in response to an OTA upgrade request, and the transmission strategy includes the transmission channels corresponding to each data segment of the data packet; if the probability of an abnormality in the target transmission channel is greater than a first preset threshold, a corresponding backup channel is configured for the target transmission channel, wherein the probability of an abnormality in the backup channel is less than that in the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data segment; when each transmission channel is used to transmit its corresponding data segment, if an abnormality is detected in the target transmission channel, the corresponding backup channel is used to transmit the data segment corresponding to the target transmission channel. Because the embodiment of the present application uses multiple transmission channels to transmit data in the vehicle software upgrade, and uses the backup channel to transmit the data of the abnormal transmission channel when an abnormality occurs in the transmission channel, the above-mentioned technical means can solve the problems of low efficiency and low success rate of vehicle software upgrade in the prior art, thereby improving the efficiency and success rate of vehicle software upgrade.
[0022] Further, if the probability of an abnormality of a target transmission channel is greater than a first preset threshold, a corresponding backup channel is configured for the target transmission channel, including: the more the number of target transmission channels is, the more corresponding backup channels are configured for each target transmission channel.
[0023] The number of target transmission channels is proportional to the number of their corresponding backup channels.
[0024] Figure 2 is a flow chart of another vehicle software upgrade method based on multi-channel data transmission provided by an embodiment of the present application, which is executed by the upgrade main controller, such as Figure 2 As shown, including:
[0025] Execute the following loop:
[0026] S201, configuring a transmission strategy for a data packet in response to an OTA upgrade request;
[0027] S202, determining whether the number of target transmission channels with abnormal probability greater than a first preset threshold is greater than a second preset threshold;
[0028] S203, if it is not greater than, configuring a corresponding backup channel for the target transmission channel;
[0029] S204, if greater than, jump to S201;
[0030] S205, when using each transmission channel to transmit its corresponding data fragment, if it is detected that an abnormality occurs in the target transmission channel, the corresponding backup channel is used to transmit the data fragment corresponding to the target transmission channel, and exits after the transmission of the entire data packet is completed.
[0031] When the number of target transmission channels is greater than the second preset threshold, jump to S201, that is, reconfigure the transmission strategy to screen out new transmission channels to replace the original transmission channels, including: determining the data volume of the data packet and the remaining bandwidth of each newly screened transmission channel; redetermining the fragment size according to the data volume and the remaining bandwidth of each newly screened transmission channel; re-fragmenting the data packet according to the re-determined fragment size, and re-allocating data fragments to each newly screened transmission channel.
[0032] Figure 3 is a flow chart of a method for configuring a transmission strategy provided by an embodiment of the present application, which is executed by the upgrade master controller, such as Figure 3 As shown, including:
[0033] S301, polling whether link channels between multiple ports and a target address of a controller are reachable, and determining each reachable link channel as a transmission channel;
[0034] S302, determining the data volume of the data packet and the remaining bandwidth of each transmission channel, and determining the fragment size according to the data volume and the remaining bandwidth of each transmission channel;
[0035] S303, fragmenting the data packet according to the fragment size to obtain multiple data fragments and a fragment sequence number of each data fragment;
[0036] S304: Allocate multiple data slices to each transmission channel according to the remaining bandwidth of the transmission channel.
[0037] Specifically: polling the reachable link channel is to determine the transmission channel that can transmit information between the upgrade master controller and the controller, and judging whether the link channel is reachable, which can be done by checking whether the link channel is in LINKUP state by PING, and if so, it is reachable; the car is provided with an upgrade master controller, a controller and an upgrade slave controller on the controller side, the upgrade slave controller is used to assist the upgrade master controller in executing the relevant steps of the vehicle software upgrade on the controller side, the upgrade slave controller can be regarded as the actual execution subject on the controller side, and the upgrade master controller executes the relevant steps of the vehicle software upgrade on the controller side by controlling the upgrade slave controller; the remaining bandwidth of the transmission channel refers to the value of subtracting the working bandwidth of the transmission channel from the total bandwidth of the transmission channel; the fragment size is the size of the data fragment, of course, there may be data fragments with a packet size smaller than the fragment size among the multiple data fragments obtained by fragment processing (often the packet size of the data fragments obtained by fragment processing is less than the fragment size), and each data fragment carries its own fragment sequence number.
[0038] The fragment size should be smaller than the minimum value of the remaining bandwidth of multiple transmission channels. When this condition is met, the number of data fragments obtained by fragmenting the data packets of different data volumes according to the fragment size cannot be greater than the preset number of packets. For example, the data volume of the data packet is very large, 10G, and there are three transmission channels, whose remaining bandwidths are 200M, 300M and 1000M respectively. According to the data volume and the remaining bandwidth of each transmission channel, the fragment size is determined to be 10M (the data volume is 10G, the fragment size should be 10M or more, if the data volume is small, such as a few hundred M, the fragment size can be 1M or less, in short, the number of data fragments should be controlled within a reasonable range), and the fragmentation is performed according to the 10M capacity, 10G / 10M=1000 fragments. The ratio of the remaining bandwidth of the three transmission channels is 2:3:10, so the allocation of data fragments to the three transmission channels can also be based on the ratio of 2:3:10.
[0039] Furthermore, after the transmission of the entire data packet is completed, the controller side uses an upgraded slave controller to assemble multiple data fragments according to the fragment sequence number of each data fragment to obtain a data packet, and the controller is upgraded using the data packet.
[0040] In an optional embodiment, an upgraded slave controller is used on the controller side to assemble multiple data slices according to the slice sequence number of each data slice, including: when the upgraded slave controller detects the slice sequence number of the missing data slice, receiving a retransmission instruction sent by the upgraded slave controller to retransmit the missing data slice according to the retransmission instruction, wherein the retransmission instruction carries the slice sequence number of the missing data slice.
[0041] When the upgrade slave controller detects missing data fragments, it will send a retransmission instruction to the upgrade master controller, and the upgrade master controller will retransmit the missing data fragments according to the retransmission instruction. The retransmission can select the original transmission channel or replace it with a transmission channel without abnormalities. Transmission channel abnormalities refer to transmission errors, including missing data fragments.
[0042] In an optional embodiment, before using the data packet to upgrade the controller, the method also includes: using the upgrade slave controller to perform a file integrity check on the assembled data packet; when the assembled data packet passes the file integrity check, controlling the upgrade slave controller to upgrade the controller using the data packet; when the assembled data packet does not pass the file integrity check, controlling the upgrade slave controller to determine that the controller upgrade has failed.
[0043] It can be determined whether the amount of data in the assembled data packet is equal to the amount of data in the data packet on the upgrade master controller side. If they are equal, the file integrity check is passed. If they are less than that, the file integrity check is not passed. Generally, the amount of data in the assembled data packet will not be greater than the amount of data in the data packet on the upgrade master controller side. If it is greater, it means that other files are mixed in the data packet received by the controller side. In this case, it needs to be resent.
[0044] In an optional embodiment, when the controller side uses an upgraded slave controller to assemble multiple data slices according to the slice sequence number of each data slice, it is determined whether the data slice belongs to the data packet based on the slice sequence number of each data slice. If not, the data slice is deleted.
[0045] Furthermore, before using each transmission channel to transmit its corresponding data fragment, the method also includes: determining the total bandwidth and remaining bandwidth of each transmission channel and each alternative channel in the alternative channel set; inputting the fragment size and the total bandwidth and remaining bandwidth of each transmission channel into the channel transmission estimation model, and outputting the abnormal probability of each transmission channel; inputting the fragment size and the total bandwidth and remaining bandwidth of each alternative channel into the channel transmission estimation model, and outputting the abnormal probability of each alternative channel.
[0046] In an optional embodiment, a positive sample set and a negative sample set are constructed based on the historical records of transmission information of multiple transmission channels, wherein the positive sample set includes multiple groups of samples in a normal transmission process, and the negative sample set includes multiple groups of samples in an abnormal transmission process, and each group of samples includes: a slice size and a total bandwidth and a remaining bandwidth of the transmission channel; the positive sample set and the negative sample set are used to iteratively train a channel transmission estimation model, optimize the model parameters of the channel transmission estimation model, and obtain a trained channel transmission estimation model.
[0047] A set of samples includes: the fragment size of a transmission and the total bandwidth and remaining bandwidth of a transmission channel in the transmission. The label of the set of samples is whether the transmission is normal or abnormal. The labels of the positive sample set are all normal, and the labels of the negative sample set are all abnormal. The method of training the channel transmission estimation model is the existing training model method and will not be repeated.
[0048] Abnormal transmission means that an abnormality occurs, and normal transmission means that no abnormality occurs.
[0049] When each transmission channel is used to transmit its corresponding data fragment, if an abnormality is detected in the target transmission channel, the corresponding backup channel is used to transmit the data fragment corresponding to the target transmission channel, including: according to the number of transmission channels detected to have abnormalities, a corresponding number of alternative channels are screened out from multiple alternative channels; and the multiple data fragments allocated to the transmission channel of the abnormal transmission are sent to the target address by using the screened alternative channels.
[0050] For example, if there are 4 transmission channels with abnormalities, 4 candidate channels can be selected from multiple candidate channels, and the multiple data fragments allocated to the 4 transmission channels with abnormal transmission can be sent to the target address using the selected 4 candidate channels, that is, one candidate channel corresponds to one transmission channel with abnormal transmission; or if there are 4 transmission channels with abnormalities, 2 candidate channels can be selected from multiple candidate channels, and the multiple data fragments allocated to the 4 transmission channels with abnormal transmission can be sent to the target address using the selected 2 candidate channels, that is, one candidate channel corresponds to two transmission channels with abnormal transmission…
[0051] Figure 4 It is a flowchart of another vehicle software upgrade method based on multi-channel data transmission provided by an embodiment of the present application, which is executed by the upgrade main controller, such as Figure 4 As shown, including:
[0052] In the embodiment of the present application, four ports P1, P2, P3 and P4 are arranged on the virtual machine of the car, four gateways VGW1, VGW2, VGW3 and VGW4 are arranged on the car, and the controller is recorded as ECU.
[0053] S401, determine that there are four link channels to the ECU: P1->VGW1->ECU, P3->VGW2->VGW1->ECU, P2->VGW4->VGW1->ECU, and P4->VGW3->VGW2->VGW1->ECU;
[0054] S402, determining that all four link channels are reachable by polling, and using the four link channels as four transmission channels;
[0055] S403, determine that the data volume of the data packet is 2Mbytes (2*1024*1024=2097152bytes), determine that the fragment size is 1434Bytes, and the number of fragments is: 2097152 / 1434=1462.4, and the number of fragments is 1463;
[0056] S404, fragmenting the data packet according to the fragment size to obtain multiple data fragments and a fragment sequence number of each data fragment, and allocating multiple data fragments to each transmission channel;
[0057] S405, using each transmission channel to send the multiple data fragments allocated to the transmission channel to the target address;
[0058] S406, on the controller side, use the upgraded slave controller to perform homology verification on the data slices in the target address, perform file integrity verification, and detect in real time whether each channel is transmitted normally. If there is an abnormal transmission channel, select the corresponding alternative channel to retransmit the slice data of the abnormal transmission channel;
[0059] S407, after homology verification, file integrity check and normal transmission detection, multiple data fragments are assembled according to the fragment sequence number of each data fragment to obtain a data packet.
[0060] Same-origin verification verifies whether the data fragments in the target address all belong to the data packet.
[0061] For example, if a transmission channel fails and the fragment number 100 is missing, the data packet cannot be assembled normally. The upgraded slave controller detects the missing fragment number and feeds back the missing fragment number 100 to the upgraded master controller for retransmission. The upgraded master controller retransmits the missing data fragment.
[0062] For example, when the upgrade main controller detects that VBOX(P2)->VGW4->VGW1->ECU fails, the upgrade main controller no longer sends data slices from the transmission channel, and can send data slices through other transmission channels and alternative channels.
[0063] This method of using multiple transmission channels to send data packets in segments greatly improves the data transmission efficiency. It also ensures that if some channels fail, other transmission channels and alternative channels can be provided for data transmission, ensuring the successful transmission of data packets. It greatly improves the success rate of sending data packets and also prevents the problem of bus overload caused by retransmitted data.
[0064] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0065] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0066] Figure 5 Schematic diagram of a vehicle software upgrade device based on multi-channel data transmission provided by an embodiment of the present application. Figure 5 As shown, the vehicle software upgrade device based on multi-channel data transmission includes:
[0067] A first configuration module 501 is configured to configure a transmission strategy for a data packet in response to an OTA upgrade request, where the transmission strategy includes a transmission channel corresponding to each data fragment of the data packet;
[0068] The second configuration module 502 is configured to configure a corresponding backup channel for the target transmission channel if the probability of an abnormality of the target transmission channel is greater than a first preset threshold, wherein the probability of an abnormality of the backup channel is less than the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data shard;
[0069] The detection module 503 is configured to use the corresponding backup channel to transmit the data slice corresponding to the target transmission channel if it is detected that an abnormality occurs in the target transmission channel when using each transmission channel to transmit the corresponding data slice.
[0070] According to the technical solution provided in the embodiment of the present application, a transmission strategy is configured for a data packet in response to an OTA upgrade request, and the transmission strategy includes the transmission channels corresponding to each data segment of the data packet; if the probability of an abnormality in the target transmission channel is greater than a first preset threshold, a corresponding backup channel is configured for the target transmission channel, wherein the probability of an abnormality in the backup channel is less than that in the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each data segment; when each transmission channel is used to transmit its corresponding data segment, if an abnormality is detected in the target transmission channel, the corresponding backup channel is used to transmit the data segment corresponding to the target transmission channel. Because the embodiment of the present application uses multiple transmission channels to transmit data in the vehicle software upgrade, and uses the backup channel to transmit the data of the abnormal transmission channel when an abnormality occurs in the transmission channel, the above-mentioned technical means can solve the problems of low efficiency and low success rate of vehicle software upgrade in the prior art, thereby improving the efficiency and success rate of vehicle software upgrade.
[0071] The more the number of target transmission channels is, the more the number of corresponding standby channels is configured for each target transmission channel.
[0072] Optionally, the first configuration module 501 is also configured to execute the following loop: configure a transmission strategy for a data packet in response to an OTA upgrade request; determine whether the number of target transmission channels whose abnormality probability is greater than a first preset threshold is greater than a second preset threshold; if not, configure a corresponding backup channel for the target transmission channel; if greater, jump to the step of configuring a transmission strategy for the data packet in response to the OTA upgrade request; when using each transmission channel to transmit its corresponding data fragment, if an abnormality is detected in the target transmission channel, use the corresponding backup channel to transmit the data fragment corresponding to the target transmission channel, and exit after completing the transmission of the entire data packet.
[0073] Optionally, the first configuration module 501 is also configured to poll whether the link channels between multiple ports and the target address of the controller are reachable, and determine each reachable link channel as a transmission channel; determine the data volume of the data packet and the remaining bandwidth of each transmission channel, and determine the fragment size according to the data volume and the remaining bandwidth of each transmission channel; fragment the data packet according to the fragment size to obtain multiple data fragments and a fragment sequence number for each data fragment; and allocate multiple data fragments to each transmission channel according to the remaining bandwidth of the transmission channel.
[0074] Optionally, the detection module 503 is further configured to assemble the multiple data fragments according to the fragment sequence number of each data fragment using the upgraded slave controller on the controller side after completing the transmission of the entire data packet, obtain a data packet, and use the data packet to upgrade the controller.
[0075] Optionally, the detection module 503 is also configured to receive a retransmission instruction sent by the upgraded slave controller when the upgraded slave controller detects the slice sequence number of the missing data slice, so as to retransmit the missing data slice according to the retransmission instruction, wherein the retransmission instruction carries the slice sequence number of the missing data slice.
[0076] Optionally, the detection module 503 is also configured to use the upgrade slave controller to perform a file integrity check on the assembled data packet; when the assembled data packet passes the file integrity check, the upgrade slave controller is controlled to use the data packet to upgrade the controller; when the assembled data packet does not pass the file integrity check, the upgrade slave controller is controlled to determine that the controller upgrade has failed.
[0077] Optionally, the detection module 503 is also configured to assemble multiple data fragments according to the fragment sequence number of each data fragment using the upgraded slave controller on the controller side, and determine whether the data fragment belongs to the data packet according to the fragment sequence number of each data fragment. If not, the data fragment is deleted.
[0078] Optionally, the second configuration module 502 is also configured to determine the total bandwidth and remaining bandwidth of each transmission channel and each alternative channel in the alternative channel set; input the shard size and the total bandwidth and remaining bandwidth of each transmission channel into the channel transmission estimation model, and output the abnormality probability of each transmission channel; input the shard size and the total bandwidth and remaining bandwidth of each alternative channel into the channel transmission estimation model, and output the abnormality probability of each alternative channel.
[0079] Optionally, the second configuration module 502 is also configured to construct a positive sample set and a negative sample set based on the historical records of transmission information of multiple transmission channels, wherein the positive sample set includes multiple groups of samples in a normal transmission process, and the negative sample set includes multiple groups of samples in an abnormal transmission process, and each group of samples includes: a shard size and a total bandwidth and a remaining bandwidth of the transmission channel; and the channel transmission estimation model is iteratively trained using the positive sample set and the negative sample set to optimize the model parameters of the channel transmission estimation model to obtain a trained channel transmission estimation model.
[0080] Optionally, the detection module 503 is further configured to select a corresponding number of candidate channels from multiple candidate channels according to the number of transmission channels detected to have abnormalities; and use the selected candidate channels to send the multiple data fragments allocated to the transmission channels of abnormal transmission to the target address.
[0081] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0082] Figure 6 Schematic diagram of a car 6 provided in an embodiment of the present disclosure. Figure 6 As shown, the automobile 6 of this embodiment includes: an upgrade main controller 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the upgrade main controller 601. When the upgrade main controller 601 executes the computer program 603, the steps in the above-mentioned various method embodiments are implemented. Alternatively, when the upgrade main controller 601 executes the computer program 603, the functions of the modules / units in the above-mentioned various device embodiments are implemented.
[0083] The car 6 includes a traditional car and a new energy car. The car 6 may include but is not limited to an upgrade main controller 601 and a memory 602. Those skilled in the art will appreciate that Figure 6 The vehicle 6 is merely an example and does not constitute a limitation of the vehicle 6 , and may include more or less components than those shown in the figure, or different components.
[0084] The memory 602 may be an internal storage unit of the automobile 6, for example, a hard disk or memory of the automobile 6. The memory 602 may also be an external storage device of the automobile 6, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the automobile 6. The memory 602 may also include both an internal storage unit and an external storage device of the automobile 6. The memory 602 is used to store computer programs and other programs and data required by the automobile.
[0085] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0086] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when it is executed by the upgraded main controller. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0087] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A vehicle software upgrade method based on multi-channel data transmission, characterized in that: include: In response to the OTA upgrade request, a transmission strategy is configured for the data packet, wherein the transmission strategy includes a transmission channel corresponding to each data slice of the data packet; If the probability of an abnormality of a target transmission channel is greater than a first preset threshold, a corresponding backup channel is configured for the target transmission channel, wherein the probability of an abnormality of the backup channel is lower than that of the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each of the data shards; When using each transmission channel to transmit its corresponding data slice, if it is detected that the target transmission channel is abnormal, the corresponding backup channel is used to transmit the data slice corresponding to the target transmission channel; Before using each transmission channel to transmit the corresponding data fragment, the method further includes: Determine the total bandwidth and the remaining bandwidth of each transmission channel and each candidate channel in the candidate channel set; Inputting the fragment size and the total bandwidth and the remaining bandwidth of each transmission channel into a channel transmission estimation model, and outputting the abnormal probability of each transmission channel, wherein the transmission strategy includes the fragment size; The slice size and the total bandwidth and the remaining bandwidth of each candidate channel are input into a channel transmission estimation model, and the abnormal probability of each candidate channel is output.
2. The method according to claim 1, characterized in that If the probability of an abnormality in the target transmission channel being greater than a first preset threshold, configuring a corresponding backup channel for the target transmission channel includes: The more the target transmission channels are, the more corresponding standby channels are configured for each target transmission channel.
3. The method according to claim 1, characterized in that If the probability of an abnormality of the target transmission channel being greater than a first preset threshold, configuring a corresponding backup channel for the target transmission channel includes: If the number of the target transmission channels is greater than the second preset threshold, jump to the step of configuring a transmission strategy for the data packet in response to the OTA upgrade request.
4. The method according to claim 1, characterized in that: Configure a transmission strategy for a data packet in response to an OTA upgrade request, including: polling whether link channels between multiple ports and a target address of a controller are reachable, and determining each reachable link channel as a transmission channel; Determine the data volume of the data packet and the remaining bandwidth of each transmission channel, and determine the fragment size according to the data volume and the remaining bandwidth of each transmission channel; The data packet is fragmented according to the fragment size to obtain a plurality of data fragments and a fragment sequence number of each data fragment, and a plurality of data fragments are allocated to each transmission channel according to the remaining bandwidth of the transmission channel.
5. The method according to claim 1, characterized in that The method further comprises: According to the historical records of transmission information of multiple transmission channels, construct a positive sample set and a negative sample set, wherein the positive sample set includes multiple groups of samples in a normal transmission process, and the negative sample set includes multiple groups of samples in an abnormal transmission process, and each group of samples includes: a fragment size and a total bandwidth and a remaining bandwidth of the transmission channel; The channel transmission estimation model is iteratively trained using the positive sample set and the negative sample set to optimize model parameters of the channel transmission estimation model to obtain the trained channel transmission estimation model.
6. The method according to claim 1, characterized in that When using each transmission channel to transmit the corresponding data slice, if it is detected that the target transmission channel is abnormal, using the corresponding standby channel to transmit the data slice corresponding to the target transmission channel, including: According to the number of transmission channels detected to be abnormal, a corresponding number of candidate channels are selected from a plurality of candidate channels; The multiple data fragments allocated to the transmission channel of abnormal transmission are sent to the target address by using the screened alternative channels.
7. A vehicle software upgrade device based on multi-channel data transmission, characterized in that: include: A first configuration module is configured to configure a transmission strategy for a data packet in response to an OTA upgrade request, wherein the transmission strategy includes a transmission channel corresponding to each data slice of the data packet; A second configuration module is configured to configure a corresponding backup channel for the target transmission channel if the probability of an abnormality of the target transmission channel is greater than a first preset threshold, wherein the probability of an abnormality of the backup channel is lower than that of the target transmission channel, and the target transmission channel is at least one of the transmission channels corresponding to each of the data shards; The detection module is configured to, when using each transmission channel to transmit the corresponding data fragment, if it is detected that the target transmission channel is abnormal, use the corresponding backup channel to transmit the data fragment corresponding to the target transmission channel; The second configuration module is also configured to: determine the total bandwidth and remaining bandwidth of each transmission channel and each alternative channel in the alternative channel set; input the slice size and the total bandwidth and remaining bandwidth of each transmission channel into the channel transmission estimation model, and output the abnormality probability of each transmission channel, wherein the transmission strategy includes the slice size; input the slice size and the total bandwidth and remaining bandwidth of each alternative channel into the channel transmission estimation model, and output the abnormality probability of each alternative channel.
8. A car, characterized in that: The invention comprises a memory, an upgrade main controller and a computer program stored in the memory and executable on the upgrade main controller, wherein the upgrade main controller implements the vehicle software upgrade method based on multi-channel data transmission as described in any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the vehicle software upgrade method based on multi-channel data transmission as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Data transmission method and device, storage medium and electronic device
CN113365310A
In-vehicle communication system, in-vehicle communication method and equipment
CN114726782A
Channel detection method, device and equipment and computer readable storage medium
CN115914020A