Control method and apparatus

By dynamically controlling the switching status of the logical port of the diagnostic system of the electronic device and configuring access permissions according to different scenarios, the differences in security and permission requirements of the electronic device diagnostic port in different usage scenarios are solved, and the security and permissions of the diagnostic port are improved and the permissions are minimized.

WO2025045019A1PCT designated stage expired Publication Date: 2025-03-06YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/114733
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-08-28
Filing Date
2024-08-27
Publication Date
2025-03-06

AI Technical Summary

Technical Problem

The diagnostic ports of electronic devices have differences in security and permission requirements in different usage scenarios, which affects their operating security, especially in the problem that the OBD ports of vehicles are easily exploited by hackers.

Method used

By dynamically controlling the switch status of the logical port of the diagnostic system, configuring access permissions according to different scenarios, minimizing the access permissions of the logical port, thereby improving the security of the diagnostic port.

Benefits of technology

By dynamically controlling the switching state of the logical port, permissions can be flexibly adjusted in different scenarios, improving the security of the diagnostic system of electronic devices and preventing illegal access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024114733_06032025_PF_FP_ABST
    Figure CN2024114733_06032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a control method and apparatus, applied to a diagnosis system. The diagnosis system comprises a first logic port and a second logic port; the first logic port is a logic port of a first network of a vehicle; and the second logic port is a logic port of a second network of the vehicle. The method comprises: acquiring first configuration information; and controlling the on / off state of a first logic port and / or a second logic port on the basis of the first configuration information. Therefore, when an electronic device is in different scenarios, the on / off states of the logic ports of the diagnosis system can be dynamically controlled, minimizing the access permission of the logic ports in different scenarios, improving the safety of port diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Control method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on August 28, 2023, with application number 202311087181.1, and priority to the Chinese patent application with the invention name “Control Method and Device”, all contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present application relate to the field of information technology, and particularly to a control method and device. Background Art

[0003] With the development of intelligent electronic devices, many electronic devices require external diagnostic equipment to be connected to the diagnostic port of the electronic device for diagnostic operations. For example, as a complex intelligent transportation tool, efficient and accurate vehicle maintenance is increasingly dependent on intelligent vehicle diagnostic and testing systems. In other words, on-board diagnostics (OBD) systems have become an indispensable part of vehicles.

[0004] However, when an external diagnostic device is connected to the diagnostic port of an electronic device, the diagnostic port may become one of the main ports exploited by hackers, which will affect the operational security of the electronic device. For example, in a vehicle, the OBD port is a port that is easily exploited by hackers.

[0005] During the lifecycle of an electronic device, different users at different stages have different security and permission requirements for the diagnostic port. For example, in the vehicle production line scenario, the environment is relatively secure and less vulnerable to attacks, and the manufacturer requires higher permissions to allocate vehicle parts. However, in the post-manufacturer user scenario, user permissions are relatively low to ensure vehicle safety.

[0006] Therefore, how to improve the security of electronic equipment diagnostic systems at different stages of the electronic equipment life cycle has become an urgent problem to be solved.

[0007] Summary of the Invention

[0008] The embodiments of the present application provide a control method and device that can dynamically control the switch state of the logical port of the diagnostic system when the electronic device is in different scenarios, thereby minimizing the access rights of the logical port in different scenarios, thereby improving the security of the diagnostic port.

[0009] In a first aspect, a control method is provided. The method is applied to a diagnostic system of a vehicle. The diagnostic system includes a first logical port and a second logical port. The first logical port is a logical port of a first network of the vehicle, and the second logical port is a logical port of a second network of the vehicle. The method includes: obtaining first configuration information. Based on the first configuration information, controlling the on / off state of the first logical port and / or the second logical port.

[0010] In the above technical solution, the first configuration information is used to control the switching status of the first logical port and the second logical port in the diagnostic system, which helps the vehicle to flexibly control the logical ports of the first network and the second network at different stages of its entire life cycle, thereby minimizing authority and maximizing security.

[0011] In conjunction with the first aspect, in certain implementations of the first aspect, the first configuration information includes a diagnostic authorization file, the diagnostic authorization file includes a first field, and obtaining the first configuration information includes: receiving the diagnostic authorization file. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the first logical port and the second logical port to be in an on state when the first field has a first value. Alternatively, controlling the first logical port and the second logical port to be in a off state when the first field has a second value.

[0012] It should be understood that the diagnosis authorization file may be received when the vehicle is at the equipment manufacturer, or when the vehicle is in the road test stage, or when maintenance and other scenarios require operations such as writing or reading through OBD.

[0013] In the above technical solution, the logical ports of the vehicle's diagnostic system are dynamically opened or closed through authorization files, ensuring security while also flexibly supporting the implementation of diagnostic services in specific scenarios. For example, while the vehicle is in production, the logical ports of the first and second networks are configured to be open to facilitate production. Compared to using the same protection method for the ports corresponding to the vehicle's diagnostic system in any scenario, the solution of this application can more flexibly control the on / off status of the logical ports based on the specific scenario of the vehicle.

[0014] In combination with the first aspect, in some implementations of the first aspect, the diagnostic authorization file also includes a second field. Before controlling the switch state of the first logical port and / or the second logical port according to the first configuration information, the method also includes: determining whether the diagnostic authorization file is valid according to the second field.

[0015] In this technical solution, before dynamically controlling the on / off state of the OBD logical port, the validity of the authorization file is diagnosed to enable the dynamic configuration of the OBD logical port. Compared to the current OBD full port openness and weak security protection only through whitelisting or authentication, this solution can further improve the security of dynamically configuring the OBD logical port.

[0016] In conjunction with the first aspect, in certain implementations of the first aspect, the first configuration information includes a fix flag, the fix instruction includes a third field, and obtaining the first configuration information includes: obtaining the fix flag after the vehicle is powered on. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the first logical port and the second logical port to be in a closed state based on the third field.

[0017] In combination with the first aspect, in certain implementations of the first aspect, the method further includes: storing the solidification mark after the vehicle leaves the factory.

[0018] In the above technical solution, before the fixed flag takes effect, the OBD logical port can be in the open state each time the vehicle is powered on, facilitating diagnostic procedures while the vehicle is on the production line. After the fixed flag takes effect, the OBD logical port can be in the closed state each time the vehicle is powered on, improving OBD security after the vehicle leaves the factory. Even after the fixed flag takes effect, if the vehicle has not yet completed the diagnostic process on the production line, the OBD logical port can be enabled using the diagnostic authorization file. This increases the flexibility of OBD logical port configuration during vehicle production and before shipment.

[0019] In conjunction with the first aspect, in certain implementations of the first aspect, the diagnostic system further includes an authentication logical port, the first configuration information includes a first authentication request, and obtaining the first configuration information includes: receiving the first authentication request sent by an external diagnostic device via the authentication logical port, the authentication logical port being used for identity authentication. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the second logical port to switch from an off state to an on state when the first authentication request successfully authenticates the external diagnostic device.

[0020] In the above technical solution, when a vehicle needs to be repaired at a 4S dealership after leaving the factory, the first device can enable the second logical port if the authentication logical port successfully authenticates the diagnostic device's authentication request. By configuring the second logical port's on / off state through the authentication logical port, unauthorized devices can be prevented from opening the second logical port. This allows the second logical port to be conditionally enabled in 4S dealership repair scenarios, ensuring the security of the onboard diagnostic system.

