Software upgrade method, system, computer device and storage medium for heterogeneous network

By adjusting the communication transmission rate of software upgrade services in real time, the problems of network blocking and low upgrade efficiency of software upgrade methods in the existing technology are solved, and an efficient and stable software upgrade process is achieved.

CN114003255BActive Publication Date: 2025-02-11BEIJING ONE SPACE ELECTRONICS CO LTD +4
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111255478.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-27
Publication Date
2025-02-11
Estimated Expiration
2041-10-27

AI Technical Summary

Technical Problem

The software upgrade method in the prior art has problems of network blockage or low upgrade efficiency, especially when multiple CAN devices are software upgraded in parallel.

Method used

Through real-time adaptation, adjust the communication transmission rate of the software upgrade service, obtain the current remaining broadband information of each heteroproton network, calculate the target increment value based on the initial transmission rate, and compare it with the preset increment value based on the target increment value. Adjust the transmission rate to avoid network blockage and maximize network bandwidth utilization.

Benefits of technology

It effectively avoids CAN bus network blockage, improves transmission efficiency, and ensures the stability and efficiency of the software upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114003255B_ABST
    Figure CN114003255B_ABST
Patent Text Reader

Abstract

The present invention provides a software upgrade method, system, computer equipment and storage medium for a heterogeneous network. The method comprises: obtaining current remaining bandwidth information of each heterogeneous sub-network; obtaining the initial transmission rate of each software upgrade service according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target increment value corresponding to each software upgrade service according to the initial transmission rate; comparing each target increment value with a preset increment threshold, adjusting a matching initial transmission rate according to each comparison result, and obtaining the current transmission rate of each software upgrade service; the problem of network congestion or low upgrade efficiency in the software upgrade method of the prior art is solved, and the communication transmission rate of the software upgrade service is adjusted in real time to avoid CAN bus network congestion, while maximizing the use of network bandwidth to transmit data, thereby improving transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a software upgrading method, system, computer equipment and storage medium for a heterogeneous network. Background Art

[0002] In a large missile system, there are many devices with CAN communication functions. According to the attributes such as subordination and function, CAN devices form CAN bus sub-networks. The working parameters and communication rates of each CAN bus sub-network are different, forming a heterogeneous sub-network.

[0003] During the software development process or the system life cycle, as the requirements change, the software of some CAN devices needs to be upgraded to achieve new functions. In the traditional way, each CAN bus subnet needs to provide at least one CAN external access interface so that the software upgrade controller can access each CAN device through it to achieve software upgrade. This method wastes CAN interface resources, and the CAN subnet deep in the system is not easy to wire to the external interface, which increases the difficulty of system design. In addition, if the system is already working normally, there is already a communication business load in each CAN bus subnet. Due to the large amount of data transmission within a certain period of time, if the transmission flow is not restricted, the existing low-priority communication business will be blocked, hindering the normal operation of the current system; if the transmission flow is too strict, the CAN bus network bandwidth will not be fully utilized, so that the upgrade process cannot be completed as soon as possible, especially when multiple CAN devices are upgraded in parallel.

[0004] It can be seen that the software upgrade method in the prior art has the problem of network congestion or low upgrade efficiency. Summary of the invention

[0005] In view of the deficiencies in the prior art, the software upgrade method, system, computer device and storage medium for heterogeneous networks provided by the present invention solve the problems of network congestion or low upgrade efficiency in the software upgrade method of the prior art, avoid CAN bus network congestion by real-time adaptive adjustment of the communication transmission rate of the software upgrade service, and maximize the use of network bandwidth to transmit data, thereby improving transmission efficiency.

[0006] In a first aspect, the present invention provides a software upgrade method for a heterogeneous network, which is applied to a software upgrade system for a heterogeneous network. The software upgrade system includes multiple heterogeneous sub-networks, multiple CAN bridges and a CAN controller, each heterogeneous sub-network includes a number of CAN devices and each heterogeneous sub-network is connected through a CAN bridge, and the CAN controller is connected to any heterogeneous sub-network through a CAN interface. The method includes: obtaining current remaining bandwidth information of each heterogeneous sub-network; obtaining an initial transmission rate of each software upgrade service according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target incremental value corresponding to each software upgrade service according to the initial transmission rate, wherein the target incremental value is an incremental value of a response interval duration of each frame of an upgrade data frame within a first preset duration; comparing each target incremental value with a preset incremental threshold, adjusting a matching initial transmission rate according to each comparison result, obtaining a current transmission rate of each software upgrade service, and causing the CAN controller to continue sending upgrade data frames of each software service according to the current transmission rate.

