CN115150271B - Gateway upgrading and data routing method, device, equipment and storage medium - Google Patents

Gateway upgrading and data routing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115150271B
CN115150271B CN202210758477.0A CN202210758477A CN115150271B CN 115150271 B CN115150271 B CN 115150271B CN 202210758477 A CN202210758477 A CN 202210758477A CN 115150271 B CN115150271 B CN 115150271B
Authority
CN
China
Prior art keywords
routing
gateway
storage
data
space
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
CN202210758477.0A
Other languages
Chinese (zh)
Other versions
CN115150271A (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.)
FAW Group Corp
Original Assignee
FAW Group Corp
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 FAW Group Corp filed Critical FAW Group Corp
Priority to CN202210758477.0A priority Critical patent/CN115150271B/en
Publication of CN115150271A publication Critical patent/CN115150271A/en
Application granted granted Critical
Publication of CN115150271B publication Critical patent/CN115150271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application discloses a gateway upgrading and data routing method and device, a vehicle-mounted gateway and a storage medium. The method comprises the following steps: under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by a diagnostic instrument is received, wherein the upgrade request comprises a routing configuration file; upgrading the route configuration data in the second storage space based on the route configuration file; and setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program codes. And under the condition of receiving a data routing request carrying a routing type, retrieving the space information from the second storage space; retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space; and completing data routing of the gateway based on the target routing configuration data.

Description