[0021] In combination with the first aspect, in certain implementations of the first aspect, the diagnostic system is an on-board diagnostic system, the first network is a controller area network, the second network is an on-board Ethernet network, the first logical port is a logical port of the controller area network, and the second logical port is a logical port of the on-board Ethernet network.

[0022] In a second aspect, a control device is provided for use in a diagnostic system of a vehicle. The diagnostic system includes a first logical port and a second logical port. The first logical port is a logical port of a first network of the vehicle, and the second logical port is a logical port of a second network of the vehicle. The device includes an acquisition unit and a processing unit. The acquisition unit is configured to acquire first configuration information. The processing unit is configured to control the on / off state of the first logical port and / or the second logical port based on the first configuration information.

[0023] It should be understood that the technical effects corresponding to the technical solution of the second aspect can refer to the first aspect and will not be elaborated here.

[0024] In conjunction with the second aspect, in certain implementations of the second aspect, the first configuration information includes a diagnostic authorization file, the diagnostic authorization file includes a first field, and the obtaining unit is specifically configured to: receive the diagnostic authorization file. The processing unit is specifically configured to: control the first logical port and the second logical port to be in an open state when the first field has a first value; or control the first logical port and the second logical port to be in a closed state when the first field has a second value.

[0025] In combination with the second aspect, in certain implementations of the second aspect, the diagnosis authorization file further includes a second field, and the processing unit is further configured to: determine whether the diagnosis authorization file is valid based on the second field.

[0026] In conjunction with the second aspect, in certain implementations of the second aspect, the first configuration information includes a fix flag, the fix instruction includes a third field, and the acquiring unit is specifically configured to: acquire the fix flag after the vehicle is powered on. The processing unit is specifically configured to: control the first logical port and the second logical port to be in a closed state based on the third field.

[0027] In combination with the second aspect, in certain implementations of the second aspect, the device further includes a storage unit: after the vehicle leaves the factory, the storage unit is used to store the curing mark.

[0028] In conjunction with the second aspect, in certain implementations of the second aspect, the diagnostic system further includes an authentication logical port, the first configuration information includes a first authentication request, and the acquisition unit is specifically configured to receive the first authentication request sent by the external diagnostic device via the authentication logical port, where the authentication logical port is used for identity authentication. The processing unit is specifically configured to control the second logical port to switch from a closed state to an open state when the first authentication request successfully authenticates the external diagnostic device.

[0029] In combination with the second aspect, in certain implementations of the second aspect, the diagnostic system is an on-board diagnostic system, the first network is a controller area network, the second network is an on-board Ethernet network, the first logical port is a logical port of the controller area network, and the second logical port is a logical port of the on-board Ethernet network.

[0030] In a third aspect, a control method is provided. The method is applied to a diagnostic system of a vehicle, the diagnostic system including a first logical port, the first logical port being a logical port of an internal local area network of the vehicle. The method includes: obtaining first configuration information; and controlling a switching state of the first logical port based on the first configuration information.

[0031] In the above technical solution, the switch status of the logical port of the internal local area network of the vehicle is controlled by configuration information, which can protect the security of the internal local area network of the vehicle and also help to flexibly switch the logical port in different scenarios to meet the functional requirements in different scenarios.

[0032] In combination with the third aspect, in certain implementations of the third aspect, the diagnostic system further includes a second logical port, which is a logical port of the Ethernet of the vehicle, and the method further includes: controlling the switching state of the second logical port according to the first configuration information.

[0033] In conjunction with the third aspect, in certain implementations of the third aspect, the first configuration information includes a diagnostic authorization file, the diagnostic authorization file includes a first field, and obtaining the first configuration information includes: receiving the diagnostic authorization file. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the first logical port and the second logical port to be in an on state when the first field has a first value. Alternatively, controlling the first logical port and the second logical port to be in a off state when the first field has a second value.

[0034] It should be understood that the diagnosis authorization file may be received in scenarios such as when the vehicle is at a device manufacturer, or when the vehicle is in a road test phase and needs to be written via OBD.

[0035] In combination with the third aspect, in certain implementations of the third aspect, the diagnostic authorization file also includes a second field. Before controlling the switch status of the first logical port and / or the second logical port according to the first configuration information, the method also includes: determining whether the diagnostic authorization file is valid according to the second field.

[0036] In conjunction with the third aspect, in certain implementations of the third aspect, the first configuration information includes a fix flag, the fix instruction includes a third field, and obtaining the first configuration information includes: obtaining the fix flag after the vehicle is powered on. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the first logical port and the second logical port to be in a closed state based on the third field.

[0037] In combination with the third aspect, in certain implementations of the third aspect, the method further includes: storing the solidification mark after the vehicle leaves the factory.

[0038] In conjunction with the third aspect, in certain implementations of the third aspect, the diagnostic system further includes an authentication logical port, the first configuration information includes a first authentication request, and obtaining the first configuration information includes: receiving the first authentication request sent by an external diagnostic device via the authentication logical port, the authentication logical port being used for identity authentication. Controlling the on / off state of the first logical port and / or the second logical port based on the first configuration information includes: controlling the second logical port to switch from an off state to an on state when the first authentication request successfully authenticates the external diagnostic device.

[0039] In combination with the third aspect, in certain implementations of the third aspect, the diagnostic system is an on-board diagnostic system, the first network is a controller area network, the second network is an on-board Ethernet network, the first logical port is a logical port of the controller area network, and the second logical port is a logical port of the on-board Ethernet network.

[0040] In a fourth aspect, a control device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, and the processor executes the computer program stored in the memory to enable the device to perform any possible method in the first aspect, or to enable the device to perform any possible method in the third aspect.

[0041] In a fifth aspect, a vehicle is provided, which comprises any possible device in the second aspect.

[0042] In some possible implementations, the vehicle is a vehicle.

[0043] In a sixth aspect, a computer program product is provided, which includes: a computer program code, which, when the computer program code runs on a computer, enables the computer to execute any possible method in the first aspect above, or enables the computer to execute any possible method in the third aspect above.

[0044] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium, wherein the first storage medium can be packaged together with the processor or separately packaged with the processor, and the embodiments of the present application do not specifically limit this.

[0045] In the seventh aspect, a computer-readable medium is provided, which stores a program code. When the computer program code runs on a computer, it enables the computer to execute any possible method in the first aspect above, or enables the computer to execute any possible method in the third aspect above.

[0046] In an eighth aspect, an embodiment of the present application provides a chip system, which includes a processor for calling a computer program or computer instructions stored in a memory so that the processor executes any possible method in the above-mentioned first aspect, or so that the processor executes any possible method in the above-mentioned third aspect.

[0047] In combination with the eighth aspect, in a possible implementation, the processor is coupled to the memory through an interface.

[0048] In combination with the eighth aspect, in one possible implementation, the chip system also includes a memory, in which a computer program or computer instructions are stored. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] FIG1 is a schematic diagram of an OBD physical port provided in an embodiment of the present application;

[0050] FIG2 is a schematic diagram of a car-to-cloud system provided in an embodiment of the present application;

[0051] FIG3 is a flow chart of a control method provided in an embodiment of the present application;

[0052] FIG4 is a schematic diagram of a diagnostic agent configuration interaction provided by an embodiment of the present application;

