Controller application upgrade method and device, electronic equipment and storage medium

CN116775065BActive Publication Date: 2026-10-30FAW JIEFANG AUTOMOTIVE CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310018380.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2026-10-30
Estimated Expiration
2043-01-06

AI Technical Summary

Technical Problem

控制器包括主控制器和从控制器,且在汽车领域中,主从控制器之间融合策略使用广泛,控制器应用升级换代频繁,且存在不同厂家主控制器匹配不同厂家从控制器的情况,由于传统的对应升级方法仅适用于单一对应升级,这不仅对制造端和售后端对于应用版本管理的要求很高,同时不能兼容多厂家从控制器

Benefits of technology

[0017]本发明实施例的技术方案,通过确定目标从控制器的目标升级包的目标起始地址;然后判断目标起始地址是否存在于主控制器的目标地址范围内;若不存在,则从目标升级文件中确定目标升级包对应的目标偏移起始地址,将目标升级包的目标起始地址更新为目标偏移起始地址;其中,目标升级文件包括升级包和偏移起始地址的关联关系;最后通过主控制器获取目标升级包,并将目标升级包刷写入从控制器中。本申请技术方案,通过将目标升级包的起始地址偏移至主控制器的目标地址范围内,解决了不同主控制器与不同从控制器的应用升级匹配风险。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116775065B_ABST
    Figure CN116775065B_ABST
Patent Text Reader

Abstract

The application discloses an application upgrading method and device from a controller, electronic equipment and a storage medium. The method comprises the following steps: determining a target starting address of a target upgrade package of a target slave controller; judging whether the target starting address exists in a target address range of a master controller; if not, determining a target offset starting address corresponding to the target upgrade package from the target upgrade file, and updating the target starting address of the target upgrade package to the target offset starting address; the target upgrade file comprises an association relationship between an upgrade package and an offset starting address; acquiring the target upgrade package through the master controller, and writing the target upgrade package into the slave controller. According to the technical scheme, the starting address of the target upgrade package is offset to the target address range of the master controller, so that the application upgrading matching risk of different master controllers and different slave controllers is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method, apparatus, electronic device, and storage medium for upgrading applications from controllers. Background Technology

[0002] The controller is used to implement the system's control functions. It controls the voltage or current in the circuit by changing the connection state of the main circuit according to a predetermined sequence, or by changing the resistance value of the resistors in the circuit, to achieve operations such as system startup, operation, and shutdown. It can consist of a program counter, instruction register, instruction decoder, timing generator, and operation controller, coordinating and directing the entire system to achieve specific functions under program control. The controller includes a master controller and slave controllers. In the automotive industry, the integration strategy between master and slave controllers is widely used. Controller applications are frequently upgraded and replaced, and there are situations where master controllers from different manufacturers are matched with slave controllers from different manufacturers. Since traditional corresponding upgrade methods are only applicable to single-component upgrades, this not only places high demands on application version management at the manufacturing and after-sales ends, but also cannot be compatible with slave controllers from multiple manufacturers. Therefore, solving the problem of application upgrade matching between master and slave controllers is crucial. Summary of the Invention

[0003] This invention provides a method, apparatus, electronic device, and storage medium for application upgrades of a controller, in order to address the risk of application upgrade mismatch between different master controllers and different slave controllers.

[0004] According to one aspect of the present invention, an application upgrade method from a controller is provided, the method comprising:

[0005] Determine the target start address of the target upgrade package from the controller, and determine whether the target start address exists within the target address range of the main controller;

[0006] If it does not exist, determine the target offset start address corresponding to the target upgrade package, and update the target start address of the target upgrade package to the target offset start address;

[0007] The target upgrade package is obtained through the main controller and then flashed into the slave controller.

[0008] According to another aspect of the present invention, an application upgrade device from a controller is provided, the device comprising:

[0009] The judgment module is used to determine the target start address of the target upgrade package from the controller, and to determine whether the target start address exists within the target address range of the main controller;

[0010] The address offset module is used to determine the target offset starting address corresponding to the target upgrade package if it does not exist, and update the target starting address of the target upgrade package to the target offset starting address.

[0011] The upgrade module is used to obtain the target upgrade package through the main controller and write the target upgrade package into the slave controller.

[0012] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0013] At least one processor; and

[0014] A memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the application upgrade method for the controller as described in any embodiment of the present invention.

[0016] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the application upgrade method of the controller as described in any embodiment of the present invention.

[0017] The technical solution of this invention involves determining the target starting address of the target upgrade package from the target controller; then determining whether the target starting address exists within the target address range of the main controller; if not, determining the target offset starting address corresponding to the target upgrade package from the target upgrade file, and updating the target starting address of the target upgrade package to the target offset starting address; wherein, the target upgrade file includes the association between the upgrade package and the offset starting address; finally, obtaining the target upgrade package through the main controller and writing the target upgrade package into the slave controller. This technical solution, by offsetting the starting address of the target upgrade package to the target address range of the main controller, solves the application upgrade matching risk between different main controllers and different slave controllers.

[0018] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart of an application upgrade method from a controller according to Embodiment 1 of the present invention;

[0021] Figure 2 This is an interaction diagram of the master-slave controller applicable to embodiments of the present invention;

[0022] Figure 3 This is a schematic diagram of an application upgrade device from a controller according to an embodiment of the present invention;

[0023] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the application upgrade method from the controller according to an embodiment of the present invention. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0025] It should be noted that the terms "objective," "first," and "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] Example 1

[0027] Figure 1This is a flowchart of an application upgrade method for a slave controller provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where applications on a slave controller are being upgraded. This method can be executed by an application upgrade device for the slave controller, which can be implemented in hardware and / or software. This application upgrade device can be configured in an electronic device that has an application upgrade method for the slave controller. Figure 1 As shown, the method includes:

[0028] S110. Determine the target start address of the target upgrade package from the target controller, and determine whether the target start address exists within the target address range of the main controller.

[0029] The target address range can be any range of addresses that the master controller allows the upgrade package from the controller to pass through.

[0030] Specifically, the interaction method between the master controller and the slave controller is as follows: Figure 2 As shown, the main controller is the only interface between the system and external programs. Upgrading the slave controllers requires forwarding the data from the main controller to the slave controller. In actual system operation, considering the platformization of the same system and the risks associated with component resources, there are situations where multiple manufacturers' main controllers are matched with multiple manufacturers' slave controllers, resulting in... Figure 2 The risk that some components formed by multiple combinations of controllers may not be compatible with the master controller may prevent the application of the slave controller from being upgraded normally.

[0031] For example, taking an assisted driving control system as an example, it contains a main controller node: a smart forward-looking camera, and a slave controller node: a millimeter-wave radar. When the millimeter-wave radar application needs to be upgraded, the smart forward-looking camera needs to send an upgrade package to the millimeter-wave radar. However, because the application start address of millimeter-wave radars from different manufacturers is not within the range of the smart forward-looking camera, the smart forward-looking camera may fail to send the upgrade package to the millimeter-wave radar, resulting in the failure of the millimeter-wave radar application upgrade.

[0032] Therefore, after determining the target start address of the target upgrade package from the target controller, this application needs to accurately determine whether the target start address is within the target address range of the main controller, and then adjust the target start address of the target upgrade package according to the determination result to ensure that the upgrade package can be safely written from the main controller to the slave controller.

[0033] In one feasible embodiment, optionally, before determining whether the target starting address exists within the target address range of the main controller, the method further includes:

[0034] Obtain the allowed write address range for different object main controllers;

[0035] Take the intersection of the allowed write address ranges as the target address range for main control.

[0036] Specifically, because the permissible write address ranges of different object master controllers are different, if only the permissible write address range of one master controller is used as the target address range, even if the target start address of the target upgrade package of the slave controller is adjusted according to the permissible write address range, there may still be a situation where it does not match another master controller. Therefore, it is necessary to obtain the permissible write address range of all existing different object master controllers, that is, the target address range. So, it is necessary to take the intersection of the permissible write address ranges of different object master controllers. In this way, this intersection can represent the permissible write address range of all master controllers, and it can be used as the target address range of the master controller.

[0037] For example, the allowed write address range for main controller 1 is 0x00000000-0x01FFFFFF; the allowed write address range for main controller 2 is 0x00F00000-0x02000000. Extracting the intersection of the allowed write address ranges of the main controllers, we get 0x00F00000-0x01FFFFFF. Therefore, 0x00F00000-0x01FFFFFF is the target address range of the main controller.

[0038] This technical solution achieves consistency in the allowed write address ranges of master controllers by taking the intersection of the allowed write address ranges of different object master controllers and using it as the target address range of the master controller. This allows the start address of the upgrade package for the slave controller to be adjusted according to the target address range, making it suitable for all master controllers and more conducive to the application upgrade of slave controllers.

[0039] S120. If it does not exist, determine the target offset start address corresponding to the target upgrade package, and update the target start address of the target upgrade package to the target offset start address.

[0040] The target offset starting address can be a starting address that fits the target address range.

[0041] Specifically, the target start address of the target upgrade package is obtained from the target controller. If the target start address does not exist within the target address range of the main controller, it means that if the target upgrade package continues to be written to the main controller using the target start address, the main controller will not be able to recognize the target upgrade package. Therefore, the target start address of the target upgrade package needs to be updated to the target offset start address to fit the target address range. If the target start address exists within the target address range of the main controller, the target upgrade package is obtained through the main controller and then written to the slave controller.

[0042] Optionally, one feasible way to determine the target offset starting address corresponding to the target upgrade package is to determine the target offset starting address corresponding to the target upgrade package from the target upgrade file. The target upgrade file can be a file that records the relationship between the target upgrade package, the target starting address, and the target offset starting address. The target upgrade file includes the association between the upgrade package and the offset starting address.

[0043] In one feasible embodiment, optionally, the process of determining the target upgrade file includes steps A1-A4:

[0044] Step A1: Obtain the starting address of the upgrade package from the controller for different objects.

[0045] Step A2: Determine if the starting address of each upgrade package from the controller is within the target address range.

[0046] Step A3: If it exists, store it directly in the target upgrade file.

[0047] Step A4: If it does not exist, the starting address of the controller upgrade package will be offset to the target address range as the offset starting address, and the correspondence between the starting address and the offset starting address will be established and stored in the target upgrade file.

[0048] Specifically, because different production objects exist within a single controller, the starting addresses of the corresponding upgrade packages will also differ. Furthermore, the starting address may not necessarily be within the target address range; that is, the master controller might not be able to recognize the upgrade package from a single controller. Therefore, it is necessary to determine whether the starting address of each upgrade package from a single controller exists within the target address range. If it does, it means that the upgrade package from this single controller can be recognized by the master controller, and the starting address of the upgrade package from the single controller needs to be stored in the target upgrade file. If it does not exist, it means that the upgrade package from this single controller cannot be recognized by the master controller, and the starting address of the upgrade package from the single controller needs to be offset to the target address range as the offset starting address. Simultaneously, a correspondence between the starting address and the offset starting address is established and stored in the target upgrade file. By traversing all single controllers, an accurate target upgrade file can be created, making it easy to find the offset address corresponding to the starting address of the upgrade package from the single controller by querying the target upgrade file later.

[0049] For example, referring to Table 1, the target address range of the master controller is 0x00F00000-0x01FFFFFF. The starting address of slave controller 1 is 0x00100000; the starting address of slave controller 2 is 0x00110000; and the starting address of slave controller 3 is 0x00120000. It can be seen that the starting addresses of these three slave controllers are not within the target address range. Therefore, the starting addresses need to be offset. For example, the starting address offset of slave controller 1 in Table 1 is 0x00FC8000. Then, the starting address and / or the offset starting address are stored in the target upgrade file to create an accurate target upgrade file.

[0050] Table 1

[0051] From controller 1: 0x00100000 From controller 1: 0x00FC8000 From controller 2: 0x00110000 From controller 2: 0x00100000 From controller 3: 0x00120000 From controller 3: 0x00FE0000

[0052] This technical solution accurately creates the target upgrade file by determining whether the starting address of each upgrade package for the controller falls within the target address range. This facilitates the accurate determination of the offset address corresponding to the starting address of the upgrade package for the controller via the target upgrade file. Furthermore, the target upgrade file can be provided to production and after-sales departments to facilitate application upgrades for the controller.

[0053] S130. Obtain the target upgrade package through the main controller and flash the target upgrade package into the slave controller.

[0054] Specifically, the acquired target upgrade package can be recognized by the main controller, meaning the main controller can write the target upgrade package into the slave controller.

[0055] Optionally, to ensure the accuracy of the target upgrade package flashed to the slave controller, it is necessary to determine whether the starting address of the target upgrade package received by the target slave controller matches the target starting address or the target offset starting address. If it matches, it means that the target upgrade package can be used to upgrade the application of the slave controller, and the application of the target slave controller is upgraded according to the target upgrade package. If it does not match, it means that although the target upgrade package may be recognized by the master controller, it does not meet the requirements for upgrading the application of the slave controller, and the flashing failure is reported to ensure that the target upgrade package flashed to the slave controller is accurate.

