CN115016823B - Target software upgrading method, device, electronic equipment, medium and program product - Google Patents

Target software upgrading method, device, electronic equipment, medium and program product Download PDF

Info

Publication number
CN115016823B
CN115016823B CN202210947137.2A CN202210947137A CN115016823B CN 115016823 B CN115016823 B CN 115016823B CN 202210947137 A CN202210947137 A CN 202210947137A CN 115016823 B CN115016823 B CN 115016823B
Authority
CN
China
Prior art keywords
information
target
software
check
identifier
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.)
Active
Application number
CN202210947137.2A
Other languages
Chinese (zh)
Other versions
CN115016823A (en
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.)
Heduo Technology Guangzhou Co ltd
Original Assignee
HoloMatic Technology Beijing 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 HoloMatic Technology Beijing Co Ltd filed Critical HoloMatic Technology Beijing Co Ltd
Priority to CN202210947137.2A priority Critical patent/CN115016823B/en
Publication of CN115016823A publication Critical patent/CN115016823A/en
Application granted granted Critical
Publication of CN115016823B publication Critical patent/CN115016823B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the disclosure discloses a target software upgrading method, a target software upgrading device, an electronic device, a medium and a program product. One embodiment of the method comprises: acquiring a software identification information set; updating each piece of software identification information in the software identification information set to an Ethernet; in response to receiving subscription information for at least one piece of software identification information in the set of software identification information, generating a target software identification sequence based on the received subscription information; and performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software. The implementation mode can improve the efficiency of target software upgrading.

Description