[0053] FIG5 is a schematic diagram of a diagnostic agent configuration process provided by an embodiment of the present application;

[0054] FIG6 is a schematic diagram of an interactive process of diagnosing a vehicle on a production line according to an embodiment of the present application;

[0055] FIG7 is a flow chart of a logical port configuration process provided by an embodiment of the present application;

[0056] FIG8 is a schematic diagram of an interactive process for configuring a logical port in a 4S shop maintenance scenario provided by an embodiment of the present application;

[0057] FIG9 is a schematic diagram of a configuration flow of a logical port in a factory repair scenario provided by an embodiment of the present application;

[0058] FIG10 is a schematic diagram of state changes of an on-board logical port in the time domain under different scenarios provided by an embodiment of the present application;

[0059] FIG11 is a schematic block diagram of a control device 1100 provided in an embodiment of the present application;

[0060] FIG12 is a structural block diagram of a control device 1200 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] To facilitate understanding of the embodiments of the present application, the following points are explained:

[0062] First, in this application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments based on their internal logical relationships.

[0063] Second, in this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c. Wherein a, b and c can be single or multiple, respectively.

[0064] Third, throughout this application, the terms "first," "second," and various numerical references (e.g., #1, #2, etc.) are used to distinguish between different logical ports for ease of description and are not intended to limit the scope of the embodiments of this application. For example, they are used to distinguish between different logical ports, rather than to describe a specific order or precedence. It should be understood that such references are interchangeable where appropriate to describe scenarios beyond the embodiments of this application.

[0065] Fourth, in this application, expressions such as "when," "under the circumstances of," and "if" all imply that a corresponding action will be taken under certain objective circumstances. They do not limit the timeframe, do not require a judgment action to be taken when the action is taken, and do not imply any other limitations. Furthermore, the judgment action following these conditional conjunctions does not imply that the judgment action following the conditional conjunctions is the only condition for achieving the result; additional conditions may also be included to achieve the result.

[0066] Fifth, in this application, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or are inherent to these processes, methods, products or apparatuses.

[0067] Sixth, in this application, "used to indicate" can include being used for direct indication and being used for indirect indication. When describing that a certain indication information is used to indicate A, it can include that the indication information directly indicates A or indirectly indicates A, and it does not mean that the indication information must carry A.

[0068] The indication methods involved in the embodiments of this application should be understood to encompass various methods that enable the party to be indicated to obtain information to be indicated. The information to be indicated can be sent as a whole or divided into multiple sub-information and sent separately. The transmission period and / or timing of these sub-information can be the same or different. This application does not limit the specific transmission method.

[0069] In the embodiments of the present application, the "indication information" may be an explicit indication, i.e., a direct indication via signaling, or may be obtained based on parameters indicated by the signaling, in combination with other rules, other parameters, or by deduction. It may also be an implicit indication, i.e., based on a rule or relationship, or based on other parameters, or by deduction. This application does not impose specific limitations on this.

[0070] Seventh, in this application, "storage" may refer to storage in one or more memories. The one or more memories may be provided separately or integrated into an encoder or decoder, a processor, or a communication device. The one or more memories may also be provided in part separately and in part integrated into a decoder, a processor, or a communication device. The memory may be any type of storage medium and is not limited in this application.

[0071] The solutions of the embodiments of the present application can be applied to vehicles with diagnostic ports and diagnostic functions, such as on-board diagnostic systems, flying cars, motorcycles, and aircraft. They can also be applied to electronic devices with diagnostic ports and diagnostic functions, such as industrial computers, embedded devices, and smart homes. The embodiments of the present application are not limited to these. The following detailed description will be given using an on-board diagnostic system as an example.

[0072] Among them, the means of transport in this application may include road vehicles, water vehicles, air vehicles, industrial equipment, agricultural equipment, or entertainment equipment, etc. For example, the means of transport may be a vehicle, which is a vehicle in a broad sense, and may be a means of transport (such as a commercial vehicle, a passenger car, a motorcycle, an air vehicle, a train, etc.), an industrial vehicle (such as a forklift, a trailer, a tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), agricultural equipment (such as a mower, a harvester, etc.), amusement equipment, a toy vehicle, etc. The embodiments of this application do not specifically limit the type of means of transport. For another example, the means of transport may be a vehicle such as an airplane or a ship.

[0073] With the continuous development of automotive electronics and intelligent technologies, cars have gradually become a complex intelligent means of transportation. Efficient and accurate vehicle maintenance is increasingly dependent on intelligent vehicle diagnosis and detection systems.

[0074] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings.

[0075] In order to facilitate understanding of the embodiments of the present application, a brief explanation of the technical terms involved in the embodiments of the present application is first given.

[0076] 1. On-Board Diagnostic System (OBD)

[0077] OBD is a system installed in the vehicle to monitor the vehicle's operating status and report abnormalities. When a problem occurs in the vehicle's subsystem, it generates a fault code and an alert signal to notify the owner and the car manufacturer for diagnosis and repair.

[0078] The American Society of Engineers (ASME) has established the OBD-II standard for the second generation of on-board diagnostic systems. The OBD-II standard specifies the type and pinout of diagnostic connectors (e.g., diagnostic instruments), available electrical signal protocols, message formats, and lists of vehicle parameters and fault codes.

[0079] OBD physical ports include physical ports that support the Controller Area Network (CAN) bus and physical ports for automotive Ethernet.

[0080] The specification definition of the OBD physical port for diagnostic communication over internet protocol (DoIP) is shown in FIG1 , which is a schematic diagram of an OBD physical port provided in an embodiment of the present application.

[0081] As shown in Figure 1, ports #2 and #10 are used for the SAE J1850 bus; ports #4 and #5 are used for ground; ports #6 and #14 are used for the CAN bus; ports #7 and #15 are used for the ISO9141 K line and L line; port #16 is used for power supply; ports #3, #11, #12, and #13 are used for in-vehicle Ethernet; ports #1 and #9 are customized ports by the car manufacturer; and port #8 is used for Ethernet activation identification.

[0082] 2. Diagnostic communication via Ethernet protocol DoIP

[0083] DoIP is a transport protocol for transmitting diagnostic data of unified diagnostic services (UDS) over Ethernet networks.

[0084] 3. Unified diagnostic service agreement

[0085] The UDS protocol is a standardized standard for diagnostic services, such as the type of instructions sent to the electronic control unit (ECU) when reading fault codes and the type of instructions sent to the ECU when reading data streams.

[0086] 4. Transport layer security (TLS)

[0087] TLS is a cryptographic protocol that provides secure communications over computer networks. It provides confidentiality, authentication, data integrity, forward secrecy, and other security features between two or more communicating computer applications, preventing communications from being eavesdropped and tampered with.

[0088] With the advancement of automotive electronics, the number and types of ECUs in vehicles are increasing. Daily vehicle maintenance relies heavily on the OBD system. However, because the OBD system's physical port can be connected to external devices, it's vulnerable to exploitation and attacks by hackers.

[0089] 5. Vehicle identification number (VIN)

[0090] The vehicle identification code includes information such as the vehicle's manufacturer, year, model, body type, and assembly location. The vehicle identification code can be understood as the vehicle's identification number.

[0091] Since the physical ports of the OBD include the physical ports of the CAN bus and the physical ports of the vehicle Ethernet, when an external device is connected to the physical port of the OBD to access the vehicle device, the physical port of the OBD will become one of the main interfaces exploited by hackers, which will seriously affect the security of the vehicle device.

[0092] Currently, there are some solutions for ensuring the safe operation of the OBD system, which are briefly described below.

[0093] First, there's the whitelist mechanism applied to the OBD system. This whitelist restricts irrelevant vehicle control commands. For example, a whitelist based on a security identifier (SID) allows only commands related to the UDS to be executed within the vehicle, restricting the execution of commands unrelated to the UDS. In this whitelist-based solution, the OBD port is fully open. After the vehicle leaves the factory, the whitelist mechanism is fixed in software. After an external device is connected to the OBD port, the whitelist mechanism restricts vehicle control commands not on the whitelist, providing a certain degree of secure vehicle communication protection. However, it's impossible to add or delete entries to the whitelist mechanism or change the permissions of whitelisted services for different scenarios or different stages of the vehicle's lifecycle. This can lead to excessive port access permissions in some scenarios, increasing security risks. For example, commands related to the UDS can read and write through the OBD port, which may be too powerful for CAN bus communication devices.

[0094] Second, the security access service applied to the OBD system. For high-risk UDS, such as writing configuration words, flashing codes, control routines, etc., there may be security issues, and it is necessary to use security access services (for example, UDS27) to prevent unauthorized operations. Among them, UDS27 is used to perform access control on some sensitive UDS services. Only after passing the UDS27 service can sensitive UDS services be performed, which is an authentication based on a challenge-response mechanism. In this solution, the OBD port is also in a fully open state, and unauthorized operations are only prevented through security access services. It is also impossible to change the permissions of sensitive services served by UDS27 for different scenarios, which increases security risks.

[0095] Third, TLS access authentication is applied to the OBD system. The vehicle mode determines whether external devices connected to the OBD physical port require authentication. Vehicle modes include factory mode and user mode. In factory mode, TLS authentication is disabled, and diagnostic devices communicate directly through the OBD physical port without TLS authentication. In user mode, TLS authentication is enabled, and diagnostic devices must undergo TLS authentication and maintain a connection after passing authentication before communicating through the OBD physical port. In this solution, the OBD port is fully open in both factory and user modes; only in user mode does TLS authentication require connection. Although this solution distinguishes between factory and user modes, user permissions in user mode are relatively fixed and cannot be changed after TLS authentication. Furthermore, TLS authentication only applies to the Ethernet port within the OBD port and does not apply to the CAN port. Therefore, the user mode permissions in this solution are relatively coarse-grained and cannot adapt to the security needs of different scenarios.

[0096] Fourth, certificate-based authentication and permission management is used in the OBD system. The diagnostic device connected to the OBD port is pre-installed with a certificate, which it uses to authenticate with the vehicle. The vehicle then grants the diagnostic device appropriate diagnostic permissions based on the certificate type. In this solution, the user's certificate type is relatively fixed, and accordingly, permissions cannot be adjusted. Therefore, this solution is also unable to adapt to the security needs of different scenarios.

[0097] To solve the above problems, the present invention provides a control method and device, which will be described in detail below with reference to Figures 2 to 12 .

[0098] Figure 2 is a schematic diagram of a car-cloud system provided in an embodiment of the present application.

[0099] As shown in Figure 2, the vehicle cloud system includes a server 210, a diagnostic device 220, and a vehicle 230. When a vehicle malfunctions and needs to be diagnosed, the diagnostic device 220 is directly connected to the first device 231 of the vehicle 230 through the OBD physical port. That is, the diagnostic device 220 is plugged together with the OBD physical port on the first device 231 through the OBD connector. Among them, the first device 231 is the device where the OBD physical port is located, such as a cockpit domain controller (CDC), a vehicle dynamic controller (VDC), a vehicle integration unit (VIU), etc., and the embodiments of the present application do not limit this.

[0100] It should be understood that the aforementioned authorization file may be received by the diagnostic device 220 from the cloud server 210 and used in the interaction process with the first device 231 of the vehicle 230 .

[0101] Figure 3 is a flow chart of a control method provided in an embodiment of the present application. The control method is applied to a diagnostic system of a vehicle, the diagnostic system including a first logical port and a second logical port, the first logical port being a logical port of a first network of the vehicle, and the second logical port being a logical port of a second network of the vehicle.

[0102] S310: Obtain first configuration information.

[0103] As a possible implementation manner, the first configuration information includes a diagnosis authorization file, and the first device receives the diagnosis authorization file from an external diagnosis device.

[0104] As a possible implementation manner, the first configuration information includes a first authentication request, and the first device receives the first authentication request from the external diagnostic device.

[0105] As a possible implementation manner, the first configuration information includes a fixed flag, and the first device obtains the fixed flag from a storage device corresponding to the first device.

[0106] It should be understood that the storage device corresponding to the first device is a non-volatile memory. Therefore, when the first device is restarted or powered on again, the fixed flag stored in the storage device still exists.

[0107] S320: Control the switch state of the first logical port and / or the second logical port according to the first configuration information.

[0108] It should be understood that when the vehicle is a vehicle, the vehicle's diagnostic system may be an onboard diagnostic system. The first network may be the vehicle's internal local area network, and the second network may be the vehicle's Ethernet network. For example, the first network may be CAN or a local interconnect network (LIN). The second network may be an in-vehicle Ethernet network. Accordingly, when the vehicle is a vehicle, the first logical port may be a logical port of the in-vehicle local area network, and the second logical port may be a logical port of the in-vehicle Ethernet network.

[0109] As a possible implementation manner, the switch state of the first logical port and / or the second logical port is controlled according to the first field in the diagnosis authorization file.

[0110] For example, the first field can be represented by one bit. When the bit value of the first field is the first value, the first logical port and the second logical port are controlled to be in an open state. When the bit value of the first field is the second value, the first logical port and the second logical port are controlled to be in a closed state. The embodiments of the present application do not limit the specific form of the first value or the second value. For example, the first value can be 0 and the second value can be 1.

[0111] For example, the first field can be represented by two bits. When the value of the first bit in the first field is the third value, the first logical port is controlled to be in the open state. When the value of the first bit in the first field is the fourth value, the first logical port is controlled to be in the closed state. When the value of the second bit in the first field is the fifth value, the second logical port is controlled to be in the open state. When the value of the second bit in the first field is the sixth value, the second logical port is controlled to be in the closed state. That is, in this example, the first field can control the first logical port and the second logical port respectively through independent bits. Therefore, in this example, the on / off state of the first logical port does not need to be consistent with the on / off state of the second logical port.

[0112] As a possible implementation manner, when the first authentication request successfully authenticates the external diagnostic device, the second logical port is controlled to switch from a closed state to an open state.

[0113] As a possible implementation manner, the first logical port and the second logical port are controlled to be in a closed state according to the fixed identifier.

[0114] In the above technical solution, the first configuration information is used to control the on / off states of the first and second logical ports in the diagnostic system. This facilitates flexible control of the logical ports of the first and second networks at different stages throughout the vehicle's lifecycle, thereby minimizing permissions and maximizing security. For example, while the vehicle is on the production line, the configuration information can be used to control the first and second logical ports to be in an open state, thereby facilitating production and manufacturing. For example, after the vehicle leaves the factory, a fixed flag can be used to control the first and second logical ports to be in a closed state, thereby ensuring the safety of the vehicle.

[0115] The following detailed description uses a vehicle as an example, and will be combined with different scenarios, that is, the vehicle is at different stages of its life cycle to explain in detail the control method and device provided by the embodiments of the present application. It should be understood that the following uses "CAN logical port" to represent "first logical port" and "DoIP logical port" to represent "second logical port".

[0116] FIG10 is a schematic diagram of state changes of an on-board logical port in the time domain under different scenarios provided by an embodiment of the present application.

[0117] As shown in Figure 10, over time, the life cycle of a vehicle can be divided into the production line stage, the post-factory use stage, and the maintenance stage.

[0118] During the production line phase, the CAN logical port and DoIP logical port can be configured to be enabled using a diagnostic authorization file. Furthermore, the status flags stored in the vehicle can be set using the diagnostic authorization file. This will be explained in detail later with reference to Figures 4 through 7.

[0119] During the post-factory usage phase, each time the first device is powered on or restarted, the CAN logical port and the DoIP logical port may be configured to be in a closed state through a status flag stored in the vehicle.

[0120] During the diagnostic and maintenance phase, different control methods are used to control the switch status of the CAN logical port and the DoIP logical port, depending on the location of the diagnostic and maintenance. For example, when performing diagnostic and maintenance at a 4S shop, the DoIP logical port is opened through the authentication port, the CAN logical port remains closed, but the regulatory data related to vehicle supervision is allowed to be read through the CAN logical port. This will be explained in detail later in conjunction with Figure 8. For another example, after returning to the factory for diagnostic and maintenance, the authentication port and the diagnostic authorization file are used to control the configuration of the CAN logical port and the DoIP logical port to be in the open state. This will be explained in detail later in conjunction with Figure 9.

[0121] 4 to 7 illustrate exemplary processes of logical port configuration for a vehicle on a production line and when the vehicle leaves the factory.

[0122] FIG4 is a schematic diagram of a diagnostic agent configuration interaction provided in an embodiment of the present application.

[0123] S401: The diagnostic device sends a request message for a diagnostic authorization file to a server.

[0124] It should be understood that the diagnostic device is an external diagnostic device to which the first device is connected via the OBD port.

[0125] As a possible implementation manner, after the diagnostic device is connected to the OBD port of the first device, the diagnostic device is triggered to send a request message for a diagnostic authorization file to the server.

[0126] S402: The server performs identity authentication according to the request message, and determines the diagnosis authorization file after the identity authentication is passed.

[0127] S403: The server sends a diagnosis authorization file to the diagnosis device.

[0128] S404: The diagnostic device imports the diagnostic authorization file into the first device.

[0129] S405: The first device determines the status of the diagnosis proxy mode according to the diagnosis authorization file.

[0130] It should be understood that when the diagnostic proxy mode is in the on state, it means that the dynamic configuration function of the logical port of the OBD is started; when the diagnostic proxy mode is in the off state, it means that the dynamic configuration function of the logical port of the OBD is turned off.

[0131] As a possible implementation method, when the vehicle is powered on for the first time and receives the diagnostic authorization file, the diagnostic proxy mode is turned on when the second field in the diagnostic authorization file indicates that the diagnostic authorization file is valid. The second field is used to indicate whether the OBD logical port has a dynamic configuration function.

[0132] For example, the second field can specifically be "Authentication_file_valid". The specific value of the second field can be "0" or "1", or the second field can be "N" or "Y". The embodiment of the present application does not limit the meaning of the diagnosis authorization file corresponding to the specific value of the second field. For example, when the second field is "0", the second field indicates that the diagnosis authorization file is valid; or, when the second field is "1", the second field indicates that the diagnosis authorization file is valid.

[0133] Optionally, the second field of the diagnosis authorization file is stored in a memory corresponding to the first device. It should be understood that the memory is a non-volatile memory.

[0134] For example, the second field of the diagnosis authorization file is stored in the first device in the form of a status flag. For example, the decentralized identity (DID) of the first status flag corresponding to the second field may be F152.

[0135] As a possible implementation, when the vehicle is not powered on or restarted for the first time, the first device can read the first status flag from the memory, and determine whether a valid diagnostic authorization file has been received based on the first status flag to determine whether to enable the diagnostic proxy mode.

[0136] The specific process can be shown in Figure 5, which is a schematic diagram of a diagnostic agent configuration process provided by an embodiment of the present application. When the vehicle is not powered on or restarted for the first time, the following steps are performed.

[0137] S501: The first device determines whether it has received a valid diagnosis authorization file.

[0138] If a valid diagnosis authorization file has been received, S502 , the first device starts a diagnosis agent mode.

[0139] The fact that the first device has received a valid diagnostic authorization file can be understood as the first device having received a valid diagnostic authorization file before being powered on or restarted, and the first device stores a first status flag indicating that the first device has received a valid diagnostic authorization file.

[0140] If no valid diagnosis authorization file has been received, S503 , the first device does not enable the diagnosis proxy mode.

[0141] The fact that the first device has not received a valid diagnostic authorization file can be understood as the fact that the first device has not received a valid diagnostic authorization file before powering on or restarting, and the first device does not store a first status flag indicating that a valid diagnostic authorization file has been received.

[0142] In this technical solution, before dynamically controlling the on / off state of the OBD logical port, the validity of the authorization file is diagnosed to enable the dynamic configuration of the OBD logical port. Compared to the current OBD full port openness and weak security protection only through whitelisting or authentication, this solution can further improve the security of dynamically configuring the OBD logical port.

[0143] Figure 6 is an interactive diagram of a diagnostic process when a vehicle is on a production line, provided by an embodiment of the present application. The interactive diagram of Figure 6 takes the first device, diagnostic device and server as the execution subjects of the interactive diagram as an example to illustrate the corresponding method, but the present application does not limit the execution subjects of the interactive diagram. For example, the first device in Figure 6 can also be a chip, chip system or processor that supports the first device to implement the corresponding method, or a logic module or software that can implement all or part of the functions of the first device. The diagnostic device in Figure 6 can also be a chip, chip system or processor that supports the diagnostic device to implement the corresponding method, or a logic module or software that can implement all or part of the functions of the diagnostic device. The server in Figure 6 can also be a chip, chip system or processor that supports the server to implement the corresponding method, or a logic module or software that can implement all or part of the functions of the server.

[0144] S610: The diagnostic device obtains a diagnostic authorization file from the server.

[0145] It should be understood that the specific acquisition process can be referred to FIG4 , which will not be described in detail here.

[0146] S620: The diagnostic device imports the diagnostic authorization file into the first device.

[0147] S630: The first device controls the switch state of the first logical port and / or the second logical port of the OBD.

[0148] Specifically, it may include steps S631 to S633.

[0149] S631: The first device controls the switch states of the CAN logical port and the DoIP logical port of the OBD according to the first field in the diagnosis authorization file.

[0150] As a possible implementation method, the first field is used to indicate whether the switch states of the CAN logical port and the DoIP logical port are both on or off. In other words, the first field is used to indicate whether the CAN logical port and the DoIP logical port are in safe mode. Among them, the CAN logical port and the DoIP logical port in safe mode means that the logical port of the OBD of the first device is in an untrusted environment and needs to be in a safe protection mode, that is, the CAN logical port and the DoIP logical port need to be closed; the CAN logical port and the DoIP logical port in non-safe mode means that the CAN logical port and the DoIP logical port of the first device are in a trusted environment, that is, the CAN logical port and the DoIP logical port can be opened.

[0151] For example, the first field may be "Sec_acc_mode," and the specific value of the first field may be "0" or "1," or the specific value of the first field may be "N" or "Y." This embodiment of the application does not limit the meaning of the switch state of the logical port indicated by the specific value of the first field.

[0152] For example, when the first field is "0", the first field indicates that the switch status of the CAN logical port and the DoIP logical port of the OBD remains unchanged; or, when the first field is "1", the first field indicates that the CAN logical port and the DoIP logical port of the OBD are configured to be on.

[0153] As a possible implementation, the first field can be used to indicate the switch status of the CAN logical port and the DoIP logical port at the same time, or can indicate the switch status of the CAN logical port and the DoIP logical port separately. For example, the first field includes 2 bits, each bit can indicate the switch status of the CAN logical port and the DoIP logical port respectively.

[0154] Optionally, after receiving the valid diagnosis authorization file for the first time, the first field of the diagnosis authorization file is stored in a memory corresponding to the first device.

[0155] For example, the first field of the diagnostic authorization file is stored in the memory of the first device in the form of a flag. For example, the DID of the second status flag corresponding to the first field may be F151. It should be understood that the second status flag stored in the memory is used to record the current on / off state of the OBD logical port.

[0156] Optionally, in S632 , the diagnostic device imports a fixation flag into the first device. After the first device is powered on again, the fixation flag is used to fix the switch states of the CAN logical port and the DoIP logical port to the closed state.

[0157] Optionally, the fixed flag may be written into a memory in the form of a status flag, for example, written into a non-volatile memory. For example, the DID of the third status flag corresponding to the fixed flag may be F15B.

[0158] For example, the solidified flag may be “security_mode_solidified.” The specific value of the solidified flag may be “0” or “1,” or the specific value of the solidified flag may be “N” or “Y.” The embodiment of the present application does not limit the specific value of the solidified flag.

[0159] After the first device is powered on again, the fixed flag can be used to fix the switch state of the CAN logical port and the DoIP logical port to the off state. It can also be understood that the fixed flag is used to indicate that the CAN logical port and the DoIP logical port need to be in safe mode. The specific explanation of safe mode can be found above and will not be repeated here.

[0160] Optionally, in S633, after the first device is powered on again or restarted, the first device configures the switch states of the CAN logical port and the DoIP logical port to be closed according to the fixation flag.

[0161] It should be understood that if the first device of the vehicle does not restart after receiving the solidification flag, the solidification flag is not effective. At this time, the CAN logical port and the DoIP logical port of the first device can be in the open state.

[0162] Steps S631 to S633 can be applied to the port configuration process before the vehicle leaves the factory, and will be described in detail with reference to FIG. 7 .

[0163] S640: When the CAN logical port and the DoIP logical port are in an open state, the diagnostic device performs a diagnostic operation on the first device.

[0164] S650: After executing the diagnostic operation, the diagnostic device imports a cancellation instruction of the diagnostic authorization file into the first device.

[0165] S660: The first device cancels the diagnosis authorization file according to the cancellation instruction.

[0166] As a possible implementation manner, the first device sets the first status flag stored in the first device to an invalid value according to the deregistration instruction.

[0167] For example, the first status flag with a DID of F152 may be set to 0.

[0168] Optionally, during a first duration, the CAN logical port and the DoIP logical port are in an open state, and the diagnostic device performs a diagnostic operation on the first device. The first duration may be preset.

[0169] Optionally, after the first time period has expired, the CAN logical port and the DoIP logical port are in a closed state, and the diagnostic device cannot perform diagnostic operations on the first device.

[0170] For example, the first time duration can be set to 2 hours. Within 2 hours, the CAN logical port and the DoIP logical port are in the open state, and the diagnostic device performs diagnostic operations on the first device; after more than 2 hours, the CAN logical port and the DoIP logical port are in the closed state, and the diagnostic device cannot perform diagnostic operations on the first device.

[0171] Figure 7 is a flow chart of a logical port configuration according to an embodiment of the present application. After the vehicle is powered on or restarted, the following steps are performed.

[0172] S701: The first device determines whether the diagnosis authorization file imported from the diagnosis device is valid.

[0173] Specifically, the first device determines whether the diagnosis authorization file is valid according to the second field of the diagnosis authorization file.

[0174] When the diagnosis authorization file is invalid, S703 , the first device closes the CAN logical port and the DoIP logical port.

[0175] When the diagnosis authorization file is valid, S702 determines whether the diagnosis authorization file indicates to open the CAN logical port and the DoIP logical port.

[0176] As a possible implementation manner, the first device determines whether to enable the CAN logical port and the DoIP logical port according to the first field of the diagnosis authorization file.

[0177] When the diagnosis authorization file is valid and the diagnosis authorization file instructs to open the logical port, S704 , the first device opens the CAN logical port and the DoIP logical port.

[0178] When the diagnosis authorization file is valid and the diagnosis authorization file indicates not to open the logical port, S703 , the first device closes the CAN logical port and the DoIP logical port.

[0179] Optionally, after the vehicle is powered on or restarted and before executing S701 , in S705 , the first device closes the logical port according to the fixation flag.

[0180] It should be understood that if the first device has obtained the fix flag and is restarted or powered on before the diagnostic process is completed on the production line, and the CAN logical port and DoIP logical port are in the closed state, the first device can also use the diagnostic authorization file to open the CAN logical port and DoIP logical port. After the diagnostic process is completed on the production line and the vehicle leaves the factory, the first device can read the fix flag and close the CAN logical port and DoIP logical port with one click.

[0181] The bold process shown in FIG7 is the process of opening the CAN logical port and the DoIP logical port before the vehicle leaves the factory, and the non-bold process shown in FIG7 is the process of closing the CAN logical port and the DoIP logical port before the vehicle leaves the factory.

[0182] In the above technical solution, before the fixed flag takes effect, the OBD logical port can be enabled each time the vehicle is powered on, facilitating diagnostics while the vehicle is on the production line. After the fixed flag takes effect, the OBD logical port can be disabled each time the vehicle is powered on, improving OBD security after the vehicle leaves the factory. Even after the fixed flag takes effect, if the vehicle has not yet completed the diagnostic process on the production line, the OBD logical port can be enabled using the diagnostic authorization file. This increases the flexibility of OBD logical port configuration during vehicle production and before vehicle shipment.

[0183] The above may be the process of dynamically configuring the CAN logical port and the DoIP logical port before the vehicle leaves the factory. During the use phase after the vehicle leaves the factory, each time the first device is powered on or restarted, the third status flag (for example, security_mode_solidified with DID F15B) is obtained from the memory, and the CAN logical port and the DoIP logical port are closed according to the third status flag.

[0184] The following will describe in detail the detailed process of dynamic configuration of CAN logical ports and DoIP logical ports during the vehicle maintenance at the 4S shop and returned to the factory for maintenance, with reference to FIG8 and FIG9 .

[0185] FIG8 is a schematic diagram of an interactive process of configuring a logical port in a 4S shop maintenance scenario provided by an embodiment of the present application.

[0186] S801: A diagnostic device sends a connection request to a first device.

[0187] Specifically, the connection request is used to request a connection between the diagnostic device and the first device through a DoIP logical port.

[0188] S802: After the connection times out, the diagnostic device sends a first authentication request to the first device.

[0189] It should be understood that the first authentication request is used to request identity authentication through the authentication logic port.

[0190] Exemplarily, the authentication request may be a two-way authentication based on TLS.

[0191] S803: After the authentication is passed, the first device controls the DoIP logical port to switch from the closed state to the open state according to the authentication pass information.

[0192] Optionally, before opening the DoIP logical port of the first device, the diagnostic device may read vehicle parameters that comply with regulatory requirements.

[0193] S804: The first device sends an authentication success message to the diagnostic device.

[0194] It should be understood that there is no fixed order between S803 and S804.

[0195] S805: The diagnostic device is successfully connected to the first device through the DoIP logical port and remains connected to the first device.

[0196] S806: The diagnostic device sends a diagnostic request to the first device through the DoIP logical port.

[0197] S807: The first device sends a diagnostic response to the diagnostic device through the DoIP logical port.

[0198] In the above technical solution, when a vehicle needs to be repaired at a 4S dealership after leaving the factory, the first device can enable the DoIP logical port if the authentication logical port successfully authenticates the diagnostic device's authentication request. Configuring the DoIP logical port's on / off status through the authentication logical port prevents unauthorized devices from opening the DoIP logical port. This allows the DoIP logical port to be conditionally enabled in 4S dealership repair scenarios, ensuring the security of the OBD port.

[0199] FIG9 is a schematic diagram of a configuration flow of a logical port in a factory return repair scenario provided in an embodiment of the present application.

[0200] S910: Perform identity authentication between the server and the diagnostic device.

[0201] For example, two-way authentication can be performed between the server and the diagnostic device based on TLS.

[0202] S920: The diagnostic device obtains the VIN of the target vehicle.

[0203] It should be understood that the target vehicle is the vehicle where the first device is located.

[0204] S930: The diagnostic device sends a first request message to the server, where the first request message is used to request a diagnostic authorization file.

[0205] The first request message includes the VIN of the target vehicle.

[0206] S940: The server sends a diagnosis authorization file to the diagnosis device.

[0207] S950: Enable the DoIP logical port by authenticating the logical port, which may include S951 and S952.

[0208] S951: The diagnostic device sends a first authentication request to the first device, where the first authentication request is used for identity authentication.

[0209] S952: After the authentication logical port passes, the first device opens the DoIP logical port.

[0210] It should be understood that the detailed process is similar to that in the 4S shop maintenance scenario, and reference may be made to S801 to S805.

[0211] S960: Open the DoIP logical port and the CAN logical port through the diagnostic authorization file. This may include S961 and S962.

[0212] S961: The diagnostic device imports the diagnostic authorization file into the first device.

[0213] S962: The first device configures the switch status of the CAN logical port and the DoIP logical port according to the diagnosis authorization file.

[0214] The specific configuration process may refer to steps S701 to S705 shown in FIG. 7 of the vehicle on the production line.

[0215] S970: The diagnostic device performs a diagnostic service with the first device.

[0216] S980: After the diagnosis service is completed, the diagnosis authorization file is cancelled between the diagnosis device and the first device.

[0217] It should be understood that the specific method of canceling the diagnostic authorization file can refer to steps S650 and S660 shown in FIG. 6 when the vehicle is on the production line.

[0218] The above content is the control method of the embodiment of the present application. The control device will be described in detail below with reference to Figures 11 and 12. It should be understood that the description of the device embodiment corresponds to the description of the method embodiment. Therefore, for matters not described in detail, please refer to the method embodiment above. For the sake of brevity, it is not repeated here.

[0219] The embodiments of the present application also provide a device for implementing any of the above methods. For example, a device is provided that includes units (or means) for implementing each step performed by a vehicle or an on-board diagnostic system in any of the above methods.

[0220] FIG11 is a schematic block diagram of a control device 1100 provided in an embodiment of the present application.

[0221] The control device 1100 includes an acquisition unit 1110 and a processing unit 1120. The control device 1100 can be used to implement any of the methods in FIG3 to FIG9.

[0222] The device 1100 is applied to a diagnostic system of a vehicle, the diagnostic system including a first logical port and a second logical port, the first logical port being a logical port of a first network of the vehicle, and the second logical port being a logical port of a second network of the vehicle. Specifically, the following steps may be performed:

[0223] The acquiring unit 1110 is configured to acquire first configuration information.

[0224] The processing unit 1120 is configured to control a switch state of the first logical port and / or the second logical port according to the first configuration information.

[0225] To avoid redundancy, the detailed steps can be referred to the corresponding method embodiments. The control device 1100 can be the first device in Figures 5 to 9, or a chip, chip system or processor that supports the first device to implement the corresponding method, or a logic module or software that can implement all or part of the functions of the first device.

[0226] It should be understood that the division of the various units in the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into a physical entity, or they can be physically separated. In addition, the units in the device can be implemented in the form of a processor calling software; for example, the device includes a processor, the processor is connected to a memory, and the memory stores instructions. The processor calls the instructions stored in the memory to implement any of the above methods or realize the functions of the various units of the device, where the processor is, for example, a general-purpose processor, such as a central processing unit (CPU) or a microprocessor, and the memory is a memory within the device or a memory outside the device. Alternatively, the units in the device can be implemented in the form of hardware circuits, and the functions of some or all of the units can be realized by designing the hardware circuits. The hardware circuit can be understood as one or more processors. For example, in one implementation, the hardware circuit is an application-specific integrated circuit (ASIC), which realizes the functions of some or all of the above units by designing the logical relationship of the components in the circuit. For another example, in another implementation, the hardware circuit can be implemented by a programmable logic device (PLD). Taking a field programmable gate array (FPGA) as an example, it can include a large number of logic gate circuits, and the connection relationship between the logic gate circuits is configured by configuring the configuration file, thereby realizing the functions of some or all of the above units. All units of the above devices can be implemented in the form of software called by the processor, or in the form of hardware circuits, or in part by software called by the processor, and the rest by hardware circuits.

[0227] In an embodiment of the present application, a processor is a circuit with a signal processing capability. In one implementation, the processor may be a circuit with the capability to read and execute instructions, such as a CPU, a microprocessor, a graphics processing unit (GPU) (which may be understood as a microprocessor) or a digital signal processor (DSP); in another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit may be fixed or reconfigurable, such as a hardware circuit implemented by an ASIC or PLD, such as an FPGA. In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration may be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it may also be a hardware circuit designed for artificial intelligence, which may be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc.

[0228] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0229] In addition, the various units in the above apparatus may be fully or partially integrated together, or may be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-a-chip (SOC). The SOC may include at least one processor for implementing any of the above methods or implementing the functions of the various units of the apparatus. The at least one processor may be of different types, for example, including a CPU and an FPGA, a CPU and an artificial intelligence processor, a CPU and a GPU, etc.

[0230] It can be seen that each unit in the above device can be one or more processors (or processing circuits) configured to implement the above method, such as: CPU, GPU, NPU, TPU, DPU, microprocessor, DSP, ASIC, FPGA, or a combination of at least two of these processor forms.

[0231] FIG12 is a structural block diagram of a control device 1200 provided in an embodiment of the present application.

[0232] The control device 1200 shown in FIG12 may include a processor 1210, a transceiver 1220, and a memory 1230. The processor 1210, the transceiver 1220, and the memory 1230 are connected via an internal connection path. The memory 1230 is used to store instructions, and the processor 1210 is used to execute the instructions stored in the memory 1230 to receive / send some parameters through the transceiver 1220. Optionally, the memory 1230 may be coupled to the processor 1210 via an interface or may be integrated with the processor 1210.

[0233] It should be noted that the transceiver 1220 may include but is not limited to a transceiver device such as an input / output interface to implement communication between the device 1200 and other devices or a communication network.

[0234] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor 1210 or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1230, and the processor 1210 reads the information in the memory 1230 and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0235] The processor 1210 can be a general-purpose CPU, microprocessor, ASIC, GPU, or one or more integrated circuits, configured to execute relevant programs to implement the control method of the method embodiments of the present application. The processor 1210 can also be an integrated circuit chip with signal processing capabilities. In specific implementations, the various steps of the control method of the present application can be performed by hardware integrated logic circuits or software instructions within the processor 1210. The processor 1210 can also be a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software modules can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 1230 , and the processor 1210 reads the information in the memory 1230 and executes the control method of the embodiment of the method of the present application in combination with its hardware.

[0236] The memory 1230 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).

[0237] The transceiver 1220 uses a transceiver device such as, but not limited to, a transceiver to implement communication between the apparatus 1200 and other devices or a communication network.

[0238] An embodiment of the present application further provides a control system, which includes a control device 1100, a diagnostic device, and a server.

[0239] An embodiment of the present application also provides a vehicle, which may include the above-mentioned control device 1100.

[0240] Optionally, the intelligent driving device may be a vehicle.

[0241] An embodiment of the present application further provides a computer program product, which includes: computer program code, which enables the computer to execute the above method when the computer program code is run on a computer.

[0242] An embodiment of the present application further provides a computer-readable medium, wherein the computer-readable medium stores a program code. When the computer program code is run on a computer, the computer executes the above method.

[0243] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or a power-on erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0244] It should be understood that in the embodiment of the present application, the memory may include a read-only memory and a random access memory, and provide instructions and data to the processor.

[0245] It should also be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0246] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0247] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0248] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0249] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0250] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0251] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory ROM, a random access memory RAM, a magnetic disk, or an optical disk.

[0252] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A control method, characterized in that: A diagnostic system applied to a vehicle, the diagnostic system comprising a first logical port and a second logical port, the first logical port being a logical port of a first network of the vehicle, the second logical port being a logical port of a second network of the vehicle, the method comprising: Obtaining first configuration information; According to the first configuration information, a switch state of the first logical port and / or the second logical port is controlled.

