CN115150271A - Method, device, equipment and storage medium for upgrading gateway and routing data - Google Patents

Method, device, equipment and storage medium for upgrading gateway and routing data Download PDF

Info

Publication number
CN115150271A
CN115150271A CN202210758477.0A CN202210758477A CN115150271A CN 115150271 A CN115150271 A CN 115150271A CN 202210758477 A CN202210758477 A CN 202210758477A CN 115150271 A CN115150271 A CN 115150271A
Authority
CN
China
Prior art keywords
routing
gateway
data
routing configuration
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.)
Granted
Application number
CN202210758477.0A
Other languages
Chinese (zh)
Other versions
CN115150271B (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

Images

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 method and a device for upgrading a gateway and routing data, 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, receiving an upgrading request sent by a diagnostic instrument, wherein the upgrading request comprises a routing configuration file; upgrading the routing configuration data in the second storage space based on the routing configuration file; and setting the upgraded routing configuration data as routing configuration data required to be called when the gateway performs data routing based on the routing program code. Under the condition that a data routing request carrying a routing type is received, the spatial information is called from the second storage space; calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space; and finishing the data routing of the gateway based on the target routing configuration data.

Description

Method, device, equipment and storage medium for upgrading gateway and routing data
Technical Field
The embodiment of the application relates to the technical field of vehicle networking, in particular to a method, a device, equipment and a storage medium for upgrading a gateway and routing data.
Background
With the rapid development of automobile intelligence, most vehicle controllers have a requirement of functional program upgrading, i.e., various functions are added, and each function may need to be implemented based on a bus, so that the upgrading of the vehicle controller program can cause data of a vehicle body bus to change.
On one hand, as a central gateway of a whole vehicle data interaction hub, the data routing function of the gateway needs to be updated along with the change of bus data, and the gateway needs to be upgraded; on the other hand, the integrated functions of the central gateway are more and more, and the scale of the program for upgrading the gateway is larger and larger.
The two aspects can lead to the upgrading package of the gateway program to be larger and larger, and when the gateway is upgraded, the network resource and the upgrading time can be greatly wasted, so that the risk caused by upgrading interruption is brought, and great inconvenience is caused.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, a device, and a storage medium for upgrading a gateway and routing data, so that only routing configuration data of the gateway need to be upgraded for upgrading a vehicle body controller, and all programs of the gateway do not need 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, receiving an upgrading request sent by a diagnostic instrument, wherein the upgrading request comprises a routing configuration file;
upgrading the routing configuration data in the second storage space based on the routing configuration file;
and setting the updated routing configuration data as routing configuration data required to be called when the gateway carries out data routing based on the routing program code.
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, spatial information is called from a second storage space;
calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space;
and finishing the 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 gateway comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving an upgrading request sent by a diagnostic instrument under the condition that the data routing function of the gateway needs to be upgraded, and the upgrading request comprises a routing configuration file;
the upgrading module is used for upgrading the routing configuration data in the second storage space based on the routing configuration file;
and the setting module is used for setting the updated routing configuration data as the routing configuration data required to be called when the gateway carries out data routing based on the routing program code.
In a fourth aspect, an embodiment of the present application further provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method for upgrading a gateway and routing data as provided in any of the embodiments of the present application.
In a fifth aspect, this embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the method for upgrading a gateway and routing data provided in any embodiment of the present application.
According to the technical scheme of the embodiment of the application, an upgrading request sent by a diagnostic instrument is received under the condition that the data routing function of a gateway needs to be upgraded, wherein the upgrading request comprises a routing configuration file; upgrading the routing configuration data in the second storage space based on the routing configuration file; setting the upgraded routing configuration data as routing configuration data to be called when the gateway performs data routing based on the routing program code; under the condition that a data routing request carrying a routing type is received, spatial information is called from a second storage space; calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space; the data routing of the gateway is completed based on the target routing configuration data, and the upgrading of the gateway routing configuration data and the upgraded data routing are realized, so that the scheme of the application only needs to upgrade the routing 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 upgrading, and avoiding risks brought by upgrading interruption.
Drawings
Fig. 1 is a schematic flowchart of a gateway upgrading method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a gateway upgrade provided in an embodiment of the present application;
fig. 3 is a schematic flowchart illustrating authentication of a diagnostic apparatus according to an embodiment of the present application;
FIG. 4 is a block diagram of a data storage according to an embodiment of the present application;
fig. 5 is a schematic flowchart of upgrading routing configuration data in a second storage space based on a routing configuration file according to an embodiment of the present application;
FIG. 6 is a schematic flowchart illustrating expanding a target storage subspace according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a data routing method for a gateway according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an upgrading apparatus of 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 present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flowchart of an upgrading method for a gateway according to an embodiment of the present disclosure, where the method is applicable to a scenario of upgrading a gateway, and the method may be executed by an upgrading apparatus for a gateway, where the apparatus 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 computation capability.
As shown in fig. 1, the method of this embodiment may include:
step 101, receiving an upgrade request sent by a diagnostic device under the condition that the data routing function of the gateway needs to be upgraded, 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 a program code of an updated version currently, and it can determine whether there is a program code of an updated version according to a previous updated version and a latest program version. And sending an upgrading request to the gateway controller once the new version exists, wherein the upgrading request comprises the routing configuration file.
Specifically, referring to fig. 2, fig. 2 is a schematic view of a gateway upgrade provided in an embodiment of the present application, as shown in fig. 2, a diagnostic device sends an upgrade request to a gateway controller through a diagnostic CAN bus when a gateway data routing function needs to be upgraded, 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 performing upgrade, the gateway controller needs to authenticate the diagnostic apparatus that sends the upgrade request, and the process of authenticating the diagnostic apparatus in this embodiment may refer to fig. 3, where fig. 3 is a schematic flowchart of a process of authenticating the diagnostic apparatus provided in this embodiment of the present application.
As shown in fig. 3, after the receiving an upgrade request sent by a diagnostic apparatus and before the upgrading the routing configuration data in the second storage space based on the routing 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 secret key stored inside the diagnostic apparatus.
In this step, after receiving the upgrade request initiated by the diagnostic device, the gateway controller sends an authentication request to the diagnostic device, where the authentication request may have an authentication random number with four digits, which may be 1053 as an example.
The diagnostic device calculates an authentication value based on the received authentication random number and an internally stored 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, shift first and then and. It should be noted that the shifting manner may be predetermined, and is not described herein again.
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 inside 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 retransmits the authentication request, and if the number of times continuously exceeds the set number, the authentication request has no response, and the gateway controller considers that the authentication has failed, and ends the upgrade. For example, the set time may be 5 seconds, and the set number of times may be 3 times.
And 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 the diagnostic device to calculate the first authentication value, and if the diagnostic device can successfully authenticate, the algorithms of the two are usually consistent, and the first key and the second key are also consistent.
Specifically, when the second authentication value is generated, the authentication random number and the second key stored in the gateway may be input to 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, and operation after shifting. Of course, calculating the first authentication value may also be based on the preset encryption algorithm.
Step 303, authenticating the diagnostic apparatus based on the first authentication value and the second authentication value, and if the authentication is successful, performing the step of upgrading the routing configuration data in the second storage space based on the routing configuration file.
In this step, if the first authentication value is the same as the second authentication value, the authentication is successful. At which point the subsequent step 102 may continue.
And step 102, upgrading the routing configuration data in the second storage space based on the routing configuration file.
It should be noted that a ROM of the gateway is provided with a first storage space and a second storage space, the first storage space stores a routing program code, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program code, the gateway calls the routing configuration data from the second storage space to implement a process of the data routing.
Among them, the ROM is also called a read only memory, and generally operates in a non-destructive read manner, and only information that cannot be written is read. Information is fixed after being written once, and even if the power is turned off, the information is not lost, so that 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, so that the first storage space and the second storage space respectively store different data, the first storage space stores a routing program Code, that is, a Code, and the second storage space stores routing configuration data, that is, routing cfg data, including current routing configuration and backup routing configuration.
Specifically, referring to fig. 4, fig. 4 is a diagram of a data storage structure according to an embodiment of the present application. As shown in fig. 4, the first memory space may be a code segment and the second memory 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 the first storage subspace, cfgA is the second storage subspace, and cfgB is the third storage subspace. The first storage subspace can be used to store the spatial information of the second storage subspace and the third storage subspace, and the data update time and other information.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a process of upgrading the routing configuration data in the second storage space based on the routing configuration file according to an 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 in this embodiment may include:
and step 501, calling the space information corresponding to the current routing configuration data required to be called from the first storage subspace.
In particular, the method comprises the following steps of, the current routing configuration data to be called refers to data used by the current gateway for data routing. The space information corresponding to the current routing configuration data to be called refers to a storage location of data used by the current gateway for data routing, and the storage location may be represented by a space identifier, and may be a second storage subspace or a third storage subspace. The spatial information includes spatial size information, spatial identification, etc. 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 identifier corresponding to the currently required routing configuration data called from the first storage subspace in this step is: the spatial identification of the second storage subspace.
Step 502, determining a currently unused target storage subspace based on the spatial information, where 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 obtained in the above step, a currently unused subspace is selected as a target storage subspace, where the target storage subspace is a storage space of the routing configuration file required by the current upgrade.
Illustratively, if the space identifier corresponding to the currently required routing configuration data 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 routing configuration data in the routing configuration file into the target storage subspace in an overlay manner, so as to complete the upgrade of the routing configuration data in the second storage space.
In this step, the routing configuration file required by the current upgrade is transmitted and stored in the target storage subspace, so that the routing configuration data after the current upgrade can be directly called from the target storage subspace when data routing is performed subsequently.
In addition, in the process of upgrading, a situation that the subspace cannot meet the space required by the routing configuration file may also be encountered, so that the embodiment may further expand the target storage subspace, specifically, refer to fig. 6, where fig. 6 is a schematic flow diagram for expanding the target storage subspace according to an embodiment of the present application.
As shown in fig. 6, in this embodiment, after determining the currently unused target storage subspace based on the space information, before overwriting and storing the routing configuration data in the routing configuration file in the target storage subspace, the method for upgrading the routing configuration data in the second storage space based on the routing configuration file may further include:
step 601, obtaining the space size information of the target storage subspace and the 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, if the space size information and the space occupation size information do not satisfy a preset condition, expanding the target storage subspace.
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 do not meet the preset condition, and at the moment, the target storage subspace needs to be subjected to space expansion 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 may 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 intercepted from the blank storage space of the ROM, and finally the space to be expanded is merged into the target storage subspace.
Step 603, if the space size information and the space occupation size information satisfy a preset condition, performing the step of storing the routing configuration data in the routing configuration file into the target storage subspace in a covering manner.
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 only be ensured to store the routing configuration file if the preset condition is satisfied. At this point, step 503 is executed.
And 103, setting the updated routing configuration data as routing configuration data required to be called when the gateway carries out data routing based on the routing program code. In this step, the space information in the first storage subspace may be updated to the 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 means 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. And 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, restarting the network management controller to perform data routing work by using the updated routing configuration data.
For example, if the space identifier corresponding to the currently required routing configuration data 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 currently required routing configuration data 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 present embodiment further provides a data routing method for a gateway, which is applicable to a data routing scenario of the gateway, and fig. 7 is a schematic flow diagram of the data routing method for the gateway provided in the first embodiment of the present application.
As shown in fig. 7, the data routing method for a gateway provided in this embodiment may include:
step 701, under the condition that a data routing request carrying a routing type is received, retrieving spatial information from a second storage space.
In this step, when the network management controller receives the data routing request, the space identifier corresponding to the currently required routing configuration data is called from the first storage subspace in the second storage space. Illustratively, a third storage subspace.
Step 702 and calling target routing configuration data corresponding to the routing type from the target storage subspace identified by the spatial 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 current required type of routing configuration data is called from the target storage subspace.
And 703, completing 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 called in step 702.
In this embodiment, an upgrade request sent by a diagnostic apparatus is received when a data routing function of a gateway needs to be upgraded, where the upgrade request includes a routing configuration file; upgrading the routing configuration data in the second storage space based on the routing configuration file; setting the upgraded routing configuration data as routing configuration data to be called when the gateway performs data routing based on the routing program code; under the condition that a data routing request carrying a routing type is received, spatial information is called from a second storage space; calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial 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 upgraded data routing. Therefore, the scheme of the application only needs to upgrade the routing configuration data of the gateway, and does not need to upgrade all programs of the gateway, so that network resources and time required by upgrading are greatly saved, and risks caused by upgrading interruption are avoided.
Example two
Referring to fig. 8, fig. 8 is a schematic structural diagram of an upgrading apparatus of 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 corresponding functional modules and beneficial effects of the execution method. The device can be implemented in a software and/or hardware manner, 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 a diagnostic apparatus when a data routing function of a gateway needs to be upgraded, where the upgrade request includes a routing configuration file;
an upgrade module 802, configured to upgrade, based on the routing configuration file, the routing configuration data in the second storage space;
a setting module 803, configured to set the updated routing configuration data as the routing configuration data that needs to be called 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 when a data routing function of a gateway needs to be upgraded, where the upgrade request includes a routing configuration file; upgrading the routing configuration data in the second storage space based on the routing configuration file; setting the upgraded routing configuration data as routing configuration data to be called when the gateway performs data routing based on the routing program code; under the condition that a data routing request carrying a routing type is received, spatial information is called from a second storage space; calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial 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 upgraded data routing. Therefore, the scheme of the application only needs to upgrade the routing configuration data of the gateway, and does not need to upgrade all programs of the gateway, so that network resources and time required by upgrading are greatly saved, and risks caused by upgrading interruption are avoided.
EXAMPLE III
Fig. 9 is a schematic structural diagram of an electronic apparatus according to a third embodiment of the present application, as shown in fig. 9, the electronic apparatus includes a processor 910, a memory 920, an input device 930, and an output device 940; the number of the processors 910 in the electronic device may be one or more, and one processor 910 is taken as an example in fig. 9; the processor 910, the memory 920, the input device 930, and the output device 940 in the electronic apparatus may be connected by a bus or other means, and fig. 9 illustrates an example of connection by a bus.
The memory 920 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the gateway upgrading or data routing method in the embodiment of the present application (for example, the receiving module 801, the upgrading module 802, and the setting module 803 in the gateway upgrading and data routing apparatus). The processor 910 executes various functional applications and data processing of the in-vehicle gateway by running software programs, instructions and modules stored in the memory 920, that is, implements the above-described gateway upgrading or data routing method.
That is, under the condition that the data routing function of the gateway needs to be upgraded, receiving an upgrade request sent by a diagnostic instrument, wherein the upgrade request comprises a routing configuration file;
upgrading the routing configuration data in the second storage space based on the routing configuration file;
and setting the upgraded routing configuration data as routing configuration data required to be called when the gateway performs data routing based on the routing program code.
Or
Under the condition of receiving a data routing request carrying a routing type, calling spatial information from a second storage space;
calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space;
and finishing the data routing of the gateway based on the target routing configuration data. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the 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, the memory 920 may further include memory located remotely from the processor 910, which may be connected to electronic devices over 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 unit 930 may be used to receive an input upgrade request or routing request and generate key signal inputs related to user settings and function control of the electronic device. The output device 440 may include a display device such as a display screen.
Example four
A fourth embodiment of the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for upgrading a gateway or routing data, the method including:
under the condition that the data routing function of the gateway needs to be upgraded, receiving an upgrading request sent by a diagnostic instrument, wherein the upgrading request comprises a routing configuration file;
upgrading the routing configuration data in the second storage space based on the routing configuration file;
and setting the updated routing configuration data as routing configuration data required to be called when the gateway carries out data routing based on the routing program code.
Or
Under the condition of receiving a data routing request carrying a routing type, calling spatial information from a second storage space;
calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space;
and finishing the data routing of the gateway based on the target routing configuration data.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the method for upgrading a gateway and routing data provided in any embodiment of the present application.
From the above description of the embodiments, it is obvious for those skilled in the art that the present application can be implemented by software and necessary general hardware, and certainly can be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied 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 (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods of the embodiments of the present application.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments illustrated herein, and that various obvious changes, rearrangements and substitutions may be made therein by those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. An upgrading method of a gateway, wherein a ROM of the gateway is provided with a first storage space and a second storage space, the first storage space stores a routing program code, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program code, the gateway calls the routing configuration data from the second storage space to implement a process of the data routing, the method comprising:
under the condition that the data routing function of the gateway needs to be upgraded, receiving an upgrading request sent by a diagnostic instrument, wherein the upgrading request comprises a routing configuration file;
upgrading the routing configuration data in the second storage space based on the routing configuration file;
and setting the updated routing configuration data as routing configuration data required to be called when the gateway carries out data routing based on the routing program code.
2. The method of claim 1, wherein after the receiving an upgrade request sent by a diagnostic device and before the upgrading 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 back the authentication random number to the diagnostic instrument so that the diagnostic instrument generates a first authentication value based on the authentication random number and a first secret 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 routing configuration data in the second storage space based on the routing configuration file under the condition of successful authentication.
3. The method of claim 2, wherein 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 according to claim 1, wherein the second storage space is provided with a first storage subspace, a second storage subspace and a third storage subspace;
the upgrading the routing configuration data in the second storage space based on the routing configuration file includes:
calling space information corresponding to the current required route configuration data from the first storage subspace;
determining a target storage subspace which is not used currently based on the spatial information, wherein the target storage subspace is the second storage subspace or the third storage subspace;
and overwriting and storing the routing configuration data in the routing configuration file into the target storage subspace so as to finish upgrading the routing configuration data in the second storage space.
5. The method of claim 4, wherein after the determining a currently unused target storage subspace based on the spatial information and before the storing the routing configuration data in the routing configuration file in the target storage subspace in an overlay manner, the upgrading the routing configuration data in the second storage space based on the routing configuration file further comprises:
acquiring the space size information of the target storage subspace and the space occupation size information of the routing configuration file;
if the space size information and the space occupation size information do not meet the preset condition, 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 into the target storage subspace in a covering manner.
6. The method according to claim 4 or 5, wherein the setting the upgraded routing configuration data as the routing configuration data that needs to be called when the gateway performs data routing based on the routing program code includes:
and updating the space information in the first storage subspace to a space identifier corresponding to the target storage subspace, so that the gateway performs data routing based on the routing program code and calls routing configuration data in the target storage subspace based on the space identifier.
7. A data routing method for a gateway, the method comprising:
under the condition of receiving a data routing request carrying a routing type, calling spatial information from a second storage space;
calling target routing configuration data corresponding to the routing type from a target storage subspace identified by the spatial information in the second storage space;
and finishing the data routing of the gateway based on the target routing configuration data.
8. An upgrade apparatus for a gateway, wherein a ROM of the gateway is provided with a first storage space and a second storage space, the first storage space stores a routing program code, the second storage space stores routing configuration data, and when the gateway performs data routing based on the routing program code, the gateway calls the routing configuration data from the second storage space to implement a process of the data routing, the apparatus comprising:
the gateway comprises a receiving module, a judging module and a judging module, wherein the receiving module is used for receiving an upgrading request sent by a diagnostic instrument under the condition that the data routing function of the gateway needs to be upgraded, and the upgrading request comprises a routing configuration file;
the upgrading module is used for upgrading the routing configuration data in the second storage space based on the routing configuration file;
and the setting module is used for setting the updated routing configuration data as the routing configuration data required to be called when the gateway carries out data routing based on the routing program code.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of upgrading a gateway of any of claims 1-6 or the method of data routing for a gateway of claim 7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method of upgrading a gateway as claimed in any one of claims 1 to 6 or the method of data routing of a gateway as claimed in claim 7.
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 true CN115150271A (en) 2022-10-04
CN115150271B 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
CN115150271B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
CN110928567A (en) Vehicle system upgrading method, terminal device and computer-readable storage medium
CN109358867B (en) Automatic upgrading method, device and system for unmanned vehicle application and storage medium
US20240069906A1 (en) Server, software update system, distribution method, and non-transitory storage medium
CN109257426B (en) Service line resource loading method and device, computer equipment and storage medium
JP5989190B1 (en) Gateway and in-vehicle software update system using the same
CN112860953A (en) Data importing method, device, equipment and storage medium of graph database
CN110741617B (en) Resource updating method and device, computer equipment and storage medium
CN112968793B (en) Equipment upgrading method, device, equipment and storage medium based on Internet of things
CN113791792A (en) Application calling information acquisition method and device and storage medium
CN113282310A (en) Application management method and system, vehicle-mounted device, server and readable storage medium
CN115150271B (en) Gateway upgrading and data routing method, device, equipment and storage medium
US20220391192A1 (en) Ota master, center, system, method, non-transitory storage medium, and vehicle
WO2022205200A1 (en) Version management method and apparatus
CN114780114A (en) Firmware upgrading method, system, vehicle and storage medium
JP2019199122A (en) On-vehicle relay device, communication system, bus determination method and computer program
CN115102804A (en) Data routing method and device for vehicle-mounted gateway, vehicle-mounted gateway and storage medium
CN111740972B (en) Method, device, equipment and storage medium for updating communication protocol stack information
CN110933736B (en) Vehicle-mounted controller communication method, device, equipment and storage medium
CN114675856A (en) OTA upgrade control method, device, system, computer equipment and medium
CN110751755B (en) Unlocking method and device, computer equipment and storage medium
CN110825406A (en) Software upgrading method and related equipment
US11947824B2 (en) Electronic control unit, method, and program
CN110677466A (en) Application program downloading method, device, gateway and storage medium
US20220405082A1 (en) Center, ota master, system, method, non-transitory storage medium, and vehicle
CN115390883B (en) Vehicle safety starting information updating method, device, equipment and storage medium

Legal Events

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