Target software upgrading method, device, electronic equipment, medium and program product
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method, an apparatus, an electronic device, a medium, and a program product for upgrading target software.
Background
The target software upgrading method is one technology for upgrading target software. At present, when upgrading target software, the method generally adopted is as follows: first, the control unit erases the entire piece of flash data. And then, performing data writing operation on the whole flash memory by taking a frame as a unit for the software upgrading package data corresponding to the target software. Thus, the target software is upgraded.
However, the inventor finds that when the target software is upgraded in the above manner, the following technical problems often exist:
firstly, as the software upgrading frequency is higher and the flash memory data volume is larger and larger, the whole flash memory data is written in a flashing manner every time of upgrading, the time consumption is longer, and the target software upgrading efficiency is lower;
secondly, before the target software is upgraded, the verification of the data source safety is often easily ignored, or the verification process is too complex, so that the safety and efficiency of the target software upgrading are low;
thirdly, if the data transmission is interrupted due to power failure or network disconnection, the control unit needs to erase the whole flash memory data again, receive the whole software upgrading program package again by taking the frame as a unit and perform data writing operation on the whole flash memory by taking the frame as a unit, thereby resulting in lower efficiency of upgrading the target software.
The above information disclosed in this background section is only for enhancement of understanding of the background of the inventive concept and, therefore, it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art in this country.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose target software upgrade methods, apparatuses, electronic devices, media and program products to solve one or more of the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a target software upgrading method, including: acquiring a software identification information set; updating each piece of software identification information in the software identification information set to an Ethernet; in response to receiving subscription information for at least one piece of software identification information in the set of software identification information, generating a target software identification sequence based on the received subscription information; and performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software.
In a second aspect, some embodiments of the present disclosure provide a target software upgrade apparatus, the apparatus comprising: an acquisition unit configured to acquire a set of software identification information; an updating unit configured to update each piece of software identification information in the software identification information set to an ethernet; a generation unit configured to generate a target software identification sequence based on the received subscription information in response to receiving the subscription information for at least one piece of software identification information in the software identification information set; and the flash processing unit is configured to perform flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software.
In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device having one or more programs stored thereon, which when executed by one or more processors, cause the one or more processors to implement the method described in any of the implementations of the first aspect.
In a fourth aspect, some embodiments of the present disclosure provide a computer readable medium on which a computer program is stored, wherein the program, when executed by a processor, implements the method described in any of the implementations of the first aspect.
In a fifth aspect, some embodiments of the present disclosure provide a computer program product comprising a computer program that, when executed by a processor, implements the method described in any of the implementations of the first aspect.
The above embodiments of the present disclosure have the following beneficial effects: by the target software upgrading method of some embodiments of the present disclosure, the efficiency of upgrading target software can be improved. Specifically, the reasons for the inefficiency of upgrading the target software are: with the increasing frequency of software upgrading and the increasing amount of flash memory data, the whole flash memory data is written in a flashing manner during each upgrading, which takes longer time, and leads to the lower efficiency of target software upgrading. Based on this, the target software upgrading method of some embodiments of the present disclosure first obtains a software identification information set. And updating each piece of software identification information in the software identification information set to the Ethernet. Therefore, the identification information of each software can be sent to the Ethernet, so that the subsequent system chip can select the target software for upgrading. Secondly, in response to receiving subscription information for at least one piece of software identification information in the software identification information set, a target software identification sequence is generated based on the received subscription information. Therefore, the software sequence to be upgraded selected by the demander can be obtained. And finally, performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software. Therefore, the program storage partition data corresponding to each target software to be upgraded can be sequentially refreshed, time consumed for upgrading is shortened, and therefore the upgrading efficiency of the target software can be improved. Therefore, according to some target software upgrading methods disclosed by the disclosure, in each software upgrading process, only the program storage partition data corresponding to each software to be upgraded needs to be refreshed, and the whole flash memory data does not need to be refreshed. Thus, the time consumed for upgrading is shortened. Furthermore, the upgrading efficiency of the target software can be improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a flow diagram of some embodiments of a target software upgrade method according to the present disclosure;
FIG. 2 is a schematic block diagram of some embodiments of a target software upgrade apparatus according to the present disclosure;
FIG. 3 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates a flow 100 of some embodiments of a target software upgrade method according to the present disclosure. The target software upgrading method comprises the following steps:
step 101, acquiring a software identification information set.
In some embodiments, an execution subject (e.g., an MCU (micro controller Unit)) of the target software upgrading method may obtain the software identification information set by a wired connection manner or a wireless connection manner. The software identifier in the software identifier information set may be a software identifier sent by an SOC (System on Chip) through an ethernet. The software identifier may be a unique identifier for the software.
And step 102, updating each piece of software identification information in the software identification information set to the Ethernet.
In some embodiments, the execution subject may update each piece of software identification information in the set of software identification information to the ethernet network. Wherein, the executing agent may execute the following steps for each piece of software identification information in the software identification information set:
firstly, matching the software identification information with each piece of upgrading software information in a preset upgrading software information group to obtain state information. The preset upgrade software information group may be a set of identification information of each software on the ethernet. The upgrade software information in the preset upgrade software information group may include a software identifier. The status information may be used to characterize whether the software identification information is on the ethernet. The state information may include an updated state and an un-updated state. The updated state may characterize the software identification information on the ethernet network. The above-mentioned not-updated state may characterize that the software identification information is not on the ethernet. The software identification information and each piece of upgrade software information in a preset upgrade software information group can be matched through the following substeps to obtain state information:
the first substep is to determine whether the software identifier corresponding to the software identifier information is the same as the software identifier included in each piece of upgrade software information in the upgrade software information group.
And a second substep of determining the updated state as the state information in response to determining that the software identifier corresponding to the software identifier information is the same as the software identifier included in at least one piece of upgrade software information in the upgrade software information set.
And a third substep of determining an un-updated state as state information in response to determining that the software identifier corresponding to the software identifier information is different from the software identifier included in each piece of upgrade software information in the upgrade software information set.
And secondly, responding to the condition information which is determined to be in an un-updated state, and sending the software identification information to the Ethernet.
Step 103, in response to receiving subscription information for at least one piece of software identification information in the software identification information set, generating a target software identification sequence based on the received subscription information.
In some embodiments, the execution subject may generate the target software identification sequence based on the received subscription information in various ways in response to receiving the subscription information for at least one piece of software identification information in the software identification information set. The subscription information may be a software identifier of the software to be upgraded, which is sent by the SOC.
In some optional implementations of some embodiments, the executing body may generate the target software identification sequence based on the received subscription information in response to receiving subscription information for at least one piece of software identification information in the software identification information set. The following steps may be specifically performed:
first, target subscription information is generated based on the received subscription information. The target subscription information may include a target verification identifier group, a target software identifier group, and check byte information. The target parity check identifier in the target parity check identifier group may be byte-coded. The byte encoding may be hexadecimal encoding. The target software identifier in the target software identifier group may be a byte code uniquely identifying the software. The corresponding relationship between the target verification identifier in the target verification identifier group and the target software identifier in the target software identifier group may be one-to-one. The check byte information may be a check code for error detection of data transmission. The target subscription information may be generated based on the received subscription information in various ways.
In some optional implementations of some embodiments, the subscription information may include a check identification byte group, a software identification byte group, and check byte information. The check byte information may include a high-order check byte and a low-order check byte. The check identification byte in the check identification byte group may correspond to the software identification byte in the software identification byte group one by one. The check identification byte in the check identification byte group may be a byte code obtained by encrypting the corresponding software identification byte. The software identification byte in the software identification byte group may be a byte code for uniquely identifying the software. The high-order check byte may be the first 8 bits of the check code. The lower check byte may be the last 8 bits of the check code. The execution subject may generate target subscription information based on the subscription information. The method specifically comprises the following steps:
firstly, determining the decimal value of the high-order check byte as a high-order numerical value. The high-order value can be used to characterize the first 8 bits of the check code.
And secondly, determining the decimal value of the lower check byte as a lower numerical value. The low-order value can be used to represent the last 8 bits of the check code.
And thirdly, circularly right shifting high-order digital bits of each check identification byte in the check identification byte group to generate a target check identification byte, so as to obtain the target check identification byte group. The target check identification byte in the target check identification byte group may be a hexadecimal code obtained by circularly right-shifting the corresponding check identification byte.
And fourthly, determining a target verification identifier corresponding to each target verification identifier byte in the target verification identifier byte group based on a preset decryption table to obtain the target verification identifier group. The predetermined decryption table may determine the plaintext byte codes by using the rows and columns corresponding to the ciphertext byte codes. The above ciphertext byte encoding may be hexadecimal encoding of a single byte. The line corresponding to the above-mentioned ciphertext byte code may be a hexadecimal value corresponding to the upper 4 bits of the ciphertext byte code. The column corresponding to the above-mentioned ciphertext byte code may be a hexadecimal value corresponding to the lower 4 bits of the ciphertext byte code. The plain-text byte encoding described above may be a single byte hexadecimal encoding.
And fifthly, circularly left-shifting each software identification byte in the software identification byte group by a low-order numerical value bit to generate a target software identification, so as to obtain a target software identification group.
And sixthly, determining the target verification identifier group, the target software identifier group and the check byte information as target subscription information.
And secondly, matching each target verification identifier in the target verification identifier group with the corresponding target software identifier in the target software identifier group to obtain first verification information. The first verification information may be matching success information or matching failure information. The matching success information can represent the matching success. The matching failure information may characterize a matching failure. The following substeps may be specifically performed:
the first substep is to determine whether each target verification identifier in the target verification identifier group is the same as the corresponding target software identifier in the target software identifier group.
And a second substep of determining matching failure information as first verification information if at least one target verification identifier in the target verification identifier group is different from a corresponding target software identifier in the target software identifier group.
And a third substep of determining matching success information as first checking information if each target checking identifier in the target checking identifier group is the same as the corresponding target software identifier in the target software identifier group.
As an example, the matching success information may be "matching success". The matching failure information may be "matching failure".
And thirdly, in response to the fact that the first check information meets a first preset check condition, carrying out transmission check processing on the target software identification group based on the check byte information to obtain second check information. The first preset verification condition may be that the first verification information is matching success information. The second check information may be transmission error-free information or transmission error information. The transmission error-free information can represent that data transmission is error-free. The transmission error information may characterize a data transmission error. The target software identification group may be subjected to transmission check processing based on the check byte information by a cyclic redundancy check method, so as to obtain second check information.
And fourthly, in response to the fact that the second checking information meets a second preset checking condition, generating third checking information based on the target software identification group and the software identification information set. The second predetermined verification condition may be that the second verification information is transmission error-free information. The third verification information may be identification matching success information or identification matching failure information. The identifier matching success information may be used to represent that each target software identifier in the target software identifier group is the same as the software identifier corresponding to each piece of software identifier information in the software identifier information set. The identifier matching failure information may be used to characterize that the target software identifier in the target software identifier group is different from the software identifiers included in the software identifier information sets. The execution main body may generate the third verification information based on the target software identification group and the software identification information set in various manners.
In some optional implementations of some embodiments, each piece of software identification information in the set of software identification information may include a software identification. In response to determining that the second verification information satisfies a second preset verification condition, the execution subject may generate third verification information based on the target software identification group and the software identification information set by:
first, matching each target software identifier in the target software identifier group with the software identifier included in each piece of software identifier information in the software identifier information set to obtain third verification information. The following substeps may be specifically performed:
the first substep, determine each target software label in the above-mentioned target software label group and the software label that each software label information includes in the above-mentioned software label information set are the same.
And a second substep of determining the identifier matching failure information as third verification information if at least one target software identifier in the target software identifier group is different from the software identifiers included in the software identifier information sets.
And a third substep of determining the successful identifier matching information as third verification information if each target software identifier in the target software identifier group is the same as the software identifier included in each piece of software identifier information in the software identifier information set.
And fifthly, in response to the fact that the third verification information meets a third preset verification condition, sequencing the target software identifiers in the target software identifier group to obtain a target software identifier sequence. The third preset verification condition may be that the third verification information is identification matching success information. The target software identification sequence may be a sequence obtained by arranging the target software identifications in the target software identification group from small to large. The target software identifiers in the target software identifier group can be sequenced through a preset sequencing algorithm, so that a target software identifier sequence is obtained.
As an example, the preset ranking algorithm may include, but is not limited to, at least one of the following: bubble ordering, insert ordering, hill ordering, and the like.
Optionally, the subscription information may be generated as follows:
firstly, determining a software identifier corresponding to each software to be upgraded as an upgraded software identifier group. The upgrading software identifier in the upgrading software identifier group can uniquely identify the software to be upgraded. The software to be upgraded may be software corresponding to the upgrade package. The upgrade package may be a collection of program code.
And secondly, determining check byte information aiming at the upgrade software identification group. Check byte information can be generated aiming at the upgrading software identification group by a cyclic redundancy check method.
And thirdly, determining the upgrading software verification identifiers corresponding to the upgrading software identifiers in the upgrading software identifier group based on a preset encryption table to obtain the upgrading software verification identifier group. The preset encryption table may determine the ciphertext byte encoding by the row and the column corresponding to the plaintext byte encoding. The line corresponding to the plaintext byte code may be a hexadecimal value corresponding to the upper 4 bits of the plaintext byte code. The column corresponding to the plaintext byte code may be a hexadecimal value corresponding to the lower 4 bits of the plaintext byte code. The upgrade software check identifier in the upgrade software check identifier group may be a ciphertext byte code corresponding to the upgrade software identifier.
And fourthly, determining the decimal value of the high-order check byte included in the check byte information as a target high-order numerical value. The target high-order value may be used to represent the first 8 bits of the check code.
And fifthly, determining the decimal value of the lower check byte included in the check byte information as the target lower digit value. The target low-order value can be used to represent the last 8 bits of the check code.
And sixthly, circularly leftwards shifting the high-order numerical value bit of each upgrading software verification identifier in the upgrading software verification identifier group to generate verification identifier bytes, and obtaining a verification identifier byte group.
And seventhly, circularly right shifting each upgrading software identifier in the upgrading software identifier group by a target low-order value bit to generate a software identifier byte, and obtaining a software identifier byte group.
And eighthly, determining the check identification byte group, the software identification byte group and the check byte information as subscription information.
The steps of generating the subscription information and the target subscription information and the related content thereof are used as an invention point of the embodiment of the disclosure, and the technical problem mentioned in the background art is solved, namely, before the target software is upgraded, the verification on the security of the data source is often neglected easily, or the verification process is too complex, so that the security and the efficiency of the target software upgrading are low. The problem that the target software upgrade is low in safety or efficiency is often as follows: before the target software is upgraded, the verification on the security of the data source is easy to be ignored or the verification process is too complicated, so that the security and efficiency of the target software upgrade are low. If the problems are solved, the effect of improving the upgrading safety and efficiency of the target software can be achieved. To achieve this effect, the present disclosure obtains the subscription information by encrypting data from the SOC. Then, the target subscription information is obtained by reversely decrypting the subscription information. And finally, matching the target verification identifier group and the target software identifier group included in the target subscription information to complete verification of data source security. Thus, the safety of the target software upgrading can be improved. In addition, the encryption and decryption process combining cyclic shift and table lookup adopted by the method is shorter in time consumption compared with other complex security verification methods, and therefore the upgrading efficiency of the target software can be improved.
And 104, performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software.
In some embodiments, the execution subject may perform a flash process on program storage partition data corresponding to each target software identifier in the target software identifier sequence, so as to upgrade the target software. The relationship between each target software identifier in the target software identifier sequence and the program storage partition may be one-to-one. The program memory partitions may be partially contiguous physical addresses on the memory. The memory may include a flash memory. The program memory partition data may be data stored in a program memory partition. The target software may be MCU software. And performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence through a preset flash processing interface so as to upgrade the target software.
As an example, the preset flush processing interface may be an OBD (On-Board Diagnostics) interface.
In some optional implementation manners of some embodiments, the execution main body may perform a flash process on program storage partition data corresponding to each target software identifier in the target software identifier sequence, so as to upgrade the target software. For each target software identification in the sequence of target software identifications, the following steps may be performed:
in a first step, in response to not detecting a write-through operation to the memory, an atomic program upgrade information sequence is obtained. The atomic program upgrade information in the atomic program upgrade information sequence may be information required for performing the flash processing on the atomic program of the same software. The atomic program may be a partial software program code obtained by dividing a software program code into functions. The atomic program upgrade information in the atomic program upgrade information sequence may include an upgrade package identifier. The upgrade package identifier may be a unique identifier for the upgrade package. The relationship between each atomic program upgrade information in the atomic program upgrade information sequence and the program storage partition data may be in a one-to-one correspondence.
And secondly, performing flash processing on program storage partition data corresponding to each atomic program upgrading information in the atomic program upgrading information sequence. And performing flash processing on the program storage partition data corresponding to each atomic program upgrading information in the atomic program upgrading information sequence through the preset flash processing interface.
In some optional implementations of some embodiments, each atomic program upgrade information in the above atomic program upgrade information sequence may include an upgrade package identification, a flash start address, and a flash length. The flash start address may be a first physical address to be flashed. The length of the flash may be the number of consecutive physical addresses. The execution main body may perform flash processing on program storage partition data corresponding to each atomic program upgrade information in the atomic program upgrade information sequence. Specifically, the following steps can be performed:
the first step, based on the initial counter, for each atom program upgrade information in the atom program upgrade information sequence, executing the following substeps:
and a first substep of acquiring a target upgrade package based on the upgrade package identifier. The target upgrade package may be an upgrade package corresponding to the upgrade package identifier. Firstly, the upgrading program package identification is sent to the SOC, so that the SOC can search the upgrading program package corresponding to the upgrading program package identification. And secondly, receiving an upgrading program package corresponding to the upgrading program package identification. Wherein the upgrade package may be sent by the SOC.
And a second substep, performing a flash process on the program storage partition data corresponding to the atomic program upgrade information based on the target upgrade package, the flash start address and the flash length, and adding 1 to the value of the initial counter to obtain a target counter. The initial counter may be a counter with an initial value of 0. The target counter may be a counter whose initial value is 1.
Optionally, the executing body may further execute the following steps:
and step one, in response to the fact that the target upgrading program package is determined to be failed to be obtained, determining the value of the target counter as the number of the completed atomic program upgrading steps. The number of upgrading stages of the completed atomic program may be the number of upgraded atomic programs.
And secondly, generating a residual atomic program upgrading information sequence based on the completed atomic program upgrading number and the atomic program upgrading information sequence. The remaining atomic program upgrade information in the remaining atomic program upgrade information sequence may be information required for performing a flash process on an atomic program that is not upgraded. The remaining atomic program upgrade information in the above remaining atomic program upgrade information sequence may include an upgrade package identifier, a flash start address, and a flash length. The atomic program upgrade information sequence may be deleted from a first position of the atomic program upgrade information sequence, and the atomic program upgrade information sequence may be deleted.
And thirdly, performing flash processing on the program storage partition data corresponding to each piece of residual atomic program upgrading information in the residual atomic program upgrading information sequence. Specifically, the following steps may be performed:
a first sub-step of, based on a first counter, executing the following steps for each remaining atomic program upgrade information in the above remaining atomic program upgrade information sequence:
and a first sub-step of acquiring a target upgrading program package based on the upgrading program package identification included in the residual atomic program upgrading information. Firstly, the upgrading program package identification included in the residual atomic program upgrading information is sent to the SOC. And secondly, receiving an upgrading program package corresponding to the upgrading program package identification included in the residual atomic program upgrading information as a target upgrading program package. Wherein the upgrade package may be sent by the SOC.
And a second sub-step, based on the target upgrade program package, the flash start address and the flash length, performing flash processing on the program storage partition data corresponding to the residual atomic program upgrade information, and adding 1 to the value of the first counter to obtain a target counter. The first counter may be a counter with a value of 0. And performing, by the preset flush processing interface, flush processing on the program storage partition data corresponding to the remaining atomic program upgrade information based on the target upgrade program package, the flush start address, and the flush length, and adding 1 to the value of the first counter to obtain a target counter.
The above processing steps and related contents of the failure of obtaining the target upgrade package are used as an invention point of the embodiment of the present disclosure, and the technical problems mentioned in the background art are solved, namely, if the power failure or the network failure causes the data transmission to be interrupted, the control unit needs to erase the whole flash memory data again, receive the whole software upgrade package by taking the frame as a unit again, and perform the data writing operation on the whole flash memory by taking the frame as a unit, thereby causing the target software upgrade efficiency to be low. ". The problem that the upgrading efficiency of the target software is low is often as follows: if the data transmission is interrupted due to power failure or network disconnection, the control unit needs to erase the whole flash memory data again, receive the whole software upgrading program package by taking the frame as a unit again and perform data writing operation on the whole flash memory by taking the frame as a unit, thereby causing the target software upgrading efficiency to be lower. If the problems are solved, the effect of improving the upgrading efficiency of the target software can be achieved. In order to achieve this effect, the present disclosure may count each atomic upgrade program that has been upgraded through a counter, and determine each atomic upgrade program to be upgraded that remains. And then, performing flash processing on program storage partition data corresponding to each atom upgrading program to be upgraded to finish the upgrading of the target software. Thus, the target software upgrading efficiency can be improved.
The above embodiments of the present disclosure have the following advantages: by the target software upgrading method of some embodiments of the present disclosure, the efficiency of upgrading target software can be improved. Specifically, the reasons for the inefficiency of upgrading the target software are: with the increasing frequency of software upgrading and the increasing amount of flash memory data, the whole flash memory data is written in a flashing manner during each upgrading, which takes longer time, and leads to the lower efficiency of target software upgrading. Based on this, the target software upgrading method of some embodiments of the present disclosure first obtains a software identification information set. And updating each piece of software identification information in the software identification information set to the Ethernet. Therefore, the identification information of each software can be sent to the Ethernet, so that the subsequent system chip can select the target software for upgrading. Secondly, in response to receiving subscription information for at least one piece of software identification information in the software identification information set, a target software identification sequence is generated based on the received subscription information. Therefore, the software sequence to be upgraded selected by the demand side can be obtained. And finally, performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software. Therefore, the program storage partition data corresponding to each target software to be upgraded can be sequentially refreshed, time consumed for upgrading is shortened, and therefore the upgrading efficiency of the target software can be improved. Therefore, according to some target software upgrading methods disclosed by the disclosure, when software is upgraded every time, only the program storage partition data corresponding to each software to be upgraded needs to be refreshed, and the flash memory data of the whole piece does not need to be refreshed. Thus, the time consumed for upgrading is shortened. Further, the target software upgrading efficiency can be improved.
With further reference to fig. 2, as an implementation of the methods illustrated in the above figures, the present disclosure provides some embodiments of a target software upgrade apparatus, which correspond to those method embodiments illustrated in fig. 1, and which may be applied in various electronic devices in particular.
As shown in FIG. 2, the target software upgrade apparatus 200 of some embodiments includes: an acquisition unit 201, an update unit 202, a generation unit 203, and a flash processing unit 204. Wherein the acquisition unit is configured to acquire the software identification information set; an updating unit configured to update each piece of software identification information in the set of software identification information to an ethernet network; a generation unit configured to generate a target software identification sequence based on the received subscription information in response to receiving subscription information for at least one piece of software identification information in the software identification information set; and the flash processing unit is configured to perform flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software.
It will be understood that the units described in the apparatus 200 correspond to the various steps in the method described with reference to fig. 1. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 200 and the units included therein, and are not described herein again.
With further reference to fig. 3, a schematic structural diagram of an electronic device 300 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device 300 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 301 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 302 or a program loaded from a storage means 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, or the like; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device 300 to communicate with other devices, wireless or wired, to exchange data. While fig. 3 illustrates an electronic device 300 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 3 may represent one device or may represent multiple devices, as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. The computer program, when executed by the processing apparatus 301, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the apparatus; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring a software identification information set; updating each piece of software identification information in the software identification information set to an Ethernet; in response to receiving subscription information for at least one piece of software identification information in the software identification information set, generating a target software identification sequence based on the received subscription information; and performing flash processing on the program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, an update unit, a generation unit, and a flash processing unit. The names of these units do not in some cases constitute a limitation on the units themselves, and for example, the acquiring unit may also be described as a "unit that acquires a set of software identification information".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems on a chip (SOCs), complex Programmable Logic Devices (CPLDs), and the like.
Some embodiments of the present disclosure also provide a computer program product comprising a computer program which, when executed by a processor, implements any of the above-described target software upgrade methods.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combinations of the above-mentioned features, and other embodiments in which the above-mentioned features or their equivalents are combined arbitrarily without departing from the spirit of the invention are also encompassed. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (8)

