CN114020293A - Software updating method and device and electronic equipment - Google Patents

Software updating method and device and electronic equipment Download PDF

Info

Publication number
CN114020293A
CN114020293A CN202111287867.6A CN202111287867A CN114020293A CN 114020293 A CN114020293 A CN 114020293A CN 202111287867 A CN202111287867 A CN 202111287867A CN 114020293 A CN114020293 A CN 114020293A
Authority
CN
China
Prior art keywords
child node
software package
updated
update
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111287867.6A
Other languages
Chinese (zh)
Inventor
黄广炜
宋海军
邹旋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Zhitu Technology Co Ltd
Original Assignee
Suzhou Zhitu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Zhitu Technology Co Ltd filed Critical Suzhou Zhitu Technology Co Ltd
Priority to CN202111287867.6A priority Critical patent/CN114020293A/en
Publication of CN114020293A publication Critical patent/CN114020293A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Abstract

The invention provides a software updating method, a software updating device and electronic equipment, which are used for receiving updating data of a software package aiming at a child node, which is sent by a server; the updating data comprises: a software package of child node update version; checking the updated data to determine whether the updated data passes the check; and if the software package passes the verification, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node. In the mode, the main node of the domain controller is in communication connection with each sub-node respectively, and the software packages of all the sub-nodes to be updated can be updated according to the received update data, so that the software management of the server is simplified, and the development difficulty of the server is reduced.

Description