[0007] Optionally, the initial transmission rate of each software upgrade service is obtained according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, including: obtaining the first remaining bandwidth information of the heterogeneous sub-network connected to the CAN controller; obtaining the first transmission rate of each software upgrade service according to the first remaining bandwidth information and the current number of software upgrade services; obtaining the second remaining bandwidth information of each target heterogeneous sub-network corresponding to each software upgrade service, the target heterogeneous sub-network being a heterogeneous sub-network on the transmission path of the software upgrade service; obtaining the second transmission rate in each target heterogeneous sub-network corresponding to each software upgrade service according to the second remaining bandwidth information and the target number of the software upgrade service passing through the target heterogeneous sub-network; and taking the minimum transmission rate among the first transmission rate and all the second transmission rates as the initial transmission rate of the corresponding software upgrade service.

[0008] Optionally, based on the initial transmission rate, a target incremental value corresponding to each software upgrade service is obtained, including: sending the upgrade data frame of each software upgrade service to the corresponding target CAN device according to the initial transmission rate, so that the target CAN device responds; monitoring the response interval duration of the upgrade data frame of each software upgrade service; within a first preset time duration, obtaining all response interval incremental values ​​of each software upgrade service according to the response interval duration; filtering all response interval incremental values ​​of each software upgrade service to obtain the corresponding target incremental value.

[0009] Optionally, each target incremental value is compared with a preset incremental threshold, and the matching initial transmission rate is adjusted according to each comparison result to obtain the current transmission rate of each software upgrade service, including: if the current target incremental value is a positive value and the current target incremental value is greater than the preset incremental threshold, the target initial transmission rate corresponding to the current incremental wave value is reduced according to the preset first step value to obtain the current transmission rate of the first target software upgrade service.

[0010] Optionally, each target incremental value is compared with a preset incremental threshold, and the matching initial transmission rate is adjusted according to each comparison result to obtain the current transmission rate of each software upgrade service, and also includes: if the current target incremental value is a negative value and the absolute value of the current target incremental value is greater than the preset incremental threshold, or the absolute value of the current target incremental value is less than or equal to the preset incremental threshold, the target initial transmission rate corresponding to the current incremental wave value is increased according to the preset first step value to obtain the current transmission rate of the first target software upgrade service; wherein, the first target software upgrade service is the software upgrade service corresponding to the target initial transmission rate.

[0011] Optionally, after monitoring the response interval duration of the upgrade data frame of each software upgrade service, the method further includes: within a second preset time duration, if there is a second target software upgrade service that has not received the response data sent by the target CAN device, reducing the initial rate corresponding to the second target software upgrade service according to a preset second step value to obtain the current transmission rate of the second target software upgrade service.

[0012] Optionally, according to the initial transmission rate, the upgrade data frame of each software upgrade service is sent to the corresponding target CAN device, including: the CAN controller splits the current software upgrade service into multiple upgrade data frames, the upgrade data frame includes a frame code, and the frame code includes a target ID identifier and a frame sequence number of the target CAN device; the CAN controller sends the multiple upgrade data frames to the CAN bridge in sequence, so that the CAN bridge forwards the multiple upgrade data frames to the corresponding target CAN device according to the target ID identifier in the frame code.

