A UDS diagnostic service distribution method, device and service distribution equipment

CN122554487APending Publication Date: 2026-08-11WUHAN JIANGXIA CHUNENG AUTOMOBILE TECHNOLOGY R&D CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-28
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]有鉴于此,有必要提供一种UDS诊断服务分发方法、装置及服务分发设备,用以解决现有的UDS诊断服务分发方案效率低、占用存储资源较高、可靠性不足的问题

Benefits of technology

[0016]The beneficial effects of this invention are as follows: The UDS diagnostic service distribution method, apparatus, and service distribution device provided by this invention first determine the return value corresponding to the diagnostic service to be processed by using the first four bits of the SID of the diagnostic service to be processed, thereby improving the efficiency of diagnostic service determination and thus improving the efficiency of diagnostic service distribution, while reducing the occupation of storage resources. Then, the mask index value corresponding to the diagnostic service to be processed is determined according to the return value corresponding to the diagnostic service to be processed. The service processing function corresponding to the diagnostic service to be processed is determined by using the mask index value corresponding to the diagnostic service to be processed and a preset mask index table, ensuring the reliability of diagnostic service distribution. Finally, the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed. This invention achieves efficient and reliable UDS diagnostic service distribution with low storage resource occupation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554487A_ABST
    Figure CN122554487A_ABST
Patent Text Reader

Abstract

This invention relates to a UDS diagnostic service distribution method, apparatus, and service distribution device, belonging to the field of vehicle fault diagnosis technology. The UDS diagnostic service distribution method includes: obtaining the SID of a diagnostic service to be processed; determining the return value corresponding to the diagnostic service based on the first four bits of the SID; determining the mask index value corresponding to the diagnostic service based on the return value; determining the service processing function corresponding to the diagnostic service based on the mask index value and a preset mask index table; and distributing the diagnostic service to the corresponding service processing function. This invention achieves efficient and reliable UDS diagnostic service distribution with low storage resource consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle fault diagnosis technology, and in particular to a UDS diagnostic service distribution method, apparatus and service distribution equipment. Background Technology

[0002] With the rapid development of automotive electronic systems, the vehicle diagnostic communication mechanism based on Unified Diagnostic Services (UDS) is widely used in vehicle controllers, gateways, and various electronic control units (ECUs). The UDS protocol defines a series of standardized service identifiers (SIDs) to implement functions such as diagnostic session control, data reading and writing, secure access, and fault management.

[0003] In existing technologies, after receiving a diagnostic request message, the lower-level computer (ECU) typically needs to distribute services based on the SID in the request, mapping different SIDs to corresponding processing functions. Current mainstream implementation methods mainly include: switch-case branching, linked list or structure array lookup, and direct index mapping (array index mapping). However, existing UDS diagnostic service distribution schemes generally suffer from low efficiency, high storage resource consumption, and insufficient reliability.

[0004] Therefore, how to achieve efficient and reliable distribution of UDS diagnostic services with low storage resource consumption has become an urgent technical problem to be solved. Summary of the Invention

[0005] In view of this, it is necessary to provide a UDS diagnostic service distribution method, apparatus and service distribution equipment to solve the problems of low efficiency, high storage resource consumption and insufficient reliability of existing UDS diagnostic service distribution schemes.

[0006] To address the aforementioned problems, in a first aspect, the present invention provides a UDS diagnostic service distribution method, comprising: Obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID. The mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed. Based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, the service processing function corresponding to the diagnostic service to be processed is determined, and the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed.

[0007] In one possible implementation, determining the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed includes: If the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20 or 0x30, the return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are 0x80, the return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are not 0x00, 0x10, 0x20, 0x30, or 0x80, the return value corresponding to the diagnostic service to be processed is determined to be 0x79.

[0008] In one possible implementation, determining the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed, when the first four bits are 0x00, 0x10, 0x20, or 0x30, includes: The return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed, the SID of the diagnostic service to be processed, and the first default bit value.