1. A target software upgrade method, comprising:
acquiring a software identification information set;
updating each piece of software identification information in the software identification information set to an Ethernet;
in response to receiving subscription information for at least one software identification information in the set of software identification information, generating a target software identification sequence based on the received subscription information;
performing flash processing on program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software;
wherein the generating a target software identification sequence based on the received subscription information comprises:
generating target subscription information based on the received subscription information, wherein the target subscription information comprises a target verification identifier group, a target software identifier group and verification byte information;
matching each target verification identifier in the target verification identifier group with the corresponding target software identifier in the target software identifier group to obtain first verification information;
in response to the fact that the first check information meets a first preset check condition, transmission check processing is carried out on the target software identification group on the basis of the check byte information to obtain second check information;
in response to determining that the second check-up information satisfies a second preset check-up condition, generating third check-up information based on the target software identification group and the software identification information set;
in response to determining that the third verification information meets a third preset verification condition, sequencing the target software identifiers in the target software identifier group to obtain a target software identifier sequence;
the subscription information comprises a check identification byte group, a software identification byte group and check byte information, wherein the check byte information comprises high-order check bytes and low-order check bytes; and
generating target subscription information based on the received subscription information, comprising:
determining a decimal value of the high-order check byte as a high-order numerical value;
determining a decimal value of the lower check byte as a lower numerical value;
circularly right-shifting each check identification byte in the check identification byte group by high-order digital bits to generate a target check identification byte, so as to obtain a target check identification byte group;
determining a target verification identifier corresponding to each target verification identifier byte in the target verification identifier byte group based on a preset decryption table to obtain a target verification identifier group;
circularly left-shifting each software identification byte in the software identification byte group by a low-order numerical value bit to generate a target software identification to obtain a target software identification group;
and determining the target check identification group, the target software identification group and the check byte information as target subscription information.
2. The method of claim 1, wherein each software identification information in the set of software identification information comprises a software identification; and
generating third verification information based on the target software identification group and the software identification information set, including:
and matching each target software identifier in the target software identifier group with the software identifier included in each piece of software identifier information in the software identifier information set to obtain third verification information.
3. The method according to claim 1, wherein performing a flash process on the program storage partition data corresponding to each target software identifier in the sequence of target software identifiers comprises:
for each target software identification in the sequence of target software identifications, performing the steps of:
in response to not detecting a flash operation for the memory, obtaining an atomic program upgrade information sequence;
and performing flash processing on program storage partition data corresponding to each atomic program upgrading information in the atomic program upgrading information sequence.
4. The method of claim 3, wherein each atomic program upgrade information in the sequence of atomic program upgrade information includes an upgrade package identification, a flash start address, and a flash length; and
the flashing processing of the program storage partition data corresponding to each atomic program upgrading information in the atomic program upgrading information sequence includes:
based on the initial counter, for each atomic program upgrade information in the sequence of atomic program upgrade information, performing the following steps:
acquiring a target upgrading program package based on the upgrading program package identification;
and based on the target upgrading program package, the flashing starting address and the flashing length, carrying out flashing processing on the program storage partition data corresponding to the atomic program upgrading information, and adding 1 to the value of the initial counter to obtain a target counter.
5. The method of claim 4, wherein the method further comprises:
determining the value of the target counter as the number of completed atomic program upgrade stages in response to determining that the target upgrade package fails to acquire;
generating a residual atomic program upgrading information sequence based on the completed atomic program upgrading number and the atomic program upgrading information sequence;
and performing flash processing on the program storage partition data corresponding to each piece of residual atomic program upgrading information in the residual atomic program upgrading information sequence.
6. A target software upgrade apparatus comprising:
an acquisition unit configured to acquire a set of software identification information;
an updating unit configured to update each piece of software identification information in the set of software identification information to an ethernet;
a generation unit configured to generate a target software identification sequence based on the received subscription information in response to receiving the subscription information for at least one piece of software identification information in the set of software identification information;
the flash processing unit is configured to perform flash processing on program storage partition data corresponding to each target software identifier in the target software identifier sequence so as to upgrade the target software;
wherein the generating a target software identification sequence based on the received subscription information comprises:
generating target subscription information based on the received subscription information, wherein the target subscription information comprises a target verification identifier group, a target software identifier group and verification byte information;
matching each target verification identifier in the target verification identifier group with the corresponding target software identifier in the target software identifier group to obtain first verification information;
in response to the fact that the first check information meets a first preset check condition, transmission check processing is carried out on the target software identification group based on the check byte information, and second check information is obtained;
generating third verification information based on the target software identification group and the software identification information set in response to determining that the second verification information meets a second preset verification condition;
in response to determining that the third verification information meets a third preset verification condition, sequencing the target software identifiers in the target software identifier group to obtain a target software identifier sequence;
the subscription information comprises a check identification byte group, a software identification byte group and check byte information, wherein the check byte information comprises high-order check bytes and low-order check bytes; and
generating target subscription information based on the received subscription information, comprising:
determining the decimal value of the high-order check byte as a high-order numerical value;
determining a decimal value of the lower check byte as a lower numerical value;
circularly right-shifting each check identification byte in the check identification byte group by high-order digital bits to generate a target check identification byte, so as to obtain a target check identification byte group;
determining a target verification identifier corresponding to each target verification identifier byte in the target verification identifier byte group based on a preset decryption table to obtain a target verification identifier group;
circularly left-shifting low-order-value bit positions of each software identification byte in the software identification byte group to generate a target software identification to obtain a target software identification group;
and determining the target check identification group, the target software identification group and the check byte information as target subscription information.
7. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-5.
8. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-5.
CN202210947137.2A 2022-08-09 2022-08-09 Target software upgrading method, device, electronic equipment, medium and program product Active CN115016823B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210947137.2A CN115016823B (en) 2022-08-09 2022-08-09 Target software upgrading method, device, electronic equipment, medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210947137.2A CN115016823B (en) 2022-08-09 2022-08-09 Target software upgrading method, device, electronic equipment, medium and program product