[0013] In a second aspect, the present invention provides a software upgrade system for a heterogeneous network, the software upgrade system comprising: multiple heterogeneous sub-networks, multiple CAN bridges and a CAN controller, each heterogeneous sub-network comprising a plurality of CAN devices and each heterogeneous sub-network being connected via a CAN bridge, the CAN controller being connected to any heterogeneous sub-network via a CAN interface; the CAN controller being used to obtain current remaining bandwidth information of each heterogeneous sub-network, and also being used to obtain an initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, and also being used to obtain a target incremental value corresponding to each software upgrade service based on the initial transmission rate, and also being used to compare each target incremental value with a preset incremental threshold, and adjusting a matching initial transmission rate based on each comparison result, to obtain the current transmission rate of each software upgrade service, so that the CAN controller continues to send upgrade data frames of each software service based on the current transmission rate.

[0014] In a third aspect, the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining current remaining bandwidth information of each heterogeneous sub-network; obtaining an initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target incremental value corresponding to each software upgrade service based on the initial transmission rate, wherein the target incremental value is an incremental value of a response interval duration of each frame of upgrade data frame within a first preset duration; comparing each target incremental value with a preset incremental threshold, adjusting a matching initial transmission rate based on each comparison result, obtaining the current transmission rate of each software upgrade service, and causing the CAN controller to continue to send upgrade data frames of each software service based on the current transmission rate.

[0015] In a fourth aspect, the present invention provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the following steps: obtaining the current remaining bandwidth information of each heterogeneous sub-network; obtaining the initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target incremental value corresponding to each software upgrade service based on the initial transmission rate, wherein the target incremental value is an incremental value of a response interval duration of each frame of upgrade data frame within a first preset duration; comparing each target incremental value with a preset incremental threshold, adjusting a matching initial transmission rate based on each comparison result, obtaining the current transmission rate of each software upgrade service, and causing the CAN controller to continue sending upgrade data frames of each software service based on the current transmission rate.

[0016] Compared with the prior art, the present invention has the following beneficial effects:

[0017] 1. The CAN controller in the software upgrade system of the heterogeneous network in the present invention is connected to any heterogeneous sub-network through an external CAN interface, which reduces the external CAN interface of the system and simplifies the layout design of the system. Each heterogeneous sub-network in the present invention is connected through a CAN bridge, so that one CAN controller can upgrade multiple CAN devices at the same time, which is convenient for the implementation and management of software upgrade.

[0018] 2. The present invention compares the target incremental value corresponding to each software upgrade service with the preset incremental threshold, adjusts the matching initial transmission rate according to each comparison result, and obtains the current transmission rate of each software upgrade service, so that the CAN controller continues to send the upgrade data frame of each software service according to the current transmission rate, thereby avoiding CAN bus network congestion by adjusting the communication transmission rate of the software upgrade service in real time, and maximizing the use of network bandwidth to transmit data, thereby improving transmission efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 FIG. 1 is a flow chart of a method for upgrading software in a heterogeneous network provided by an embodiment of the present invention;

[0020] Figure 2 FIG. 1 is a schematic diagram of the structure of a software upgrade system for a heterogeneous network provided by an embodiment of the present invention;

[0021] Figure 3 The embodiment of the present invention is shown in Figure 1 Specific flow diagram of step 102;

[0022] Figure 4 FIG. 1 is a schematic diagram of adjusting a transmission rate provided by an embodiment of the present invention;

[0023] Figure 5 FIG. 1 is a schematic diagram showing the operation of a CAN bridge provided by an embodiment of the present invention;

[0024] Figure 6 FIG. 1 is a flow chart of another method for upgrading software in a heterogeneous network provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0026] Figure 1 FIG. 1 is a flow chart of a software upgrade method for a heterogeneous network provided by an embodiment of the present invention; the heterogeneous sub-network upgrade method provided by the present invention is applied to a software upgrade system of a heterogeneous network, such as Figure 2 As shown, the software upgrade system includes multiple heterogeneous sub-networks, multiple CAN bridges and CAN controllers, each heterogeneous sub-network includes a plurality of CAN devices and each heterogeneous sub-network is connected through a CAN bridge, and the CAN controller is connected to any heterogeneous sub-network through a CAN interface. The software upgrade method of the heterogeneous network specifically includes the following steps:

[0027] Step S101, obtaining current remaining bandwidth information of each heterogeneous sub-network.

[0028] Step S102, obtaining the initial transmission rate of each software upgrade service according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services.