[0009] In one possible implementation, determining the return value corresponding to the diagnostic service to be processed based on its SID, when the first four bits of the SID are 0x80, includes: The return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed, the first default bit value, and the second default bit value.

[0010] In one possible implementation, when the return value of the diagnostic service to be processed is determined to be 0x79, the step of determining the mask index value corresponding to the diagnostic service to be processed based on the return value includes: The mask index value corresponding to the diagnostic service to be processed is determined to be 0.

[0011] In one possible implementation, determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of high-bit base address and low-bit offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

[0012] In one possible implementation, determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of fixed offset and low-order offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

[0013] In one possible implementation, determining the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and a preset mask index table includes: Based on the mask index value corresponding to the diagnostic service to be processed, the service number corresponding to the diagnostic service to be processed is determined in the mask index table, and the service processing function corresponding to the diagnostic service to be processed is determined based on the service number corresponding to the diagnostic service to be processed.

[0014] On the other hand, the present invention also provides a UDS diagnostic service distribution device, comprising: The acquisition module is used to obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed. The determination module is used to determine the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed. The distribution module is used to determine the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, and to distribute the diagnostic service to be processed to the service processing function corresponding to the diagnostic service to be processed.

[0015] Secondly, the present invention also provides a service distribution device, including a data acquisition unit, a memory, and a processor, wherein, The data acquisition device is used to acquire the SID of the diagnostic service to be processed; The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the UDS diagnostic service distribution method described in any of the above implementations.

[0016] The beneficial effects of this invention are as follows: The UDS diagnostic service distribution method, apparatus, and service distribution device provided by this invention first determine the return value corresponding to the diagnostic service to be processed by using the first four bits of the SID of the diagnostic service to be processed, thereby improving the efficiency of diagnostic service determination and thus improving the efficiency of diagnostic service distribution, while reducing the occupation of storage resources. Then, the mask index value corresponding to the diagnostic service to be processed is determined according to the return value corresponding to the diagnostic service to be processed. The service processing function corresponding to the diagnostic service to be processed is determined by using the mask index value corresponding to the diagnostic service to be processed and a preset mask index table, ensuring the reliability of diagnostic service distribution. Finally, the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed. This invention achieves efficient and reliable UDS diagnostic service distribution with low storage resource occupation. Attached Figure Description

[0017] Figure 1 A schematic flowchart of an embodiment of the UDS diagnostic service distribution method provided by the present invention; Figure 2 A schematic flowchart of an embodiment of the UDS diagnostic service distribution process provided by the present invention; Figure 3 A schematic diagram of an embodiment of the UDS diagnostic service distribution device provided by the present invention; Figure 4 A schematic diagram of an embodiment of the service distribution device provided by the present invention. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0019] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0020] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.

[0021] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0022] This invention provides a UDS diagnostic service distribution method, apparatus, and service distribution equipment, which are described below.

[0023] Figure 1 This is a schematic flowchart of an embodiment of the UDS diagnostic service distribution method provided by the present invention, as shown below. Figure 1 As shown, the UDS diagnostic service distribution method includes: S101. Obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID.

[0024] It should be noted that the UDS diagnostic service distribution method provided by this invention can be applied to the UDS diagnostic service distribution scenario for vehicles.

[0025] During the UDS diagnostic service distribution process, the service distribution device (such as a desktop or portable computer) first obtains the SID of the diagnostic service to be processed. Then, based on the first four bits of the SID, it determines the return value corresponding to the diagnostic service. Determining the return value of the diagnostic service by using the first four bits of the SID improves the efficiency of diagnostic service determination, thereby improving the efficiency of diagnostic service distribution, while reducing storage resource consumption.

[0026] S102. Determine the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed.

[0027] It should be noted that after determining the return value of the diagnostic service to be processed, the mask index value of the diagnostic service to be processed can be further determined to ensure the reliability of subsequent diagnostic service distribution.

[0028] S103. Based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, determine the service processing function corresponding to the diagnostic service to be processed, and distribute the diagnostic service to be processed to the service processing function corresponding to the diagnostic service to be processed.

[0029] It should be noted that: finally, the service processing function corresponding to the diagnostic service to be processed can be determined by the mask index value corresponding to the diagnostic service to be processed and the preset mask index table. Then, the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed, so as to achieve accurate distribution of the diagnostic service to be processed.

[0030] In summary, the UDS diagnostic service distribution method provided in this embodiment of the invention first determines the return value corresponding to the diagnostic service to be processed by using the first four bits of the SID of the diagnostic service to be processed, thereby improving the efficiency of diagnostic service determination and thus improving the efficiency of diagnostic service distribution, while reducing the occupation of storage resources. Then, the mask index value corresponding to the diagnostic service to be processed is determined according to the return value of the diagnostic service to be processed. The service processing function corresponding to the diagnostic service to be processed is determined by the mask index value corresponding to the diagnostic service to be processed and a preset mask index table, ensuring the reliability of diagnostic service distribution. Finally, the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed. This invention achieves efficient and reliable UDS diagnostic service distribution with low storage resource occupation.

[0031] In some embodiments of the present invention, determining the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed includes: If the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20 or 0x30, the return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are 0x80, the return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are not 0x00, 0x10, 0x20, 0x30, or 0x80, the return value corresponding to the diagnostic service to be processed is determined to be 0x79.

[0032] It should be noted that when determining the return value of a diagnostic service based on its first four bits (SID), if the first four bits are 0x00, 0x10, 0x20, or 0x30, the return value can be determined accordingly. If the first four bits are 0x80, the return value can be determined based on the SID. If the first four bits are not 0x00, 0x10, 0x20, 0x30, or 0x80, the return value is determined to be 0x79.

[0033] In some embodiments of the present invention, determining the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed when the first four bits are 0x00, 0x10, 0x20, or 0x30 includes: The return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed, the SID of the diagnostic service to be processed, and the first default bit value.

[0034] It should be noted that when the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20 or 0x30, the return value of the diagnostic service to be processed can be determined based on the first four bits of the SID of the diagnostic service to be processed, the SID of the diagnostic service to be processed and the first default bit value.

[0035] In some embodiments of the present invention, determining the return value corresponding to the diagnostic service to be processed based on the SID of the diagnostic service to be processed when the first four bits of the SID of the diagnostic service to be processed are 0x80 includes: The return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed, the first default bit value, and the second default bit value.

[0036] It should be noted that when the first four bits of the SID of the diagnostic service to be processed are 0x80, the return value of the diagnostic service to be processed can be determined based on the SID of the diagnostic service to be processed, the first default bit value, and the second default bit value.

[0037] In some embodiments of the present invention, when the return value corresponding to the diagnostic service to be processed is determined to be 0x79, the step of determining the mask index value corresponding to the diagnostic service to be processed based on the return value includes: The mask index value corresponding to the diagnostic service to be processed is determined to be 0.

[0038] It should be noted that when the return value of the diagnostic service to be processed is determined to be 0x79, the mask index value of the diagnostic service to be processed can be determined to be 0.

[0039] In some embodiments of the present invention, determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of high-bit base address and low-bit offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

[0040] It should be noted that when the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20 or 0x30, the mask index value corresponding to the diagnostic service to be processed can be determined based on the return value of the diagnostic service to be processed through the mapping strategy of high-bit base address and low-bit offset.

[0041] In some embodiments of the present invention, determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of fixed offset and low-order offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

[0042] It should be noted that when the first four bits of the SID of the diagnostic service to be processed are 0x80, the mask index value corresponding to the diagnostic service to be processed can be determined based on the return value of the diagnostic service to be processed through a mapping strategy of fixed offset and low bit offset.