Software updating method and device and electronic equipment
Technical Field
The invention relates to the technical field of vehicle-mounted software updating, in particular to a software updating method, a device and electronic equipment.
Background
The electronic-electrical architecture of a conventional vehicle is distributed and comprises a plurality of single electronic control units, each having a function, i.e. corresponding to a software package. The large number of electronic control units makes it complicated to design the control logic of the vehicle. Moreover, under the electronic and electrical architecture of the traditional vehicle, each electronic control unit is respectively connected with the network of the whole vehicle, and when software in the vehicle needs to be upgraded, the software package of each electronic control unit needs to be upgraded, so that the management of the software package is complex, and the development difficulty of an upgrade server is increased; in addition, the software packages of all the electronic control units need to be upgraded in sequence according to a certain sequence, and the upgrading time is long.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a software updating method, device and electronic device, so as to simplify software management of a server and reduce development difficulty of the server.
In a first aspect, an embodiment of the present invention provides a software updating method, where the method is applied to a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; the method comprises the following steps: receiving update data of a software package aiming at child nodes, which is sent by a server; wherein updating the data comprises: a software package of child node update version; checking the updated data to determine whether the updated data passes the check; and if the software package passes the verification, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node.
Further, updating the data further includes: checking information of the child node and a json file of the child node; the step of checking the update data and determining whether the update data passes the check includes: decompressing the updated data to obtain a json file of the check information of the child node; if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification; and if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to the server.
Further, the step of checking the json file of the child node and judging whether the json file passes the checking comprises the following steps: analyzing the json file to obtain a child node analysis result; the analysis result comprises the following steps: the method comprises the following steps of (1) identifying the software package of a child node, the identifier of the child node, and the update version information and compatibility information of the software package of the update version of the child node; determining a target child node from at least one child node according to the name of the software package of the child node and the identifier of the child node; acquiring current version information of a software package of a target child node; judging whether the updated version information is compatible with the current version information or not according to the compatibility information; if so, judging that the json file passes the verification; if not, reporting the prompt information of the update error to the server.
Further, the step of sending the software package of the updated version of each child node to the corresponding child node respectively to update the software package of the current version of the child node includes: and parallelly transmitting the software package of the update version of each child node to the corresponding child node in a multithreading mode, so that the child node updates the software package of the current version according to the received software package of the update version.
Further, after the step of sending the software package of the updated version of each child node to the corresponding child node respectively to update the software package of the current version of the child node, the method further includes: acquiring version information of the updated software package of the child node; if the version information of the software package of the updated child node is consistent with the updating version information included in the updating data, the software updating operation is completed; and if the version information of the software package of the updated child node is inconsistent with the updated version information included in the updated data, reporting prompt information of update errors to the server.
Further, the update data is obtained by: generating a json file according to a software package of a child node to be updated in the domain controller through an update script of the server; calculating the verification information of the software package of the child node to be updated; and generating updating data according to the json file, the verification information and the software package of the updating version of the child node to be updated.
In a second aspect, an embodiment of the present invention provides a software updating apparatus, where the apparatus is disposed in a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; the device comprises: the receiving module is used for receiving the update data of the software package aiming at the child node, which is sent by the server; wherein updating the data comprises: a software package of child node update version; the verification module is used for verifying the updated data and determining whether the updated data passes the verification; and the updating module is used for respectively sending the software package of the updated version of each child node to the corresponding child node if the software package passes the verification so as to update the software package of the current version of the child node.
Further, updating the data further includes: checking information of the child node and a json file of the child node; the verification module is further configured to: decompressing the updated data to obtain a json file of the check information of the child node; if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification; and if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to the server.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to implement the software updating method in any one of the first aspect.
In a fourth aspect, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the software update method of any one of the first aspects.
The embodiment of the invention has the following beneficial effects:
the invention provides a software updating method, a software updating device and electronic equipment, which are used for receiving updating data of a software package aiming at a child node, which is sent by a server; the updating data comprises: a software package of child node update version; checking the updated data to determine whether the updated data passes the check; and if the software package passes the verification, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node. In the mode, the main node of the domain controller is in communication connection with each sub-node respectively, and the software packages of all the sub-nodes to be updated can be updated according to the received update data, so that the software management of the server is simplified, and the development difficulty of the server is reduced.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a software updating method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a specific software updating method according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a software updating apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The electronic-electrical architecture of the current conventional vehicle is distributed and comprises a plurality of single electronic control units, each having a function, i.e. corresponding to a software package. Typically, more than 100 electronic control units are used for a vehicle, and the large number of electronic control units makes it complicated to design the control logic of the vehicle. Each electronic control unit under the traditional electronic appliance architecture is directly connected with the network of the whole vehicle, each electronic control unit can be upgraded and updated independently, and the software of each electronic control unit can be managed independently. However, the whole vehicle has more electronic control units, each electronic control unit corresponds to one software package, the management of the software packages is complex, and the development difficulty of the server is increased. Based on this, the software updating method, the software updating device and the electronic device provided by the embodiment of the invention can be applied to a vehicle with a control function, and particularly can be applied to a domain controller of the vehicle.
In order to facilitate understanding of the present embodiment, a detailed description is first given of a software updating method disclosed in the present embodiment, where the method is applied to a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; the server may be an OTA (Over The Air ) server, as shown in fig. 1, The method includes The following steps:
step S102, receiving update data of a software package aiming at a child node sent by a server; wherein updating the data comprises: a software package of child node update version;
the child node may be a child node to be updated, or may be all child nodes in a domain. The update data comprises a software package of an update version of a child node to be updated in the domain controller, and can also comprise software packages of update versions of all child nodes in the domain controller; it will be appreciated that the update data for child nodes within the domain controller will be sent to the master node as a whole.
The generation process of the update data is realized through a server, and specifically, a json file is generated through the server according to a software package of a child node to be updated in the domain controller; calculating the verification information of the software package of the child node to be updated; and generating updating data according to the json file, the verification information and the software package of the updating version of the child node to be updated.
The json file includes a software package name of a child node to be updated, an Identity Document (Identity Document), update version information of the software package, compatibility information of the software version, and the like. When the method is actually realized, a script can be generated through updating data set in a server, and a json file is automatically generated according to a software package of a child node to be updated in a domain controller; and finally, compressing the json file, the verification information and the software package of the updated version of the child node to be updated through the update data generation script to generate the update data. And transmitting the generated update data to the master node of the domain controller through the network.
Step S104, checking the updated data to determine whether the updated data passes the check;
in order to determine that data related to the child node in the updated data, such as a data summary (or a message summary), a name of the child node, and the like, are consistent with information preset in the domain controller, and the situation of update errors is avoided. Firstly, after receiving the updated data, the main node decompresses the updated data, then determines whether the decompressed data is consistent with the information of the child nodes in the domain controller according to the decompression result, if so, determines that the updated data passes the verification, and executes the step S106; if the data are inconsistent, the update data are determined not to pass the verification, and an update error can be reported to the server.
And step S106, if the verification is passed, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node.
Specifically, the software package of the update version of each child node may be simultaneously sent to the corresponding child node according to the identifier of the child node, and the child node updates the current software package through the received software package to finally obtain the updated software.
The embodiment of the invention provides a software updating method, which comprises the steps of receiving updating data of a software package aiming at child nodes, which is sent by a server; the updating data comprises: a software package of child node update version; checking the updated data to determine whether the updated data passes the check; and if the software package passes the verification, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node. In the mode, the main node of the domain controller is in communication connection with each sub-node respectively, and the software packages of all the sub-nodes to be updated can be updated according to the received update data, so that the software management of the server is simplified, and the development difficulty of the server is reduced.
The present embodiment also provides another software updating method, which is implemented on the basis of the foregoing embodiments, and the present embodiment mainly describes a specific implementation process of a step of performing verification processing on update data, determining whether the update data passes through the verification (implemented in step 202 and step 204), and a specific implementation process of a step of sending a software package of an update version of each node to a corresponding child node respectively, so as to update a software package of a current version of the child node (implemented in step 205). The method specifically comprises the following steps:
step 201, receiving update data of a software package aiming at a child node, which is sent by a server; wherein updating the data comprises: a software package of child node update version;
the update data further includes: checking information of the child node and a json file of the child node; the verification information is usually calculated by an information summarization algorithm through an update data generation script of the server, and may be represented as md5 sum. The json file is a configurable json file, and a json file configuration mode can be specifically used, so that the software updating process can be configured, and the method is also suitable for expansion and compatibility of subsequent updating functions. For example, adding a certain function can be realized by adding a certain field, but the use of the original software updating function is not influenced.
Step 202, decompressing the updated data to obtain the check information and json file of the child node;
and after receiving the updated data, the main node decompresses the updated data to obtain verification information and a json file, firstly verifies the verification information, and then verifies the json file.
Step 203, if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification;
step 204, if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to a server;
the preset check information of the child node is usually generated in advance, is in the same mode as the check information generated by the server, and is obtained through an information summarization algorithm. During specific implementation, whether the verification information of the child node is consistent with the preset verification information of the child node or not can be compared, and if so, it is indicated that the received update data is not tampered. Then, in order to further determine whether the data content is wrong, the json file of the child node needs to be checked, and specifically, the json file of the received updated data and the related data of the child node of the domain controller may be compared to determine whether the json file passes the check.
If the update data is inconsistent with the update data, reporting error update prompt information to the server, wherein the error prompt information can be that the check information fails, so that the server regenerates the update data and then sends the update data to the master node.
One possible implementation:
(1) analyzing the json file to obtain a child node analysis result; the analysis result comprises the following steps: the method comprises the following steps of (1) identifying the software package of a child node, the identifier of the child node, and the update version information and compatibility information of the software package of the update version of the child node;
(2) determining a target child node from at least one child node according to the name of the software package of the child node and the identifier of the child node; acquiring current version information of a software package of a target child node;
(3) judging whether the updated version information is compatible with the current version information or not according to the compatibility information; if so, judging that the json file passes the verification; if not, reporting the prompt information of the update error to the server.
The json file comprises more related information of the child nodes, and the json file is firstly analyzed to obtain the names of the software packages of the child nodes, the identifiers of the child nodes, the update version information of the software packages of the update versions of the child nodes and the compatibility information. Then, according to the name of the software package of the child node and the identifier of the child node, a target child node which is the same as the name of the software package and the identifier of the child node is inquired from at least one child node included in the domain controller, and then the current version information of the software package of the target child node is inquired. The process master node can determine a plurality of corresponding target child nodes according to the names of the software packages of the child nodes and the identifiers of the child nodes, and simultaneously acquire the current version information of the software packages of the target child nodes.
In order to determine whether the current version information of the software package of the child node to be updated in the domain controller is inconsistent with the updated version information of the software package of the child node, and at the same time, whether the updated version information is compatible with the current version information. In the embodiment, whether the updated version information is compatible with the current version information is judged according to the compatibility information; if so, judging that the json file passes the verification, and indicating that the child node can be subjected to software updating; if not, reporting the prompt information of the update error to the server.
In step 205, if the verification is passed, the software package of the update version of each child node is transmitted to the corresponding child node in parallel in a multithreading manner, so that the child node updates the software package of the current version according to the received software package of the update version.
Specifically, the master node transmits the software package of the update version of each child node to the corresponding child node in parallel in a multithreading manner by using a plurality of communication manners, such as a CAN (Controller Area Network), an ethernet, an SPI (Serial Peripheral Interface), a master node local, and the like; and updating the software package of the current version by the child node according to the received software package of the updated version. In the method, the time consumption of upgrading can be effectively reduced by a parallel data transmission and upgrading method.
After the software package of each child node is updated, in order to further confirm that the software package of each child node is updated correctly, one possible implementation manner is as follows:
step 206, acquiring the version information of the updated software package of the child node;
step 207, if the version information of the updated software package of the child node is consistent with the update version information included in the update data, the software update operation is completed;
and step 208, reporting prompt information of update errors to the server if the version information of the updated software package of the child node is inconsistent with the update version information included in the update data.
And inquiring the version information of the updated software package of the child node in a query mode according to the node name and the node identifier of the child node. And comparing the version information of the software package of the updated child node with the updated version information included in the updated data, if the version information is consistent with the updated version information, finishing the updating of the software in the domain controller, and if the version information is inconsistent with the updated version information, reporting prompt information of update errors to the server, wherein the prompt information can include prompts of update version errors and the like, so that the server regenerates the updated data and sends the updated data to the master node.
In the mode, the updating of the software packages of all the child nodes in the domain can be managed through the updating data, the file structure in the data can be updated, and the software management complexity of the service is effectively reduced. The information of the software packages of all the child nodes is described through the json file, and the json file can be configured, so that the whole updating process can be configured, and the method is also suitable for expansion and compatibility of subsequent updating functions. For example, adding a certain function can be realized by adding a certain field, but the use of the original update function is not affected. And the time consumption of updating can be effectively reduced by upgrading each child node in the domain controller in a parallel mode.
Referring to a specific software updating method shown in fig. 2, an upgrade package corresponds to the update data, and first, a server generates a json file according to a software package of each child node by using an update data making script, where the file includes names of all node upgrade packages, node device IDs, software version information, compatibility information, and the like; and then, calculating md5sum of all the upgrade packages by using the update data making script, and compressing the software packages, json files and md5sum files of all the child nodes into a DCU upgrade package (corresponding to the update data). After the upgrade package is manufactured, the upgrade package is sent to a main node, the main node checks the upgrade package, firstly, the upgrade package is decompressed, and then whether the point comparison md5sum is consistent or not is judged; if the json files are consistent, the main node analyzes the json files and verifies the consistency of json file information of each upgrading packet domain; inquiring version information of each child node, and checking the compatibility of the upgrade package; and if the current version of the software package is consistent with the current version of the software package, performing data transmission and performing software flashing by the child node, namely sending the software package with the updated version to the child node so that the child node updates the current version.
And after the updating is finished, inquiring version information of the updated software package, if the version information is consistent with the preset updating version information, ending, and if the version information is inconsistent with the preset updating version information, reporting an error, namely sending error prompt information to the server.
Corresponding to the above method embodiment, the embodiment of the present invention provides a software updating apparatus, which is disposed in a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; as shown in fig. 3, the apparatus includes:
a receiving module 31, configured to receive update data of a software package for a child node sent by a server; wherein updating the data comprises: a software package of child node update version;
the checking module 32 is configured to perform checking processing on the updated data, and determine whether the updated data passes the checking;
and the updating module 33 is configured to, if the verification is passed, send the software package of the updated version of each child node to the corresponding child node, respectively, so as to update the software package of the current version of the child node.
The embodiment of the invention provides a software updating device, which receives updating data of a software package aiming at a child node, which is sent by a server; the updating data comprises: a software package of child node update version; checking the updated data to determine whether the updated data passes the check; and if the software package passes the verification, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node. In the mode, the main node of the domain controller is in communication connection with each sub-node respectively, and the software packages of all the sub-nodes to be updated can be updated according to the received update data, so that the software management of the server is simplified, and the development difficulty of the server is reduced.
Further, the update data further includes: checking information of the child node and a json file of the child node; the check module is further configured to: decompressing the updated data to obtain a json file of the check information of the child node; if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification; and if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to the server.
Further, the check module is further configured to: analyzing the json file to obtain a child node analysis result; the analysis result comprises the following steps: the method comprises the following steps of (1) identifying the software package of a child node, the identifier of the child node, and the update version information and compatibility information of the software package of the update version of the child node; determining a target child node from at least one child node according to the name of the software package of the child node and the identifier of the child node; acquiring current version information of a software package of a target child node; judging whether the updated version information is compatible with the current version information or not according to the compatibility information; if so, judging that the json file passes the verification; if not, reporting the prompt information of the update error to the server.
Further, the update module is further configured to: and parallelly transmitting the software package of the update version of each child node to the corresponding child node in a multithreading mode, so that the child node updates the software package of the current version according to the received software package of the update version.
Further, the apparatus further includes an update confirmation module, configured to: acquiring version information of the updated software package of the child node; if the version information of the software package of the updated child node is consistent with the updating version information included in the updating data, the software updating operation is completed; and if the version information of the software package of the updated child node is inconsistent with the updated version information included in the updated data, reporting prompt information of update errors to the server.
Further, the update data is obtained by: generating a json file according to a software package of a child node to be updated in the domain controller through an update script of the server; calculating the verification information of the software package of the child node to be updated; and generating updating data according to the json file, the verification information and the software package of the updating version of the child node to be updated.
The software updating device provided by the embodiment of the invention has the same technical characteristics as the software updating method provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment also provides an electronic device, which comprises a processor and a memory, wherein the memory stores machine executable instructions capable of being executed by the processor, and the processor executes the machine executable instructions to realize the software updating method.
Referring to fig. 4, the electronic device includes a processor 100 and a memory 101, the memory 101 stores machine executable instructions capable of being executed by the processor 100, and the processor 100 executes the machine executable instructions to implement the software updating method.
Further, the electronic device shown in fig. 4 further includes a bus 102 and a communication interface 103, and the processor 100, the communication interface 103, and the memory 101 are connected through the bus 102.
The Memory 101 may include a high-speed Random Access Memory (RAM) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, and the like can be used. The bus 102 may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 4, but that does not indicate only one bus or one type of bus.
Processor 100 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 100. The Processor 100 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the foregoing embodiment in combination with the hardware thereof.
Embodiments of the present invention also provide a machine-readable storage medium, in which machine-executable instructions are stored, and when the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the software updating method.
The software updating method, the software updating apparatus, and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementations may refer to the method embodiments and are not described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood in specific cases for those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A software update method, characterized in that the method is applied to a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; the method comprises the following steps:
receiving update data of the software package aiming at the child node sent by the server; wherein the update data comprises: a software package of an updated version of the child node;
checking the updated data to determine whether the updated data passes the check;
and if the verification is passed, respectively sending the software package of the updated version of each child node to the corresponding child node so as to update the software package of the current version of the child node.
2. The method of claim 1, wherein updating the data further comprises: the verification information of the child nodes and the json files of the child nodes;
the step of performing verification processing on the update data and determining whether the update data passes the verification includes:
decompressing the updated data to obtain the check information and the json file of the child node;
if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification;
and if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to the server.
3. The method of claim 2, wherein the step of checking the json file of the child node to determine whether the json file passes the check comprises:
analyzing the json file to obtain the analysis result of the child node; the analysis result comprises: the name of the software package of the child node, the identifier of the child node, and the update version information and the compatibility information of the software package of the update version of the child node;
determining a target child node from the at least one child node according to the name of the software package of the child node and the identifier of the child node; acquiring current version information of the software package of the target child node;
judging whether the updated version information is compatible with the current version information or not according to the compatibility information; if so, judging that the json file passes verification; and if not, reporting error updating prompt information to the server.
4. The method according to claim 1, wherein the step of sending the software package of the updated version of each child node to the corresponding child node respectively to update the software package of the current version of the child node comprises:
and parallelly transmitting the software package of the update version of each child node to the corresponding child node in a multithreading mode, so that the child node updates the software package of the current version according to the received software package of the update version.
5. The method according to claim 1, wherein after the step of sending the updated version of the software package of each child node to the corresponding child node respectively to update the current version of the software package of the child node, the method further comprises:
acquiring the updated version information of the software package of the child node;
if the updated version information of the software package of the child node is consistent with the updated version information included in the updated data, the software updating operation is completed;
and reporting prompt information of update errors to the server if the updated version information of the software package of the child node is inconsistent with the updated version information included in the updated data.
6. The method of claim 1, wherein the update data is obtained by:
generating a json file according to the software package of the child node to be updated in the domain controller through the updating script of the server;
calculating the verification information of the software package of the child node to be updated;
and generating the updating data according to the json file, the verification information and the software package of the updating version of the child node to be updated.
7. A software updating apparatus is characterized in that the apparatus is arranged at a master node of a domain controller; the domain controller includes at least one child node; the main node is respectively in communication connection with the server and the child nodes; each child node corresponds to a software package; the device comprises:
the receiving module is used for receiving the update data of the software package aiming at the child node, which is sent by the server; wherein the update data comprises: a software package of an updated version of the child node;
the checking module is used for checking the updated data and determining whether the updated data passes the checking;
and the updating module is used for respectively sending the software package of the updated version of each child node to the corresponding child node if the software package passes the verification so as to update the software package of the current version of the child node.
8. The apparatus of claim 7, wherein the update data further comprises: the verification information of the child nodes and the json files of the child nodes;
the verification module is further configured to: decompressing the updated data to obtain a json file of the check information of the child node; if the verification information of the child node is consistent with the preset verification information of the child node, verifying the json file of the child node, and judging whether the json file passes the verification; and if the verification information of the child node is inconsistent with the preset verification information of the child node, reporting error updating prompt information to the server.
9. An electronic device comprising a processor and a memory, the memory storing machine executable instructions executable by the processor, the processor executing the machine executable instructions to implement the software update method of any one of claims 1-6.
10. A machine-readable storage medium having stored thereon machine-executable instructions which, when invoked and executed by a processor, cause the processor to implement the software update method of any one of claims 1-6.
CN202111287867.6A 2021-11-02 2021-11-02 Software updating method and device and electronic equipment Pending CN114020293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111287867.6A CN114020293A (en) 2021-11-02 2021-11-02 Software updating method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111287867.6A CN114020293A (en) 2021-11-02 2021-11-02 Software updating method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN114020293A true CN114020293A (en) 2022-02-08