[0029] In this embodiment, if Figure 3 As shown, according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, the initial transmission rate of each software upgrade service is obtained, including:

[0030] Step S201, obtaining first remaining bandwidth information of a heterogeneous sub-network connected to the CAN controller;

[0031] Step S202, obtaining a first transmission rate of each software upgrade service according to the first remaining bandwidth information and the current number of software upgrade services;

[0032] Step S203, obtaining the second remaining bandwidth information of each target heterogeneous sub-network corresponding to each software upgrade service, wherein the target heterogeneous sub-network is a heterogeneous sub-network on the transmission path of the software upgrade service;

[0033] Step S204, obtaining a second transmission rate in each target heterogeneous sub-network corresponding to each software upgrade service according to the second remaining bandwidth information and the target number of the software upgrade service passing through the target heterogeneous sub-network;

[0034] Step S205: Using the first transmission rate and the minimum transmission rate among all second transmission rates as the initial transmission rate corresponding to the software upgrade service.

[0035] It should be noted that before the CAN controller initiates the software upgrade service, it obtains the remaining bandwidth of each heterogeneous proton network through communication with the CAN bridge. Information,pre-binding based heterogeneous subnetwork The obtained software upgrade service data transmission path distribution information and the current software upgrade service data , allocate initial bandwidth to each software upgrade sub-service , which is the initial transmission rate.

[0036] The initial bandwidth allocation principle is as follows: Note that the heterogeneous sub-networks to which the CAN controller is connected The first residual bandwidth is ,First, according to the average distribution principle, the first transmission rate of each software upgrade service can be expressed as: ;Record a software upgrade service that interconnects heterogeneous sub-networks through a CAN bridge , ,..reach the target CAN device, record , ,..The second remaining bandwidth of the network is , , ..., and there are , ,... software upgrade services need to be passed , ,... subnet, the bandwidth of this soft upgrade service is min{ , , , ...}, and so on, the initial bandwidth of each software upgrade service is calculated.

[0037] For example, Figure 2 In the networking system shown, if there are currently three software upgrade services, the target CAN device of the first software upgrade service is in the heterogeneous sub-network A, the target CAN device of the second software upgrade service is in the heterogeneous sub-network C, and the target CAN device of the third software upgrade service is in the heterogeneous sub-network D, then the number of software upgrade services through the heterogeneous sub-network A is 1, the number of software upgrade services through the heterogeneous sub-network C is 2, and the number of software upgrade services through the heterogeneous sub-network D is 1; according to the above embodiment, it can be known that the first transmission rate of each software upgrade service is: , the second transmission rate of the first software upgrade service is: , and finally take and The minimum rate in is used as the initial transmission rate of the first software upgrade service; the second transmission rate of the second software upgrade service is: ,Pick and The minimum rate in is used as the initial transmission rate of the second software upgrade service; the second transmission rates of the third software upgrade service are respectively: , ,Pick , , The minimum rate in is used as the initial transmission rate of the third software upgrade service.

[0038] It can be seen that the specific steps for obtaining the initial transmission rate in this embodiment include: (1) the controller communicates with the CAN bridge to obtain the remaining bandwidth of each subnet; (2) the network topology information is pre-set in the CAN controller, and the path of each upgrade service can be calculated; (3) based on the information in step (2), the number of software upgrade services to be transmitted in each subnet can be calculated; (4) based on the information in steps (1) and (3), the transmission rate of each service in each subnet can be calculated; (5) the smallest transmission rate in each subnet is the initial transmission rate of the corresponding upgrade service that can communicate in the network. In this case, if the network communication does not change, each software upgrade service fully utilizes the bandwidth of each subnet and will not be blocked, so it is called the initial transmission rate.

[0039] Step S103: obtaining a target incremental value corresponding to each software upgrade service according to the initial transmission rate.

