Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," and the like, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
Referring to the schematic structural diagram of fig. 1 and the signal transmission diagram of fig. 2, a network control device of a non-original module is shown, the device includes: original module 110, non-original module 120, control local area network 130 and gateway module 140;
the control area network 130 comprises a controller area network 1310 of original modules and a control area network 1320 of non-original modules;
the original module 110 is electrically connected to the controller area network 1310 of the original module, and the controller area network 1310 of the original module is electrically connected to the gateway module 140;
the original module 110 is configured to obtain data required by a vehicle unassembled module, and send the data required by the vehicle unassembled module to the gateway module 140 through the controller local area network 1310 of the original module;
the non-original module 120 is electrically connected to the controller area network 1320 of the non-original module, and the controller area network 1320 of the non-original module is electrically connected to the gateway module 140;
the gateway module 140 is configured to authenticate the non-genuine module 120 through the controller area network 1310 of the non-genuine module;
if the authentication is successful, the gateway module 140 forwards the data required by the vehicle unaffiliated module to the controller area network 1310 of the unaffiliated module;
the non-native module 120 is configured to receive data, which is transmitted by the controller lan 1320 of the non-native module and is required by the vehicle non-native module, and execute a corresponding function according to the data required by the vehicle non-native module.
Specifically, the original module comprises various functional domain modules, which can comprise a power domain module, a chassis domain module, an information domain module and the like. The corresponding Network topology is also a Controller Area Network (CAN) of each functional domain module, such as a CAN of a power domain module, a CAN of a chassis domain module, a CAN of an information domain module, and the like. Each module is connected to a node of the CAN in the corresponding domain. The non-original-mounted module is a functional module mounted behind a user after a vehicle leaves a factory, for example, an operator of a network appointment car needs to actively prompt when the user opens a door when getting off the car due to a certain requirement, at the moment, a door action signal acquired by a sensor in the original-mounted module of the vehicle needs to be acquired, and then the door action signal is transmitted to a door opening prompt module mounted behind the vehicle, the door opening prompt module gives a corresponding prompt, and the prompt information can be fed back to a control module of the original-mounted module.
When the vehicle leaves a factory, the network structure comprises the CAN of each functional domain module and the CAN reserved for the non-original module, namely the CAN of the non-original module, only a gateway node is arranged on the CAN of the non-original module, and the non-original module is not arranged on the CAN of the non-original module, so that a user CAN install the non-original module on the CAN line of the non-original module according to the requirement of the user.
When the non-original module acquires required data from the original module, the original module needs to transmit data to the gateway module through the CAN of the original module, the gateway module forwards the data, and the data is transmitted to the non-original module through the CAN of the non-original module. The gateway module needs to authenticate the non-original module, and the data transmission can be performed only by the successfully authenticated non-original module, so that the security of data transmission is guaranteed.
Further, referring to fig. 2, the apparatus further includes:
the non-native module 120 is further configured to send data executed by the non-native function to the gateway module 140 through the controller area network 1320 of the non-native module;
if the gateway module 140 successfully authenticates the non-genuine module 120, the gateway module 140 is further configured to forward the data executed by the non-genuine function to the controller local area network 1310 of the genuine module;
the original module 110 is further configured to receive data transmitted by the controller area network 1310 of the original module, where the data is executed by the non-original function.
Specifically, the original module and the non-original module perform two-way communication through the gateway module, the original module transmits related data to the non-original module through forwarding of the gateway module, the non-original module feeds back execution data to the original module through forwarding of the gateway module, and in the two-way communication process, the gateway module needs to authenticate the non-original module, otherwise, the data of the non-original module cannot be fed back to the original module.
Further, referring to fig. 3, the authentication of the non-native module 120 by the gateway module 140 through the controller area network 1320 of the non-native module includes:
the gateway module 140 sends authentication information to the non-genuine module 120;
the non-original module 120 sends feedback information to the gateway module 140 based on the authentication information;
the gateway module 140 compares the feedback information with the authentication information, and authenticates the non-original module 120.
Specifically, when the gateway module authenticates the non-genuine module, the gateway module sends authentication information to the non-genuine module through the CAN of the non-genuine module, after the non-genuine module receives the authentication information, corresponding feedback information is obtained based on the authentication information, the feedback information is sent to the gateway module through the CAN of the non-genuine module, and the gateway module verifies the feedback information and determines whether the non-genuine module passes the authentication. When verifying the feedback information, the gateway module verifies by comparing the contents of the authentication information and the feedback information.
Further, referring to fig. 4, the gateway module 140 compares the feedback information with the authentication information, and the authenticating the non-original module 120 includes:
the gateway module 140 obtains the first encoded data in the authentication information;
the gateway module 140 calculates second encoded data according to the first encoded data;
the gateway module 140 matches the second encoded data with the feedback encoded data in the feedback information, and authenticates the non-genuine module 120, where the feedback encoded data is calculated by the non-genuine module 120 according to the first encoded data.
Specifically, when the gateway module compares the feedback information with the authentication information, the first coded data in the authentication information and the feedback coded data in the feedback information are compared. The authentication information sent by the gateway module to the non-original module contains first coded data, after the authentication information with the first coded data is received by the non-original module, feedback coded information is obtained through calculation according to a preset algorithm consistent with that of the gateway module and based on the first coded data, and the feedback coded information is sent to the gateway module. And at the moment, the gateway module calculates to obtain second coded data based on the first coded data according to a preset algorithm consistent with the non-original module, the gateway module compares the first coded data with the feedback coded data, if the first coded data is consistent with the feedback coded data, the authentication is successful, and the non-original module is a legal node.
In a specific embodiment, after the vehicle is powered on, the gateway broadcasts a safety management message in a period of 1s, wherein 4 bytes of the first 7 bytes of the message are keys, the other 3 bytes are random numbers, and the last byte is a CRC check code. And sending the CAN message data with Key to the non-original module. After the node of the non-original module receives the Key message, the Seed of 4 bytes is calculated in a certain time by an algorithm consistent with the gateway, the Seed is distributed in the first 7 bytes, the other 3 bytes are random numbers, and the last byte is a CRC (cyclic redundancy check) code. The non-original-mounted module sends the CAN message data containing the Seed to the gateway, after the gateway receives the Seed message sent by the node of the rear-mounted module, the Seed of the message is compared with the Seed calculated by the gateway, and if the Seed message is consistent with the Seed calculated by the gateway, the node is considered to be a legal node.
The data transmission safety is ensured by the mode of authenticating the non-original module. And the gateway module does not carry out signal routing according to the existence of the signal source, but carries out signal routing according to the existence of the non-original module, and simultaneously verifies the non-original module, so that the error report when the message is transmitted and no response is made CAN be avoided when the CAN of the non-original module has no legal node.
Further, referring to fig. 5, the gateway module 140 matches the second encoded data with the feedback encoded data in the feedback information, and authenticating the non-original module 120 further includes:
if the gateway module 140 does not successfully authenticate the non-original module 120 for the first time, the gateway module 140 performs secondary authentication on the non-original module 120;
if the second authentication is successful, the gateway module 140 forwards the data required by the vehicle unaffiliated module to the controller local area network 1320 of the unaffiliated module;
if the secondary authentication is not successful, the gateway module 140 prohibits the data required by the vehicle unassembled module from being transmitted to the controller area network 1320 of the unassembled module.
Specifically, if the first authentication of the non-original module by the gateway module is not successful, the gateway module will send the second authentication information to the non-original module again to perform the second authentication. And the non-original-package module obtains feedback coding data of the secondary authentication through a preset algorithm consistent with the gateway module according to the first coding data in the secondary authentication information. And the gateway module obtains second coded data of the secondary authentication according to a preset algorithm based on the first coded data in the secondary authentication information, compares the second coded data of the secondary authentication with the feedback coded data of the secondary authentication, and judges whether the non-original module is a legal node or not. If the authentication is successful, the subsequent information transmission operation is continued, if the authentication is failed, the non-original module is determined to be an illegal node, and the data information in the non-original module is prohibited from being uploaded to the original module and the CAN of the original module, so that the data safety in the original module is guaranteed.
Further, the controller area network 1320 of the non-native module and the controller area network 1310 of the native module are different network buses with physical isolation.
Specifically, an isolation mechanism is arranged between a controller area network of the non-original module and a controller area network of the original module, and the isolation mechanism comprises physical isolation and software isolation. The network bus of the controller area network physically isolated into the original module and the network bus of the controller area network of the original module are different network buses, data transmitted on the network bus of the controller area network physically isolated into the original module and the network bus of the controller area network of the original module can be transmitted only after the gateway module successfully authenticates the non-original module, the gateway module selectively routes the data, the data of the routable node preset in the gateway module is directly forwarded by the gateway module, nodes not preset in the gateway module, such as the nodes of the non-original module, are not preset, and the gateway module performs routing after authentication. The controller area network of the non-original module and the controller area network of the original module are physically and software isolated, so that mutual interference between the non-original module and the original module is avoided, and the communication quality of the control area network is ensured.
Further, referring to fig. 6, the apparatus further includes a diagnostic port 150, which includes a diagnostic port 1520 of the non-genuine module and a diagnostic port 1510 of the genuine module;
the diagnostic port 1520 of the non-genuine module sends diagnostic information to the non-genuine module 120 through the controller area network 1320 of the non-genuine module;
the non-native module 120 feeds back a diagnosis result to the diagnosis port 1520 of the non-native module through the controller area network 1320 of the non-native module, and the diagnosis port 1520 of the non-native module is a diagnosis port which is arranged on the controller area network 1320 of the non-native module and is only used for diagnosing the non-native module 120.
Specifically, a controller local area network of the non-original module is provided with two network nodes, namely a non-original module and a diagnosis interface of the non-original module, wherein the diagnosis interface of the non-original module is only used for diagnosing the non-original module, and fault information of the non-original module can be timely processed on the basis of isolation of the original module and the non-original module. The diagnosis interface of the non-original module sends diagnosis information to the non-original module for diagnosis, the non-original module feeds back a diagnosis result to the diagnosis port of the non-original module, and the diagnosis port of the non-original module analyzes and processes the fed back diagnosis result to judge whether the non-original module fails. If yes, the diagnosis interface of the non-original module feeds back fault information, and fault prompt of the non-original module is carried out.
The embodiment of the invention provides a network control device of a non-original module, which comprises: the system comprises an original module, a non-original module, a control local area network and a gateway module. The original module is connected with the control local area network of the original module, the non-original module is connected with the control local area network of the non-original module, and the control local area network of the original module and the control local area network of the non-original module are both connected with the gateway module. When the original module sends data to the non-original module or the non-original module sends data to the original module, the gateway module needs to authenticate the non-original module, data transmission can be continued when authentication is successful, and data transmission of the non-original module to the original module is forbidden when authentication is unsuccessful. The method has the advantages that the control local area network of the non-original module is separated, the mutual interference between the non-original module and the original module is avoided, the communication quality of the control local area network is guaranteed, and the safety of data transmission is guaranteed in a mode of authenticating the non-original module.
An embodiment of the present invention further provides a network control method for a non-original module, please refer to fig. 7, where the method includes:
s710, the original module acquires data required by the vehicle non-original module;
s720, the original module sends data required by the vehicle non-original module to a gateway module through a controller local area network of the original module;
s730, the gateway module authenticates the non-original module through a controller local area network of the non-original module;
further, referring to fig. 8, the authenticating, by the gateway module, the non-native module through the controller area network of the non-native module includes:
s810, the gateway module sends authentication information to the non-original module;
s820, the non-original-installed module sends feedback information to a gateway module based on the authentication information;
and S830, the gateway module compares the feedback information with the authentication information to authenticate the non-original module.
Further, referring to fig. 9, the comparing, by the gateway module, the feedback information and the authentication information, and the authenticating the non-original module includes:
s910, the gateway module acquires first coded data in the authentication information;
s920, the gateway module calculates second coded data according to the first coded data;
s930, the gateway module matches the second coded data with feedback coded data in the feedback information to authenticate the non-original-package module, wherein the feedback coded data are data calculated by the non-original-package module according to the first coded data.
Specifically, when the gateway module compares the feedback information with the authentication information, the first coded data in the authentication information and the feedback coded data in the feedback information are compared. The authentication information sent by the gateway module to the non-original module contains first coded data, after the authentication information with the first coded data is received by the non-original module, feedback coded information is obtained through calculation according to a preset algorithm consistent with that of the gateway module and based on the first coded data, and the feedback coded information is sent to the gateway module. And at the moment, the gateway module calculates to obtain second coded data based on the first coded data according to a preset algorithm consistent with the non-original module, the gateway module compares the first coded data with the feedback coded data, if the first coded data is consistent with the feedback coded data, the authentication is successful, and the non-original module is a legal node.
In a specific embodiment, after the vehicle is powered on, the gateway broadcasts a safety management message in a period of 1s, wherein 4 bytes of the first 7 bytes of the message are keys, the other 3 bytes are random numbers, and the last byte is a CRC check code. And sending the CAN message data with Key to the non-original module. After the node of the non-original module receives the Key message, the Seed of 4 bytes is calculated in a certain time by an algorithm consistent with the gateway, the Seed is distributed in the first 7 bytes, the other 3 bytes are random numbers, and the last byte is a CRC (cyclic redundancy check) code. The non-original-mounted module sends the CAN message data containing the Seed to the gateway, after the gateway receives the Seed message sent by the node of the rear-mounted module, the Seed of the message is compared with the Seed calculated by the gateway, and if the Seed message is consistent with the Seed calculated by the gateway, the node is considered to be a legal node.
The data transmission safety is ensured by the mode of authenticating the non-original module. And the gateway module does not carry out signal routing according to the existence of the signal source, but carries out signal routing according to the existence of the non-original module, and simultaneously verifies the non-original module, so that the error report when the message is transmitted and no response is made CAN be avoided when the CAN of the non-original module has no legal node.
Further, referring to fig. 10, the matching, by the gateway module, the second encoded data and the feedback encoded data in the feedback information, and authenticating the non-original module further includes:
s1010, if the authentication of the non-original module by the gateway module for the first time is unsuccessful, the gateway module carries out secondary authentication on the non-original module;
s1020, if the secondary authentication is successful, the gateway module forwards data required by the vehicle non-original module to a controller area network of the non-original module;
and S1030, if the secondary authentication is unsuccessful, the gateway module prohibits the data required by the vehicle non-original module from being transmitted to the controller local area network of the non-original module.
Specifically, if the first authentication of the non-original module by the gateway module is not successful, the gateway module will send the second authentication information to the non-original module again to perform the second authentication. And the non-original-package module obtains feedback coding data of the secondary authentication through a preset algorithm consistent with the gateway module according to the first coding data in the secondary authentication information. And the gateway module obtains second coded data of the secondary authentication according to a preset algorithm based on the first coded data in the secondary authentication information, compares the second coded data of the secondary authentication with the feedback coded data of the secondary authentication, and judges whether the non-original module is a legal node or not. If the authentication is successful, the subsequent information transmission operation is continued, if the authentication is failed, the non-original module is determined to be an illegal node, and the data information in the non-original module is prohibited from being uploaded to the original module and the CAN of the original module, so that the data safety in the original module is guaranteed.
S740, if the authentication is successful, the gateway module forwards data required by the vehicle non-original module to a controller area network of the non-original module;
s750, a non-original-mounted module receives data required by the vehicle non-original-mounted module, wherein the data are transmitted by a controller local area network of the non-original-mounted module;
and S760, the non-original module executes corresponding functions according to data required by the vehicle non-original module.
Further, referring to fig. 11, the method further includes:
s1110, the non-original module sends data executed by the non-original function to a gateway module through a controller local area network of the non-original module;
s1120 if the gateway module successfully authenticates the non-native module, the gateway module forwards the data executed by the non-native function to a controller area network of the native module;
s1130 the original module receives data, which is transmitted by the controller area network of the original module and executed by the non-original function.
The embodiment of the invention provides a network control method of a non-original module, which comprises the following steps: when the original module sends data to the non-original module or the non-original module sends data to the original module, the gateway module needs to authenticate the non-original module, data transmission can be continued when authentication is successful, and data transmission of the non-original module to the original module is forbidden when authentication is unsuccessful. The method has the advantages that the control local area network of the non-original module is separated, the mutual interference between the non-original module and the original module is avoided, the communication quality of the control local area network is guaranteed, and the safety of data transmission is guaranteed in a mode of authenticating the non-original module.
The present embodiment also provides a computer-readable storage medium, where computer-executable instructions are stored in the storage medium, and the computer-executable instructions are loaded by a processor and execute the network control method of the non-native module according to the present embodiment.
The present embodiment also provides an apparatus, which includes a processor and a memory, where the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the network control method of the non-native module according to the present embodiment.
The device may be a computer terminal, a mobile terminal or a server, and the device may also participate in forming the apparatus or system provided by the embodiments of the present invention. As shown in fig. 12, the mobile terminal 12 (or computer terminal 12 or server 12) may include one or more (shown here as 1202a, 1202b, … …, 1202 n) processors 1202 (the processors 1202 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), memory 1204 for storing data, and a transmitting device 1206 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 12 is only an illustration and is not intended to limit the structure of the electronic device. For example, mobile device 12 may also include more or fewer components than shown in FIG. 12, or have a different configuration than shown in FIG. 12.
It should be noted that the one or more processors 1202 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Further, the data processing circuitry may be a single, stand-alone processing module, or incorporated in whole or in part into any of the other elements in the mobile device 12 (or computer terminal). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 1204 may be used for storing software programs and modules of application software, such as program instructions/data storage devices corresponding to the method described in the embodiment of the present invention, and the processor 1202 executes various functional applications and data processing by running the software programs and modules stored in the memory 1204, so as to implement the above-mentioned method for generating the self-attention network-based time-series behavior capture block. The memory 1204 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 1204 may further include memory located remotely from processor 1202, which may be connected to mobile device 12 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 transmitting device 1206 is used for receiving or sending data via a network. Specific examples of such networks may include wireless networks provided by the communication provider of the mobile terminal 12. In one example, the transmitting device 1206 includes a Network Interface Controller (NIC) that can be connected to other Network devices via a base station to communicate with the internet. In one example, the transmitting device 1206 can be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the mobile device 12 (or computer terminal).
The present specification provides method steps as described in the examples or flowcharts, but may include more or fewer steps based on routine or non-inventive labor. The steps and sequences recited in the embodiments are but one manner of performing the steps in a multitude of sequences and do not represent a unique order of performance. In the actual system or interrupted product execution, it may be performed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
The configurations shown in the present embodiment are only partial configurations related to the present application, and do not constitute a limitation on the devices to which the present application is applied, and a specific device may include more or less components than those shown, or combine some components, or have an arrangement of different components. It should be understood that the methods, apparatuses, and the like disclosed in the embodiments may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a division of one logic function, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or unit modules.
Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.