[0043] In some embodiments of the present invention, determining the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and a preset mask index table includes: Based on the mask index value corresponding to the diagnostic service to be processed, the service number corresponding to the diagnostic service to be processed is determined in the mask index table, and the service processing function corresponding to the diagnostic service to be processed is determined based on the service number corresponding to the diagnostic service to be processed.

[0044] It should be noted that when determining the service processing function corresponding to the diagnostic service to be processed based on the mask index value and the preset mask index table, the service number corresponding to the diagnostic service to be processed can be determined from the mask index table based on the mask index value of the diagnostic service to be processed, and then the service processing function corresponding to the diagnostic service to be processed can be determined based on the service number corresponding to the diagnostic service to be processed.

[0045] The following specific embodiment illustrates the UDS diagnostic service distribution process provided by this invention: The service distribution device first obtains the SID of the diagnostic service to be processed. Based on the first four bits of the SID, it determines the return value corresponding to the diagnostic service, reducing storage space usage and improving distribution efficiency. Then, it determines the mask index value corresponding to the diagnostic service based on the return value. This mask index value, combined with a preset mask index table, determines the corresponding service processing function, ensuring the reliability of diagnostic service distribution. Finally, the diagnostic service is distributed to its corresponding service processing function, thus completing the diagnostic service distribution process.

[0046] This invention performs structured segmentation of service identifiers, combines high-order mask extraction and low-order offset calculation, maps the original SID into a compact intermediate index, and then completes the final service location through a predefined mask index table, thereby achieving service distribution with constant time complexity.

[0047] Combination Figure 2 Here are the specific steps for service distribution: 1. SID segmentation and parsing mechanism.

[0048] After determining the SID range, this invention employs differentiated index generation strategies for different ranges. For the standard diagnostic range, an intermediate index is constructed directly using the "high-order base address + low-order offset" method to achieve a naturally continuous index space. For extended ranges, such as 0x80, which is far from the standard area, this invention uses a fixed offset mapping strategy to compress it into an index field consistent with the standard range. This strategy avoids the storage waste caused by reserving a large amount of invalid SID space in traditional methods, making the mapping array more compact and efficient in terms of space.

[0049] Different intervals represent different types of diagnostic services, for example: 0x00-0x3F: Standard diagnostic service area; 0x80 range: Extended or custom service area.

[0050] This segmentation strategy allows for service classification without adding complex branches.

[0051] 2. Segmented index generation mechanism.

[0052] After obtaining the high 4 bits, a differentiated index calculation method is used according to different intervals: For standard ranges (such as 0x00-0x30), the following approach is used: high-order base address + low-order offset.

[0053] For extended ranges (such as 0x80), an offset mapping strategy is used to compress them into a unified index space, for example: fixed offset + low-order offset.

[0054] 3. Mask index lookup mechanism.

[0055] After obtaining the intermediate index, this invention implements a secondary mapping from SID to service processing function index through a masked index table. The masked index table exists in the form of a compact array, where each array element represents the service number corresponding to a possible SID. For valid SIDs, the array item points to the corresponding service processing function; while for invalid SIDs, the array item is uniformly set to a predefined default value (such as 0) so that the system can quickly identify and handle the exception. This table lookup method completely eliminates branches and loops, and only one array access is needed to complete the diagnostic service location.

[0056] Its features include: invalid SIDs are mapped to default values ​​(such as 0); valid SIDs are mapped to service processing indexes; and it supports flexible expansion and redefinition.

[0057] The table lookup process does not require loops or complex conditional statements; it can be completed with just one array access, significantly improving execution efficiency.

[0058] 4. Unified exception handling mechanism.

[0059] In terms of exception handling, when the mask index result is a default value, the system directly enters a unified negative response logic, generating an error response code (NRC) conforming to the UDS protocol, such as "Service not supported". This centralized exception handling mechanism avoids the code redundancy caused by decentralized judgment in traditional implementations, improving the overall consistency and maintainability of the system. This mechanism avoids decentralized error handling, improving system consistency and reliability.