[0040] In this embodiment, according to the initial transmission rate, the target increment value corresponding to each software upgrade service is obtained, which specifically includes: according to the initial transmission rate, sending the upgrade data frame of each software upgrade service to the corresponding target CAN device, so that the target CAN device responds; monitoring the response interval duration of the upgrade data frame of each software upgrade service; within a first preset duration, obtaining all response interval increment values ​​of each software upgrade service according to the response interval duration; filtering all response interval increment values ​​of each software upgrade service to obtain the corresponding target increment value. Among them, the target increment value is the increment value of the response interval duration of the upgrade data frame within the first preset duration, and the response interval duration is the duration of the response received by the target CAN device when the CAN controller sends the upgrade data frame of the software upgrade service to the target CAN device.

[0041] It should be noted that each software upgrade service includes several upgrade data frames. Each time the CAN controller sends an upgrade data frame, it will receive a response frame from the target CAN device. The time from the CAN controller sending an upgrade data frame to receiving the response frame from the target CAN device is the response interval duration. Multiple upgrade data frames of each software upgrade service will be sent within the first preset duration, thereby obtaining multiple response interval durations. The multiple response interval durations in each software upgrade service are subtracted from each other in chronological order to obtain multiple response interval incremental values, that is, the latter response interval duration is subtracted from the previous response interval duration. All response interval incremental values ​​in each software upgrade service within the first preset duration are filtered to obtain the target incremental value of each software upgrade service, wherein filtering all response interval incremental values ​​in each software upgrade service includes but is not limited to taking the average and the median.

[0042] In this embodiment, during the upgrade process, the incremental value is counted within each preset time period; during the upgrade process, the transmission rate is increased or decreased based on the statistical results and the threshold comparison results; for example, the initial transmission rate is s0, and it is s1 after the first adjustment. The second time is adjusted on the basis of s1 to form s2, and the third time is adjusted on the basis of s2 to form s3, and so on.

[0043] Step S104, compare each target increment value with a preset increment threshold, adjust the matching initial transmission rate according to each comparison result, obtain the current transmission rate of each software upgrade service, and enable the CAN controller to continue to send the upgrade data frame of each software service according to the current transmission rate.

[0044] In this embodiment, each target incremental value is compared with a preset incremental threshold, and the matching initial transmission rate is adjusted according to each comparison result to obtain the current transmission rate of each software upgrade service, including: if the current target incremental value is a positive value and the current target incremental value is greater than the preset incremental threshold, the target initial transmission rate corresponding to the current incremental wave value is reduced according to the preset first step value to obtain the current transmission rate of the first target software upgrade service; if the current target incremental value is a negative value and the absolute value of the current target incremental value is greater than the preset incremental threshold, or the absolute value of the current target incremental value is less than or equal to the preset incremental threshold, the target initial transmission rate corresponding to the current incremental wave value is increased according to the preset first step value to obtain the current transmission rate of the first target software upgrade service; wherein, the first target software upgrade service is the software upgrade service corresponding to the target initial transmission rate.

[0045] In this embodiment, after monitoring the response interval duration of the upgrade data frame of each software upgrade service, the method also includes: within a second preset time duration, if there is a second target software upgrade service that has not received the response data sent by the target CAN device, reducing the initial transmission rate corresponding to the second target software upgrade service according to a preset second step value to obtain the current transmission rate of the second target software upgrade service; wherein the second step value is greater than the first step value.

[0046] It should be noted that during the transmission process of each software upgrade service, multiple rounds of transmission rate adjustments will be performed, and the current transmission rate after each round of rate adjustment will be used as the initial transmission rate for the next round of rate adjustment. By dynamically adjusting the transmission rate of each software upgrade service, network congestion can be prevented and transmission efficiency can be increased.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] 1. The CAN controller in the software upgrade system of the heterogeneous network in the present invention is connected to any heterogeneous sub-network through an external CAN interface, which reduces the external CAN interface of the system and simplifies the layout design of the system. Each heterogeneous sub-network in the present invention is connected through a CAN bridge, so that one CAN controller can upgrade multiple CAN devices at the same time, which is convenient for the implementation and management of software upgrade.

[0049] 2. The present invention compares the target incremental value corresponding to each software upgrade service with the preset incremental threshold, adjusts the matching initial transmission rate according to each comparison result, and obtains the current transmission rate of each software upgrade service, so that the CAN controller continues to send the upgrade data frame of each software service according to the current transmission rate, thereby avoiding CAN bus network congestion by adjusting the communication transmission rate of the software upgrade service in real time, and maximizing the use of network bandwidth to transmit data, thereby improving transmission efficiency.

[0050] In another real-time example of the present invention, according to the initial transmission rate, the upgrade data frame of each software upgrade service is sent to the corresponding target CAN device, including: the CAN controller splits the current software upgrade service into multiple upgrade data frames, the upgrade data frame includes a frame code, and the frame code includes a target ID identifier and a frame sequence number of the target CAN device; the CAN controller sends the multiple upgrade data frames to the CAN bridge in sequence, so that the CAN bridge forwards the multiple upgrade data frames to the corresponding target CAN device according to the target ID identifier in the frame code.

[0051] In another real-time example of the present invention, the present invention provides a software upgrade system for a heterogeneous network, the software upgrade system comprising: multiple heterogeneous sub-networks, multiple CAN bridges and a CAN controller, each heterogeneous sub-network comprising a number of CAN devices and each heterogeneous sub-network being connected via a CAN bridge, the CAN controller being connected to any heterogeneous sub-network via a CAN interface; the CAN controller being used to obtain current remaining bandwidth information of each heterogeneous sub-network, and also being used to obtain an initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, and also being used to obtain a target incremental value corresponding to each software upgrade service based on the initial transmission rate, and also being used to compare each target incremental value with a preset incremental threshold, and adjusting a matching initial transmission rate based on each comparison result, to obtain the current transmission rate of each software upgrade service, so that the CAN controller continues to send upgrade data frames of each software service based on the current transmission rate.

[0052] It should be noted that if Figure 2 As shown in the figure, multiple CAN devices form heterogeneous sub-networks with different working parameters and communication rates according to their attributes such as subordinate and function. These heterogeneous sub-networks are interconnected through CAN bridges to form an interconnected CAN communication network. The CAN controller is connected to a heterogeneous sub-network through a CAN external access port, and all CAN devices are interconnected through the CAN bridge. Each CAN device in the network has multiple unique IDs according to its functions and business requirements. These ID sets are pre-installed in the CAN bridge and CAN controller.

[0053] like Figure 5 As shown, the receiving and sending units of the CAN bridge receive and send CAN signals according to the working parameters of the heterogeneous sub-networks they are connected to; the CAN bridge is pre-installed with the CAN device ID sets in the networks on both sides. When the bridge receives a CAN data frame sent by a device in one network, it queries the ID set list. If this ID belongs to a CAN device in another network, the data frame is cached in the FIFO; the CAN bridge monitors the congestion status of the access network in real time, and when the bus network is idle, the cached data frames are forwarded in the order of reception; a timer is set inside the CAN bridge, and each time a data frame is cached, the receiving time is synchronously recorded. If it exceeds the waiting time limit and has not been forwarded, it will be discarded; when the internal cache space of the CAN bridge is exhausted, the newly received data frame to be cached will overwrite the old, earliest cached data frame; the CAN bridge monitors and counts the idle bandwidth information of the networks on both sides in real time, and the CAN controller can obtain this information through management signaling.

[0054] like Figure 6As shown in the figure, the CAN controller is connected to a specific CAN device through a network. The steps of software upgrade are as follows: (1) The CAN controller sends a software upgrade command to the CAN device and CAN bridge that need software upgrade; (2) After receiving the software upgrade command from the CAN controller, the CAN device and CAN bridge in the network enter the software upgrade mode and respond; (3) After receiving the above response, the CAN controller splits and frames the software to be upgraded and sends it to the CAN device in sequence. The CAN device responds after receiving each frame and determines the position of the received frame data according to the ID number of the data frame to reassemble the upgraded software; (4) If the controller does not receive a response within a timeout period, it will pause. Continuously send and resend the frames that have not received a response; if the response is successfully received, continue to send continuously; if the response is not successfully received after multiple retransmissions, it is considered that the upgrade process has failed, and the software upgrade command can be resent to restart the software upgrade process; (5) After the controller has sent the upgraded software data, it sends the verification and burning commands to the CAN device. If the CAN device verifies the received data successfully and burns successfully, it sends a response with a success mark, otherwise it sends a response with a failure mark; (6) If the controller receives a response with a success mark, it can send a restart command to the CAN device. After receiving it, the CAN device responds, exits the software upgrade mode, and restarts to execute the upgraded software. If the controller receives a response with a failure mark, it can also issue a restart command. At this time, after the CAN device responds, it will exit the software upgrade mode and execute the old software program; the controller can also resend the software upgrade command and start the upgrade process again.

[0055] In one embodiment of the present invention, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining current remaining bandwidth information of each heterogeneous sub-network; obtaining an initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target incremental value corresponding to each software upgrade service based on the initial transmission rate, wherein the target incremental value is an incremental value of a response interval duration of each frame of upgrade data frame within a first preset duration; comparing each target incremental value with a preset incremental threshold, adjusting a matching initial transmission rate based on each comparison result, obtaining the current transmission rate of each software upgrade service, and causing the CAN controller to continue to send upgrade data frames of each software service based on the current transmission rate.

[0056] In one embodiment of the present invention, the present invention provides a readable storage medium having a computer program stored thereon, wherein the computer program implements the following steps when executed by a processor: obtaining the current remaining bandwidth information of each heterogeneous sub-network; obtaining the initial transmission rate of each software upgrade service based on the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; obtaining a target incremental value corresponding to each software upgrade service based on the initial transmission rate, wherein the target incremental value is an incremental value of a response interval duration of each frame of upgrade data frame within a first preset duration; comparing each target incremental value with a preset incremental threshold, adjusting a matching initial transmission rate based on each comparison result, obtaining the current transmission rate of each software upgrade service, and causing the CAN controller to continue to send upgrade data frames of each software service based on the current transmission rate.

[0057] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0058] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article 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, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A software upgrade method for a heterogeneous network, characterized in that: A software upgrade system applied to a heterogeneous network, the software upgrade system comprising a plurality of heterogeneous sub-networks, a plurality of CAN bridges and a CAN controller, each heterogeneous sub-network comprising a plurality of CAN devices and each heterogeneous sub-network being connected via a CAN bridge, the CAN controller being connected to any heterogeneous sub-network via a CAN interface, the method comprising: Obtain the current remaining bandwidth information of each heterogeneous sub-network; Obtaining an initial transmission rate of each software upgrade service according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services; According to the initial transmission rate, a target increment value corresponding to each software upgrade service is obtained, wherein the target increment value is an increment value of a response interval duration of each frame of upgrade data frame within a first preset duration; Compare each target increment value with a preset increment threshold, adjust the matching initial transmission rate according to each comparison result, obtain the current transmission rate of each software upgrade service, and enable the CAN controller to continue to send the upgrade data frame of each software service according to the current transmission rate; According to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, an initial transmission rate of each software upgrade service is obtained, including: Acquire first remaining bandwidth information of a heterogeneous sub-network connected to the CAN controller; Obtaining a first transmission rate for each software upgrade service according to the first remaining bandwidth information and the current number of software upgrade services; Acquire the second remaining bandwidth information of each target heterogeneous sub-network corresponding to each software upgrade service, wherein the target heterogeneous sub-network is a heterogeneous sub-network on the transmission path of the software upgrade service; Obtaining a second transmission rate in each target heterogeneous sub-network corresponding to each software upgrade service according to the second remaining bandwidth information and a target number of the software upgrade services passing through the target heterogeneous sub-network; The minimum transmission rate among the first transmission rate and all the second transmission rates is used as the initial transmission rate corresponding to the software upgrade service.

2. The software upgrade method of a heterogeneous network according to claim 1, characterized in that: According to the initial transmission rate, a target incremental value corresponding to each software upgrade service is obtained, including: According to the initial transmission rate, the upgrade data frame of each software upgrade service is sent to the corresponding target CAN device, so that the target CAN device responds; Monitor the response interval of the upgrade data frame of each software upgrade service; Within the first preset time period, obtaining all answer interval increment values ​​of each software upgrade service according to the answer interval time period; All response interval increment values ​​of each software upgrade service are filtered to obtain a corresponding target increment value.