Publications (2)

Publication Number Publication Date
CN115016823A CN115016823A (en) 2022-09-06
CN115016823B true CN115016823B (en) 2022-11-11

Family

ID=83065232

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210947137.2A Active CN115016823B (en) 2022-08-09 2022-08-09 Target software upgrading method, device, electronic equipment, medium and program product

Country Status (1)

Country Link
CN (1) CN115016823B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024087234A1 (en) * 2022-10-29 2024-05-02 华为技术有限公司 Method and apparatus for updating software, and intelligent device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597174A (en) * 2020-08-27 2021-04-02 禾多科技(北京)有限公司 Map updating method and device, electronic equipment and computer readable medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103546809B (en) * 2012-07-13 2018-02-13 中兴通讯股份有限公司 The method for upgrading software and device of set top box
US10140110B2 (en) * 2014-04-02 2018-11-27 Ford Global Technologies, Llc Multiple chunk software updates
CN111857776B (en) * 2020-07-09 2023-07-28 天津津航计算技术研究所 On-line upgrading method for application program of DSP board card
CN113986313A (en) * 2021-12-09 2022-01-28 北京奕斯伟计算技术有限公司 Software upgrading method and device, electronic equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597174A (en) * 2020-08-27 2021-04-02 禾多科技(北京)有限公司 Map updating method and device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN115016823A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
JP6916871B2 (en) Computer program products, computer systems, and computer implementation methods that implement instructions to provide true random numbers.
CN115016823B (en) Target software upgrading method, device, electronic equipment, medium and program product
CN105117953A (en) User sign-in processing method and device
CN115757400B (en) Data table processing method, device, electronic equipment and computer readable medium
CN111597107B (en) Information output method and device and electronic equipment
CN110679090B (en) Reduced delay error correction decoding
CN110879729A (en) Channel configuration method and device for live broadcast room, readable medium and electronic equipment
US20140068048A1 (en) Managing remote devices
CN109445973A (en) Position the method and device of application crash
CN117349291A (en) Database primary key short ID generation method, electronic equipment and medium
US8412844B2 (en) Validating download success
US10581593B2 (en) Message padding for bit-oriented and bit-reversed input messages
CN113379019B (en) Verification code generation method and device, storage medium and electronic equipment
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN111552715B (en) User query method and device
US11068346B2 (en) Method and apparatus for data protection
CN114090103A (en) Form generation method and device, electronic equipment and computer readable medium
WO2017070855A1 (en) Bluetooth-based data transmission method and device
CN111737040A (en) Program code repairing method and device
CN112000667A (en) Method, apparatus, server and medium for retrieving tree data
CN115348260B (en) Information processing method, device, equipment and medium based on campus information security
CN113850988B (en) Key value correction method, device, equipment and computer readable medium
CN110325966A (en) Arithmetic inertia mark for emulation indicates
CN109150612B (en) Detection method based on distributed system for unmanned vehicle and electronic equipment
CN117492788A (en) Chip program upgrading method, device, electronic equipment and computer readable medium

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 201, 202, 301, No. 56-4 Fenghuang South Road, Huadu District, Guangzhou City, Guangdong Province, 510806

Patentee after: Heduo Technology (Guangzhou) Co.,Ltd.

Address before: 100099 101-15, 3rd floor, building 9, yard 55, zique Road, Haidian District, Beijing

Patentee before: HOLOMATIC TECHNOLOGY (BEIJING) Co.,Ltd.

CP03 Change of name, title or address