Gateway upgrading and data routing method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of Internet of vehicles, in particular to a gateway upgrading and data routing method, device, equipment and storage medium.
Background
With the rapid development of automobile intellectualization, most of the vehicle controllers have a need for functional program upgrade, i.e., various functions are added, and each function may need to be implemented based on a bus, so that the upgrade of the vehicle controller program may cause a change in data of a bus of a vehicle body.
On one hand, a central gateway serving as a whole vehicle data interaction hub needs to update the data routing function of the central gateway along with the change of bus data, and the gateway needs to be updated; on the other hand, the functions of the central gateway are more and more integrated, and the program scale for upgrading the gateway is larger and larger.
The two aspects can lead to the upgrade package of the gateway program to be bigger and bigger, and the network resource and the upgrade time can be wasted greatly when the gateway is upgraded, thereby bringing the risk caused by upgrade interruption and causing great inconvenience.
Disclosure of Invention
The embodiment of the application provides a gateway upgrading and data routing method, device, equipment and storage medium, so that a vehicle body controller only needs to upgrade the routing configuration data of a gateway, and all programs of the gateway are not required to be upgraded.
In a first aspect, an embodiment of the present application provides a method for upgrading a gateway, where the method includes:
under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by a diagnostic instrument is received, wherein the upgrade request comprises a routing configuration file;
upgrading the route configuration data in the second storage space based on the route configuration file;
and setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program codes.
In a second aspect, an embodiment of the present application provides a data routing method for a gateway, where the method includes:
under the condition that a data routing request carrying a routing type is received, space information is called from a second storage space;
retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space;
and completing data routing of the gateway based on the target routing configuration data.
In a third aspect, an embodiment of the present application further provides an apparatus for upgrading a gateway, where the apparatus for upgrading a gateway includes:
the receiving module is used for receiving an upgrade request sent by the diagnostic instrument under the condition that the data routing function of the gateway needs to be upgraded, wherein the upgrade request comprises a routing configuration file;
the upgrading module is used for upgrading the route configuration data in the second storage space based on the route configuration file;
and the setting module is used for setting the updated route configuration data into the route configuration data which is required to be called when the gateway carries out data routing based on the route program codes.
In a fourth aspect, an embodiment of the present application further provides an electronic device including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the gateway upgrade and data routing method as provided by any of the embodiments of the present application.
In a fifth aspect, an embodiment of the present application further provides a computer readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement a method for upgrading and routing data of a gateway according to any one of the embodiments of the present application.
According to the technical scheme, under the condition that the data routing function of the gateway is required to be upgraded, an upgrading request sent by a diagnostic instrument is received, wherein the upgrading request comprises a routing configuration file; upgrading the route configuration data in the second storage space based on the route configuration file; setting the updated route configuration data as the route configuration data required to be called when the gateway carries out data routing based on the route program codes; under the condition of receiving a data routing request carrying a routing type, space information is called from a second storage space; retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space; the data routing of the gateway is completed based on the target routing configuration data, and the updating of the gateway routing configuration data and the data routing after updating are realized, so that the scheme of the application only needs to update the routing configuration data of the gateway and does not need to update all programs of the gateway, thereby greatly saving network resources and time required by updating and avoiding the risks caused by updating interruption.
Drawings
Fig. 1 is a flow chart of a gateway upgrading method according to a first embodiment of the present application;
fig. 2 is a schematic diagram of gateway upgrade provided in a first embodiment of the present application;
FIG. 3 is a schematic diagram of a diagnostic apparatus authentication process according to a first embodiment of the present application;
FIG. 4 is a diagram of a data storage architecture according to a first embodiment of the present application;
fig. 5 is a schematic flow chart of upgrading route configuration data in a second storage space based on a route configuration file according to a first embodiment of the present application;
FIG. 6 is a flowchart illustrating an expansion of a target storage subspace according to a first embodiment of the present application;
fig. 7 is a flow chart of a data routing method of a gateway according to a first embodiment of the present application;
fig. 8 is a schematic structural diagram of an upgrade apparatus for a gateway according to a second embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to a third embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
Example 1
Fig. 1 is a flow chart of a gateway upgrading method according to an embodiment of the present application, where the embodiment is applicable to a scenario of gateway upgrading, the method may be performed by an upgrading device of the gateway, and the device may be implemented in a hardware and/or software manner, and may be generally integrated in a vehicle-mounted gateway such as a computer with data computing capability.
As shown in fig. 1, the method of the present embodiment may include:
step 101, under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by the diagnostic apparatus is received, wherein the upgrade request comprises a routing configuration file.
It should be noted that, the diagnostic apparatus is generally a device capable of diagnosing whether there is currently an updated version of program code, and can determine whether there is an updated version of program code according to the previous updated version and the latest program version. Once the new version exists, an upgrade request is sent to the gateway controller, the upgrade request including the routing configuration file.
Referring to fig. 2 specifically, fig. 2 is a schematic diagram of gateway upgrade provided in the first embodiment of the present application, as shown in fig. 2, when a gateway data routing function needs to be upgraded, a diagnostic apparatus sends an upgrade request to a gateway controller through a diagnostic CAN bus, where the upgrade request includes a routing cfg file, that is, a routing configuration file, and the routing configuration file includes routing configuration data.
In addition, for gateway data security, after receiving the upgrade request and before upgrading, the gateway controller needs to authenticate the diagnostic apparatus sending the upgrade request, and the process of authenticating the diagnostic apparatus in this embodiment may refer to fig. 3, and fig. 3 is a schematic flow chart of authenticating the diagnostic apparatus according to the first embodiment of the present application.
As shown in fig. 3, after the receiving the upgrade request sent by the diagnostic apparatus and before the upgrading the route configuration data in the second storage space based on the route configuration file, the method may further include:
step 301, generating an authentication random number, and feeding back the authentication random number to the diagnostic apparatus, so that the diagnostic apparatus generates a first authentication value based on the authentication random number and a first key stored in the diagnostic apparatus.
In this step, after receiving the upgrade request initiated by the diagnostic apparatus, the gateway controller sends an authentication request to the diagnostic apparatus, where the authentication request may have a four-digit authentication random number, which may be 1053, for example.
The diagnostic instrument calculates an authentication value based on the received authentication random number and the internally stored secret key, and feeds back the obtained first authentication value to the gateway controller. In this embodiment, the calculation method includes, but is not limited to, shifting first and then AND operation. It should be noted that, the shift manner may be predetermined, and will not be described herein.
Step 302, receiving a first authentication value fed back by the diagnostic apparatus, and generating a second authentication value based on the authentication random number and a second key stored in the gateway.
In this step, optionally, if the gateway controller still does not receive the authentication value after exceeding the set time, the gateway controller resends the authentication request, and if the number of times continuously exceeds the set number of times, the authentication request is not responded, the authentication is considered to be failed, and the upgrading is ended. For example, the set time may be 5 seconds, and the set number of times may be 3.
If the gateway controller successfully receives the first authentication value fed back by the diagnostic instrument, the gateway controller generates a second authentication value based on the authentication random number and a secret key stored in the gateway. It should be noted that, the algorithm based on which the gateway controller generates the second authentication value may refer to the algorithm of calculating the first authentication value by the diagnostic apparatus, if the diagnostic apparatus can successfully authenticate, the algorithm of the first authentication value and the second authentication value are generally identical, and the first key and the second key are also identical.
Specifically, when the second authentication value is generated, the authentication random number and the second key stored in the gateway may be input into a preset encryption algorithm, and the second authentication value output by the preset encryption algorithm may be obtained.
In this step, the preset encryption algorithm may be, but is not limited to, performing an and operation after the shift. Of course, the calculation of the first authentication value may equally be based on the preset encryption algorithm.
And step 303, authenticating the diagnostic apparatus based on the first authentication value and the second authentication value, and executing the step of upgrading the route configuration data in the second storage space based on the route configuration file if authentication is successful.
In this step, if the first authentication value and the second authentication value are the same, authentication is successful. At this point, the following step 102 may continue.
Step 102, upgrading the route configuration data in the second storage space based on the route configuration file.
The ROM of the gateway is provided with a first storage space and a second storage space, the first storage space stores routing program codes, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program codes, the gateway realizes the data routing process by calling the routing configuration data from the second storage space.
The ROM, also called read-only memory, usually operates in a non-destructive read-out manner, and only information which cannot be written in can be read out. The information is fixed once written, and even if the power supply is turned off, the information is not lost, so the information is also called a fixed memory.
In this embodiment, a first storage space and a second storage space may be set in the ROM to store different data respectively, so that the first storage space stores routing program codes, i.e. Code codes, and the second storage space stores routing configuration data, i.e. routing cfg data, including current routing configuration and backup routing configuration.
Referring specifically to fig. 4, fig. 4 is a block diagram of a data storage structure according to a first embodiment of the present application. As shown in fig. 4, the first storage space may be a code segment and the second storage space may be a routing cfg data segment.
In this step, the second storage space may further be provided with a first storage subspace, a second storage subspace, and a third storage subspace. As shown in fig. 4, the Select header is a first storage subspace, cfgA is a second storage subspace, and cfgB is a third storage subspace. The first storage subspace may be used to store spatial information of the second storage subspace and the third storage subspace, and information such as data update time.
In this step, referring to fig. 5, fig. 5 is a schematic flow chart of a process of upgrading the routing configuration data in the second storage space based on the routing configuration file according to the first embodiment of the present application.
As shown in fig. 5, the method for upgrading the routing configuration data in the second storage space based on the routing configuration file according to this embodiment may include:
step 501, space information corresponding to routing configuration data to be called is called from the first storage subspace.
Specifically, the routing configuration data currently required to be invoked refers to data used by the current gateway for data routing. The space information corresponding to the routing configuration data to be called currently refers to a storage position of data used by the current gateway for data routing, and the storage position can be represented by a space identifier, and can be a second storage subspace or a third storage subspace. The space information comprises space size information, space identification and the like of the subspace. The spatial information obtained in this step may include a spatial identifier.
For example, if the data used by the current gateway for data routing is stored in the second storage subspace, the space corresponding to the current routing configuration data to be called, which is called from the first storage subspace in this step, is identified as: the spatial identification of the second storage subspace.
Step 502, determining a target storage subspace which is not used currently based on the space information, wherein the target storage subspace is the second storage subspace or the third storage subspace.
In this step, based on the space identifier of the data used by the current gateway for data routing acquired in the above step, a currently unused subspace is selected as a target storage subspace, where the target storage subspace is the storage space of the routing configuration file required by the current upgrade.
For example, if it is identified that the space corresponding to the routing configuration data that is called currently and is required to be called and called from the first storage subspace is identified as the second storage subspace, the third storage subspace is selected as the target storage subspace.
Step 503, storing the route configuration data in the route configuration file in the target storage subspace in an overlaying manner, so as to finish upgrading the route configuration data in the second storage space.
In this step, the route configuration file required by the current upgrade is transmitted and stored in the target storage subspace, so that the route configuration data after the current upgrade is directly called from the target storage subspace when the data routing is performed subsequently.
In addition, in the upgrading process, a situation that the subspace cannot meet the space required by the routing configuration file may be encountered, so that the embodiment may further expand the target storage subspace, and particularly refer to fig. 6, and fig. 6 is a schematic flow chart for expanding the target storage subspace according to the first embodiment of the present application.
As shown in fig. 6, after the determining the currently unused target storage subspace based on the space information and before the storing the route configuration data in the route configuration file in the target storage subspace in an overlaying manner, the method for upgrading the route configuration data in the second storage space based on the route configuration file may further include:
step 601, obtaining space size information of the target storage subspace and space occupation size information of the routing configuration file.
In this step, the space size information of the target storage subspace and the space occupation size information of the routing configuration file may be retrieved from the first storage subspace.
Step 602, expanding the target storage subspace if the space size information and the space occupation size information do not meet a preset condition.
In this step, the preset condition means that the space size of the target storage subspace is larger than the space occupation size of the routing configuration file. When the space size of the target storage subspace is smaller than or equal to the space occupation size of the routing configuration file, the space size information and the space occupation size information are indicated to not meet the preset condition, and at the moment, the space expansion is required to be carried out on the target storage subspace until the space size of the target storage subspace is larger than or equal to the space occupation size of the routing configuration file.
Specifically, the space size information to be expanded can be calculated according to the space size information of the target storage subspace and the space occupation size information of the routing configuration file, then the space to be expanded corresponding to the space size information to be expanded is cut out from the blank storage space of the ROM, and finally the space to be expanded is merged into the target storage subspace.
And step 603, executing the step of storing the route configuration data in the route configuration file in an overlaying manner in the target storage subspace if the space size information and the space occupation size information meet preset conditions.
In this step, the size of the target storage subspace is larger than the size of the routing configuration file, that is, the target storage subspace can be ensured to store the routing configuration file to meet the preset condition. At this time, step 503 is executed.
Step 103, setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program code. In this step, the space information in the first storage subspace may be updated to a space identifier corresponding to the target storage subspace, so that the gateway performs data routing based on the routing program code, and invokes the routing configuration data in the target storage subspace based on the space identifier.
In this step, updating the space information in the first storage subspace to the space identifier corresponding to the target storage subspace refers to updating the space identifier corresponding to the data used by the current gateway for data routing stored in the first storage subspace to the space identifier corresponding to the target storage subspace. After the space identifier corresponding to the data used by the current gateway for data routing stored in the first storage subspace is updated to the space identifier corresponding to the target storage subspace, the network management controller is restarted, and the updated routing configuration data can be used for data routing.
For example, if the space identifier corresponding to the route configuration data to be called currently stored in the first storage subspace is the space identifier of the second storage subspace and the target storage subspace is the third storage subspace, the space identifier corresponding to the route configuration data to be called currently stored in the first storage subspace is updated from the space identifier of the second storage subspace to the space identifier of the third storage subspace.
The embodiment also provides a data routing method of the gateway, which is applicable to a data routing scene of the gateway, and fig. 7 is a flow chart of the data routing method of the gateway provided by the first embodiment of the application.
As shown in fig. 7, the data routing method of the gateway provided in this embodiment may include:
step 701, in case of receiving a data routing request carrying a routing type, retrieving spatial information from the second storage space.
In this step, when the network management controller receives the data routing request, the space identifier corresponding to the routing configuration data to be called is called from the first storage subspace in the second storage space. Illustratively, a third storage subspace.
Step 702, retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space.
In this step, a corresponding target storage subspace is found according to the space identifier obtained in step 701, and the routing configuration data of the current required type is retrieved from the target storage subspace.
Step 703, completing the data routing of the gateway based on the target routing configuration data.
In this step, the data routing of the gateway can be completed based on the routing configuration data retrieved in step 702.
In this embodiment, an upgrade request sent by a diagnostic apparatus is received under a condition that a data routing function of a gateway needs to be upgraded, where the upgrade request includes a routing configuration file; upgrading the route configuration data in the second storage space based on the route configuration file; setting the updated route configuration data as the route configuration data required to be called when the gateway carries out data routing based on the route program codes; under the condition of receiving a data routing request carrying a routing type, space information is called from a second storage space; retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space; and finishing the data routing of the gateway based on the target routing configuration data, and realizing the upgrading of the gateway routing configuration data and the data routing after the upgrading. Therefore, the scheme of the application only needs to upgrade the route configuration data of the gateway, and does not need to upgrade all programs of the gateway, thereby greatly saving network resources and time required by upgrade and avoiding risks caused by upgrade interruption.
Example two
Referring to fig. 8, fig. 8 is a schematic structural diagram of an upgrade apparatus for a gateway according to a second embodiment of the present application. The gateway upgrading and data routing device provided by the embodiment of the application can execute the gateway upgrading method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the executing method. The device can be implemented in a software and/or hardware mode, as shown in fig. 8, the gateway upgrading and data routing device specifically includes: a receiving module 801, an upgrading module 802, and a setting module 803.
The receiving module 801 is configured to receive an upgrade request sent by the diagnostic apparatus when the data routing function of the gateway needs to be upgraded, where the upgrade request includes a routing configuration file;
an upgrade module 802, configured to upgrade the route configuration data in the second storage space based on the route configuration file;
and the setting module 803 is configured to set the updated routing configuration data as routing configuration data that needs to be invoked when the gateway performs data routing based on the routing program code.
In this embodiment, an upgrade request sent by a diagnostic apparatus is received under a condition that a data routing function of a gateway needs to be upgraded, where the upgrade request includes a routing configuration file; upgrading the route configuration data in the second storage space based on the route configuration file; setting the updated route configuration data as the route configuration data required to be called when the gateway carries out data routing based on the route program codes; under the condition of receiving a data routing request carrying a routing type, space information is called from a second storage space; retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space; and finishing the data routing of the gateway based on the target routing configuration data, and realizing the upgrading of the gateway routing configuration data and the data routing after the upgrading. Therefore, the scheme of the application only needs to upgrade the route configuration data of the gateway, and does not need to upgrade all programs of the gateway, thereby greatly saving network resources and time required by upgrade and avoiding risks caused by upgrade interruption.
Example III
Fig. 9 is a schematic structural diagram of an electronic device according to a third embodiment of the present application, as shown in fig. 9, the electronic device includes a processor 910, a memory 920, an input device 930, and an output device 940; the number of processors 910 in the electronic device may be one or more, one processor 910 being taken as an example in fig. 9; the processor 910, memory 920, input devices 930, and output devices 940 in the electronic device may be connected by a bus or other means, with bus connections being illustrated in fig. 9.
The memory 920 is used as a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to the gateway upgrade or data routing method in the embodiment of the present application (for example, the receiving module 801, the upgrade module 802, and the setting module 803 in the gateway upgrade and data routing apparatus). The processor 910 executes various functional applications and data processing of the vehicle gateway by running software programs, instructions and modules stored in the memory 920, i.e. implementing the gateway upgrade or data routing method described above.
That is, under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by the diagnostic apparatus is received, wherein the upgrade request comprises a routing configuration file;
upgrading the route configuration data in the second storage space based on the route configuration file;
and setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program codes.
Or (b)
Under the condition that a data routing request carrying a routing type is received, space information is called from a second storage space;
retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space;
and completing data routing of the gateway based on the target routing configuration data. Memory 920 may include primarily a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for functionality; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 920 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 920 may further include memory remotely located relative to processor 910 that may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 930 may be used to receive an input upgrade request or a route request and generate key signal inputs related to user settings and function control of the electronic device. The output 440 may include a display device such as a display screen.
Example IV
A fourth embodiment of the present application also provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing a gateway upgrade or data routing method, the method comprising:
under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by a diagnostic instrument is received, wherein the upgrade request comprises a routing configuration file;
upgrading the route configuration data in the second storage space based on the route configuration file;
and setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program codes.
Or (b)
Under the condition that a data routing request carrying a routing type is received, space information is called from a second storage space;
retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space;
and completing data routing of the gateway based on the target routing configuration data.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present application is not limited to the above method operations, but may also perform the related operations in the gateway upgrade and data routing method provided in any embodiment of the present application.
From the above description of embodiments, it will be clear to a person skilled in the art that the present application may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present application.
It should be noted that, in the above-mentioned embodiments of the search apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, as long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present application.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, while the application has been described in connection with the above embodiments, the application is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the application, which is set forth in the following claims.