2. The method according to claim 1, characterized in that The first configuration information includes a diagnosis authorization file, the diagnosis authorization file includes a first field, and obtaining the first configuration information includes: receiving the diagnosis authorization document; The controlling the switch state of the first logical port and / or the second logical port according to the first configuration information includes: When the first field is a first value, the first logical port and the second logical port are controlled to be in an open state; or, When the first field has a second value, the first logical port and the second logical port are controlled to be in a closed state.

3. The method according to claim 2, characterized in that The diagnostic authorization file further includes a second field. Before controlling the switch state of the first logical port and / or the second logical port according to the first configuration information, the method further includes: The diagnosis authorization file is determined to be valid according to the second field.

4. The method according to claim 1, characterized in that The first configuration information includes a solidification flag, the solidification instruction includes a third field, and obtaining the first configuration information includes: After the vehicle is powered on, obtaining a curing mark; The controlling the switch state of the first logical port and / or the second logical port according to the first configuration information includes: According to the third field, the first logical port and the second logical port are controlled to be in a closed state.

5. The method according to claim 4, characterized in that The method further comprises: After the vehicle leaves the factory, the curing mark is stored.

6. The method according to claim 1, characterized in that The diagnostic system further includes an authentication logic port, the first configuration information includes a first authentication request, and obtaining the first configuration information includes: receiving the first authentication request sent by the external diagnostic device through the authentication logic port, wherein the authentication logic port is used for identity authentication; The controlling the switch state of the first logical port and / or the second logical port according to the first configuration information includes: When the first authentication request successfully authenticates the external diagnostic device, the second logical port is controlled to switch from a closed state to an open state.

