CN107193560B - Configuration updating method and device - Google Patents

Configuration updating method and device Download PDF

Info

Publication number
CN107193560B
CN107193560B CN201710347088.8A CN201710347088A CN107193560B CN 107193560 B CN107193560 B CN 107193560B CN 201710347088 A CN201710347088 A CN 201710347088A CN 107193560 B CN107193560 B CN 107193560B
Authority
CN
China
Prior art keywords
configuration
code
function
configuration code
software upgrading
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
CN201710347088.8A
Other languages
Chinese (zh)
Other versions
CN107193560A (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.)
Chery Automobile Co Ltd
Original Assignee
Chery Automobile 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 Chery Automobile Co Ltd filed Critical Chery Automobile Co Ltd
Priority to CN201710347088.8A priority Critical patent/CN107193560B/en
Publication of CN107193560A publication Critical patent/CN107193560A/en
Application granted granted Critical
Publication of CN107193560B publication Critical patent/CN107193560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses a configuration updating method and device, and belongs to the field of automobiles. The method comprises the following steps: configuring a newly-added configuration code for an idle configuration code bit reserved in the software upgrading packet according to the newly-added function to obtain a software upgrading packet after the configuration code is updated; configuring a function code for a target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, wherein the target configuration identifier at least consists of the newly added configuration code; and according to the software upgrading package after the code is updated, carrying out system upgrading on the host. The invention effectively improves the efficiency of configuration updating. The method is used for updating the configuration of the host of the automobile.

Description

Configuration updating method and device
Technical Field
The invention relates to the field of automobiles, in particular to a configuration updating method and device.
Background
When the automobile is off-line from the production line, a special off-line detection (English: End Of L ine; EO L for short) device can be used for writing configuration signals into a function host by opening or closing part or all functions contained in the function host (such as a sound host Of the automobile), so that the function host has different functions and further meets different configuration requirements.
In the prior art, when configuration update needs to be performed on a functional host, host software needs to be changed according to a newly added function, and the change mainly represents the change of a software code.
Because the function host includes a plurality of functions, and the plurality of functions use the same encoding method in the software, when the functions need to be added, a large amount of codes or even all codes in the software need to be changed, and thus, the efficiency of the existing configuration updating method is low.
Disclosure of Invention
In order to solve the problem that a large amount of codes in software need to be changed when functions need to be added in the prior art, embodiments of the present invention provide a configuration updating method and apparatus. The technical scheme is as follows:
in a first aspect, a configuration update method is provided, including:
configuring a newly-added configuration code for an idle configuration code bit reserved in the software upgrading packet according to the newly-added function to obtain a software upgrading packet after the configuration code is updated;
configuring a function code for a target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, wherein the target configuration identifier at least consists of the newly added configuration code;
and according to the software upgrading package after the code is updated, carrying out system upgrading on the host.
Optionally, the system upgrading the host according to the software upgrade package after the code update includes:
judging whether the number of bits of the configuration code bits of the diagnostic instrument is greater than or equal to the number of bits of the configuration code bits of the software upgrading packet after the code is updated;
and when the digit of the configuration code bits of the diagnostic instrument is greater than or equal to the digit of the configuration code bits of the software upgrading packet after the code is updated, the diagnostic instrument is used for carrying out system upgrading on the host.
Optionally, the system upgrading the host by the diagnostic apparatus includes:
comparing the configuration identifier of the software upgrading packet in the host with the configuration identifier of the software upgrading packet after the code is updated;
and when the configuration identifier of the software upgrading packet after the code updating is different from the configuration identifier of the software upgrading packet in the host, writing the functional code corresponding to the different identifier into the host.
Optionally, after configuring the new configuration code for the idle configuration code bits reserved in the software upgrade package according to the new function, the method further includes:
judging whether the newly added function is associated with the original function in the software upgrading package;
when the newly added function is associated with the original function in the software upgrading package, determining a configuration code corresponding to the function associated with the newly added function, and forming the target configuration identifier by the corresponding configuration code and the newly added configuration code;
and when the newly added function has no correlation with the original function in the software upgrading package, forming the target configuration identifier by the newly added configuration code.
Optionally, the configuring, according to the new function, a new configuration code for an idle configuration code bit reserved in the software upgrade package includes:
detecting whether an idle configuration code bit exists in a reserved configuration code bit, wherein the idle configuration code bit is a code bit which is not completely occupied in the reserved configuration code bit;
and when the reserved configuration code bits have idle configuration code bits, configuring new configuration codes in the idle configuration code bits.
In a second aspect, a configuration update apparatus is provided, including:
the first configuration module is used for configuring a newly-added configuration code for an idle configuration code bit reserved in the software upgrading package according to a newly-added function to obtain a software upgrading package after the configuration code is updated;
the second configuration module is used for configuring the function code for the target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, wherein the target configuration identifier at least consists of the newly added configuration code;
and the upgrading module is used for carrying out system upgrading on the host according to the software upgrading package after the codes are updated.
Optionally, the upgrade module includes:
the judging submodule is used for judging whether the number of bits of the configuration code bits of the diagnostic instrument is larger than or equal to the number of bits of the configuration code bits of the software upgrading packet after the code is updated;
and the upgrading submodule is used for upgrading the system of the host computer through the diagnostic instrument when the digit of the configuration code bits of the diagnostic instrument is greater than or equal to the digit of the configuration code bits of the software upgrading packet after the codes are updated.
Optionally, the upgrade submodule is specifically configured to:
comparing the configuration identifier of the software upgrading packet in the host with the configuration identifier of the software upgrading packet after the code is updated;
and when the configuration identifier of the software upgrading packet after the code updating is different from the configuration identifier of the software upgrading packet in the host, writing the functional code corresponding to the different identifier into the host.
Optionally, the apparatus further comprises:
the judging module is used for judging whether the newly added function is associated with the original function in the software upgrading package;
the composition module is used for determining a configuration code corresponding to the function which has the association relation with the newly added function when the newly added function has the association relation with the original function in the software upgrading package, and forming the target configuration identifier by the corresponding configuration code and the newly added configuration code;
the composition module is further configured to, when the newly added function is not associated with the original function in the software upgrade package, compose the newly added configuration code into the target configuration identifier.
Optionally, the first configuration module is specifically configured to:
detecting whether an idle configuration code bit exists in a reserved configuration code bit, wherein the idle configuration code bit is a code bit which is not completely occupied in the reserved configuration code bit;
and when the reserved configuration code bits have idle configuration code bits, configuring new configuration codes in the idle configuration code bits.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the configuration updating method and device provided by the embodiment of the invention configure the newly added configuration code for the reserved idle configuration code bit in the software upgrading package according to the newly added function to obtain the software upgrading package after the configuration code is updated, configure the function code for the target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, and then perform system upgrading on the host according to the software upgrading package after the code is updated, when the function is added to the host, only a small part of the code is needed to be changed, but not a large number of codes or even all codes, for example: the part needing to be changed in the code is the function code of the target configuration identification, so that the workload of modifying the code is reduced, and the efficiency of the configuration updating method is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of a configuration updating method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another configuration update method provided by an embodiment of the invention;
fig. 3 is a flowchart of a method for configuring a new configuration code for an idle configuration code bit reserved in a software upgrade package according to a new function according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for system upgrade of a host according to a software upgrade package after code update according to an embodiment of the present invention;
fig. 5 is a flowchart of a method for upgrading a system of a host through a diagnostic apparatus according to an embodiment of the present invention;
FIG. 6-1 is a schematic structural diagram of a configuration update apparatus according to an embodiment of the present invention;
FIG. 6-2 is a schematic structural diagram of an upgrade module according to an embodiment of the present invention;
fig. 6-3 are schematic structural diagrams of another configuration update apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Fig. 1 is a flowchart of a configuration updating method according to an embodiment of the present invention, and as shown in fig. 1, the method may include:
step 101, configuring a newly added configuration code for an idle configuration code bit reserved in a software upgrading package according to a newly added function to obtain the software upgrading package after the configuration code is updated.
And 102, configuring a function code for the target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated.
Wherein, the target configuration mark at least comprises a newly added configuration code.
And 103, carrying out system upgrade on the host according to the software upgrade package after the code is updated.
To sum up, in the configuration updating method provided in the embodiment of the present invention, the new configuration code is configured for the idle configuration code bits reserved in the software upgrade package according to the new function, so as to obtain the software upgrade package after the configuration code is updated, the configuration function code is configured for the target configuration identifier in the software upgrade package after the configuration code is updated according to the new function, so as to obtain the software upgrade package after the code is updated, and then the system upgrade is performed on the host according to the software upgrade package after the code is updated, when the function is added to the host, only a small part of the code needs to be changed, instead of a large amount of codes or even all of the codes, for example: the part needing to be changed in the code is the function code of the target configuration identification, so that the workload of modifying the code is reduced, and the efficiency of the configuration updating method is effectively improved.
Fig. 2 is a flowchart of another configuration updating method according to an embodiment of the present invention, and as shown in fig. 2, the method may include:
step 201, configuring a newly added configuration code for an idle configuration code bit reserved in a software upgrade package according to a newly added function, and obtaining the software upgrade package after the configuration code is updated.
Optionally, as shown in fig. 3, the process of configuring the new configuration code for the idle configuration code bits reserved in the software upgrade package according to the new function may include:
and step 2011, detecting whether the reserved configuration code bits have idle configuration code bits.
The reserved configuration code bit refers to a configuration code bit which is temporarily unused and is reserved in the software upgrade package in the initial configuration period of the host, that is, the configuration code is not configured on the reserved configuration code bit, or the configuration code is configured on the reserved configuration code bit, but a function code is not configured on the configuration identifier corresponding to the configuration code.
When the configuration code bits are completely occupied, it is described that the configuration code identifiers corresponding to all the configuration codes on the configuration code bits are configured with functions, the functions are the existing functions in the host, and in order to enable the new functions not to affect the existing functions, the new configuration codes need to be configured on the code bits which are not completely occupied in the reserved configuration code bits, that is, the new configuration codes are configured on the idle configuration code bits. Therefore, before configuring the newly added configuration code bits in the idle configuration code bits, it is necessary to detect whether there are idle configuration code bits in the reserved configuration code bits.
Optionally, when the configuration code bit is reserved in the initial configuration period of the host, the idle configuration code bit or the configuration code in the idle configuration code bit may be marked, it is only necessary to detect whether the marked configuration code bit or the configuration code exists in the reserved configuration code bit or not during detection, when the marked configuration code bit or the configuration code exists in the reserved configuration code bit, it is described that the idle configuration code bit exists in the reserved configuration code bit, and when the marked configuration code bit or the configuration code does not exist in the reserved configuration code bit, it is described that the idle configuration code bit does not exist in the reserved configuration code bit.
For example, in the initial configuration period of the automobile host, a total of 6 data bytes (english: DataByte) are set in the memory, the 6 data bytes have 48 configuration code bits, the configuration code bits may be referred to as bits (english: Bit) in binary, the corresponding relationship between the 6 data bytes and the 48 configuration code bits please refer to table 1, and it can be seen from table 1 that the data byte 1 corresponds to 8 configuration code bits from byte 0 to byte 7.
TABLE 1
Data Byte Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
Data#1 7 6 5 4 3 2 1 0
Data#2 15 14 13 12 11 10 9 8
Data#3 23 22 21 20 19 18 17 16
Data#4 31 30 29 28 27 26 25 24
Data#5 39 38 37 36 35 34 33 32
Data#6 47 46 45 44 43 42 41 40
Step 2012, when the reserved configuration code bits have idle configuration code bits, configuring the newly added configuration code in the idle configuration code bits.
When the reserved configuration code bits have the idle configuration code bits, the total number of the configuration codes needing to be newly added can be determined according to the total number of the functions needing to be newly added during the configuration updating, then the total number of the configuration code bits corresponding to the configuration codes needing to be newly added is determined according to the coding method used during coding, the newly added configuration codes are configured for the configuration code bits, the corresponding relation between the newly added configuration codes and the newly added functions is established according to the configuration result, and meanwhile, the corresponding relation is stored in the software upgrading package to obtain the software upgrading package after the configuration codes are updated. The new function refers to a function that the host does not have originally, for example: the video playing function, the music playing function, the backing image function with an auxiliary line, the backing image function without an auxiliary line, the function without backing assistance and the like.
Illustratively, assuming that the idle configuration code bits are 43 and 44 bits, the total number of functions required to be added in the configuration update is 3, the 3 added functions are respectively a backup image function with auxiliary lines, a backup image function without auxiliary lines and a function without backup assistance, the coding method used when the configuration code is configured according to the added functions is a binary coding method, the total number of the configuration codes required to be added can be determined to be 3 according to the total number of the functions required to be added, since 2 binary bits can represent 4 binary states, each binary state can represent 1 added function, it can be known that 2 configuration code bits can represent 3 added functions, that is, the configuration code can be configured for 3 added binary states in 4 binary states corresponding to the 43-bit and 44-bit configuration code bits, the remaining 1 binary state is marked by using a "NU LL" symbol to represent that the idle configuration code bits exist in the reserved configuration code bits, and the 3 added configuration codes and the 3 added functions are set as corresponding relations, the corresponding relation of the corresponding relation between the backup image code and the backup image function is set as 0, for example, the backup image function with 0 and the corresponding relation between the auxiliary line of the configuration code.
TABLE 2
43 bit 44 position New added function
0 0 Backing image function with auxiliary line
0 1 Backing image function without auxiliary line
1 0 Function without using backing assistance
NULL NULL
It should be noted that the encoding method used when configuring the configuration code according to the newly added function may also be an encoding method such as an octal, decimal, hexadecimal, or American Standard code Interchange (ASCII), which is not limited in the embodiment of the present invention.
Step 202, judging whether the newly added function is associated with the original function in the software upgrade package.
The newly added function and the original function in the software upgrading package are obtained after the function code is configured on the configuration identifier, therefore, before configuring the code of the newly added function to the configuration identifier corresponding to the newly added function, the configuration identifier corresponding to the newly added function needs to be determined, the determined configuration identifier may be referred to as a target configuration identifier, which may at least consist of the newly added configuration code, and, in particular, when the newly added function is associated with the original function in the software upgrade package, the target configuration identifier corresponding to the newly added function is composed of the newly added configuration code and the configuration code of the original function associated with the newly added configuration code, the target configuration identifier is determined through step 203, when the newly added function is not associated with the original function in the software upgrade package, the target configuration identifier corresponding to the newly added function is composed of the newly added configuration code, and the target configuration identifier is determined through step 204.
Step 203, when the newly added function has an association relationship with the original function in the software upgrade package, determining a configuration code corresponding to the function having the association relationship with the newly added function, and forming a target configuration identifier by the corresponding configuration code and the newly added configuration code.
When the newly added function is associated with the original function in the software upgrade package, the implementation of the newly added function is affected by the original function, and therefore, when determining the target configuration identifier of the newly added function, it is necessary to combine the configuration code corresponding to the function associated with the newly added function with the newly added configuration code to obtain the target configuration identifier, and store the obtained target configuration identifier in the software upgrade package after the configuration code is updated for use.
And step 204, when the newly added function is not associated with the original function in the software upgrading package, forming the newly added configuration code into a target configuration identifier.
When the new function is not associated with the original function in the software upgrade package, the implementation of the new function is not affected by the original function, so that the new configuration code corresponding to the new function is the target configuration identifier of the new function and is stored in the software upgrade package after the configuration code is updated.
For example, suppose that an original function in the software upgrade package is a corner sensing function (abbreviated as SAM function), the function is used to sense a turning action of an automobile, the configuration code bit corresponding to the function is 38 bits, the configuration code corresponding to the function is 1, the 3 newly added functions are a reversing image function with an auxiliary line, a reversing image function without an auxiliary line and a function without a reversing aid, and the corresponding relationship between the 3 newly added functions and the newly added configuration code please refer to table 2, because an automobile may turn during reversing, during the implementation process of the reversing image function with an auxiliary line and the reversing image function without an auxiliary line, both functions need to refer to the turning action of the automobile, that is, both functions are affected by the corner sensing function, for example: under the condition of no corner sensing function, the reversing image function with the auxiliary line and the reversing image function without the auxiliary line cannot know the turning of the automobile when in use, the host can display abnormal conditions, and a fault code can appear in a host system, so that the whole automobile cannot pass the inspection of the inspection equipment when off-line, and therefore, the reversing image function with the auxiliary line and the reversing image function without the auxiliary line can be determined to be in association with the corner sensing function. Therefore, the configuration code corresponding to the corner sensing function and the configuration code corresponding to the reversing image function with the auxiliary line form the target configuration identifier of the reversing image function with the auxiliary line, the configuration code corresponding to the corner sensing function and the configuration code corresponding to the reversing image function without the auxiliary line form the target configuration identifier of the reversing image function without the auxiliary line, the configuration code corresponding to the function without the reversing aid forms the target configuration identifier of the function without the reversing aid, and the target configuration identifiers corresponding to the 3 newly added functions please refer to table 3 (the oblique line in the cell in the column of the bit indicates that the value of the bit indicated by the column does not affect the implementation of the function indicated by the row of the cell, and the oblique line in the cell in the column of the newly added function indicates that the newly added function is not set), for example: "38-bit 1" and "43-bit 0" and "44-bit 0" constitute a target configuration flag of the reverse image function with the auxiliary line, and "43-bit 1" and "44-bit 0" constitute a target configuration flag of the function without the reverse assist.
TABLE 3
38 bit 43 bit 44 position New added function
1 0 0 Backing image function with auxiliary line
1 0 1 Backing image function without auxiliary line
1 0 Function without using backing assistance
NULL NULL
And step 205, configuring the function code for the target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated.
After determining the target configuration identifier corresponding to the newly added function, the corresponding relationship between the target configuration identifier and the newly added function needs to be written in the software upgrade package after the configuration code is updated, and the function code is used in the software upgrading package after the configuration code is updated to define the new function, the realization of the new function in the function code needs to define the matching of the existing parts in the automobile, the preset action needed by each part when the new function is completed and the sequence of each preset action, so as to obtain the software upgrading package after the code is updated, after the configuration updating is finished according to the software upgrading package after the code updating, when the host receives an instruction which is triggered by a user and corresponds to the target configuration identifier, the parts in the automobile can execute preset actions according to the sequence specified in the function code, and further, the corresponding function is completed, and finally, the configuration updating of the host is completed on the premise of not adding new parts.
While configuring the function code for the target configuration identifier, it is also necessary to record the corresponding relationship between the target configuration identifier and the function code corresponding to the target configuration identifier in a software upgrade package after the code is updated, for example; the "38-bit 1" and the "43-bit 0" and the "44-bit 0" form a corresponding relationship between the target configuration identifier and the address of the corresponding function code, and the corresponding relationship is recorded in the software upgrade package after the code update, and the corresponding relationship may be recorded in a header file of the function code of the software upgrade package after the code update, or the corresponding relationship may be expressed in the function code by means of a pointer or the like.
It should be noted that, when the target configuration identifier configuration function code in the software upgrade package after the configuration code is updated according to the newly added function to obtain the software upgrade package after the code update, the software upgrade package may be separately set for the function code related to the newly added function, and the separately set software upgrade package does not include the function code corresponding to the original function of the host. When the system of the host is upgraded according to the independently set software upgrading packet, the time for upgrading the system can be shortened, and the efficiency of configuration updating is further improved.
And step 206, performing system upgrade on the host according to the software upgrade package after the code is updated.
Optionally, as shown in fig. 4, the process of performing system upgrade on the host according to the software upgrade package after code update may include:
step 2061, judging whether the digit of the configuration code bit of the diagnostic instrument is larger than or equal to the digit of the configuration code bit of the software upgrading packet after the code is updated.
The diagnostic instrument can be in serial communication with the host computer to complete data exchange between the diagnostic instrument and the host computer, and the setting of the host computer is refreshed according to the software upgrading packet after the codes are updated, so that the system upgrading is carried out on the host computer, and the configuration updating of the host computer is further completed. Because the diagnostic device needs to perform serial communication with the host, the diagnostic device is required to have enough configuration code bits to read the configuration code in the software upgrade packet after the code is updated, that is, the number of bits of the configuration code bits of the diagnostic device is required to be greater than or equal to the number of bits of the configuration code bits of the software upgrade packet after the code is updated, therefore, before performing system upgrade on the host, whether the number of bits of the configuration code bits of the diagnostic device is greater than or equal to the number of bits of the configuration code bits of the software upgrade packet after the code is updated needs to be judged, when the number of bits of the configuration code bits of the diagnostic device is greater than or equal to the number of bits of the configuration code bits of the software upgrade packet after the code is updated, the system upgrade can be performed on the host through the diagnostic device, that is, step 2062 is executed, when the number of bits of the configuration code bits of the diagnostic device is less than the number of bits of the configuration code bits of, and the system can not be upgraded by the diagnostic instrument until the digit of the configuration code bits of the diagnostic instrument is greater than or equal to the digit of the configuration code bits of the software upgrading packet after the code is updated.
Step 2062, when the digit of the configuration code bit of the diagnostic apparatus is larger than or equal to the digit of the configuration code bit of the software upgrading packet after the code is updated, the system upgrading is carried out on the host computer through the diagnostic apparatus.
Optionally, as shown in fig. 5, the process of performing system upgrade on the host by using the diagnostic apparatus may include:
step 2062a, comparing the configuration identifier of the software upgrading packet in the host computer with the configuration identifier of the software upgrading packet after the code is updated.
When the system of the host computer is upgraded, the host computer can be upgraded according to different parts in the software upgrading package after the upgrading code is updated and the software upgrading package in the host computer, so that the time for upgrading the system can be effectively shortened, and the efficiency for updating the configuration can be further improved. The different part is mainly represented by the difference between the configuration identifier of the software upgrade package after the code is updated and the configuration identifier of the software upgrade package in the host, that is, the different part is mainly represented by the target configuration identifier and the corresponding function code. Therefore, before the upgrade, the configuration identifier of the software upgrade package in the host may be compared with the configuration identifier of the software upgrade package after the code update to determine whether an identifier different from the configuration identifier of the software upgrade package in the host exists in the configuration identifier of the software upgrade package after the code update, and when an identifier different from the configuration identifier of the software upgrade package in the host exists in the configuration identifier of the software upgrade package after the code update, the functional code corresponding to the different identifier is written into the host, that is, step 2062b is executed to complete the system upgrade of the host.
Step 2062b, when the configuration identifier of the software upgrading package after the code updating has an identifier different from the configuration identifier of the software upgrading package in the host, writing the functional code corresponding to the different identifier into the host.
When the system of the host is upgraded, the functional code corresponding to the target configuration identifier can be found by inquiring the corresponding relation between the target configuration identifier stored in the software upgrading package after the code is updated and the corresponding functional code, and the functional code is written into the host, so that the configuration of the function corresponding to the target configuration identifier is realized, and the configuration update of the host is further completed. During the writing process, the diagnostic instrument may determine the number of parts included in the vehicle by obtaining a list of parts included in the vehicle, and looking up whether the list includes parts involved in the software upgrade package after the code update, to determine whether the parts in the vehicle can support the implementation of the newly added functions involved in the software upgrade package after code update, when the list contains the parts related to the software upgrading package after the code updating, the parts in the automobile can support the realization of the newly added functions related to the software upgrading package after the code updating, the function codes corresponding to different identifications can be written into the host, the writing process is mainly embodied as a process in which the diagnostic communication service of the diagnostic apparatus writes the configuration information and the parameter information into the host, and, and restarting the host after the writing process is finished, wherein the host can read the written configuration information and configuration parameters, and then the configuration update of the host is finished.
TABLE 4
38 bit 39 bit 40 bit Original functions of the host
0 0 0 Function A
0 0 Function B
0 1 0 Function C
0 1 Function D
1 0 0 Function E
1 0 1 Function F
1 1 0 Function G
1 1 1 Function H
1 Corner sensing function
For example, assuming that the configuration identifier of the software upgrade package in the host is shown in table 4, and the configuration identifier of the software upgrade package after code update is shown in table 5, it can be known from a comparison between table 4 and table 5 that, in the configuration identifier of the software upgrade package after code update, an identifier different from the configuration identifier of the software upgrade package in the host exists, and the different identifier is: the target configuration identifier composed of "38-bit 1", "43-bit 0", and "44-bit 0", the target configuration identifier composed of "38-bit 1", "43-bit 0", and "44-bit 1", and the target configuration identifier composed of "43-bit 1" and "44-bit 0".
TABLE 5
38 bit 39 bit 40 bit 43 bit 44 position Original functions of the host
0 0 0 Function A
0 0 Function B
0 1 0 Function C
0 1 Function D
1 0 0 Function E
1 0 1 Function F
1 1 0 Function G
1 1 1 Function H
1 Corner sensing function
1 0 0 Backing image function with auxiliary line
1 0 1 Backing image function without auxiliary line
1 0 Function without using backing assistance
After different identifiers in the software upgrading package in the host and the software upgrading package after code updating are found according to the table 4 and the table 5, the function code corresponding to each target configuration identifier can be found by inquiring the corresponding relation between the target configuration identifier and the function code corresponding to the target configuration identifier, and the corresponding function code is written into the host, so that the configuration updating of the host is completed.
It should be noted that, when the system of the host is upgraded, the host can be upgraded according to the different parts of the software upgrade package updated by the upgrade code and the software upgrade package in the host, because the same part in the software upgrading package is not upgraded, the original function of the host computer after the configuration updating is not influenced, i.e., the use of the functions of the vehicle that has been produced and sold, does not fail, and, since a plurality of functions are included in the vehicle main body, only different parts of the software upgrade package are upgraded during the upgrade, and the upgrade package is updated according to the upgrade package, the workload of changing and testing the software during upgrading can be reduced, the probability of errors caused by changing and testing the software is reduced, the configuration updating period is shortened, and furthermore, the efficiency of configuration updating of the host is improved, and even the condition that the sold vehicle is recalled and repaired due to too large software change can be avoided.
And after the configuration update of the host is completed, the original software upgrading package of the host can be replaced by the software upgrading package after the code update, and the original software upgrading package of the host is deleted, so that the stability of the host system after the configuration update is improved.
It should be noted that, the order of the steps of the configuration updating method provided in the embodiment of the present invention may be appropriately adjusted, and the steps may also be increased or decreased according to the circumstances, and any method that can be easily conceived by a person skilled in the art within the technical scope disclosed in the present application shall be covered in the protection scope of the present application, and therefore, the details are not described again.
To sum up, in the configuration updating method provided in the embodiment of the present invention, the new configuration code is configured for the idle configuration code bits reserved in the software upgrade package according to the new function, so as to obtain the software upgrade package after the configuration code is updated, the configuration function code is configured for the target configuration identifier in the software upgrade package after the configuration code is updated according to the new function, so as to obtain the software upgrade package after the code is updated, and then the system upgrade is performed on the host according to the software upgrade package after the code is updated, when the function is added to the host, only a small part of the code needs to be changed, instead of a large amount of codes or even all of the codes, for example: the part needing to be changed in the code is the function code of the target configuration identification, so that the workload of modifying the code is reduced, and the efficiency of the configuration updating method is effectively improved.
An embodiment of the present invention provides a configuration updating apparatus 600, as shown in fig. 6-1, where the apparatus 600 may include:
the first configuration module 601 is configured to configure a new configuration code for an idle configuration code bit reserved in the software upgrade package according to a new function, so as to obtain the software upgrade package after the configuration code is updated.
The second configuration module 602 is configured to configure the function code for the target configuration identifier in the software upgrade package after the configuration code is updated according to the new function to obtain the software upgrade package after the code is updated, where the target configuration identifier is at least composed of the new configuration code.
The upgrade module 603 performs system upgrade on the host according to the software upgrade package after code update.
To sum up, in the configuration updating method provided in the embodiment of the present invention, the first configuration module configures a new configuration code for an idle configuration code bit reserved in the software upgrade package according to a new function to obtain a software upgrade package after the configuration code is updated, the second configuration module configures a function code for a target configuration identifier in the software upgrade package after the configuration code is updated according to the new function to obtain a software upgrade package after the code is updated, and the upgrade module performs system upgrade on the host according to the software upgrade package after the code is updated, when a function is added to the host, only a small part of the code needs to be changed instead of a large amount of codes or even all of the codes, for example: the part needing to be changed in the code is the function code of the target configuration identification, so that the workload of modifying the code is reduced, and the efficiency of the configuration updating method is effectively improved.
Optionally, as shown in fig. 6-2, the upgrade module 603 may include:
and the judgment sub-module 6031 is configured to judge whether the number of bits of the configuration code bits of the diagnostic apparatus is greater than or equal to the number of bits of the configuration code bits of the software upgrade package after the code update.
And the upgrade submodule 6032 is configured to perform system upgrade on the host through the diagnostic apparatus when the number of bits of the configuration code bits of the diagnostic apparatus is greater than or equal to the number of bits of the configuration code bits of the software upgrade package after the code update.
Optionally, the upgrade submodule 6032 may be specifically configured to:
and comparing the configuration identifier of the software upgrading packet in the host with the configuration identifier of the software upgrading packet after the code is updated.
And when the configuration identifier of the software upgrading packet after the code updating is different from the configuration identifier of the software upgrading packet in the host, writing the functional codes corresponding to the different identifiers into the host.
Optionally, as shown in fig. 6-3, the apparatus 600 may further include:
the determining module 604 is configured to determine whether the newly added function is associated with an original function in the software upgrade package.
A module 605, configured to determine, when the newly added function is associated with the original function in the software upgrade package, a configuration code corresponding to the function associated with the newly added function, and configure the corresponding configuration code and the newly added configuration code into a target configuration identifier.
The forming module 605 is further configured to form the newly added configuration code into the target configuration identifier when the newly added function is not associated with the original function in the software upgrade package.
Optionally, the first configuration module 601 may specifically be configured to:
and detecting whether an idle configuration code bit exists in the reserved configuration code bit, wherein the idle configuration code bit is a code bit which is not completely occupied in the reserved configuration code bit.
And when the reserved configuration code bits have idle configuration code bits, configuring new configuration codes in the idle configuration code bits.
To sum up, in the configuration updating method provided in the embodiment of the present invention, the first configuration module configures a new configuration code for an idle configuration code bit reserved in the software upgrade package according to a new function to obtain a software upgrade package after the configuration code is updated, the second configuration module configures a function code for a target configuration identifier in the software upgrade package after the configuration code is updated according to the new function to obtain a software upgrade package after the code is updated, and the upgrade module performs system upgrade on the host according to the software upgrade package after the code is updated, when a function is added to the host, only a small part of the code needs to be changed instead of a large amount of codes or even all of the codes, for example: the part needing to be changed in the code is the function code of the target configuration identification, so that the workload of modifying the code is reduced, and the efficiency of the configuration updating method is effectively improved.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, modules and sub-modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A configuration update method, comprising:
configuring a newly-added configuration code for an idle configuration code bit reserved in the software upgrading packet according to the newly-added function to obtain a software upgrading packet after the configuration code is updated;
configuring a function code for a target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, wherein the target configuration identifier at least consists of the newly added configuration code;
and according to the software upgrading package after the code is updated, carrying out system upgrading on the host.
2. The method of claim 1, wherein the performing a system upgrade on a host according to the software upgrade package after the code update comprises:
judging whether the number of bits of the configuration code bits of the diagnostic instrument is greater than or equal to the number of bits of the configuration code bits of the software upgrading packet after the code is updated;
and when the digit of the configuration code bits of the diagnostic instrument is greater than or equal to the digit of the configuration code bits of the software upgrading packet after the code is updated, the diagnostic instrument is used for carrying out system upgrading on the host.
3. The method of claim 2, wherein said system upgrading said host computer with said diagnostic instrument comprises:
comparing the configuration identifier of the software upgrading packet in the host with the configuration identifier of the software upgrading packet after the code is updated;
and when the configuration identifier of the software upgrading packet after the code updating is different from the configuration identifier of the software upgrading packet in the host, writing the functional code corresponding to the different identifier into the host.
4. The method of claim 1, wherein after configuring the new configuration code for the spare configuration code bits reserved in the software upgrade package according to the new function, the method further comprises:
judging whether the newly added function is associated with the original function in the software upgrading package;
when the newly added function is associated with the original function in the software upgrading package, determining a configuration code corresponding to the function associated with the newly added function, and forming the target configuration identifier by the corresponding configuration code and the newly added configuration code;
and when the newly added function has no correlation with the original function in the software upgrading package, forming the target configuration identifier by the newly added configuration code.
5. The method of claim 1, wherein configuring the new configuration code for the reserved idle configuration code bits in the software upgrade package according to the new function comprises:
detecting whether an idle configuration code bit exists in a reserved configuration code bit, wherein the idle configuration code bit is a code bit which is not completely occupied in the reserved configuration code bit;
and when the reserved configuration code bits have idle configuration code bits, configuring new configuration codes in the idle configuration code bits.
6. A configuration update apparatus, comprising:
the first configuration module is used for configuring a newly-added configuration code for an idle configuration code bit reserved in the software upgrading package according to a newly-added function to obtain a software upgrading package after the configuration code is updated;
the second configuration module is used for configuring the function code for the target configuration identifier in the software upgrading package after the configuration code is updated according to the newly added function to obtain the software upgrading package after the code is updated, wherein the target configuration identifier at least consists of the newly added configuration code;
and the upgrading module is used for carrying out system upgrading on the host according to the software upgrading package after the codes are updated.
7. The apparatus of claim 6, wherein the upgrade module comprises:
the judging submodule is used for judging whether the number of bits of the configuration code bits of the diagnostic instrument is larger than or equal to the number of bits of the configuration code bits of the software upgrading packet after the code is updated;
and the upgrading submodule is used for upgrading the system of the host computer through the diagnostic instrument when the digit of the configuration code bits of the diagnostic instrument is greater than or equal to the digit of the configuration code bits of the software upgrading packet after the codes are updated.
8. The apparatus according to claim 7, wherein the upgrade submodule is specifically configured to:
comparing the configuration identifier of the software upgrading packet in the host with the configuration identifier of the software upgrading packet after the code is updated;
and when the configuration identifier of the software upgrading packet after the code updating is different from the configuration identifier of the software upgrading packet in the host, writing the functional code corresponding to the different identifier into the host.
9. The apparatus of claim 6, further comprising:
the judging module is used for judging whether the newly added function is associated with the original function in the software upgrading package;
the composition module is used for determining a configuration code corresponding to the function which has the association relation with the newly added function when the newly added function has the association relation with the original function in the software upgrading package, and forming the target configuration identifier by the corresponding configuration code and the newly added configuration code;
the composition module is further configured to, when the newly added function is not associated with the original function in the software upgrade package, compose the newly added configuration code into the target configuration identifier.
10. The apparatus of claim 6, wherein the first configuration module is specifically configured to:
detecting whether an idle configuration code bit exists in a reserved configuration code bit, wherein the idle configuration code bit is a code bit which is not completely occupied in the reserved configuration code bit;
and when the reserved configuration code bits have idle configuration code bits, configuring new configuration codes in the idle configuration code bits.
CN201710347088.8A 2017-05-16 2017-05-16 Configuration updating method and device Active CN107193560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710347088.8A CN107193560B (en) 2017-05-16 2017-05-16 Configuration updating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710347088.8A CN107193560B (en) 2017-05-16 2017-05-16 Configuration updating method and device

Publications (2)

Publication Number Publication Date
CN107193560A CN107193560A (en) 2017-09-22
CN107193560B true CN107193560B (en) 2020-08-04

Family

ID=59873863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710347088.8A Active CN107193560B (en) 2017-05-16 2017-05-16 Configuration updating method and device

Country Status (1)

Country Link
CN (1) CN107193560B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108920178B (en) * 2018-06-29 2021-11-23 北京汽车股份有限公司 Method and device for adjusting vehicle type carrying configuration
JP7137379B2 (en) * 2018-07-05 2022-09-14 Juki株式会社 Production system, management device, program
CN110109440A (en) * 2019-04-10 2019-08-09 深圳市朗仁科技有限公司 Diagnostic equipment method for parameter configuration, device, computer equipment and storage medium
CN110413265B (en) * 2019-08-02 2023-11-03 甘棠软件系统(上海)有限公司 Software configuration code generation method and device and electronic equipment
CN112445160B (en) * 2019-09-02 2022-06-14 广州汽车集团股份有限公司 Automatic generation method and device of ECU configuration code
CN115794185B (en) * 2021-09-10 2023-11-07 中兴通讯股份有限公司 Data increment upgrading method, power supply equipment system, network manager and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310388A (en) * 2000-02-21 2001-08-29 英业达股份有限公司 Increment mode method for upgrading data file
CN1691599A (en) * 2004-04-24 2005-11-02 华为技术有限公司 Method of communication terminal configuration synchronization
US7343483B1 (en) * 2000-06-12 2008-03-11 Altera Corporation Configuring both a programmable logic device and its embedded logic with a single serialized configuration bit stream
CN102301332A (en) * 2009-04-27 2011-12-28 宝马股份公司 Method for updating software components
CN102520995A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Software remote stream type loading method and system
CN102555945A (en) * 2010-12-30 2012-07-11 上海博泰悦臻电子设备制造有限公司 Multi-mode switching method and system for vehicle-mounted terminal
CN102937903A (en) * 2012-10-23 2013-02-20 珠海金山网络游戏科技有限公司 Packaged file updating method based on feature matching
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
CN105871691A (en) * 2016-04-29 2016-08-17 腾讯科技(深圳)有限公司 Communication system, method and device applied to intelligent toy system

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1310388A (en) * 2000-02-21 2001-08-29 英业达股份有限公司 Increment mode method for upgrading data file
US7343483B1 (en) * 2000-06-12 2008-03-11 Altera Corporation Configuring both a programmable logic device and its embedded logic with a single serialized configuration bit stream
CN1691599A (en) * 2004-04-24 2005-11-02 华为技术有限公司 Method of communication terminal configuration synchronization
CN102301332A (en) * 2009-04-27 2011-12-28 宝马股份公司 Method for updating software components
CN105718293A (en) * 2009-04-27 2016-06-29 宝马股份公司 Method And System For Updating Software Components Of Motor Vehicle, And Corresponding Motor Vehicle
CN102555945A (en) * 2010-12-30 2012-07-11 上海博泰悦臻电子设备制造有限公司 Multi-mode switching method and system for vehicle-mounted terminal
CN102520995A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Software remote stream type loading method and system
CN103458298A (en) * 2012-06-01 2013-12-18 北京四达时代软件技术股份有限公司 Method and system or upgrading set top box software
CN102937903A (en) * 2012-10-23 2013-02-20 珠海金山网络游戏科技有限公司 Packaged file updating method based on feature matching
CN105871691A (en) * 2016-04-29 2016-08-17 腾讯科技(深圳)有限公司 Communication system, method and device applied to intelligent toy system