Claims (9)

1. A gateway upgrade method, characterized in that a first storage space and a second storage space are provided in a ROM of the gateway, the first storage space stores routing program codes, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program codes, the gateway realizes the data routing process by calling the routing configuration data from the second storage space, the method comprising:
under the condition that the data routing function of the gateway needs to be upgraded, an upgrade request sent by a diagnostic instrument is received, wherein the upgrade request comprises a routing configuration file;
upgrading the route configuration data in the second storage space based on the route configuration file;
the second storage space is provided with a first storage subspace, a second storage subspace and a third storage subspace;
the updating the route configuration data in the second storage space based on the route configuration file includes:
space information corresponding to routing configuration data to be called currently is called from the first storage subspace;
determining a target storage subspace which is not used currently based on the space information, wherein the target storage subspace is the second storage subspace or the third storage subspace;
the route configuration data in the route configuration file is stored in the target storage subspace in an overlaying mode, so that the route configuration data in the second storage space is updated;
and setting the updated route configuration data as the route configuration data required to be called when the gateway performs data routing based on the route program codes.
2. The method of claim 1, wherein after receiving the upgrade request sent by the diagnostic apparatus and before the upgrade of the routing configuration data in the second storage space based on the routing configuration file, the method further comprises:
generating an authentication random number and feeding the authentication random number back to the diagnostic instrument so that the diagnostic instrument generates a first authentication value based on the authentication random number and a first key stored in the diagnostic instrument;
receiving a first authentication value fed back by the diagnostic instrument, and generating a second authentication value based on the authentication random number and a second secret key stored in the gateway;
and authenticating the diagnostic instrument based on the first authentication value and the second authentication value, and executing the step of upgrading the route configuration data in the second storage space based on the route configuration file under the condition that authentication is successful.
3. The method of claim 2, wherein the generating a second authentication value based on the authentication nonce and a second key stored internally by the gateway comprises:
and inputting the authentication random number and a second secret key stored in the gateway into a preset encryption algorithm, and acquiring a second authentication value output by the preset encryption algorithm.
4. The method of claim 1, wherein after the determining a currently unused target storage subspace based on the space information, the updating the routing configuration data in the second storage space based on the routing configuration file prior to the storing of the routing configuration data in the routing configuration file into the target storage subspace is further comprising:
acquiring space size information of the target storage subspace and space occupation size information of the routing configuration file;
if the space size information and the space occupation size information do not meet preset conditions, expanding the target storage subspace;
and if the space size information and the space occupation size information meet preset conditions, executing the step of storing the route configuration data in the route configuration file in an overlaying manner into the target storage subspace.
5. The method according to claim 1 or 4, wherein said setting the updated routing configuration data to the routing configuration data that the gateway needs to invoke when routing data based on the routing program code, comprises:
and updating the space information in the first storage subspace into a space identifier corresponding to the target storage subspace, so that the gateway performs data routing based on the routing program codes and invokes routing configuration data in the target storage subspace based on the space identifier.
6. The data routing method of the gateway is characterized in that a first storage space and a second storage space are arranged in a ROM of the gateway, the first storage space stores routing program codes, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program codes, the gateway realizes the process of data routing by calling the routing configuration data from the second storage space, and the method comprises the following steps:
under the condition that a data routing request carrying a routing type is received, space information is called from a second storage space; the second storage space is provided with a first storage subspace, a second storage subspace and a third storage subspace;
the retrieving spatial information from the second storage space includes: a space identifier corresponding to the routing configuration data to be called currently is called from the first storage subspace in the second storage space;
selecting the second storage subspace or the third storage subspace which is not currently used as a target storage subspace according to the space identifier;
retrieving target route configuration data corresponding to the route type from a target storage subspace identified by the space information in the second storage space;
and completing data routing of the gateway based on the target routing configuration data.
7. An upgrade apparatus for a gateway, wherein a first storage space and a second storage space are provided in a ROM of the gateway, the first storage space stores routing program codes, the second storage space stores routing configuration data, and the gateway realizes a process of data routing by calling the routing configuration data from the second storage space when performing data routing based on the routing program codes, the apparatus comprising:
the receiving module is used for receiving an upgrade request sent by the diagnostic instrument under the condition that the data routing function of the gateway needs to be upgraded, wherein the upgrade request comprises a routing configuration file;
the upgrading module is used for upgrading the route configuration data in the second storage space based on the route configuration file;
the second storage space is provided with a first storage subspace, a second storage subspace and a third storage subspace;
the updating the route configuration data in the second storage space based on the route configuration file includes:
space information corresponding to routing configuration data to be called currently is called from the first storage subspace;
determining a target storage subspace which is not used currently based on the space information, wherein the target storage subspace is the second storage subspace or the third storage subspace;
the route configuration data in the route configuration file is stored in the target storage subspace in an overlaying mode, so that the route configuration data in the second storage space is updated;
and the setting module is used for setting the updated route configuration data into the route configuration data which is required to be called when the gateway carries out data routing based on the route program codes.
8. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the gateway upgrade method of any one of claims 1-5 or the gateway data routing method of claim 6.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements a gateway upgrade method according to any one of claims 1-5 or a gateway data routing method according to claim 6.
CN202210758477.0A 2022-06-29 2022-06-29 Gateway upgrading and data routing method, device, equipment and storage medium Active CN115150271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210758477.0A CN115150271B (en) 2022-06-29 2022-06-29 Gateway upgrading and data routing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210758477.0A CN115150271B (en) 2022-06-29 2022-06-29 Gateway upgrading and data routing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115150271A CN115150271A (en) 2022-10-04
CN115150271B true CN115150271B (en) 2023-11-21

Family

ID=83410653

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210758477.0A Active CN115150271B (en) 2022-06-29 2022-06-29 Gateway upgrading and data routing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115150271B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020069995A (en) * 2001-02-28 2002-09-05 삼성전자 주식회사 Apparatus and method for upgrading the gateway online
CN105635222A (en) * 2014-11-06 2016-06-01 中兴通讯股份有限公司 Cloud terminal upgrading method and system, network management server and proxy server
CN107908441A (en) * 2017-12-06 2018-04-13 郑州云海信息技术有限公司 The upgrade method and update device of a kind of database
CN111356114A (en) * 2020-02-19 2020-06-30 北京百度网讯科技有限公司 In-vehicle electronic control unit upgrading method, device, equipment and vehicle system
CN112636992A (en) * 2021-03-10 2021-04-09 腾讯科技(深圳)有限公司 Dynamic routing method, device, equipment and storage medium
CN113590162A (en) * 2021-08-24 2021-11-02 北京经纬恒润科技股份有限公司 Data upgrading method and system
CN113986315A (en) * 2021-12-09 2022-01-28 北京奕斯伟计算技术有限公司 Software upgrading method and device, electronic equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020069995A (en) * 2001-02-28 2002-09-05 삼성전자 주식회사 Apparatus and method for upgrading the gateway online
CN105635222A (en) * 2014-11-06 2016-06-01 中兴通讯股份有限公司 Cloud terminal upgrading method and system, network management server and proxy server
CN107908441A (en) * 2017-12-06 2018-04-13 郑州云海信息技术有限公司 The upgrade method and update device of a kind of database
CN111356114A (en) * 2020-02-19 2020-06-30 北京百度网讯科技有限公司 In-vehicle electronic control unit upgrading method, device, equipment and vehicle system
CN112636992A (en) * 2021-03-10 2021-04-09 腾讯科技(深圳)有限公司 Dynamic routing method, device, equipment and storage medium
CN113590162A (en) * 2021-08-24 2021-11-02 北京经纬恒润科技股份有限公司 Data upgrading method and system
CN113986315A (en) * 2021-12-09 2022-01-28 北京奕斯伟计算技术有限公司 Software upgrading method and device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN115150271A (en) 2022-10-04