[0056] Optionally, different vendor codes, different upgrade package address ranges, and different security access algorithms can be used to differentiate between master and slave controllers of different objects, further ensuring the accuracy of the upgrade.

[0057] Optionally, after receiving the target upgrade package from the master controller, the slave controller needs to determine the starting address of the target upgrade package. If the starting address of the target upgrade package is the target offset starting address, then the starting address of the target upgrade package needs to be offset back to the target starting address to satisfy the slave controller's preset starting address; the preset starting address is the target starting address, thus ensuring accurate application upgrades to the slave controller. Alternatively, an address verification can be performed on the offset target starting address. If the address is accurate, the application upgrade can then be performed based on the target upgrade package to ensure the accuracy of the offset target starting address and prevent the slave controller from crashing. If the offset target starting address is inaccurate, a flashing failure message should be immediately returned.

[0058] Optionally, if the flashing of the target upgrade package to the slave controller fails due to an abnormal power outage, the application on the target slave controller can be upgraded again after power is restored, based on the target upgrade package. This avoids repeating the process of flashing the target upgrade package from the master controller to the slave controller, ensuring the stability of the controller upgrade and saving flashing time.

[0059] The technical solution of this invention involves determining the target starting address of the target upgrade package from the target controller; then determining whether the target starting address exists within the target address range of the main controller; if not, determining the target offset starting address corresponding to the target upgrade package from the target upgrade file, and updating the target starting address of the target upgrade package to the target offset starting address; wherein, the target upgrade file includes the association between the upgrade package and the offset starting address; finally, obtaining the target upgrade package through the main controller and writing the target upgrade package into the slave controller. This technical solution, by offsetting the starting address of the target upgrade package to the target address range of the main controller, solves the application upgrade matching risk between different main controllers and different slave controllers.

[0060] Example 2

[0061] Figure 3 This is a schematic diagram of an application upgrade device from a controller, provided as an embodiment of the present invention. Figure 3 As shown, the device includes:

[0062] The judgment module 210 is used to determine the target start address of the target upgrade package from the controller, and to determine whether the target start address exists within the target address range of the main controller;

[0063] Address offset module 220 is used to determine the target offset start address corresponding to the target upgrade package if it does not exist, and update the target start address of the target upgrade package to the target offset start address;

[0064] Upgrade module 230 is used to obtain the target upgrade package through the main controller and write the target upgrade package into the slave controller.

[0065] Optionally, an address range determination unit may be included before the determination module, specifically used for:

[0066] Obtain the allowed write address range for different object main controllers;

[0067] Take the intersection of the allowed write address ranges as the target address range for main control.

[0068] Optionally, the address offset module includes an offset start address determination unit, specifically used for:

[0069] The target offset start address corresponding to the target upgrade package is determined from the target upgrade file; the target upgrade file includes the association between the upgrade package and the offset start address;

[0070] Correspondingly, the offset start address determination unit includes an upgrade file determination unit, specifically used for:

[0071] Obtain the starting address of the upgrade package from the controller for different objects;

[0072] Determine if the starting address of each upgrade package from the controller exists within the target address range;

[0073] If it exists, it will be stored directly in the target upgrade file;

[0074] If it does not exist, the starting address of the controller upgrade package will be offset to the target address range as the offset starting address, and the correspondence between the starting address and the offset starting address will be established and stored in the target upgrade file.

[0075] Optionally, the judgment module is followed by an application upgrade unit, specifically used for:

[0076] If it exists, the target upgrade package is obtained through the main controller and then written to the slave controller.

[0077] Optional upgrade module, specifically used for:

[0078] Determine whether the starting address of the target upgrade packet received by the target from the controller matches the target starting address or the target offset starting address;

[0079] If the conditions are met, the target application from the controller will be upgraded according to the target upgrade package;

[0080] If it does not meet the requirements, a write failure message will be displayed.

[0081] Optionally, the upgrade module includes a first upgrade unit, specifically used for:

[0082] If the starting address of the target upgrade package is the target offset starting address, then the starting address of the target upgrade package needs to be offset back to the target starting address to satisfy the preset starting address of the control; the preset starting address is the target starting address.

[0083] Optionally, the upgrade module includes a second upgrade unit, specifically used for:

