CN116455784A - Gateway test method, system, computer and readable storage medium - Google Patents

Gateway test method, system, computer and readable storage medium Download PDF

Info

Publication number
CN116455784A
CN116455784A CN202310250768.3A CN202310250768A CN116455784A CN 116455784 A CN116455784 A CN 116455784A CN 202310250768 A CN202310250768 A CN 202310250768A CN 116455784 A CN116455784 A CN 116455784A
Authority
CN
China
Prior art keywords
test
gateway
module
vehicle
parameters
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.)
Pending
Application number
CN202310250768.3A
Other languages
Chinese (zh)
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.)
Jiangling Motors Corp Ltd
Original Assignee
Jiangling Motors Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangling Motors Corp Ltd filed Critical Jiangling Motors Corp Ltd
Priority to CN202310250768.3A priority Critical patent/CN116455784A/en
Publication of CN116455784A publication Critical patent/CN116455784A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • 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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention provides a gateway test method, a system, a computer and a readable storage medium, wherein the method comprises the following steps: receiving a DBC file input by a user, and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises each functional module of the gateway; detecting module parameters corresponding to each functional module in a preset database, and generating a plurality of test cases corresponding to each module parameter, wherein each test case has uniqueness; establishing communication connection with a CAN bus of the vehicle through VSPY, and simulating a CAN channel corresponding to the CAN bus through VSPY; and transmitting the test cases to a gateway of the vehicle through the CAN path, and simulating a signal environment of the vehicle through VSPY so as to complete the test of the gateway through the test cases in the signal environment. Through the mode, the test of a plurality of functional modules in the vehicle gateway can be completed at the same time, and further, the workload of the test is greatly reduced.

Description

Gateway test method, system, computer and readable storage medium
Technical Field
The present invention relates to the field of automotive technologies, and in particular, to a gateway testing method, a gateway testing system, a gateway testing computer, and a readable storage medium.
Background
With the stable development of the automobile industry, automobiles become one of important tools in production and life, so that the maintenance quantity of the automobiles is promoted to be continuously increased. The automobile is continuously increased, meanwhile, the configuration of the automobile is rich, the rich configuration needs to be synchronously matched with a plurality of CAN (Controller Area Network, controller area network bus) network segments, and the effectiveness and accuracy of signal interaction among the network segments directly reflect the automobile type configuration function and the quality of customer experience.
The gateway is used as a routing part of the whole vehicle, plays an important role in the development of the whole vehicle function, and has strict requirements on the functional completeness and reliability of the gateway. However, the test of the gateway function in the prior art is only limited to the test of checking the message information one by one after the whole car is loaded or on the whole car rack, and the test mode is large in workload, complex in work, easy to occur the phenomenon that the missing function is not tested, and huge in data volume generated by the test, so that the gateway part cannot be tested completely and effectively.
Disclosure of Invention
Based on the above, the invention aims to provide a gateway testing method, a system, a computer and a readable storage medium, so as to solve the problems that the test of the gateway function in the prior art is only limited to the test of checking message information one by one after the completion of loading of the whole vehicle or on the whole vehicle rack, the testing mode has large workload and complicated work, the phenomenon of untested missing function easily occurs, and the data volume generated by the test is huge, so that the complete and effective test of the gateway part cannot be realized.
An embodiment of the present invention provides a gateway testing method, where the method includes:
receiving a DBC file input by a user, and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises each functional module of a gateway;
detecting module parameters corresponding to the functional modules in a preset database, and generating a plurality of test cases corresponding to the module parameters, wherein each test case has uniqueness;
establishing communication connection with a CAN bus of a vehicle through VSPY, and simulating a CAN channel corresponding to the CAN bus through the VSPY;
transmitting a plurality of test cases to a gateway of the vehicle through the CAN access, and simulating a signal environment of the vehicle through the VSPY so as to finish the test of the gateway through the test cases in the signal environment.
The beneficial effects of the invention are as follows: generating corresponding gateway routing information according to the DBC file by receiving the DBC file input by a user, wherein the gateway routing information comprises each functional module of a gateway; further, module parameters corresponding to the functional modules are detected in a preset database, and a plurality of test cases corresponding to the module parameters are generated, wherein each test case has uniqueness; further, communication connection with a CAN bus of the vehicle is established through VSPY, and a CAN channel corresponding to the CAN bus is simulated through the VSPY; and finally, transmitting a plurality of test cases to a gateway of the vehicle only through the CAN path, and simulating a signal environment of the vehicle through the VSPY so as to finish the test of the gateway through the test cases in the signal environment. According to the method, the corresponding test cases can be generated in real time according to the module parameters of each functional module in the vehicle gateway, and meanwhile, the test environment matched with the current vehicle gateway can be simulated in real time, so that the test of a plurality of functional modules in the vehicle gateway can be completed at the same time, the workload of the test is greatly reduced, the phenomenon that the functional modules are not tested is avoided, and the method is suitable for large-scale popularization and use.
Preferably, the step of detecting module parameters corresponding to the functional modules in a preset database, and generating a plurality of test cases corresponding to the module parameters includes:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
Preferably, the step of generating a plurality of test cases according to a plurality of test factors includes:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
Preferably, the step of generating a plurality of corresponding test sequences by serializing each module parameter by a first preset algorithm includes:
when a plurality of module parameters are obtained, identifying structured parameters and unstructured parameters contained in each module parameter through a preset ARX model, and storing the structured parameters and the unstructured parameters into a preset MySQL relational database;
and carrying out serialization processing on the structured parameters and filtering processing on the unstructured parameters in the preset MySQL relational database through the first preset algorithm so as to generate a plurality of test sequences.
Preferably, after the step of simulating the signal environment of the vehicle by the VSPY to complete the test on the gateway by the test case in the signal environment, the method further includes:
receiving a test result output by the VSPY in real time, and judging whether the test result is within a preset threshold value;
if the test result is judged to be within the preset threshold, judging that the gateway of the vehicle meets the factory requirement currently, and generating a corresponding test label according to the test result;
if the test result is judged not to be within the preset threshold, judging that the gateway of the current vehicle does not meet the factory requirement, and retesting the gateway of the current vehicle.
A second aspect of an embodiment of the present invention proposes a gateway test system, the system including:
the receiving module is used for receiving the DBC file input by the user and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises all functional modules of the gateway;
the detection module is used for detecting module parameters corresponding to the functional modules in a preset database and generating a plurality of test cases corresponding to the module parameters, wherein each test case has uniqueness;
the simulation module is used for establishing communication connection with a CAN bus of the vehicle through VSPY and simulating a CAN channel corresponding to the CAN bus through the VSPY;
the test module is used for transmitting a plurality of test cases to a gateway of the vehicle through the CAN access, and simulating a signal environment of the vehicle through the VSPY so as to complete the test of the gateway through the test cases in the signal environment.
In the gateway test system, the detection module is specifically configured to:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
In the gateway test system, the detection module is further specifically configured to:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
In the gateway test system, the detection module is further specifically configured to:
when a plurality of module parameters are obtained, identifying structured parameters and unstructured parameters contained in each module parameter through a preset ARX model, and storing the structured parameters and the unstructured parameters into a preset MySQL relational database;
and carrying out serialization processing on the structured parameters and filtering processing on the unstructured parameters in the preset MySQL relational database through the first preset algorithm so as to generate a plurality of test sequences.
In the gateway test system, the gateway test system further comprises a judging module, wherein the judging module is specifically used for:
receiving a test result output by the VSPY in real time, and judging whether the test result is within a preset threshold value;
if the test result is judged to be within the preset threshold, judging that the gateway of the vehicle meets the factory requirement currently, and generating a corresponding test label according to the test result;
if the test result is judged not to be within the preset threshold, judging that the gateway of the current vehicle does not meet the factory requirement, and retesting the gateway of the current vehicle.
A third aspect of an embodiment of the present invention proposes a computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the gateway test method as described above when executing the computer program.
A fourth aspect of the embodiments of the present invention proposes a readable storage medium having stored thereon a computer program which, when executed by a processor, implements a gateway test method as described above.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
Fig. 1 is a flowchart of a gateway testing method according to a first embodiment of the present invention;
fig. 2 is a block diagram of a gateway test system according to a sixth embodiment of the present invention.
The invention will be further described in the following detailed description in conjunction with the above-described figures.
Detailed Description
In order that the invention may be readily understood, a more complete description of the invention will be rendered by reference to the appended drawings. Several embodiments of the invention are presented in the figures. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "mounted" on another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and/or" as used herein includes any and all combinations of one or more of the associated listed items.
The gateway is used as a routing part of the whole vehicle, plays an important role in the development of the whole vehicle function, and has strict requirements on the functional completeness and reliability of the gateway. However, the test of the gateway function in the prior art is only limited to the test of checking the message information one by one after the whole car is loaded or on the whole car rack, and the test mode is large in workload, complex in work, easy to occur the phenomenon that the missing function is not tested, and huge in data volume generated by the test, so that the gateway part cannot be tested completely and effectively.
Referring to fig. 1, a gateway test method according to a first embodiment of the present invention is shown, where the gateway test method according to the present embodiment can generate corresponding test cases in real time according to module parameters of each functional module in a vehicle gateway, and at the same time, can simulate a test environment adapted to a current vehicle gateway in real time, so that a plurality of functional modules in the vehicle gateway can be tested at the same time, thereby greatly reducing test workload, avoiding a phenomenon that missing functional modules are not tested, and being suitable for wide popularization and use.
Specifically, the gateway testing method provided in this embodiment specifically includes the following steps:
step S10, receiving a DBC file input by a user, and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises each functional module of a gateway;
in particular, in this embodiment, it should be first explained that the gateway test method provided in this embodiment is specifically applied to gateways of different vehicle types, and is used to detect, in real time, whether the gateway in the vehicle is qualified before the vehicle leaves the factory, so as to ensure the quality of the vehicle, and correspondingly improve the driving experience of the user.
Therefore, in this embodiment, in order to accurately complete the test on the vehicle gateway, the embodiment may first receive a DBC (Dynamic Body Control, dynamic vehicle body control) file input by the user in real time, and through the DBC file, the working state of the vehicle gateway in the running process of the vehicle can be simulated in real time.
Further, the embodiment further generates corresponding gateway routing information according to the DBC file received in real time, and specifically, the gateway routing information received in the embodiment includes each functional module of the gateway in the current vehicle.
Step S20, detecting module parameters corresponding to the functional modules in a preset database, and generating a plurality of test cases corresponding to the module parameters, wherein each test case has uniqueness;
further, in this step, it should be noted that, after each function module corresponding to the current vehicle gateway is obtained through the above step, the step further detects module parameters corresponding to each current function module in a preset parameter database, and at the same time, further generates a plurality of test cases corresponding to each current module parameter, where each test case provided in this embodiment has uniqueness, and each test case corresponds to each function module one by one.
Step S30, establishing communication connection with a CAN bus of a vehicle through VSPY, and simulating a CAN channel corresponding to the CAN bus through the VSPY;
furthermore, in this embodiment, it should be noted that, after the above steps are performed to generate a plurality of test cases, the step further establishes a communication connection with the CAN bus in the current vehicle through a preset VSPY tool, and on the basis, the CAN path corresponding to the CAN bus of the current vehicle is simulated in real time through the VSPY tool. It should be noted that, the VSPY provided in this embodiment is a tool that integrates functions of network monitoring, data acquisition/recording, node simulation, diagnosis, automatic test, and the like, and can effectively test a vehicle gateway.
And S40, transmitting a plurality of test cases to a gateway of the vehicle through the CAN path, and simulating a signal environment of the vehicle through the VSPY so as to finish the test of the gateway through the test cases in the signal environment.
Finally, in this step, it should be noted that, after the required CAN path and the test case are obtained through the above steps, the present test case is further transmitted to the gateway of the present vehicle through the present CAN path, and on this basis, the signal environment of the present vehicle, that is, the test environment of the present vehicle, is further simulated through the VSPY tool, so that the test of the gateway of the present vehicle CAN be completed through the test case in the present signal environment.
When the method is used, the DBC file input by a user is received, and corresponding gateway routing information is generated according to the DBC file, wherein the gateway routing information comprises all functional modules of a gateway; further, module parameters corresponding to the functional modules are detected in a preset database, and a plurality of test cases corresponding to the module parameters are generated, wherein each test case has uniqueness; further, communication connection with a CAN bus of the vehicle is established through VSPY, and a CAN channel corresponding to the CAN bus is simulated through the VSPY; and finally, transmitting a plurality of test cases to a gateway of the vehicle only through the CAN path, and simulating a signal environment of the vehicle through the VSPY so as to finish the test of the gateway through the test cases in the signal environment. According to the method, the corresponding test cases can be generated in real time according to the module parameters of each functional module in the vehicle gateway, and meanwhile, the test environment matched with the current vehicle gateway can be simulated in real time, so that the test of a plurality of functional modules in the vehicle gateway can be completed at the same time, the workload of the test is greatly reduced, the phenomenon that the functional modules are not tested is avoided, and the method is suitable for large-scale popularization and use.
It should be noted that the foregoing implementation procedure is only for illustrating the feasibility of the present application, but this does not represent that the gateway test method of the present application is only one implementation procedure, and may be incorporated into the feasible implementation of the gateway test method of the present application, as long as it can be implemented.
In summary, the gateway test method provided by the embodiment of the invention can generate the corresponding test case according to the module parameters of each functional module in the vehicle gateway in real time, and simultaneously simulate the test environment adapted to the current vehicle gateway in real time, thereby completing the test of a plurality of functional modules in the vehicle gateway at the same time, further greatly reducing the test workload, avoiding the phenomenon of missing functional modules and being suitable for wide popularization and use.
The second embodiment of the present invention also provides a gateway testing method, which is different from the gateway testing method provided in the first embodiment in that:
specifically, in this embodiment, it should be noted that the step of detecting, in the preset database, module parameters corresponding to each of the functional modules and generating a plurality of test cases corresponding to each of the module parameters includes:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
Specifically, in this embodiment, it should be noted that, when each functional module is acquired in this embodiment, for example, when each functional module such as bluetooth, wireless network, and player is acquired, the embodiment immediately identifies the module type corresponding to each current functional module, for example, the bluetooth module corresponds to the transmission type module, and the player corresponds to the entertainment type module. Based on this, the embodiment further detects module parameters corresponding to each current functional module, for example, transmission distance parameters and transmission frequency parameters corresponding to the bluetooth module, in the preset database according to the identified module type.
Furthermore, in this embodiment, the preset DTW algorithm is used to perform serialization processing on each current module parameter, so as to correspondingly generate a plurality of required test sequences, where each test sequence includes a plurality of test factors, and further, generate a plurality of required test cases according to the current plurality of test factors.
It should be noted that, for the sake of brevity, the method according to the second embodiment of the present invention, which implements the same principle and some of the technical effects as the first embodiment, is not mentioned here, and reference is made to the corresponding content provided by the first embodiment.
In summary, the gateway test method provided by the embodiment of the invention can generate the corresponding test case according to the module parameters of each functional module in the vehicle gateway in real time, and simultaneously simulate the test environment adapted to the current vehicle gateway in real time, thereby completing the test of a plurality of functional modules in the vehicle gateway at the same time, further greatly reducing the test workload, avoiding the phenomenon of missing functional modules and being suitable for wide popularization and use.
The third embodiment of the present invention also provides a gateway testing method, which is different from the gateway testing method provided in the first embodiment in that:
further, in this embodiment, it should be noted that the step of generating the plurality of test cases according to the plurality of test factors includes:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
Further, in this embodiment, it should be noted that, when the embodiment obtains a plurality of test factors, this embodiment further performs cluster analysis processing on the current plurality of test factors through the DTW algorithm to generate a plurality of corresponding target test matrices, where it should be noted that each target test matrix includes a plurality of specific parameter values, on this basis, test indexes corresponding to each module parameter are calculated according to each target test matrix, and further, corresponding test cases are generated according to each test index generated in real time.
It should be noted that, for the sake of brevity, the principles and some technical effects of the method according to the third embodiment of the present invention are the same as those of the first embodiment, and reference should be made to the corresponding matters provided in the first embodiment for the description of the present invention.
In summary, the gateway test method provided by the embodiment of the invention can generate the corresponding test case according to the module parameters of each functional module in the vehicle gateway in real time, and simultaneously simulate the test environment adapted to the current vehicle gateway in real time, thereby completing the test of a plurality of functional modules in the vehicle gateway at the same time, further greatly reducing the test workload, avoiding the phenomenon of missing functional modules and being suitable for wide popularization and use.
The fourth embodiment of the present invention also provides a gateway testing method, which is different from the gateway testing method provided in the first embodiment in that:
specifically, in this embodiment, it should be further noted that the step of performing the serialization processing on each module parameter by using the first preset algorithm to generate a plurality of corresponding test sequences includes:
when a plurality of module parameters are obtained, identifying structured parameters and unstructured parameters contained in each module parameter through a preset ARX model, and storing the structured parameters and the unstructured parameters into a preset MySQL relational database;
and carrying out serialization processing on the structured parameters and filtering processing on the unstructured parameters in the preset MySQL relational database through the first preset algorithm so as to generate a plurality of test sequences.
In this embodiment, it should be noted that, when the embodiment obtains a plurality of required module parameters, the embodiment further identifies, through a preset ARX model, a structured parameter and an unstructured parameter that are respectively included in each current module parameter, where the structured parameter may include a specific numerical value, and the unstructured parameter may include a specific symbol and an identifier, respectively.
Furthermore, in this embodiment, the identified structured parameters and unstructured parameters are stored in a preset MySQL relational database, and specifically, in this embodiment, the current structured parameters are further processed in the current preset MySQL relational database in a serialization manner by the DTW algorithm, and correspondingly, the current unstructured parameters are filtered, so as to finally generate a plurality of required test sequences.
It should be noted that, for the sake of brevity, the method according to the fourth embodiment of the present invention, which implements the same principle and some of the technical effects as those of the first embodiment, may refer to the corresponding content provided by the first embodiment.
In summary, the gateway test method provided by the embodiment of the invention can generate the corresponding test case according to the module parameters of each functional module in the vehicle gateway in real time, and simultaneously simulate the test environment adapted to the current vehicle gateway in real time, thereby completing the test of a plurality of functional modules in the vehicle gateway at the same time, further greatly reducing the test workload, avoiding the phenomenon of missing functional modules and being suitable for wide popularization and use.
The fifth embodiment of the present invention also provides a gateway testing method, which is different from the gateway testing method provided in the first embodiment in that:
in addition, in this embodiment, it should be further noted that, after the step of simulating the signal environment of the vehicle by the VSPY to complete the test on the gateway by the test case in the signal environment, the method further includes:
receiving a test result output by the VSPY in real time, and judging whether the test result is within a preset threshold value;
if the test result is judged to be within the preset threshold, judging that the gateway of the vehicle meets the factory requirement currently, and generating a corresponding test label according to the test result;
if the test result is judged not to be within the preset threshold, judging that the gateway of the current vehicle does not meet the factory requirement, and retesting the gateway of the current vehicle.
In addition, in this embodiment, it should also be noted that, in order to enable a worker to accurately learn the test result of the current vehicle gateway, the embodiment may receive the test result output by the VSPY in real time, and immediately determine whether the current test result is within the preset threshold.
Further, if the current test result is judged to be within the preset threshold, it can be judged that the gateway of the current vehicle meets the factory requirements, and meanwhile, a corresponding test label is generated according to the test result generated in real time and is stuck on the current vehicle to indicate that the current vehicle meets the factory requirements.
Correspondingly, if the current test result is judged not to be within the preset threshold, it is judged that the gateway of the current vehicle does not meet the factory requirement, and further, retesting is conducted on the gateway of the current vehicle to avoid unnecessary test errors.
It should be noted that, for the sake of brevity, the method according to the fifth embodiment of the present invention, which implements the same principle and some of the technical effects as those of the first embodiment, may refer to the corresponding content provided by the first embodiment.
In summary, the gateway test method provided by the embodiment of the invention can generate the corresponding test case according to the module parameters of each functional module in the vehicle gateway in real time, and simultaneously simulate the test environment adapted to the current vehicle gateway in real time, thereby completing the test of a plurality of functional modules in the vehicle gateway at the same time, further greatly reducing the test workload, avoiding the phenomenon of missing functional modules and being suitable for wide popularization and use.
Referring to fig. 2, a gateway test system according to a sixth embodiment of the present invention is shown, the system includes:
the receiving module 12 is configured to receive a DBC file input by a user, and generate corresponding gateway routing information according to the DBC file, where the gateway routing information includes each functional module of a gateway;
the detection module 22 is configured to detect module parameters corresponding to each of the functional modules in a preset database, and generate a plurality of test cases corresponding to each of the module parameters, where each test case has uniqueness;
the simulation module 32 is configured to establish a communication connection with a CAN bus of a vehicle through VSPY, and simulate a CAN path corresponding to the CAN bus through the VSPY;
and the test module 42 is configured to transmit a plurality of test cases to a gateway of the vehicle through the CAN channel, and simulate a signal environment of the vehicle through the VSPY, so as to complete a test on the gateway through the test cases in the signal environment.
In the gateway test system, the detection module 22 is specifically configured to:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
In the gateway test system, the detection module 22 is further specifically configured to:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
In the gateway test system, the detection module 22 is further specifically configured to:
when a plurality of module parameters are obtained, identifying structured parameters and unstructured parameters contained in each module parameter through a preset ARX model, and storing the structured parameters and the unstructured parameters into a preset MySQL relational database;
and carrying out serialization processing on the structured parameters and filtering processing on the unstructured parameters in the preset MySQL relational database through the first preset algorithm so as to generate a plurality of test sequences.
In the above gateway test system, the gateway test system further includes a judging module 52, where the judging module 52 is specifically configured to:
receiving a test result output by the VSPY in real time, and judging whether the test result is within a preset threshold value;
if the test result is judged to be within the preset threshold, judging that the gateway of the vehicle meets the factory requirement currently, and generating a corresponding test label according to the test result;
if the test result is judged not to be within the preset threshold, judging that the gateway of the current vehicle does not meet the factory requirement, and retesting the gateway of the current vehicle.
A seventh embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the gateway test method provided in the above embodiment when executing the computer program.
An eighth embodiment of the present invention provides a readable storage medium having stored thereon a computer program which, when executed by a processor, implements the gateway test method as provided in the above embodiments.
In summary, the gateway test method, system, computer and readable storage medium provided by the embodiments of the present invention can generate corresponding test cases in real time according to the module parameters of each functional module in the vehicle gateway, and at the same time, simulate the test environment adapted to the current vehicle gateway in real time, so as to complete the test of multiple functional modules in the vehicle gateway at the same time, thereby greatly reducing the test workload, avoiding the phenomenon of missing functional modules, and being suitable for wide popularization and use.
The above-described respective modules may be functional modules or program modules, and may be implemented by software or hardware. For modules implemented in hardware, the various modules described above may be located in the same processor; or the above modules may be located in different processors in any combination.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing examples illustrate only a few embodiments of the invention and are described in detail herein without thereby limiting the scope of the invention. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the invention, which are all within the scope of the invention. Accordingly, the scope of protection of the present invention is to be determined by the appended claims.

Claims (10)

1. A method of gateway testing, the method comprising:
receiving a DBC file input by a user, and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises each functional module of a gateway;
detecting module parameters corresponding to the functional modules in a preset database, and generating a plurality of test cases corresponding to the module parameters, wherein each test case has uniqueness;
establishing communication connection with a CAN bus of a vehicle through VSPY, and simulating a CAN channel corresponding to the CAN bus through the VSPY;
transmitting a plurality of test cases to a gateway of the vehicle through the CAN access, and simulating a signal environment of the vehicle through the VSPY so as to finish the test of the gateway through the test cases in the signal environment.
2. The gateway test method according to claim 1, wherein: the step of detecting module parameters corresponding to the functional modules in a preset database and generating a plurality of test cases corresponding to the module parameters comprises the following steps:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
3. The gateway test method according to claim 2, wherein: the step of generating a plurality of test cases according to a plurality of test factors comprises the following steps:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
4. The gateway test method according to claim 2, wherein: the step of generating a plurality of corresponding test sequences by carrying out serialization processing on each module parameter through a first preset algorithm comprises the following steps:
when a plurality of module parameters are obtained, identifying structured parameters and unstructured parameters contained in each module parameter through a preset ARX model, and storing the structured parameters and the unstructured parameters into a preset MySQL relational database;
and carrying out serialization processing on the structured parameters and filtering processing on the unstructured parameters in the preset MySQL relational database through the first preset algorithm so as to generate a plurality of test sequences.
5. The gateway test method according to claim 1, wherein: after the step of simulating the signal environment of the vehicle by the VSPY to complete the test on the gateway by the test case in the signal environment, the method further includes:
receiving a test result output by the VSPY in real time, and judging whether the test result is within a preset threshold value;
if the test result is judged to be within the preset threshold, judging that the gateway of the vehicle meets the factory requirement currently, and generating a corresponding test label according to the test result;
if the test result is judged not to be within the preset threshold, judging that the gateway of the current vehicle does not meet the factory requirement, and retesting the gateway of the current vehicle.
6. A gateway test system, the system comprising:
the receiving module is used for receiving the DBC file input by the user and generating corresponding gateway routing information according to the DBC file, wherein the gateway routing information comprises all functional modules of the gateway;
the detection module is used for detecting module parameters corresponding to the functional modules in a preset database and generating a plurality of test cases corresponding to the module parameters, wherein each test case has uniqueness;
the simulation module is used for establishing communication connection with a CAN bus of the vehicle through VSPY and simulating a CAN channel corresponding to the CAN bus through the VSPY;
the test module is used for transmitting a plurality of test cases to a gateway of the vehicle through the CAN access, and simulating a signal environment of the vehicle through the VSPY so as to complete the test of the gateway through the test cases in the signal environment.
7. The gateway test system of claim 6, wherein: the detection module is specifically used for:
when each functional module is obtained, identifying the module type corresponding to each functional module, and detecting the module parameters corresponding to each functional module in the preset database according to the module type;
carrying out serialization processing on each module parameter through a first preset algorithm to generate a plurality of corresponding test sequences, wherein each test sequence comprises a plurality of test factors;
and generating a plurality of test cases according to the plurality of test factors.
8. The gateway test system of claim 7, wherein: the detection module is also specifically used for:
when a plurality of test factors are obtained, respectively performing cluster analysis processing on the plurality of test factors to generate a plurality of corresponding target test matrixes, and calculating test indexes respectively corresponding to each module parameter according to the plurality of target test matrixes;
and respectively generating the corresponding test cases according to each test index.
9. A computer comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the gateway test method of any of claims 1 to 5 when the computer program is executed.
10. A readable storage medium having stored thereon a computer program, which when executed by a processor implements a gateway testing method according to any of claims 1 to 5.
CN202310250768.3A 2023-03-15 2023-03-15 Gateway test method, system, computer and readable storage medium Pending CN116455784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310250768.3A CN116455784A (en) 2023-03-15 2023-03-15 Gateway test method, system, computer and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310250768.3A CN116455784A (en) 2023-03-15 2023-03-15 Gateway test method, system, computer and readable storage medium

Publications (1)

Publication Number Publication Date
CN116455784A true CN116455784A (en) 2023-07-18

Family

ID=87129248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310250768.3A Pending CN116455784A (en) 2023-03-15 2023-03-15 Gateway test method, system, computer and readable storage medium

Country Status (1)

Country Link
CN (1) CN116455784A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117651012A (en) * 2024-01-25 2024-03-05 江铃汽车股份有限公司 Vehicle central gateway testing method and system

Similar Documents

Publication Publication Date Title
CN107145140B (en) Automatic test system and test method for CAN interface of vehicle-mounted electronic control unit
CN109507981B (en) Vehicle testing method and device and machine-readable storage medium
CN109918302B (en) Vehicle-mounted automatic testing method and device, vehicle-mounted multimedia system and automobile
CN108802511B (en) Method and system for testing battery management unit
CN107943008B (en) Automated diagnosis test method based on VT system
CN210041853U (en) Automatic test system for automobile CAN/LIN bus
CN116455784A (en) Gateway test method, system, computer and readable storage medium
CN112697455A (en) Automatic real vehicle testing system
CN113608518A (en) Data generation method, device, terminal equipment and medium
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
CN113721584B (en) Visual vehicle diagnosis method and device, equipment and storage medium
CN109213111B (en) Vehicle control unit testing method and system
CN113225232B (en) Hardware testing method and device, computer equipment and storage medium
CN112509176B (en) Fault repair method and device based on vehicle data
CN114756008A (en) Fault injection system, automatic test system and method for automobile hybrid bus integrated rack
CN113590399A (en) Automatic testing system and method for vehicle-mounted voice
CN113515307A (en) Calibratable can information processing system and method based on hybrid electric vehicle
CN113162826A (en) Finished automobile network testing method and system
CN215181956U (en) ECU (electronic control unit) flash error-proofing system
CN116136662B (en) Vehicle-mounted system simulation platform and testing method and device thereof
CN112863008B (en) Fault recording method and device, storage medium and computer equipment
CN112306033B (en) Vehicle-mounted controller joint test control method, device and system
CN116629663A (en) Module part assembly detection method, system, computer and readable storage medium
CN109491845B (en) Test method and system for storage product controller
CN116257437A (en) ADAS system defect verification method and device based on real vehicle data reinjection

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