Similar Documents

Publication Publication Date Title
CN109597655B (en) Method and device for configuring application program
CN109491681B (en) Method and device for upgrading MCU in automobile
CN109726528B (en) Method, device, equipment and medium for activating and requesting vehicle-machine service
US20240069906A1 (en) Server, software update system, distribution method, and non-transitory storage medium
CN109358867B (en) Automatic upgrading method, device and system for unmanned vehicle application and storage medium
CN111736873B (en) Program updating method, device, equipment and storage medium of electronic control unit
JP5989190B1 (en) Gateway and in-vehicle software update system using the same
EP3961378A1 (en) Software update device, update control method, and non- transitory storage medium
CN115150271B (en) Gateway upgrading and data routing method, device, equipment and storage medium
CN113885907A (en) Firmware upgrading system and method
CN111722857A (en) Updating method and device of software development kit, electronic equipment and storage medium
CN112667270A (en) Voice processing resource updating method, computer equipment and storage device
US20220391192A1 (en) Ota master, center, system, method, non-transitory storage medium, and vehicle
US11995429B2 (en) Software update device, update control method, non-transitory storage medium, and server
WO2022205200A1 (en) Version management method and apparatus
CN115576627A (en) Middleware configuration management method, device, equipment, storage medium and operating machine
CN114780114A (en) Firmware upgrading method, system, vehicle and storage medium
US11947824B2 (en) Electronic control unit, method, and program
US11954480B2 (en) Center, OTA master, system, method, non-transitory storage medium, and vehicle
CN114785531B (en) Bidirectional authentication method and device based on service node switching
CN113835857B (en) Mounting method, device, equipment and medium of external storage equipment
US11972248B2 (en) Controlling software update of electronic control units mounted on a vehicle
CN115390883B (en) Vehicle safety starting information updating method, device, equipment and storage medium
US20220413831A1 (en) Center, ota master, method, non-transitory storage medium, and vehicle
CN114115814A (en) System development method, device and equipment based on module decoupling

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