3. The software upgrade method of a heterogeneous network according to claim 1, characterized in that: Each target increment value is compared with a preset increment threshold, and a matching initial transmission rate is adjusted according to each comparison result to obtain a current transmission rate of each software upgrade service, including: If the current target increment value is positive and the current target increment value is greater than the preset increment threshold, the target initial transmission rate corresponding to the current target increment value is reduced according to the preset first increment value to obtain the current transmission rate of the first target software upgrade service.

4. The software upgrade method of a heterogeneous network as claimed in claim 3, characterized in that: Comparing each target increment value with a preset increment threshold, adjusting a matching initial transmission rate according to each comparison result, and obtaining a current transmission rate of each software upgrade service, further comprising: If the current target increment value is negative and the absolute value of the current target increment value is greater than the preset increment threshold, or the absolute value of the current target increment value is less than or equal to the preset increment threshold, the target initial transmission rate corresponding to the current target increment value is increased according to the preset first step value to obtain the current transmission rate of the first target software upgrade service; The first target software upgrade service is a software upgrade service corresponding to the target initial transmission rate.

5. The software upgrade method of a heterogeneous network as claimed in claim 2, characterized in that: After monitoring the response interval duration of the upgrade data frame of each software upgrade service, the method further includes: Within the second preset time period, if there is a second target software upgrade service that has not received the response data sent by the target CAN device, the initial rate corresponding to the second target software upgrade service is reduced according to the preset second step value to obtain the current transmission rate of the second target software upgrade service.

6. The software upgrade method of a heterogeneous network as claimed in claim 2, characterized in that: According to the initial transmission rate, the upgrade data frame of each software upgrade service is sent to the corresponding target CAN device, including: The CAN controller splits the current software upgrade service into multiple upgrade data frames, wherein the upgrade data frames include frame codes, and the frame codes include a target ID identifier and a frame sequence number of a target CAN device; The CAN controller sends the multiple upgrade data frames to the CAN bridge in sequence, so that the CAN bridge forwards the multiple upgrade data frames to the corresponding target CAN devices according to the target ID identifier in the frame code.

7. A software upgrade system for a heterogeneous network, characterized in that: The software upgrade system comprises: A plurality of heterogeneous sub-networks, a plurality of CAN bridges and a CAN controller, each heterogeneous sub-network includes a plurality of CAN devices and each heterogeneous sub-network is connected via a CAN bridge, and the CAN controller is connected to any heterogeneous sub-network via a CAN interface; The CAN controller is used to obtain the current remaining bandwidth information of each heterogeneous sub-network, and is also used to obtain the initial transmission rate of each software upgrade service according to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, and is also used to obtain the target increment value corresponding to each software upgrade service according to the initial transmission rate, and the target increment value is the increment value of the response interval duration of each frame of the upgrade data frame within the first preset duration; it is also used to compare each target increment value with a preset increment threshold value, and adjust the matching initial transmission rate according to each comparison result to obtain the current transmission rate of each software upgrade service, so that the CAN controller continues to send the upgrade data frame of each software service according to the current transmission rate; According to the current remaining bandwidth information of each heterogeneous sub-network and the current number of software upgrade services, an initial transmission rate of each software upgrade service is obtained, including: Acquire first remaining bandwidth information of a heterogeneous sub-network connected to the CAN controller; Obtaining a first transmission rate for each software upgrade service according to the first remaining bandwidth information and the current number of software upgrade services; Acquire the second remaining bandwidth information of each target heterogeneous sub-network corresponding to each software upgrade service, wherein the target heterogeneous sub-network is a heterogeneous sub-network on the transmission path of the software upgrade service; Obtaining a second transmission rate in each target heterogeneous sub-network corresponding to each software upgrade service according to the second remaining bandwidth information and a target number of the software upgrade services passing through the target heterogeneous sub-network; The minimum transmission rate among the first transmission rate and all the second transmission rates is used as the initial transmission rate corresponding to the software upgrade service.

8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Device upgrade method, data transmission unit, controller local network device and network

    CN109039779A

  • Data transmission optimization method and device, computer equipment and storage medium

    CN110661727A