Also Published As

Publication number Publication date
CN107193560A (en) 2017-09-22

Similar Documents

Publication Publication Date Title
CN107193560B (en) Configuration updating method and device
US8086919B2 (en) Controller having flash memory testing functions, and storage system and testing method thereof
US20150127972A1 (en) Method and apparatus for non-volatile ram error re-mapping
CN101699402B (en) Multi-mode startup embedded system
US8667348B2 (en) Data writing method for non-volatile memory module and memory controller and memory storage apparatus using the same
CN103631721A (en) Method and system for isolating bad blocks in internal storage
CN111966287B (en) Data storage method, electronic device and storage medium
CN111104246B (en) Method, device, computer equipment and storage medium for improving verification efficiency of error detection and correction of DRAM
CN105988722A (en) Data storage method and embedded system
CN107678977B (en) Reading and writing method and device of counter
CN111352764A (en) Chip repairing method, device, equipment and storage medium
CN110618828A (en) Data updating method and device
CN110209349B (en) Data processing method and terminal equipment
CN104678292A (en) Test method and device for CPLD (Complex Programmable Logic Device)
US7694186B2 (en) Method for actuating a system on chip (SOC) and computer system medium thereof
CN113515082A (en) Polling communication method and device
CN110737550B (en) Color identification detection method and device for terminal equipment
CN102216912B (en) Configuring method and apparatus for memory capacity
CN110032378B (en) Operation method and device with mask for chip table entry
CN112199103B (en) Equipment upgrading method and terminal equipment
CN116069387B (en) Storage device adaptation method, adaptation device, storage device and readable storage medium
CN111641419B (en) Version identification method, control method and system of radio frequency power amplifier of terminal
CN113518501B (en) Intelligent lighting system equipment replacement method, system, device and storage medium
CN114816833B (en) Writing method, device and system of flash data
CN116414310A (en) Data storage method

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