Controller application management method, device and system
By managing slave programs in the master controller, sending wake-up messages, receiving response messages, obtaining mapping information, and rewriting applications, the problem of low entry efficiency of controller application programs in the prior art is solved, and efficient slave program management is achieved.
Patent Information
- Application Number
- CN202210867830.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2042-07-22
AI Technical Summary
In the prior art, the entry efficiency of controller applications is low, resulting in program error burning and repetitive work.
By sending a wake-up message in the master controller, receiving a response message from the slave controller, determining whether the second application program and its source address are stored in the slave controller, mapping information is obtained, the first application program is rewritten, the target application program is generated, and it is sent to the slave controller.
This method improves the flashing efficiency of slave controller programs, ensuring that each slave controller obtains the latest version and has mapping relationships, and avoids the tedious process of entering the application separately.
Smart Images

Figure CN115202261B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automotive communications, and in particular, to a method, device, computer-readable storage medium, processor, and system for managing controller applications. Background Art
[0002] In the electronic control system, the application of master-slave controllers in the design of vehicle controller area networks (CAN) is increasing. In the process of mass production of complete vehicles, with the increase in market demand and the continuous optimization and upgrading of products, the frequency of software upgrades in the controller continues to increase. The master controller and the slave controller are mainly in the form of one master and one slave, one master and multiple slaves. In the form of one master and multiple slaves, the slave control program is mainly the collection and control of some information, and the slave logic has general consistency. In the prior art, different control programs are specified by different logics of different controllers, and the relevant programs are burned separately according to different slave controller sorting. In this case, the slave control program will be burned multiple times. If the slave controller sorting does not correspond correctly to the program, it will also cause the program to be burned incorrectly, resulting in repetitive work.
[0003] Therefore, there is an urgent need for a slave control program management method that improves flashing efficiency.
[0004] The above information disclosed in the background technology section is only used to enhance the understanding of the background technology of the technology described in this article. Therefore, the background technology may contain certain information that does not form the prior art known in this country for those skilled in the art. Summary of the invention
[0005] The main purpose of the present application is to provide a method, device, computer-readable storage medium, processor and system for managing controller applications to solve the problem of low efficiency in controller application input in the prior art.
[0006] To achieve the above-mentioned purpose, according to one aspect of the present application, a method for managing controller applications is provided, which is applied to a main controller of a vehicle, wherein the main controller includes a first application, and the method includes: sending a wake-up message to at least one slave controller, and receiving a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message; determining whether a second application is stored in the slave controller at least according to the type of the response message, and determining a source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, wherein the second application has the same function as the first application, and the second application has mapping information, wherein the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller; when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application; sending the target application to the corresponding slave controller so that the corresponding slave controller executes the target application.
[0007] Optionally, determining whether the second application is stored in the slave controller and determining the source address of the slave controller are determined at least based on the type of the response message, including: when the type of the response message is a first type, determining that the second application and the source address are not stored in the corresponding slave controller, addressing the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, the first type being used to characterize that the second application and the source address are not stored in the slave controller; when the type of the response message is a second type, determining that the second application and the source address are stored in the corresponding slave controller, and obtaining the source address corresponding to the corresponding slave controller, the second type being used to characterize that the second application and the source address are stored in the slave controller, and the response message of the second type includes the version of the second application of the corresponding slave controller and the source address.
[0008] Optionally, after addressing the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, the method further includes: sending an addressed message to the corresponding slave controller, the addressed message including the source address; receiving a reply message to determine that the slave controller has received the addressed message.
[0009] Optionally, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the mapping information corresponding to the source address is obtained, and the first application is rewritten according to the mapping information to obtain a target application, including: when the second application is not stored in the slave controller, establishing the mapping information corresponding to the source address; when the version of the second application is inconsistent with the version of the first application, determining the corresponding slave controller according to the source address, and obtaining the mapping information stored in the corresponding slave controller; writing the mapping information into the first application to obtain the target application of the corresponding slave controller.
[0010] Optionally, the method further includes: when the version of the second application is consistent with the version of the first application, determining that the second application in the corresponding slave controller is the target application, so that the corresponding slave controller executes the target application.
[0011] Optionally, after sending the target application to the corresponding slave controller, the method further includes: sending a question-and-answer message to each of the slave controllers, and receiving the response message sent by the slave controller, the response message being a message generated in response to the question-and-answer message, and the response message being used to characterize that the slave controller is in an awake state.
[0012] Optionally, sending the question-answer message to each of the slave controllers includes: sending the question-answer message to each of the slave controllers periodically at a predetermined time period.
[0013] According to another aspect of the present application, a management device for slave controller applications is provided, which is applied to a main controller of a vehicle, wherein the main controller includes a first application, and the device includes a first sending unit, a first determining unit, a processing unit, and a second sending unit, wherein the first sending unit is used to send a wake-up message to at least one slave controller and receive a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message; the first determining unit determines whether a second application is stored in the slave controller at least according to the type of the response message, and determines a source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information; the processing unit obtains the mapping information corresponding to the source address when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, and rewrites the first application according to the mapping information to obtain a target application, wherein the mapping information is the correspondence information between the slave controller and the target device controlled by the slave controller; the second sending unit is used to send the target application to the corresponding slave controller so that the corresponding slave controller executes the target application.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the controller application management methods.
[0015] According to another aspect of the present application, a processor is provided, wherein the processor is used to run a program, wherein the program executes any one of the controller application management methods when running.
[0016] According to another aspect of the present application, a management system for controller applications is provided, comprising a master controller and at least one slave controller, wherein the master controller is used to execute any one of the methods for managing controller applications; and the slave controller is communicatively connected to the master controller.
[0017] Applying the technical solution of the present application, in the method for managing controller applications, first, a wake-up message is sent to at least one slave controller, and a response message sent by each of the slave controllers is received, wherein the response message is a message generated in response to the wake-up message; then, at least according to the type of the response message, it is determined whether a second application is stored in the slave controller, and a source address of the slave controller is determined, wherein the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information, wherein the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller; then, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the mapping information corresponding to the source address is obtained, and the first application is rewritten according to the mapping information to obtain the target application; finally, the target application is sent to the corresponding slave controller so that the corresponding slave controller executes the target application. The method stores the first application in the main controller, determines whether the second application is stored in the slave controller at least based on the type of the response message, and determines the source address of the slave controller. When the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the first application is rewritten according to the mapping information corresponding to the source address to obtain the target application and send it to the slave controller, so that each of the slave controllers obtains the latest version of the application with a mapping relationship, avoids entering the corresponding application for each slave controller separately, thereby improving the efficiency of entering the application for each slave controller, and further solving the problem of low efficiency in controller application entry in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 A flowchart of a method for managing a controller application according to an embodiment of the present application is shown;
[0020] Figure 2 A flowchart of a device for managing a controller application according to an embodiment of the present application is shown;
[0021] Figure 3 A logic diagram of a method for managing a controller application according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0022] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0023] In order to enable those skilled in the art to better understand the solution of the present application, 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 only 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 creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] It should be understood that when an element (such as a layer, film, region, or substrate) is described as being "on" another element, the element may be directly on the other element, or there may be intermediate elements. Moreover, in the specification and claims, when an element is described as being "connected" to another element, the element may be "directly connected" to the other element, or "connected" to the other element through a third element.
[0026] As mentioned in the background technology, the controller application entry efficiency in the prior art is low. In order to solve the above problem, in a typical implementation of the present application, a controller application management method, device, computer-readable storage medium, processor and system are provided.
[0027] According to an embodiment of the present application, a method for managing a controller application is provided.
[0028] Figure 1 FIG. 1 is a flow chart of a method for managing a controller application according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0029] Step S101, sending a wake-up message to at least one slave controller, and receiving a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message;
[0030] Step S102, determining whether a second application is stored in the slave controller at least according to the type of the response message, and determining a source address of the slave controller, the source address being used to uniquely characterize the slave controller, the second application having the same function as the first application, and the second application having mapping information, the mapping information being corresponding relationship information between the slave controller and a target device controlled by the slave controller;
[0031] Step S103, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application;
[0032] Step S104, sending the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application.
[0033] In the above-mentioned controller application management method, first, a wake-up message is sent to at least one slave controller, and a response message sent by each of the above-mentioned slave controllers is received, the above-mentioned response message is a message generated in response to the above-mentioned wake-up message; then, at least according to the type of the above-mentioned response message, it is determined whether the above-mentioned slave controller stores a second application, and the source address of the above-mentioned slave controller is determined, the above-mentioned source address is used to uniquely characterize the above-mentioned slave controller, the above-mentioned second application has the same function as the above-mentioned first application, and the above-mentioned second application has mapping information, and the above-mentioned mapping information is the correspondence relationship information between the above-mentioned slave controller and the target device controlled by the above-mentioned slave controller; then, in the case that the above-mentioned second application is not stored in the above-mentioned slave controller or the version of the above-mentioned second application is inconsistent with the version of the above-mentioned first application, the above-mentioned mapping information corresponding to the above-mentioned source address is obtained, and the above-mentioned first application is rewritten according to the above-mentioned mapping information to obtain the target application; finally, the above-mentioned target application is sent to the corresponding above-mentioned slave controller, so that the corresponding above-mentioned slave controller executes the above-mentioned target application. The method stores the first application in the main controller, determines whether the second application is stored in the slave controller at least based on the type of the response message, and determines the source address of the slave controller. When the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the first application is rewritten according to the mapping information corresponding to the source address to obtain the target application and send it to the slave controller, so that each of the slave controllers obtains the latest version of the application with a mapping relationship, avoiding the need to enter the corresponding application for each slave controller separately, thereby improving the efficiency of entering the application for each slave controller, and further solving the problem of low efficiency in controller application entry in the prior art.
[0034] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] In practical applications, the vehicle may be a car, a bus, etc. The first application is stored in a flash (Flash EEPROM Memory) fixed in the master controller. The slave controller also includes an application and a Boot program for network management functions. The master controller and the slave controller may establish a communication connection through a CAN (Controller Area Network) bus, Bluetooth, etc., to facilitate fast and stable data transmission. The master controller and the slave controllers form a system that jointly completes a class of functions. The master controller and the slave controllers may be a vehicle gearbox controller, an oil pump controller, a battery pack controller, etc. For example, when the master controller and the slave controller are gearbox controllers, different slave controllers control gearboxes of different cylinders.
[0036] In a specific embodiment of the present application, the master controller has a flashing function, which flashes the target application into the slave controller, so that only the target application is retained in the slave controller.
[0037] In one embodiment of the present application, at least according to the type of the response message, determining whether the second application is stored in the slave controller and determining the source address of the slave controller includes: when the type of the response message is the first type, determining that the corresponding slave controller does not store the second application and the source address, addressing the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, the first type is used to indicate that the second application and the source address are not stored in the slave controller; when the type of the response message is the second type, determining that the corresponding slave controller stores the second application and the source address, and obtaining the source address corresponding to the corresponding slave controller, the second type is used to indicate that the second application and the source address are stored in the slave controller, and the response message of the second type includes the version of the second application of the corresponding slave controller and the source address. The type of the response message can quickly determine whether the corresponding slave controller has a source address and a second application. If there is no source address, the master controller creates a source address for the slave controller. If there is a source address, the source address is directly obtained. Therefore, the source address of each slave controller can be quickly obtained according to the type of the response message.
[0038] In order to enable a slave controller that does not store a source address to obtain a source address and confirm that the slave controller is in normal working condition, so that it can subsequently successfully receive the target application sent by the master controller, in an embodiment of the present application, after addressing the corresponding slave controller to obtain the corresponding source address of the slave controller, the method also includes: sending an addressed message to the corresponding slave controller, the addressed message including the source address; receiving a reply message to determine that the slave controller has received the addressed message.
[0039] In another embodiment of the present application, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the mapping information corresponding to the source address is obtained, and the first application is rewritten according to the mapping information to obtain the target application, including: when the second application is not stored in the slave controller, the mapping information corresponding to the source address is established; when the version of the second application is inconsistent with the version of the first application, the corresponding slave controller is determined according to the source address, and the mapping information stored in the corresponding slave controller is obtained; the mapping information is written into the first application to obtain the target application of the corresponding slave controller. The first application in the master controller is rewritten according to the mapping information, so that the second application corresponding to the slave controller can be obtained very conveniently and quickly.
[0040] In order to save program entry time and effectively save resources, when the version of the second application in the slave controller is consistent with the version of the first application, there is no need to re-enter it. In another embodiment of the present application, the above method also includes: when the version of the above second application is consistent with the version of the above first application, determining that the corresponding second application in the above slave controller is the above target application, so that the corresponding above slave controller executes the above target application.
[0041] In actual applications, after the target application is stored in the slave controller, the target application runs according to the slave control logic.
[0042] In another embodiment of the present application, after sending the target application to the corresponding slave controller, the method further includes: sending a question-and-answer message to each of the slave controllers, and receiving the response message sent by the slave controller, wherein the response message is a message generated in response to the question-and-answer message, and the response message is used to indicate that the slave controller is in an awake state. After the slave controllers all have the target application, the slave controllers respond to the question-and-answer message of the master controller through a response message, so that the master controller can confirm that the slave controllers are in an awake state.
[0043] In order to obtain the status of the slave controller in time, in another embodiment of the present application, question and answer messages are sent to each of the above-mentioned slave controllers, including: sending the above-mentioned question and answer messages to each of the above-mentioned slave controllers periodically at a predetermined time period.
[0044] The embodiment of the present application also provides a management device for a controller application. It should be noted that the management device for a controller application in the embodiment of the present application can be used to execute the management method for a controller application provided in the embodiment of the present application. The management device for a controller application provided in the embodiment of the present application is introduced below.
[0045] Figure 2 Schematic diagram of a management device for a controller application according to an embodiment of the present application. Figure 2 As shown, the device comprises:
[0046] A first sending unit 10, configured to send a wake-up message to at least one slave controller, and receive a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message;
[0047] The first determining unit 20 determines whether the slave controller stores a second application program at least according to the type of the response message, and determines a source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, the second application program has the same function as the first application program, and the second application program has mapping information;
[0048] The processing unit 30 obtains mapping information corresponding to the source address and rewrites the first application according to the mapping information to obtain a target application when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, wherein the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller;
[0049] The second sending unit 40 is used to send the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application.
[0050] In the management device of the controller application, a wake-up message is sent to at least one slave controller through the first sending unit, and a response message sent by each of the slave controllers is received, wherein the response message is a message generated in response to the wake-up message; the first determining unit is used to determine whether a second application is stored in the slave controller at least according to the type of the response message, and to determine the source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information, wherein the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller; the processing unit is used to obtain the mapping information corresponding to the source address when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, and the first application is rewritten according to the mapping information to obtain the target application; the target application is sent to the corresponding slave controller through the second sending unit, so that the corresponding slave controller executes the target application. In the device, the first application is stored in the main controller, and whether the second application is stored in the slave controller is determined at least according to the type of the response message, and the source address of the above-mentioned slave controller is determined. When the above-mentioned second application is not stored in the above-mentioned slave controller or the version of the above-mentioned second application is inconsistent with the version of the above-mentioned first application, the above-mentioned first application is rewritten according to the above-mentioned mapping information corresponding to the above-mentioned source address, and the target application is obtained and sent to the slave controller, so that each of the above-mentioned slave controllers obtains the latest version of the application with a mapping relationship, avoiding the need to enter the corresponding application for each slave controller separately, thereby improving the efficiency of entering the application for each slave controller, and further solving the problem of low efficiency in controller application entry in the prior art.
[0051] In practical applications, the vehicle may be a car, a bus, etc. The first application is stored in a flash (Flash EEPROM Memory) fixed in the master controller. The slave controller also includes an application and a Boot program for network management functions. The master controller and the slave controller may establish a communication connection through a CAN (Controller Area Network) bus, Bluetooth, etc., to facilitate fast and stable data transmission. The master controller and the slave controllers form a system that jointly completes a class of functions. The master controller and the slave controllers may be a vehicle gearbox controller, an oil pump controller, a battery pack controller, etc. For example, when the master controller and the slave controller are gearbox controllers, different slave controllers control gearboxes of different cylinders.
[0052] In a specific embodiment of the present application, the master controller has a flashing function, which flashes the target application into the slave controller, so that only the target application is retained in the slave controller.
[0053] In one embodiment of the present application, the first determination unit includes a first determination module and a second determination module, wherein the first determination module is used to determine that the corresponding slave controller does not store the second application and the source address when the type of the response message is the first type, address the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, and the first type is used to indicate that the second application and the source address are not stored in the slave controller; the second determination module is used to determine that the corresponding slave controller stores the second application and the source address when the type of the response message is the second type, and obtain the source address corresponding to the corresponding slave controller, and the second type is used to indicate that the second application and the source address are stored in the slave controller, and the response message of the second type includes the version of the second application of the corresponding slave controller and the source address. The type of the response message can quickly determine whether the corresponding slave controller has a source address and a second application. If there is no source address, the master controller creates a source address for the slave controller. If there is a source address, the source address is directly obtained. Therefore, the source address of each slave controller can be quickly obtained according to the type of the response message.
[0054] In order to enable a slave controller that does not store a source address to obtain the source address and confirm that the slave controller is in normal working condition, so that it can subsequently successfully receive the target application sent by the master controller, in an embodiment of the present application, the above-mentioned device also includes a third sending unit and a receiving unit, wherein the above-mentioned third sending unit is used to send an addressed message to the corresponding above-mentioned slave controller after addressing the corresponding above-mentioned slave controller and obtaining the above-mentioned source address corresponding to the above-mentioned slave controller, and the above-mentioned addressed message includes the above-mentioned source address; the above-mentioned receiving unit is used to receive a reply message to determine that the above-mentioned slave controller has received the above-mentioned addressed message.
[0055] In another embodiment of the present application, the processing unit includes an establishment module, a third determination module and a processing module, wherein the establishment module is used to establish the mapping information corresponding to the source address when the second application is not stored in the slave controller; the third determination module is used to determine the corresponding slave controller according to the source address when the version of the second application is inconsistent with the version of the first application, and obtain the mapping information stored in the corresponding slave controller; the processing module is used to write the mapping information into the first application to obtain the target application of the corresponding slave controller. The first application in the master controller is rewritten according to the mapping information, so that the second application corresponding to the slave controller can be obtained very conveniently and quickly.
[0056] In order to save program entry time and effectively save resources, when the version of the second application in the slave controller is consistent with the version of the first application, there is no need to re-enter it. In another embodiment of the present application, the above-mentioned device also includes a second determination unit, and the above-mentioned second determination unit is used to determine that the above-mentioned second application in the corresponding above-mentioned slave controller is the above-mentioned target application when the version of the above-mentioned second application is consistent with the version of the above-mentioned first application, so that the corresponding above-mentioned slave controller executes the above-mentioned target application.
[0057] In actual applications, after the target application is stored in the slave controller, the target application runs according to the slave control logic.
[0058] In another embodiment of the present application, the device further includes a fourth sending unit, which is used to send a question-and-answer message to each of the slave controllers after sending the target application to the corresponding slave controller, and receive the response message sent by the slave controller, wherein the response message is a message generated in response to the question-and-answer message, and the response message is used to indicate that the slave controller is in an awake state. After the slave controllers all have the target application, the slave controllers respond to the question-and-answer message of the master controller through a response message, so that the master controller can confirm that the slave controllers are in an awake state.
[0059] In order to obtain the status of the slave controller in a timely manner, in another embodiment of the present application, the fourth sending unit includes a sending module, and the sending module is used to periodically send the question-and-answer message to each of the slave controllers at a predetermined time period.
[0060] The management device of the above-mentioned controller application includes a processor and a memory. The above-mentioned first sending unit, the above-mentioned first determination unit, the above-mentioned processing unit and the above-mentioned second sending unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0061] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the problem of low efficiency of controller application program input in the prior art can be solved by adjusting kernel parameters.
[0062] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0063] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is running, a device where the computer-readable storage medium is located is controlled to execute a management method for the controller application.
[0064] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the program executes the management method of the controller application program when running.
[0065] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:
[0066] Step S101, sending a wake-up message to at least one slave controller, and receiving a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message;
[0067] Step S102, determining whether a second application is stored in the slave controller at least according to the type of the response message, and determining a source address of the slave controller, the source address being used to uniquely characterize the slave controller, the second application having the same function as the first application, and the second application having mapping information, the mapping information being corresponding relationship information between the slave controller and a target device controlled by the slave controller;
[0068] Step S103, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application;
[0069] Step S104, sending the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application.
[0070] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0071] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:
[0072] Step S101, sending a wake-up message to at least one slave controller, and receiving a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message;
[0073] Step S102, determining whether a second application is stored in the slave controller at least according to the type of the response message, and determining a source address of the slave controller, the source address being used to uniquely characterize the slave controller, the second application having the same function as the first application, and the second application having mapping information, the mapping information being corresponding relationship information between the slave controller and a target device controlled by the slave controller;
[0074] Step S103, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application;
[0075] Step S104, sending the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application.
[0076] According to another aspect of the present application, a management system for controller applications is provided, comprising a master controller and at least one slave controller, wherein the master controller is used to execute any one of the above-mentioned methods for managing controller applications; and the slave controller is communicatively connected to the master controller.
[0077] Figure 3 is a logic diagram of a method for managing a controller application according to an embodiment of the present application. Figure 3 To explain in detail:
[0078] The master controller sends a wake-up message to the slave controller;
[0079] determining whether a second application is stored in the slave controller;
[0080] In the case that the second application is not stored in the slave controller, the slave controller sends a first type of response message to the master controller;
[0081] The master controller addresses the slave controller that sends the first type of response message in binary format, obtains the corresponding source address of the slave controller, and sends the address message to the slave controller;
[0082] The slave controller sends a reply message in response to the addressed message to the master controller;
[0083] The main controller establishes mapping information corresponding to the source address;
[0084] The master controller writes the mapping information into the first application program, obtains the target application program of the corresponding slave controller, and sends it to the corresponding slave controller;
[0085] The master controller sends question-answer messages to each slave controller and receives response messages sent by the slave controller;
[0086] In case that the second application is stored in the slave controller, the slave controller sends a second type of response message to the master controller;
[0087] The main controller determines whether the second application stored in the slave controller is consistent with the first application stored in the main controller;
[0088] When the main controller determines that the second application program stored in the slave controller is inconsistent with the first application program in the main controller, the main controller obtains the mapping information stored in the corresponding slave controller according to the source address;
[0089] The master controller writes the mapping information into the first application program, obtains the target application program of the corresponding slave controller, and sends it to the corresponding slave controller;
[0090] When the master controller determines that the second application stored in the slave controller is consistent with the version of the first application in the master controller, the master controller determines the corresponding second application in the slave controller as the target application;
[0091] The master controller sends question-answer messages to each slave controller and receives response messages sent by the slave controller.
[0092] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0093] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0094] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0095] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0096] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0097] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0098] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0099] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0100] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0101] 1) In the controller application management method of the present application, first, a wake-up message is sent to at least one slave controller, and a response message sent by each of the above slave controllers is received, the above response message being a message generated in response to the above wake-up message; then, at least according to the type of the above response message, it is determined whether the above slave controller stores a second application, and the source address of the above slave controller is determined, the above source address is used to uniquely characterize the above slave controller, the above second application has the same function as the above first application, and the above second application has mapping information, the above mapping information is the correspondence relationship information between the above slave controller and the target device controlled by the above slave controller; then, in the case that the above second application is not stored in the above slave controller or the version of the above second application is inconsistent with the version of the above first application, the above mapping information corresponding to the above source address is obtained, and the above first application is rewritten according to the above mapping information to obtain the target application; finally, the above target application is sent to the corresponding above slave controller, so that the corresponding above slave controller executes the above target application. The method stores the first application in the main controller, determines whether the second application is stored in the slave controller at least based on the type of the response message, and determines the source address of the slave controller. When the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, the first application is rewritten according to the mapping information corresponding to the source address to obtain the target application and send it to the slave controller, so that each of the slave controllers obtains the latest version of the application with a mapping relationship, avoiding the need to enter the corresponding application for each slave controller separately, thereby improving the efficiency of entering the application for each slave controller, and further solving the problem of low efficiency in controller application entry in the prior art.
[0102] 2) In the controller application management device of the present application, a wake-up message is sent to at least one slave controller through the first sending unit, and a response message sent by each of the slave controllers is received, wherein the response message is a message generated in response to the wake-up message; the first determining unit is used to determine whether a second application is stored in the slave controller at least according to the type of the response message, and to determine the source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information, wherein the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller; the processing unit is used to obtain the mapping information corresponding to the source address when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, and the first application is rewritten according to the mapping information to obtain the target application; the second sending unit is used to send the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application. In the device, the first application is stored in the main controller, and whether the second application is stored in the slave controller is determined at least according to the type of the response message, and the source address of the above-mentioned slave controller is determined. When the above-mentioned second application is not stored in the above-mentioned slave controller or the version of the above-mentioned second application is inconsistent with the version of the above-mentioned first application, the above-mentioned first application is rewritten according to the above-mentioned mapping information corresponding to the above-mentioned source address, and the target application is obtained and sent to the slave controller, so that each of the above-mentioned slave controllers obtains the latest version of the application with a mapping relationship, avoiding the need to enter the corresponding application for each slave controller separately, thereby improving the efficiency of entering the application for each slave controller, and further solving the problem of low efficiency in controller application entry in the prior art.
[0103] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for managing controller applications, applied to a main controller of a vehicle, characterized in that: The main controller includes a first application program, and the method includes: Sending a wake-up message to at least one slave controller, and receiving a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message; At least according to the type of the response message, determine whether a second application is stored in the slave controller, and determine a source address of the slave controller, the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information, the mapping information is the correspondence relationship information between the slave controller and the target device controlled by the slave controller; In the case where the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application; The target application is sent to the corresponding slave controller so that the corresponding slave controller executes the target application.
2. The method according to claim 1, characterized in that Determining whether a second application is stored in the slave controller at least according to the type of the response message, and determining a source address of the slave controller, including: In the case where the type of the response message is the first type, determining that the corresponding slave controller does not store the second application and the source address, addressing the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, the first type being used to indicate that the slave controller does not store the second application and the source address; In the case where the type of the response message is the second type, it is determined that the second application and the source address are stored in the corresponding slave controller, and the source address corresponding to the corresponding slave controller is obtained. The second type is used to characterize that the second application and the source address are stored in the slave controller. The response message of the second type includes the version of the second application of the corresponding slave controller and the source address.
3. The method according to claim 2, characterized in that After addressing the corresponding slave controller to obtain the source address corresponding to the corresponding slave controller, the method further includes: Sending an addressed message to the corresponding slave controller, wherein the addressed message includes the source address; A reply message is received to determine whether the slave controller has received the addressed message.
4. The method according to claim 1, characterized in that: In a case where the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining the mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application, including: In a case where the second application is not stored in the slave controller, establishing the mapping information corresponding to the source address; In the case that the version of the second application is inconsistent with the version of the first application, determining the corresponding slave controller according to the source address, and acquiring the mapping information stored in the corresponding slave controller; The mapping information is written into the first application program to obtain the corresponding target application program of the slave controller.
5. The method according to claim 1, characterized in that The method further comprises: When the version of the second application is consistent with the version of the first application, the second application in the corresponding slave controller is determined to be the target application, so that the corresponding slave controller executes the target application.
6. The method according to any one of claims 1 to 5, characterized in that After sending the target application to the corresponding slave controller, the method further includes: Sending a question-and-answer message to each of the slave controllers, and receiving a response message sent by the slave controller, wherein the response message is a message generated in response to the question-and-answer message, and the response message is used to indicate that the slave controller is in an awake state.
7. The method according to claim 6, characterized in that Sending a question-answer message to each slave controller includes: The question-answer message is sent to each slave controller periodically at a predetermined time period.
8. A management device for slave controller applications, applied to a main controller of a vehicle, characterized in that: The main controller includes a first application program, and the device includes: A first sending unit, configured to send a wake-up message to at least one slave controller, and receive a response message sent by each of the slave controllers, wherein the response message is a message generated in response to the wake-up message; a first determining unit, at least according to the type of the response message, determining whether a second application is stored in the slave controller, and determining a source address of the slave controller, wherein the source address is used to uniquely characterize the slave controller, the second application has the same function as the first application, and the second application has mapping information; a processing unit, when the second application is not stored in the slave controller or the version of the second application is inconsistent with the version of the first application, obtaining mapping information corresponding to the source address, and rewriting the first application according to the mapping information to obtain a target application, wherein the mapping information is correspondence information between the slave controller and the target device controlled by the slave controller; The second sending unit is used to send the target application to the corresponding slave controller, so that the corresponding slave controller executes the target application.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method for managing controller applications according to any one of claims 1 to 7.
10. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the method for managing a controller application program according to any one of claims 1 to 7.
11. A management system for controller applications, characterized in that: include: A main controller, the main controller being used to execute the method for managing a controller application according to any one of claims 1 to 7; At least one slave controller is communicatively connected to the master controller.
Citation Information
Patent Citations
Method and apparatus for run-time in-memory patching of code from a service processor
CN101154187A
Software version loading method
CN104199702A