[0084] If the flashing process fails due to an abnormal power outage, the application on the target slave controller can be upgraded again after power is restored, based on the target upgrade package.

[0085] The application upgrade device for the slave controller provided in the embodiments of the present invention can execute the application upgrade method for the slave controller provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0086] The acquisition, storage, use, and processing of data in this application comply with relevant national laws and regulations and do not violate public order and good morals.

[0087] Example 3

[0088] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0089] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0090] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0091] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0092] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as application upgrade methods from the controller.

[0093] In some embodiments, the application upgrade method from the controller can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the application upgrade method from the controller described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the application upgrade method from the controller by any other suitable means (e.g., by means of firmware).

[0094] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0095] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0096] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0097] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0098] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0099] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0100] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0101] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for upgrading an application from a controller, characterized in that, include: Determine the target start address of the target upgrade package from the controller, and determine whether the target start address exists within the target address range of the main controller; If it does not exist, determine the target offset start address corresponding to the target upgrade package, and update the target start address of the target upgrade package to the target offset start address; The target upgrade package is obtained through the main controller and then flashed onto the slave controller. Before determining whether the target starting address exists within the target address range of the main controller, the method further includes: Obtain the allowed write address range for different object main controllers; Take the intersection of the allowed write address ranges as the target address range of the main controller; This includes obtaining the target upgrade package through the main controller and flashing the target upgrade package into the slave controller, including: Determine whether the starting address of the target upgrade packet received by the target from the controller matches the target starting address or the target offset starting address; If the conditions are met, the target application from the controller will be upgraded according to the target upgrade package; If it does not meet the requirements, a flashing failure will be reported. This includes upgrading the target application from the controller based on the target upgrade package, including: If the starting address of the target upgrade package is the target offset starting address, then the starting address of the target upgrade package is offset back to the target starting address to satisfy the preset starting address of the controller; the preset starting address is the target starting address.

2. The method according to claim 1, characterized in that, Determine the starting address of the target offset corresponding to the target upgrade package, including: The target offset start address corresponding to the target upgrade package is determined from the target upgrade file; the target upgrade file includes the association between the upgrade package and the offset start address; Accordingly, the process of determining the target upgrade file includes: Obtain the starting address of the upgrade package from the controller for different objects; Determine if the starting address of each upgrade package from the controller exists within the target address range; If it exists, it will be stored directly in the target upgrade file; If it does not exist, the starting address of the controller upgrade package will be offset to the target address range as the offset starting address, and the correspondence between the starting address and the offset starting address will be established and stored in the target upgrade file.

3. The method according to claim 1, characterized in that, After determining whether the target starting address exists within the target address range of the main controller, the method further includes: If it exists, the target upgrade package is obtained through the main controller and then written to the slave controller.

4. The method according to claim 1 or 3, characterized in that, The target upgrade package is obtained from the main controller and then flashed onto the slave controller, including: If the flashing process fails due to an abnormal power outage, the application on the target slave controller can be upgraded again after power is restored, based on the target upgrade package.

5. An application upgrade device for a controller, characterized in that, include: The judgment module is used to determine the target start address of the target upgrade package from the controller, and to determine whether the target start address exists within the target address range of the main controller; The address offset module is used to determine the target offset start address corresponding to the target upgrade package if it does not exist, and update the target start address of the target upgrade package to the target offset start address. The upgrade module is used to obtain the target upgrade package through the main controller and write the target upgrade package to the slave controller; The application upgrade device from the controller also includes an address range determination unit, which is specifically used to: obtain the allowable write address range of different object main controllers before determining whether the target starting address exists within the target address range of the main controller; and take the intersection of the allowable write address ranges as the target address range of the main controller. The upgrade module is configured to: determine whether the starting address of the target upgrade package received by the target from the controller conforms to the target starting address or the target offset starting address; if it conforms, upgrade the application on the target from the controller according to the target upgrade package; if it does not conform, report a flashing failure. The upgrade module includes a first upgrade unit, configured to: if the starting address of the target upgrade package is the target offset starting address, offset the starting address of the target upgrade package back to the target starting address to satisfy the preset starting address of the controller; the preset starting address is the target starting address.

6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the application upgrade method from the controller as described in any one of claims 1-4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement the application upgrade method of any one of claims 1-4 from the controller.

Citation Information

Patent Citations

  • System and method for safely updating ECU data

    CN101470411A

  • Electric meter upgrading method and system, intelligent electric meter and storage medium

    CN112667272A