7. The method according to any one of claims 1 to 6, characterized in that: The diagnostic system is an on-board diagnostic system, the first network is a controller area network, the second network is an on-board Ethernet network, the first logical port is a logical port of the controller area network, and the second logical port is a logical port of the on-board Ethernet network.

8. A control device, characterized in that: A diagnostic system applied to a vehicle, the diagnostic system comprising a first logical port and a second logical port, the first logical port being a logical port of a first network of the vehicle, the second logical port being a logical port of a second network of the vehicle, the device comprising an acquisition unit and a processing unit: The acquiring unit is used to acquire first configuration information; The processing unit is configured to control a switch state of the first logical port and / or the second logical port according to the first configuration information.

9. The device according to claim 8, characterized in that The first configuration information includes a diagnosis authorization file, and the diagnosis authorization file includes a first field, The acquisition unit is specifically used to: receive the diagnosis authorization file; The processing unit is specifically used for: When the first field is a first value, the first logical port and the second logical port are controlled to be in an open state; or, When the first field has a second value, the first logical port and the second logical port are controlled to be in a closed state.

10. The device according to claim 9, characterized in that The diagnosis authorization file further includes a second field, and the processing unit is further configured to: The diagnosis authorization file is determined to be valid according to the second field.

11. The device according to claim 8, characterized in that The first configuration information includes a fix flag, and the fix instruction includes a third field, The acquisition unit is specifically used to: acquire a curing mark after the vehicle is powered on; The processing unit is specifically used for: According to the third field, the first logical port and the second logical port are controlled to be in a closed state.