Family

ID=80059566

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111287867.6A Pending CN114020293A (en) 2021-11-02 2021-11-02 Software updating method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN114020293A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088913A (en) * 2023-04-11 2023-05-09 北京集度科技有限公司 Integrated device, method and computer program product for whole vehicle upgrade software

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116088913A (en) * 2023-04-11 2023-05-09 北京集度科技有限公司 Integrated device, method and computer program product for whole vehicle upgrade software
CN116088913B (en) * 2023-04-11 2023-06-13 北京集度科技有限公司 Integrated device, method and computer program product for whole vehicle upgrade software

Similar Documents

Publication Publication Date Title
CN107992321B (en) ECU software updating method and device, vehicle-mounted T-BOX and vehicle
CN113342371B (en) Internet of things equipment upgrading system
RU2015107724A (en) SYSTEM AND METHOD OF MANAGING A HOME GATEWAY USING THE INTELLIGENT TERMINAL
CN109658542B (en) Diagnostic parameter data verification method, diagnostic parameter data verification device, vehicle diagnostic equipment and storage medium
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
CN109729517B (en) Communication module software version management method and system
CN111634160A (en) Method for establishing communication connection with tire pressure monitoring system, device and electronic equipment thereof
CN112319146B (en) Learning method, device, sensor, system and medium of tire pressure monitoring system
CN113900682A (en) System software upgrading method, device, equipment and computer storage medium
CN114020293A (en) Software updating method and device and electronic equipment
CN112783541A (en) Equipment upgrading method and device and server
CN111949293A (en) Firmware upgrading method and device, computer equipment and storage medium
CN111522562B (en) Dishwasher software burning method, device and equipment thereof
CN110990046A (en) Upgrading method based on dynamic file
CN112131554A (en) Installation identification method and device of vehicle-mounted terminal and vehicle-mounted terminal
CN115827024A (en) Vehicle-mounted program updating method and system
CN110727456A (en) Method, device, equipment and system for downloading application program patch package
CN112925546B (en) Multistage verification method and system for preventing vehicle-mounted ECU from refreshing errors
CN114371855A (en) Upgrading method, system and device of vehicle automatic driving system and electronic equipment
CN112965735B (en) Model updating method, device, equipment and computer readable medium
CN111736917B (en) Data verification method and device, computer equipment and storage medium
CN115174660A (en) Service registration and discovery method, device, electronic equipment and storage medium
CN114691174A (en) Vehicle-mounted software upgrading method, device and equipment
CN114172714A (en) Account access authority control method and device and electronic equipment
CN110855526A (en) Method and device for detecting data source connection, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination