Gateway testing method, system, computer and readable storage medium

CN116455784BActive Publication Date: 2026-10-23JIANGLING MOTORS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310250768.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-15
Publication Date
2026-10-23
Estimated Expiration
2043-03-15

AI Technical Summary

Technical Problem

[0004]基于此,本发明的目的是提供一种网关测试方法、系统、计算机及可读存储介质,以解决现有技术对网关功能的测试仅局限于在整车装车完成后或者在整车台架上进行逐个报文信息核对测试,此种测试方式不仅工作量大,而且工作繁琐,容易出现遗漏功能未测试的现象,同时测试产生的数据量也巨大,导致不能对网关件做到完整、有效测试的问题

Benefits of technology

[0010]本发明的有益效果是:通过接收用户输入的DBC文件,并根据所述DBC文件生成对应的网关路由信息,所述网关路由信息包括网关的各个功能模块;进一步的,在预设数据库中检测出与各个所述功能模块分别对应的模块参数,并生成与各个所述模块参数分别对应的若干测试用例,每一所述测试用例均具有唯一性;更进一步的,通过VSPY建立与车辆的CAN总线的通讯连接,并通过所述VSPY模拟出与所述CAN总线对应的CAN通路;最后只需通过所述CAN通路将若干所述测试用例传输至所述车辆的网关中,并通过所述VSPY模拟出所述车辆的信号环境,以在所述信号环境中通过所述测试用例完成对所述网关的测试。通过上述方式能够实时根据车辆网关中的各个功能模块的模块参数生成对应的测试用例,与此同时,还能够实时模拟出与当前车辆网关适配的测试环境,从而能够同时完成对车辆网关中的多个功能模块的测试,进而大幅减少了测试的工作量,也不会出现遗漏功能模块未测试的现象,适用于大范围的推广与使用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116455784B_ABST
    Figure CN116455784B_ABST
Patent Text Reader

Abstract

The application provides a gateway test method, system, computer and readable storage medium, the method comprises the following steps: receiving the DBC file input by the user, and generating corresponding gateway routing information according to the DBC file, the gateway routing information comprises various functional modules of the gateway; detecting the module parameters corresponding to each functional module in the preset database respectively, and generating a plurality of test cases corresponding to each module parameter respectively, each test case has uniqueness; through VSPY, a communication connection with the CAN bus of the vehicle is established, and a CAN channel corresponding to the CAN bus is simulated through VSPY; a plurality of test cases are transmitted to the gateway of the vehicle through the CAN channel, and the signal environment of the vehicle is simulated through VSPY, so that the test of the gateway is completed in the signal environment through the test case. Through the above-mentioned mode, the test of a plurality of functional modules in the gateway of the vehicle can be completed at the same time, and the test workload is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automotive technology, and in particular to a gateway testing method, system, computer, and readable storage medium. Background Technology

[0002] With the steady development of the automotive industry, automobiles have become an important tool in production and daily life, leading to a continuous increase in car ownership. As the number of cars increases, their configurations also become more diverse. These diverse configurations require the simultaneous matching of multiple CAN (Controller Area Network) segments. The effectiveness and accuracy of signal interaction between these segments directly reflect the quality of the vehicle's features and the customer experience.

[0003] As a routing component in the entire vehicle, the gateway plays a crucial role in the development of vehicle functions. Therefore, strict requirements are placed on the completeness and reliability of gateway functions. However, current technologies limit gateway function testing to checking each message after vehicle assembly or on a vehicle test bench. This testing method is not only labor-intensive and tedious, but also prone to missing functions. Furthermore, the amount of data generated during testing is enormous, making it impossible to achieve complete and effective testing of the gateway component. Summary of the Invention

[0004] Based on this, the purpose of this invention is to provide a gateway testing method, system, computer, and readable storage medium to solve the problem that the existing technology for testing gateway functions is limited to checking each message information after the vehicle is installed or on the vehicle test bench. This testing method is not only labor-intensive and cumbersome, but also prone to missing functions. At the same time, the amount of data generated by the test is huge, which makes it impossible to perform complete and effective testing of gateway components.

[0005] The first aspect of this invention provides a gateway testing method, the method comprising:

[0006] Receive a DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes the various functional modules of the gateway.

[0007] The module parameters corresponding to each of the functional modules are detected in the preset database, and several test cases corresponding to each of the module parameters are generated. Each test case is unique.

[0008] A communication connection with the vehicle's CAN bus is established through VSPY, and a CAN path corresponding to the CAN bus is simulated through VSPY.

[0009] Several test cases are transmitted to the vehicle's gateway via the CAN channel, and the vehicle's signal environment is simulated via VSPY, so that the gateway can be tested in the signal environment using the test cases.

[0010] The beneficial effects of this invention are as follows: By receiving a DBC file input by the user and generating corresponding gateway routing information based on the DBC file, the gateway routing information includes various functional modules of the gateway; further, by detecting module parameters corresponding to each functional module in a preset database and generating several test cases corresponding to each module parameter, each test case being unique; further still, by establishing a communication connection with the vehicle's CAN bus through VSPY and simulating a CAN path corresponding to the CAN bus through VSPY; finally, by transmitting several test cases to the vehicle's gateway through the CAN path and simulating the vehicle's signal environment through VSPY, the gateway can be tested in the signal environment using the test cases. This method enables the generation of corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway, and simultaneously simulates a test environment adapted to the current vehicle gateway, thereby enabling simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the testing workload and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0011] Preferably, the step of detecting module parameters corresponding to each of the functional modules in a preset database and generating a plurality of test cases corresponding to each of the module parameters includes:

[0012] When each of the functional modules is obtained, the module type corresponding to each functional module is identified, and the module parameters corresponding to each functional module are detected in the preset database according to the module type.

[0013] Each module parameter is serialized using a first preset algorithm to generate several corresponding test sequences, each of which includes several test factors.

[0014] Several test cases are generated based on several test factors.

[0015] Preferably, the step of generating a plurality of test cases based on a plurality of test factors includes:

[0016] When several test factors are obtained, cluster analysis is performed on the several test factors respectively to generate several corresponding target test matrices, and test indicators corresponding to each module parameter are calculated based on the several target test matrices.

[0017] Generate the corresponding test cases based on each of the aforementioned test metrics.

[0018] Preferably, the step of serializing each module parameter using a first preset algorithm to generate several corresponding test sequences includes:

[0019] When several module parameters are obtained, the structured parameters and unstructured parameters contained in each module parameter are identified by a preset ARX model, and both the structured parameters and the unstructured parameters are stored in a preset MySQL relational database.

[0020] In the preset MySQL relational database, the structured parameters are serialized and the unstructured parameters are filtered using the first preset algorithm to generate several test sequences.

[0021] Preferably, after the step of simulating the vehicle's signal environment using VSPY to complete the test of the gateway in the signal environment through the test cases, the method further includes:

[0022] Receive the test results output by VSPY in real time, and determine whether the test results are within a preset threshold;

[0023] If the test result is determined to be within the preset threshold, the gateway of the current vehicle is determined to meet the factory requirements, and a corresponding test tag is generated based on the test result.

[0024] If the test result is determined to be outside the preset threshold, the gateway of the current vehicle is determined to be non-compliant with the factory requirements, and the gateway of the current vehicle is retested.

[0025] A second aspect of this invention provides a gateway testing system, the system comprising:

[0026] The receiving module is used to receive the DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes the various functional modules of the gateway.

[0027] The detection module is used to detect the module parameters corresponding to each of the functional modules in a preset database, and generate a number of test cases corresponding to each of the module parameters, each of the test cases being unique.

[0028] The simulation module is used to establish a communication connection with the vehicle's CAN bus via VSPY, and to simulate the CAN path corresponding to the CAN bus via VSPY.

[0029] The testing module is used to transmit several test cases to the vehicle's gateway through the CAN channel, and to simulate the vehicle's signal environment through the VSPY, so as to complete the testing of the gateway through the test cases in the signal environment.

[0030] In the aforementioned gateway testing system, the detection module is specifically used for:

[0031] When each of the functional modules is obtained, the module type corresponding to each functional module is identified, and the module parameters corresponding to each functional module are detected in the preset database according to the module type.

[0032] Each module parameter is serialized using a first preset algorithm to generate several corresponding test sequences, each of which includes several test factors.

[0033] Several test cases are generated based on several test factors.

[0034] In the aforementioned gateway testing system, the detection module is further specifically used for:

[0035] When several test factors are obtained, cluster analysis is performed on the several test factors respectively to generate several corresponding target test matrices, and test indicators corresponding to each module parameter are calculated based on the several target test matrices.

[0036] Generate the corresponding test cases based on each of the aforementioned test metrics.

[0037] In the aforementioned gateway testing system, the detection module is further specifically used for:

[0038] When several module parameters are obtained, the structured parameters and unstructured parameters contained in each module parameter are identified by a preset ARX model, and both the structured parameters and the unstructured parameters are stored in a preset MySQL relational database.

[0039] In the preset MySQL relational database, the structured parameters are serialized and the unstructured parameters are filtered using the first preset algorithm to generate several test sequences.

[0040] The gateway testing system described above further includes a judgment module, which is specifically used for:

[0041] Receive the test results output by VSPY in real time, and determine whether the test results are within a preset threshold;

[0042] If the test result is determined to be within the preset threshold, the gateway of the current vehicle is determined to meet the factory requirements, and a corresponding test tag is generated based on the test result.

[0043] If the test result is determined to be outside the preset threshold, the gateway of the current vehicle is determined to be non-compliant with the factory requirements, and the gateway of the current vehicle is retested.

[0044] A third aspect of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the gateway testing method as described above.

[0045] A fourth aspect of the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the gateway testing method as described above.

[0046] 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. Attached Figure Description

[0047] Figure 1 A flowchart of the gateway testing method provided in the first embodiment of the present invention;

[0048] Figure 2 This is a structural block diagram of the gateway testing system provided in the sixth embodiment of the present invention.

[0049] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0050] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0051] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0052] Unless otherwise defined, 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 pertains. 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.

[0053] As a routing component in the entire vehicle, the gateway plays a crucial role in the development of vehicle functions. Therefore, strict requirements are placed on the completeness and reliability of gateway functions. However, current technologies limit gateway function testing to checking each message after the vehicle is installed or on a test bench. This testing method is not only labor-intensive and tedious, but also prone to missing functions. Furthermore, the amount of data generated during testing is enormous, making it impossible to achieve complete and effective testing of the gateway component.

[0054] Please see Figure 1 The diagram shows a gateway testing method provided in the first embodiment of the present invention. The gateway testing method provided in this embodiment can generate corresponding test cases in real time according to the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby completing the testing of multiple functional modules in the vehicle gateway at the same time, which greatly reduces the workload of testing and will not cause the phenomenon of missing functional modules. It is suitable for widespread promotion and use.

[0055] Specifically, the gateway testing method provided in this embodiment includes the following steps:

[0056] Step S10: Receive the DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes the various functional modules of the gateway.

[0057] Specifically, in this embodiment, it should first be noted that the gateway testing method provided in this embodiment is specifically applied to the gateways of different vehicle models. It 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 improve the user's driving experience.

[0058] Therefore, in this embodiment, in order to accurately complete the test of the vehicle gateway, this embodiment will first receive the DBC (Dynamic Body Control) file input by the user in real time. The DBC file can simulate the working state of the vehicle gateway during the vehicle's driving process in real time.

[0059] Furthermore, this embodiment will generate corresponding gateway routing information based on the real-time received DBC file. Specifically, the gateway routing information received in this embodiment includes the various functional modules of the gateway in the current vehicle.

[0060] Step S20: Detect the module parameters corresponding to each of the functional modules in the preset database, and generate a number of test cases corresponding to each of the module parameters, each of the test cases being unique;

[0061] Furthermore, in this step, it should be noted that after obtaining the various functional modules corresponding to the current vehicle gateway through the above steps, this step will further detect the module parameters corresponding to each current functional module in the pre-set parameter database. At the same time, several test cases corresponding to each current module parameter will be generated. In this embodiment, each test case is unique and corresponds one-to-one with each functional module.

[0062] Step S30: Establish a communication connection with the vehicle's CAN bus through VSPY, and simulate the CAN path corresponding to the CAN bus through VSPY.

[0063] Furthermore, in this embodiment, it should be noted that after generating the required test cases through the above steps, this step further establishes a communication connection with the CAN bus in the current vehicle using a pre-configured VSPY tool. Based on this, the VSPY tool is used to simulate the CAN path corresponding to the CAN bus of the current vehicle in real time. It should be noted that the VSPY provided in this embodiment is a tool that integrates network monitoring, data acquisition / recording, node simulation, diagnostics, and automatic testing functions, enabling effective testing of vehicle gateways.

[0064] Step S40: Transmit several test cases to the vehicle's gateway through the CAN channel, and simulate the vehicle's signal environment through VSPY, so as to complete the test of the gateway through the test cases in the signal environment.

[0065] Finally, it should be noted in this step that after obtaining the required CAN path and test cases through the above steps, this step will further transmit the current test cases to the current vehicle's gateway through the current CAN path. On this basis, the VSPY tool mentioned above will be used to simulate the current vehicle's signal environment, i.e., the current vehicle's test environment, so that the gateway in the current vehicle can be tested in the current signal environment through the above test cases.

[0066] In use, the system receives a DBC file input by the user and generates corresponding gateway routing information based on the DBC file. This gateway routing information includes the various functional modules of the gateway. Further, it detects module parameters corresponding to each functional module in a preset database and generates several test cases corresponding to each module parameter, each test case being unique. Further still, it establishes a communication connection with the vehicle's CAN bus via VSPY and simulates a CAN path corresponding to the CAN bus using VSPY. Finally, it transmits the test cases to the vehicle's gateway via the CAN path and simulates the vehicle's signal environment using VSPY, allowing the gateway to be tested within that signal environment. This method enables real-time generation of corresponding test cases based on the module parameters of each functional module in the vehicle gateway. Simultaneously, it can simulate a test environment compatible with the current vehicle gateway, allowing for simultaneous testing of multiple functional modules within the vehicle gateway. This significantly reduces the testing workload and prevents the omission of untested functional modules, making it suitable for widespread adoption and use.

[0067] It should be noted that the above implementation process is only to illustrate the feasibility of this application, but it does not mean that the gateway testing method of this application has only the above-mentioned unique implementation process. On the contrary, as long as the gateway testing method of this application can be implemented, it can be included in the feasible implementation scheme of this application.

[0068] In summary, the gateway testing method provided by the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the workload of testing and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0069] The second embodiment of the present invention also provides a gateway testing method. The gateway testing method provided in this embodiment differs from the gateway testing method provided in the first embodiment above in that:

[0070] Specifically, in this embodiment, it should be noted that the steps of detecting the module parameters corresponding to each of the functional modules in the preset database and generating several test cases corresponding to each of the module parameters include:

[0071] When each of the functional modules is obtained, the module type corresponding to each functional module is identified, and the module parameters corresponding to each functional module are detected in the preset database according to the module type.

[0072] Each module parameter is serialized using a first preset algorithm to generate several corresponding test sequences, each of which includes several test factors.

[0073] Several test cases are generated based on several test factors.

[0074] Specifically, in this embodiment, it should be noted that when this embodiment acquires various functional modules, such as Bluetooth, Wi-Fi, and media player modules, it immediately identifies the module type corresponding to each functional module. For example, the Bluetooth module corresponds to a transmission type module, and the media player corresponds to an entertainment type module. Based on this, this embodiment further detects the module parameters corresponding to each functional module in the aforementioned preset database according to the identified module type. For example, the transmission distance parameter and transmission frequency parameter corresponding to the Bluetooth module.

[0075] Furthermore, in this embodiment, the parameters of each module are serialized using a pre-set DTW algorithm to generate several required test sequences. Each test sequence includes several test factors. Further, several required test cases are generated based on the current test factors.

[0076] It should be noted that the method provided in the second embodiment of the present invention has the same implementation principle and some technical effects as the first embodiment. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content provided in the first embodiment.

[0077] In summary, the gateway testing method provided by the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the workload of testing and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0078] The third embodiment of the present invention also provides a gateway testing method. The gateway testing method provided in this embodiment differs from the gateway testing method provided in the first embodiment above in that:

[0079] Furthermore, in this embodiment, it should be noted that the step of generating several test cases based on several test factors includes:

[0080] When several test factors are obtained, cluster analysis is performed on the several test factors respectively to generate several corresponding target test matrices, and test indicators corresponding to each module parameter are calculated based on the several target test matrices.

[0081] Generate the corresponding test cases based on each of the aforementioned test metrics.

[0082] Furthermore, in this embodiment, it should be noted that when this embodiment obtains several test factors, it will further perform cluster analysis on the current several test factors using the above-mentioned DTW algorithm to generate several corresponding target test matrices. It should be pointed out that each target test matrix includes several specific parameter values. Based on this, test indicators corresponding to each module parameter are calculated according to each target test matrix. Furthermore, corresponding test cases are generated according to each test indicator generated in real time.

[0083] It should be noted that the method provided in the third embodiment of the present invention has the same implementation principle and some technical effects as the first embodiment. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content provided in the first embodiment.

[0084] In summary, the gateway testing method provided by the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the workload of testing and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0085] The fourth embodiment of the present invention also provides a gateway testing method. The gateway testing method provided in this embodiment differs from the gateway testing method provided in the first embodiment above in that:

[0086] Specifically, in this embodiment, it should also be noted that the step of serializing each module parameter using the first preset algorithm to generate several corresponding test sequences includes:

[0087] When several module parameters are obtained, the structured parameters and unstructured parameters contained in each module parameter are identified by a preset ARX model, and both the structured parameters and the unstructured parameters are stored in a preset MySQL relational database.

[0088] In the preset MySQL relational database, the structured parameters are serialized and the unstructured parameters are filtered using the first preset algorithm to generate several test sequences.

[0089] In this embodiment, it should be noted that when this embodiment obtains several required module parameters, it will further identify the structured parameters and unstructured parameters contained in each module parameter through a pre-set ARX model. Specifically, the structured parameters may include specific numerical values, and the corresponding unstructured parameters may include specific symbols and identifiers.

[0090] Furthermore, this embodiment will store both the identified structured and unstructured parameters in a preset MySQL relational database. Specifically, this embodiment will further serialize the current structured parameters in the current preset MySQL relational database using the aforementioned DTW algorithm, and correspondingly filter the current unstructured parameters to ultimately generate several required test sequences.

[0091] It should be noted that the method provided in the fourth embodiment of the present invention has the same implementation principle and some technical effects as the first embodiment. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content provided in the first embodiment.

[0092] In summary, the gateway testing method provided by the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the workload of testing and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0093] The fifth embodiment of the present invention also provides a gateway testing method. The gateway testing method provided in this embodiment differs from the gateway testing method provided in the first embodiment above in that:

[0094] Furthermore, in this embodiment, it should be noted that after the steps described above, which involve simulating the vehicle's signal environment using VSPY to complete the testing of the gateway in that signal environment through the test cases, the method further includes:

[0095] Receive the test results output by VSPY in real time, and determine whether the test results are within a preset threshold;

[0096] If the test result is determined to be within the preset threshold, the gateway of the current vehicle is determined to meet the factory requirements, and a corresponding test tag is generated based on the test result.

[0097] If the test result is determined to be outside the preset threshold, the gateway of the current vehicle is determined to be non-compliant with the factory requirements, and the gateway of the current vehicle is retested.

[0098] In addition, in this embodiment, it should be noted that in order to enable staff to accurately know the current test results of the vehicle gateway, this embodiment will receive the test results output by the VSPY in real time and immediately determine whether the current test results are within the preset threshold.

[0099] Furthermore, if the current test result is determined to be within the aforementioned preset threshold, it can be determined that the current vehicle's gateway meets the factory requirements. At the same time, a corresponding test label is generated based on the real-time generated test result, and the test label is affixed to the current vehicle to indicate that the current vehicle meets the factory requirements.

[0100] Correspondingly, if it is determined that the current test result is not within the above-mentioned preset threshold, it is determined that the current vehicle's gateway does not meet the factory requirements. Furthermore, this embodiment will retest the current vehicle's gateway to avoid unnecessary test errors.

[0101] It should be noted that the method provided in the fifth embodiment of the present invention has the same implementation principle and some technical effects as the first embodiment. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content provided in the first embodiment.

[0102] In summary, the gateway testing method provided by the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the workload of testing and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0103] Please see Figure 2 The image shows a gateway testing system provided in the sixth embodiment of the present invention. The system includes:

[0104] The receiving module 12 is used to receive the DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes various functional modules of the gateway.

[0105] The detection module 22 is used to detect the module parameters corresponding to each of the functional modules in the preset database, and generate a number of test cases corresponding to each of the module parameters, each of the test cases being unique.

[0106] The simulation module 32 is used to establish a communication connection with the vehicle's CAN bus through VSPY, and to simulate the CAN path corresponding to the CAN bus through VSPY.

[0107] Test module 42 is used to transmit several test cases to the vehicle's gateway through the CAN channel, and to simulate the vehicle's signal environment through VSPY, so as to complete the test of the gateway through the test cases in the signal environment.

[0108] In the aforementioned gateway testing system, the detection module 22 is specifically used for:

[0109] When each of the functional modules is obtained, the module type corresponding to each functional module is identified, and the module parameters corresponding to each functional module are detected in the preset database according to the module type.

[0110] Each module parameter is serialized using a first preset algorithm to generate several corresponding test sequences, each of which includes several test factors.

[0111] Several test cases are generated based on several test factors.

[0112] In the aforementioned gateway testing system, the detection module 22 is further specifically used for:

[0113] When several test factors are obtained, cluster analysis is performed on the several test factors respectively to generate several corresponding target test matrices, and test indicators corresponding to each module parameter are calculated based on the several target test matrices.

[0114] Generate the corresponding test cases based on each of the aforementioned test metrics.

[0115] In the aforementioned gateway testing system, the detection module 22 is further specifically used for:

[0116] When several module parameters are obtained, the structured parameters and unstructured parameters contained in each module parameter are identified by a preset ARX model, and both the structured parameters and the unstructured parameters are stored in a preset MySQL relational database.

[0117] In the preset MySQL relational database, the structured parameters are serialized and the unstructured parameters are filtered using the first preset algorithm to generate several test sequences.

[0118] The gateway testing system described above further includes a judgment module 52, which is specifically used for:

[0119] Receive the test results output by VSPY in real time, and determine whether the test results are within a preset threshold;

[0120] If the test result is determined to be within the preset threshold, the gateway of the current vehicle is determined to meet the factory requirements, and a corresponding test tag is generated based on the test result.

[0121] If the test result is determined to be outside the preset threshold, the gateway of the current vehicle is determined to be non-compliant with the factory requirements, and the gateway of the current vehicle is retested.

[0122] The seventh embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the gateway testing method provided in the above embodiments.

[0123] The eighth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the gateway testing method provided in the above embodiments.

[0124] In summary, the gateway testing method, system, computer, and readable storage medium provided in the above embodiments of the present invention can generate corresponding test cases in real time based on the module parameters of each functional module in the vehicle gateway. At the same time, it can also simulate a test environment adapted to the current vehicle gateway in real time, thereby enabling the simultaneous testing of multiple functional modules in the vehicle gateway. This significantly reduces the testing workload and prevents the omission of untested functional modules, making it suitable for widespread promotion and use.

[0125] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0126] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0127] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0128] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0129] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0130] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

Claims

1. A gateway testing method, characterized in that, The method includes: Receive a DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes the various functional modules of the gateway. The module parameters corresponding to each of the functional modules are detected in the preset database, and several test cases corresponding to each of the module parameters are generated. Each test case is unique. A communication connection with the vehicle's CAN bus is established through VSPY, and a CAN path corresponding to the CAN bus is simulated through VSPY. Several test cases are transmitted to the vehicle's gateway through the CAN channel, and the vehicle's signal environment is simulated through VSPY, so that the gateway can be tested in the signal environment using the test cases. The step of detecting module parameters corresponding to each of the functional modules in a preset database and generating several test cases corresponding to each of the module parameters includes: When each of the functional modules is obtained, the module type corresponding to each functional module is identified, and the module parameters corresponding to each functional module are detected in the preset database according to the module type. Each module parameter is serialized using a first preset algorithm to generate several corresponding test sequences, each of which includes several test factors. Generate several test cases based on several test factors; The step of generating several test cases based on several test factors includes: When several test factors are obtained, cluster analysis is performed on the several test factors respectively to generate several corresponding target test matrices, and test indicators corresponding to each module parameter are calculated based on the several target test matrices. Generate the corresponding test cases based on each of the aforementioned test metrics; The step of serializing each module parameter using a first preset algorithm to generate several corresponding test sequences includes: When several module parameters are obtained, the structured parameters and unstructured parameters contained in each module parameter are identified by a preset ARX model, and both the structured parameters and the unstructured parameters are stored in a preset MySQL relational database. In the preset MySQL relational database, the structured parameters are serialized and the unstructured parameters are filtered using the first preset algorithm to generate several test sequences.

2. The gateway testing method according to claim 1, characterized in that: After the step of simulating the vehicle's signal environment using VSPY to test the gateway in the signal environment using the test cases, the method further includes: Receive the test results output by VSPY in real time, and determine whether the test results are within a preset threshold; If the test result is determined to be within the preset threshold, the gateway of the current vehicle is determined to meet the factory requirements, and a corresponding test tag is generated based on the test result. If the test result is determined to be outside the preset threshold, the gateway of the current vehicle is determined to be non-compliant with the factory requirements, and the gateway of the current vehicle is retested.

3. A gateway testing system, characterized in that, The system for implementing the gateway testing method as described in any one of claims 1 to 2 includes: The receiving module is used to receive the DBC file input by the user and generate corresponding gateway routing information based on the DBC file. The gateway routing information includes the various functional modules of the gateway. The detection module is used to detect the module parameters corresponding to each of the functional modules in a preset database, and generate a number of test cases corresponding to each of the module parameters, each of the test cases being unique. The simulation module is used to establish a communication connection with the vehicle's CAN bus via VSPY, and to simulate the CAN path corresponding to the CAN bus via VSPY. The testing module is used to transmit several test cases to the vehicle's gateway through the CAN channel, and to simulate the vehicle's signal environment through the VSPY, so as to complete the testing of the gateway through the test cases in the signal environment.

4. A computer, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the gateway testing method as described in any one of claims 1 to 2.

5. A readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the gateway testing method as described in any one of claims 1 to 2.

Citation Information

Patent Citations

  • Automobile gateway routing configuration system

    CN114553764A

  • Bridge state monitoring method and system

    CN115357646A

  • Gateway routing test method and device of vehicle, electronic equipment and storage medium

    CN115470108A