12. The device according to claim 11, characterized in that The device also includes a storage unit: After the vehicle leaves the factory, the storage unit is used to store the curing mark.

13. The device according to claim 8, characterized in that The diagnostic system further comprises an authentication logic port, the first configuration information comprises a first authentication request, The acquisition unit is specifically used to: receive the first authentication request sent by the external diagnostic device through the authentication logic port, and the authentication logic port is used for identity authentication; The processing unit is specifically used for: When the first authentication request successfully authenticates the external diagnostic device, the second logical port is controlled to switch from a closed state to an open state.

14. The device according to any one of claims 8 to 13, characterized in that The diagnostic system is an on-board diagnostic system, the first network is a controller area network, the second network is an on-board Ethernet network, the first logical port is a logical port of the controller area network, and the second logical port is a logical port of the on-board Ethernet network.

15. A control device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program stored in the memory so that the apparatus performs the method according to any one of claims 1 to 7.

16. A vehicle, characterized in that: Comprising a control device as claimed in any one of claims 8 to 15.

17. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Control method and device

    CN119575922A

  • Fault diagnosis method and device and vehicle

    CN112585549A

  • Data diagnosis method and device and automobile

    CN114675617A

  • Vehicle controller diagnosis method, device, equipment and medium

    CN115442064A

  • Gateway connecting device and vehicle

    CN217388734U