[0060] 5. Modular and scalable design.

[0061] The mapping table and distribution logic of this invention are decoupled, which can support: dynamic configuration of service mapping relationships; automatic generation of mapping tables at compile time; and reuse across different ECU platforms.

[0062] This invention employs a highly modular design concept, completely decoupling the segmented mapping table from business logic. The mapping relationships can be automatically generated during compilation or customized based on differences in the ECU platform. Its structure also supports further upgrades to a multi-level indexing system or integration with access permissions, security authentication, and other mechanisms, making it suitable for various high-reliability automotive electronic scenarios. Furthermore, it can be further expanded into a multi-level mapping structure or combined with secure access control to implement more complex diagnostic strategies.

[0063] Compared to existing technologies, this invention achieves constant-time service distribution by employing a "bitwise operation + table lookup" approach, avoiding the performance degradation associated with traditional solutions. This makes it particularly suitable for in-vehicle systems with high real-time requirements. Through a segmented compression mapping strategy, it effectively addresses the sparse distribution of SIDs, avoiding large-scale empty arrays and significantly reducing ROM usage. It supports service expansion by modifying the mapping table without altering the core logic code, improving system maintainability and upgradeability. Compared to traditional branching structures, this invention uses a data-driven approach, resulting in a simpler code structure and reduced maintenance costs. A unified exception handling path ensures that all invalid SIDs are correctly identified and processed, enhancing system robustness. This invention is particularly suitable for scenarios with limited MCU resources, enabling high-performance diagnostic service distribution under limited resources.

[0064] To better implement the UDS diagnostic service distribution method in this embodiment of the invention, based on the UDS diagnostic service distribution method, correspondingly, as follows: Figure 3 As shown, this embodiment of the invention also provides a UDS diagnostic service distribution device, the UDS diagnostic service distribution device 300 including: The acquisition module 301 is used to acquire the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed. The determination module 302 is used to determine the mask index value corresponding to the diagnostic service to be processed based on the return value corresponding to the diagnostic service to be processed. The distribution module 303 is used to determine the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, and to distribute the diagnostic service to be processed to the service processing function corresponding to the diagnostic service to be processed.

[0065] The UDS diagnostic service distribution device 300 provided in the above embodiments can implement the technical solutions described in the above UDS diagnostic service distribution method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above UDS diagnostic service distribution method embodiments, and will not be repeated here.

[0066] like Figure 4 As shown, the present invention also provides a service distribution device 400. The service distribution device 400 includes a processor 401, a memory 402, a display 403, and a data acquisition device 404. Figure 4 Only some components of the service distribution device 400 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0067] In some embodiments, processor 401 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 402 or process data, such as the UDS diagnostic service distribution method of the present invention.

[0068] In some embodiments, processor 401 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 401 may be local or remote. In some embodiments, processor 401 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, internal cloud, multi-cloud, etc., or any combination thereof.

[0069] In some embodiments, memory 402 may be an internal storage unit of service distribution device 400, such as a hard disk or memory of service distribution device 400. In other embodiments, memory 402 may also be an external storage device of service distribution device 400, such as a pluggable hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on service distribution device 400.

[0070] Furthermore, the memory 402 may include both internal storage units of the service distribution device 400 and external storage devices. The memory 402 is used to store application software and various types of data installed on the service distribution device 400.

[0071] In some embodiments, display 403 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an organic light-emitting diode (OLED) touchscreen, etc. Display 403 is used to display information from the service distribution device 400 and to display a visual user interface. Components 401-403 of the service distribution device 400 communicate with each other via a system bus.

[0072] In some embodiments, the data acquisition device 404 may be a data transceiver chip, a data transceiver circuit, etc.

[0073] In one embodiment, when processor 401 executes the UDS diagnostic service distribution program in memory 402, the following steps may be implemented: Obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID. The mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed. Based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, the service processing function corresponding to the diagnostic service to be processed is determined, and the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed.

[0074] It should be understood that when the processor 401 executes the UDS diagnostic service distribution program in the memory 402, in addition to the functions mentioned above, it can also perform other functions, as can be found in the description of the corresponding method embodiments above.

[0075] Furthermore, this embodiment of the invention does not specifically limit the type of service distribution device 400 mentioned. The service distribution device 400 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic devices can also be other portable electronic devices, such as laptop computers with touch-sensitive surfaces (e.g., touch panels). It should also be understood that in some other embodiments of the invention, the service distribution device 400 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).

[0076] The UDS diagnostic service distribution method, apparatus, and service distribution equipment provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A UDS diagnostic service distribution method, characterized in that, include: Obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID. The mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed. Based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, the service processing function corresponding to the diagnostic service to be processed is determined, and the diagnostic service to be processed is distributed to the service processing function corresponding to the diagnostic service to be processed.

2. The UDS diagnostic service distribution method according to claim 1, characterized in that, The return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed, including: If the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20 or 0x30, the return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are 0x80, the return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed. If the first four bits of the SID of the diagnostic service to be processed are not 0x00, 0x10, 0x20, 0x30, or 0x80, the return value corresponding to the diagnostic service to be processed is determined to be 0x79.

3. The UDS diagnostic service distribution method according to claim 2, characterized in that, When the first four bits of the SID of the diagnostic service to be processed are 0x00, 0x10, 0x20, or 0x30, determining the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed includes: The return value corresponding to the diagnostic service to be processed is determined based on the first four bits of the SID of the diagnostic service to be processed, the SID of the diagnostic service to be processed, and the first default bit value.

4. The UDS diagnostic service distribution method according to claim 2, characterized in that, When the first four bits of the SID of the diagnostic service to be processed are 0x80, determining the return value corresponding to the diagnostic service to be processed based on the SID of the diagnostic service to be processed includes: The return value corresponding to the diagnostic service to be processed is determined based on the SID of the diagnostic service to be processed, the first default bit value, and the second default bit value.

5. The UDS diagnostic service distribution method according to claim 2, characterized in that, When the return value of the diagnostic service to be processed is determined to be 0x79, the step of determining the mask index value corresponding to the diagnostic service to be processed based on the return value includes: The mask index value corresponding to the diagnostic service to be processed is determined to be 0.

6. The UDS diagnostic service distribution method according to claim 3, characterized in that, The process of determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of high-bit base address and low-bit offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

7. The UDS diagnostic service distribution method according to claim 4, characterized in that, The process of determining the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed includes: Based on the mapping strategy of fixed offset and low-order offset, the mask index value corresponding to the diagnostic service to be processed is determined based on the return value of the diagnostic service to be processed.

8. The UDS diagnostic service distribution method according to claim 1, characterized in that, The process of determining the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table includes: Based on the mask index value corresponding to the diagnostic service to be processed, the service number corresponding to the diagnostic service to be processed is determined in the mask index table, and the service processing function corresponding to the diagnostic service to be processed is determined based on the service number corresponding to the diagnostic service to be processed.

9. A UDS diagnostic service distribution device, characterized in that, include: The acquisition module is used to obtain the SID of the diagnostic service to be processed, and determine the return value corresponding to the diagnostic service to be processed based on the first four bits of the SID of the diagnostic service to be processed. The determination module is used to determine the mask index value corresponding to the diagnostic service to be processed based on the return value of the diagnostic service to be processed. The distribution module is used to determine the service processing function corresponding to the diagnostic service to be processed based on the mask index value corresponding to the diagnostic service to be processed and the preset mask index table, and to distribute the diagnostic service to be processed to the service processing function corresponding to the diagnostic service to be processed.

10. A service distribution device, characterized in that, Includes a data acquisition unit, memory, and processor, among which, The data acquisition device is used to acquire the SID of the diagnostic service to be processed; The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the UDS diagnostic service distribution method according to any one of claims 1 to 7.