Diagnostic instrument online service bypass processing method, device and equipment and storage medium

By extracting diagnostic protocol headers and payloads to manage thread resources, the method addresses thread conflicts during vehicle software upgrades, enhancing upgrade success rates and system stability.

CN120315409APending Publication Date: 2025-07-15DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510296738.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

In the process of vehicle upgrade, the interval between diagnosis requests of the main thread and the child thread is extreme, resulting in the use of server resources and the failure of upgrades. How to efficiently and accurately diversion of thread resource occupation has become an urgent problem to be solved.

Method used

By obtaining the header and load information of the vehicle diagnostic protocol, determining the bypass working condition status, processing thread resource occupation based on this status, controlling the response reply status, and ensuring that the system performs normal software upgrades.

Benefits of technology

It significantly improves the success rate of upgrades and the stability of the system, avoids service denial or system crash caused by competition in thread resources, and improves the reliability and user experience of software upgrades.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120315409A_ABST
    Figure CN120315409A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnostic instrument online service bypass processing method, device and equipment and a storage medium, and relates to the technical field of automobile communication, and the method comprises the steps: obtaining an automobile diagnosis protocol message header and automobile diagnosis protocol load information; based on the automobile diagnosis protocol message header and the automobile diagnosis protocol load information shunting thread resource occupation, determining a bypass working condition state; and based on the bypass working condition state and the automobile diagnosis protocol load information processing thread occupation, determining a response and reply state, and based on the response and reply state, controlling a system to normally perform software upgrading. According to the application, the bypass working condition state is determined by acquiring the automobile diagnosis protocol message header and the automobile diagnosis protocol load information and shunting thread resource occupation, so that bypass processing or normal processing of thread occupation is carried out, the response and reply state is determined, and the system is controlled to carry out software upgrading normally; the upgrade failure caused by resource occupation due to simultaneous processing of multiple threads is avoided, and the upgrade success rate and the system stability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive communication technologies, and particularly to a method, apparatus, device, and storage medium for bypass processing of diagnostic instrument online services. Background Art

[0002] With the rapid development of vehicle networking technologies, over-the-air (OTA) technology has been widely applied in the automotive field, enabling vehicles to perform remote upgrades via wireless networks. However, during the vehicle upgrade process, continuous communication with the vehicle needs to be maintained. The client needs to periodically send diagnostic instrument online requests to maintain the non-default session state of the server. The client realizes the periodic sending of diagnostic instrument online requests by creating a child thread in the main thread. At this time, there is an extreme situation where the diagnostic requests sent by the main thread and the child thread have an extremely short interval. When the server first receives the diagnostic request from the child thread and then receives the diagnostic request from the main thread within an extremely short time, the server will reject the diagnostic request from the main thread due to resource occupation, resulting in a failed upgrade. Therefore, properly diverting the main thread and the child thread is an essential task.

[0003] Currently, the first existing approach is to directly broadcast the Ethernet packets received by the vehicle gateway from the vehicle test device to all in-vehicle electronic control units connected to the vehicle gateway. Another existing approach is to read the flashing flag bit corresponding to the target in-vehicle electronic control unit from a preset memory in the application mode and update and save the flashing flag bit as a valid flag bit for upgrade flashing.

[0004] However, for some in-vehicle electronic control units that do not support the Ethernet protocol in the first existing approach, the in-vehicle electronic control unit still needs to reply with a message indicating non-support, and wait until the vehicle gateway completes the conversion of the Ethernet packet before actually sending the diagnostic instrument online request to these in-vehicle electronic control units. The time is even more uncertain, and there may be a greater probability of an extremely short interval between the received diagnostic instrument online request packet and the upgrade diagnostic packet, resulting in a failed upgrade. In the other existing approach, after entering the programming session, the task of maintaining the OTA technology upgrade mode is started, and commands are sent periodically. Since the resources are occupied by diagnostic requests, the reset instruction will be rejected, resulting in a failed upgrade. Therefore, how to perform bypass processing of diagnostic instrument online services to efficiently and accurately divert the occupation of thread resources has become an urgent problem to be solved.

[0005] The above content is only used to assist in understanding the technical solution of this application, and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this application is to provide a method, apparatus, device, and storage medium for bypass processing of diagnostic instrument online services, aiming to solve the technical problem of how to perform bypass processing of diagnostic instrument online services to efficiently and accurately divert the occupation of thread resources.

[0007] To achieve the above object, the present application proposes an online service bypass processing method for a diagnostic instrument, and the method includes:

[0008] Obtain the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information;

[0009] Based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information, divert the thread resource occupation to determine the bypass working condition state;

[0010] Based on the bypass working condition state and the automotive diagnostic protocol payload information, process the thread occupation to determine the response reply state, and control the normal software upgrade of the system based on the response reply state.

[0011] In one embodiment, the step of obtaining the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information includes:

[0012] Obtain the gateway thread information and the gateway function set, where the gateway thread information includes the main thread information and the sub-thread information;

[0013] Based on the gateway thread information and the gateway function set, determine the automotive diagnostic protocol message header information;

[0014] Based on the automotive diagnostic protocol message header information and the gateway function, determine the automotive diagnostic protocol payload information, where the automotive diagnostic protocol payload information includes source address information, destination address information, service identifier information, and sub-function information.

[0015] In one embodiment, the step of diverting the thread resource occupation based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information to determine the bypass working condition state includes:

[0016] Obtain the target message header check information, the target service identifier information, and the gateway configuration information, where the gateway configuration information includes a configured function address and a configured logical address;

[0017] Based on the automotive diagnostic protocol message header, the automotive diagnostic protocol payload information, the target message header check information, the target service identifier information, and the gateway configuration information, check the target thread to determine the check status;

[0018] Based on the check status, divert the bypass processing sub-thread to obtain the bypass working condition state.

[0019] In one embodiment, the step of determining the response reply state based on the bypass working condition state and the automotive diagnostic protocol payload information to process the thread occupation includes:

[0020] Obtain the timer time and the target timer time;

[0021] Determine the communication mode status based on the timer time and the target timer time, where the communication mode status includes a session mode and other session modes;

[0022] Obtain the response reply status based on the bypass working condition status, the communication mode status, and the vehicle diagnostic protocol payload information.

[0023] In one embodiment, the step of obtaining the response reply status based on the bypass working condition status, the communication mode status, and the vehicle diagnostic protocol payload information includes:

[0024] When the bypass working condition status is entering the bypass processing mode, control the system to execute a sub-thread based on the communication mode status and the vehicle diagnostic protocol payload information, and determine the sub-thread response reply status;

[0025] When the bypass working condition status is not entering the bypass processing mode, obtain the thread resource idle status, and control the system to execute the main thread based on the thread resource idle status to determine the main thread response reply status;

[0026] Obtain the response reply status based on the sub-thread reply status and the main thread response reply status.

[0027] In one embodiment, the step of controlling the system to execute a sub-thread based on the communication mode status and the vehicle diagnostic protocol payload information and determining the sub-thread response reply status includes:

[0028] Perform function verification based on the communication mode status and the vehicle diagnostic protocol payload information to determine the function verification status, where the function verification status includes the message total length verification status and the sub-function working condition verification status;

[0029] Control the system to execute a sub-thread based on the function verification status to determine the timer time and the negative response reply status;

[0030] Judge the message sending status based on the timer time to determine the positive response reply status;

[0031] Obtain the sub-thread response reply status based on the negative response reply status and the positive response reply status.

[0032] In one embodiment, the step of controlling the system to execute the main thread based on the thread resource idle status and determining the main thread response reply status includes:

[0033] When the thread resource idle status is idle, obtain the service processor information and the work unit resource information, construct the main thread based on the service processor information and the work unit resource information, submit the main thread to the thread pool for execution, and the main thread response reply status is no reply;

[0034] When the thread resource idle state is not idle, the main thread responds with a negative response for the response status.

[0035] In addition, to achieve the above object, the present application also proposes a diagnostic instrument online service bypass processing device, and the diagnostic instrument online service bypass processing device includes:

[0036] An acquisition module, configured to acquire an automotive diagnostic protocol message header and automotive diagnostic protocol payload information;

[0037] A processing module, configured to determine a bypass working condition state by diverting thread resource occupation based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information;

[0038] An execution module, configured to determine a response reply state by processing thread occupation based on the bypass working condition state and the automotive diagnostic protocol payload information, and control the system to normally perform software upgrade based on the response reply state.

[0039] In addition, to achieve the above object, the present application also proposes a diagnostic instrument online service bypass processing device, and the device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the diagnostic instrument online service bypass processing method as described above.

[0040] In addition, to achieve the above object, the present application also proposes a storage medium, and the storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by a processor, the steps of the diagnostic instrument online service bypass processing method as described above are implemented.

[0041] One or more technical solutions proposed by the present application have at least the following technical effects:

[0042] A diagnostic instrument online service bypass processing method proposed in this embodiment acquires an automotive diagnostic protocol message header and automotive diagnostic protocol payload information; determines a bypass working condition state by diverting thread resource occupation based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; determines a response reply state by processing thread occupation based on the bypass working condition state and the automotive diagnostic protocol payload information, and controls the system to normally perform software upgrade based on the response reply state. The present application acquires an automotive diagnostic protocol message header and automotive diagnostic protocol payload information, diverts thread resource occupation, determines a bypass working condition state, thereby performing bypass processing or normal processing of thread occupation, determines a response reply state, and controls the system to normally perform software upgrade, avoiding resource occupation caused by simultaneously processing multiple threads, and significantly improving the success rate of upgrade and the stability of the system. Description of the Drawings

[0043] The accompanying drawings here are incorporated into the description and form a part of this description, showing embodiments consistent with this application, and are used together with the description to explain the principles of this application.

[0044] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0045] Figure 1 It is a schematic flowchart provided for the first embodiment of the method for online service bypass processing of the diagnostic instrument of this application;

[0046] Figure 2 It is a schematic flowchart provided for the second embodiment of the method for online service bypass processing of the diagnostic instrument of this application;

[0047] Figure 3 It is a schematic flowchart of the brief process of the method for online service bypass processing of the diagnostic instrument provided for the embodiments of this application;

[0048] Figure 4 It is a schematic diagram of the module structure of the online service bypass processing device for the diagnostic instrument provided for the embodiments of this application;

[0049] Figure 5 It is a schematic diagram of the device structure of the hardware operating environment involved in the method for online service bypass processing of the diagnostic instrument provided for the embodiments of this application.

[0050] The realization of the purpose, functional features and advantages of this application will be further described with reference to the embodiments and the accompanying drawings. Detailed Embodiments

[0051] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of this application and are not used to limit this application.

[0052] In order to better understand the technical solutions of this application, the following will be described in detail in combination with the accompanying drawings of the description and the specific embodiments.

[0053] The main solution of the embodiments of this application is: obtaining the vehicle diagnostic protocol message header and the vehicle diagnostic protocol payload information; based on the vehicle diagnostic protocol message header and the vehicle diagnostic protocol payload information, shunting the thread resource occupancy to determine the bypass working condition state; based on the bypass working condition state and the vehicle diagnostic protocol payload information, processing the thread occupancy to determine the response reply state, and based on the response reply state, controlling the system to normally perform software upgrade.

[0054] In this embodiment, for the convenience of description, the following describes the execution subject with the online service bypass processing device of the diagnostic instrument.

[0055] Due to the prior art, for some in-vehicle electronic control units that do not support the Ethernet protocol, the in-vehicle electronic control unit is also required to reply with a message indicating non-support, and wait until the vehicle gateway completes the conversion of the Ethernet message before the diagnostic instrument online request can be truly sent to these in-vehicle electronic control units. The time is more uncertain, and there is a greater probability that the interval between the received diagnostic instrument online request message and the upgrade diagnostic message is extremely short, resulting in upgrade failure. Or, after entering the programming session and starting the task of the over-the-air (OTA) technology upgrade mode, commands are sent periodically, and due to the resources being occupied by the diagnostic request, the reset instruction will be rejected, resulting in upgrade failure.

[0056] This application provides a solution, which acquires the header of the vehicle diagnostic protocol message and the vehicle diagnostic protocol payload information; determines the bypass working condition state based on the header of the vehicle diagnostic protocol message and the vehicle diagnostic protocol payload information to divert the thread resource occupation; determines the response reply state based on the bypass working condition state and the vehicle diagnostic protocol payload information for thread occupation, and controls the system to perform software upgrade normally based on the response reply state.

[0057] As can be seen from the above embodiments, this application acquires the header of the vehicle diagnostic protocol message and the vehicle diagnostic protocol payload information, diverts the thread resource occupation, determines the bypass working condition state, thereby performing bypass processing or normal processing for thread occupation, determines the response reply state, and controls the system to perform software upgrade normally, avoiding resource occupation caused by simultaneously processing multiple threads, and significantly improving the upgrade success rate and system stability.

[0058] Based on this, the embodiments of this application provide a method for bypass processing of the online service of the diagnostic instrument. Refer to Figure 1 , Figure 1 which is the schematic flowchart of the first embodiment of the method for bypass processing of the online service of the diagnostic instrument of this application.

[0059] In this embodiment, the method for bypass processing of the online service of the diagnostic instrument includes steps S10 to S30:

[0060] Step S10, acquire the header of the vehicle diagnostic protocol message and the vehicle diagnostic protocol payload information;

[0061] It should be noted that the header of the vehicle diagnostic protocol message reflects the characteristics that the message can be correctly identified in a complex vehicle network environment, and the vehicle diagnostic protocol payload information reflects the characteristics of carrying specific diagnostic request or response data.

[0062] For ease of understanding, taking the acquisition of the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information as an example for illustration, where the information acquisition device is the information acquisition module and the storage device is the memory.

[0063] The information acquisition module acquires gateway thread information, such as the main thread and the sub-threads, and acquires the gateway function set, such as the recvmsg system function and the recv system function. Based on the gateway thread information and the gateway function set, it determines the automotive diagnostic protocol message header information, that is, uses the recvmsg system function to receive data more flexibly, reads the gateway thread information to obtain the automotive diagnostic protocol message header, and based on the automotive diagnostic protocol message header information and the gateway function, it determines the automotive diagnostic protocol payload information, that is, uses the recv system function to read the gateway thread information to obtain the automotive diagnostic protocol payload information. For example, the composition of the obtained automotive diagnostic protocol payload information should be the source address SA, the destination address TA, the service identifier SID, and the sub-function SF. Subsequent processing is performed based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information.

[0064] In a feasible implementation manner, step S10 may include steps A11 to A13:

[0065] Step A11, acquire the gateway thread information and the gateway function set, where the gateway thread information includes the main thread information and the sub-thread information;

[0066] It should be noted that the gateway thread information reflects the characteristics of the configuration and status of different threads responsible for processing diagnostic communications in the gateway, and the gateway function set reflects the characteristics of the set of diagnostic services and operation function that the gateway can execute.

[0067] It can be understood that the gateway thread information includes the main thread information and the sub-thread information. The main thread is responsible for the main communication diagnosis tasks, and the sub-thread is responsible for the auxiliary tasks of periodically sending diagnostic requests. The gateway function set may include a series of diagnostic service functions corresponding to different diagnostic commands and services, such as reading fault codes, clearing fault codes, and reading vehicle status, so as to dynamically allocate and adjust thread resources and execute the corresponding diagnostic services in an optimal manner.

[0068] Step A12, determine the automotive diagnostic protocol message header information based on the gateway thread information and the gateway function set;

[0069] It can be understood that the automotive diagnostic protocol message header information can enable the message to be correctly identified and processed in the automotive network environment, and enable the diagnostic information to be correctly encapsulated and transmitted.

[0070] Step A13: Determine the automotive diagnostic protocol payload information based on the automotive diagnostic protocol header information and the gateway function. The automotive diagnostic protocol payload information includes source address information, destination address information, service identifier information, and sub-function information.

[0071] It can be understood that by accurately obtaining and analyzing the header and payload information of the automotive diagnostic protocol, the threads that should be shunted can be accurately identified, thereby triggering bypass processing, avoiding resource occupation caused by simultaneously processing multiple threads, and improving the success rate of the upgrade and the stability of the system.

[0072] Step S20: Determine the bypass working condition state by shunting thread resource occupation based on the automotive diagnostic protocol header and the automotive diagnostic protocol payload information.

[0073] It should be noted that the bypass working condition state reflects the characteristics of the working mode in which the identified auxiliary threads are shunted to the bypass for processing.

[0074] It can be understood that the gateway diagnosis module is configured with a functional address and a logical address, which are used for functional addressing and logical addressing respectively. According to the requirements in the UDS protocol, bypass processing is performed on the 3E 80 diagnostic message and 3E 00 diagnostic message sent by the client through functional addressing, which can adapt to a small number of clients that require the server to reply with a 3E service response.

[0075] In addition, it should be noted that by verifying the automotive diagnostic protocol header and the automotive diagnostic protocol payload information, it can be determined whether to trigger the bypass processing flow to shunt the current thread, avoiding conflicts between the online request of the diagnostic instrument and the upgrade diagnostic request, ensuring the smooth progress of the upgrade process, and using bypass processing reduces the occupation of server resources, allowing specific requests to be quickly processed through the bypass logic without occupying the resources of the main processing flow.

[0076] For ease of understanding, taking the determination of the bypass working condition state as an example, the information collection device is the information collection module, the storage device is the memory, and the processing device is the processing module.

[0077] The information collection module acquires the vehicle diagnostic protocol message header, vehicle diagnostic protocol payload information, target message header verification information, target service identifier information, and gateway configuration information, verifies the target thread based on the vehicle diagnostic protocol message header, the vehicle diagnostic protocol payload information, the target message header verification information, the target service identifier information, and the gateway configuration information, determines the verification status, and shunts the bypass processing sub-thread based on the verification status to obtain the bypass operating condition status. That is, when the vehicle diagnostic protocol message header matches the target message header verification information, it is determined whether the service identifier information in the vehicle diagnostic protocol payload information matches the target service identifier information, that is, it is determined that the SID in the DoIP payload is 0x3E to obtain a first judgment result, and then it is determined whether the destination address in the vehicle diagnostic protocol payload information matches the gateway configuration information, that is, it is determined that the TA in the DoIP payload is the functional address to obtain a second judgment result. If both the first judgment result and the second judgment result are successful matches, the verification result is successful verification, and the bypass operating condition status is to enter bypass processing. If the first judgment result or the second judgment result is a failed match, the verification result is failed verification, and the bypass operating condition status is not to enter bypass processing. Subsequent processing is performed based on the bypass operating condition status.

[0078] In a feasible implementation manner, step S20 may include steps B11 to B13:

[0079] Step B11, acquire the target message header verification information, target service identifier information, and gateway configuration information, where the gateway configuration information includes a configured functional address and a configured logical address;

[0080] It should be noted that the target message header verification information reflects the verification of each field of the message header, ensuring the characteristics that the message header has not been tampered with or damaged during transmission. The target service identifier information reflects the characteristics of identifying the diagnostic service to be executed. The gateway configuration information reflects the characteristics of the specific configuration of the diagnostic message.

[0081] It can be understood that performing message header verification ensures the integrity and correctness of the message, reduces communication failures caused by message errors. Accurately identifying the service identifier enables the diagnostic system to quickly respond to specific service requests, improving the pertinence and efficiency of diagnosis. Performing gateway configuration can ensure that the diagnostic message can be correctly routed to the target ECU, reducing unnecessary communication delays and errors. Significantly improving the reliability and response speed of vehicle diagnosis.

[0082] Step B12, verify the target thread based on the vehicle diagnostic protocol message header, the vehicle diagnostic protocol payload information, the target message header verification information, the target service identifier information, and the gateway configuration information, and determine the verification status;

[0083] It should be noted that the verification status reflects the characteristics of the verification results of the automotive diagnostic protocol message header and payload information.

[0084] It can be understood that by verifying to ensure the correctness of the message, communication failures caused by message errors can be reduced, and the verification status can detect potential misconfigurations, protect the system from malicious messages, reduce the risk of system failures caused by incorrect operations, and enhance the stability and reliability of the system.

[0085] Step B13: Based on the verification status, shunt the bypass processing sub-thread to obtain the bypass working condition status.

[0086] It can be understood that when diagnostic requests from the main thread and sub-threads occur within an extremely short time, the bypass processing is triggered to shunt the diagnostic request of the sub-thread, avoiding the server from rejecting the diagnostic request of the main thread due to occupied resources and causing the upgrade to fail, thereby enhancing the stability and reliability of the system.

[0087] Step S30: Based on the bypass working condition status and the occupation of the automotive diagnostic protocol payload information processing thread, determine the response reply status, and control the system to perform software upgrade normally based on the response reply status.

[0088] It should be noted that the response reply status reflects the characteristics of the status of the system processing diagnostic requests and the status of sending positive or negative responses.

[0089] For easy understanding, taking the determination of the response reply status as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the execution device is the execution module.

[0090] The information acquisition module obtains the bypass working condition status, obtains the automotive diagnostic protocol payload information, obtains the timer time, obtains the target timer time, determines the communication mode status based on the timer time and the target timer time. The communication mode status includes the session mode and other session modes. When the bypass working condition status is entering the bypass processing mode, perform a function check based on the communication mode status and the automotive diagnostic protocol payload information to determine the function check status. The function check status includes the message total length check status and the sub-function working condition check status. That is, split the automotive diagnostic protocol payload information, remove the source address and the destination address, and check the UDS message in the automotive diagnostic protocol payload information, that is, check the service identifier and the sub-function. Preset a storage space, such as 2 bytes. If the service identifier SID is 0x3E and the sub-function SF is 0x80 or 0x00, add the total lengths of the service identifier and the sub-function, and judge whether the total length meets the storage space. At this time, that is, judge whether the total length of the service identifier and the sub-function is 2 bytes to obtain the third judgment result. Then check whether the sub-function in the automotive diagnostic protocol payload information is valid, that is, judge whether the sub-function SF is 0x80 or 0x00 to obtain the fourth judgment result. When both the third judgment result and the fourth judgment result are successful matches, the check result is a successful check. When the third judgment result or the fourth judgment result is a failed match, the check result is a failed check.

[0091] If the check fails, call the sendmsg system function to reply a negative response to the client. If the check is successful, control the system to execute a sub-thread based on the function check status, determine the timer time and the negative response reply status, judge the message sending status based on the timer time, and determine the positive response reply status. That is, restart the S3server timer and start timing again. When the timer time reaches the target timer time, such as when the S3server time reaches 5000 ms, that is, the gateway does not receive any diagnostic request messages within the S3server time, then exit the non-default session mode and return to the default session mode. Judge whether the sub-function SF is 0x80, that is, judge whether the positive response suppression bit in the sub-function is 1. If the sub-function is 0x80, there is no need to reply a response to the client. If the sub-function is 0x00, call the sendmsg system function to reply a positive response to the client, thereby obtaining the sub-thread response reply status.

[0092] When the bypass working condition state is not entering the bypass processing mode, obtain the idle state of the thread resources. When the thread resources are idle, obtain the service processor information and the working unit resource information, construct the main thread based on the service processor information and the working unit resource information, submit the main thread to the thread pool for execution, and the response reply state of the main thread is no reply. When the thread resources are not idle, the response reply state of the main thread is to reply with a negative response, that is, obtain the corresponding service processor and working unit resources for processing. In the normal process, a service processor of 0x3E is also configured. Determine whether the thread resources are idle. If not idle, reply with a negative response to obtain the response reply state of the main thread. If idle, obtain the corresponding service processor according to the SID, construct a working unit thread based on the service processor and the automotive diagnostic protocol payload information, and submit it to the thread pool for execution.

[0093] Obtain the response reply state based on the child thread reply state and the main thread response reply state, and control the normal software upgrade of the system based on the response reply state.

[0094] A method for diagnosing an online service bypass process according to this embodiment obtains the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information, divert the thread resource occupation to determine the bypass working condition state; based on the bypass working condition state and the automotive diagnostic protocol payload information, process the thread occupation to determine the response reply state, and control the normal software upgrade of the system based on the response reply state. It solves the technical problem of how to efficiently divert the thread resource occupation in the online service bypass process of the diagnostic instrument. Compared with the prior art, this application obtains the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information, efficiently diverts the thread resource occupation to determine the bypass working condition state, then processes the thread occupation and determines the response reply state, thereby controlling the software upgrade process. It significantly improves the stability and response speed of the system during the upgrade, avoids service denial or system crash caused by thread resource competition, and thus improves the reliability of software upgrade and the user experience.

[0095] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar content as the above-mentioned embodiment one can be referred to the above introduction and will not be repeated hereinafter.

[0096] In this embodiment, refer to Figure 2 , Figure 2 is a schematic flow chart provided for the second embodiment of the method for diagnosing an online service bypass process of the present application. Step S30 specifically includes steps S31 to S33:

[0097] Step S31, obtain the timer time and the target timer time;

[0098] It should be noted that the timer time reflects the actual timing time of the timer, and the target timer time reflects the characteristics of the preset timing period.

[0099] It can be understood that the timer time represents the duration calculated from zero for other session modes, and the target timer time is used to control the timer to perform specific operations when reaching this time point, that is, if no diagnostic request message is received after the timer time reaches the target timer time, the non-default session mode is exited and the default session mode is returned, reducing unnecessary processor occupancy and energy consumption, and improving the overall efficiency and performance of the system.

[0100] For easy understanding, taking the acquisition of the timer time and the target timer time as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the execution device is the execution module.

[0101] The information acquisition module acquires the automotive diagnostic protocol payload information, manually presets the target timer time, verifies the service identifier SID and the destination address TA in the automotive diagnostic protocol payload information to obtain the function verification status, controls the system to execute the sub-thread based on the function verification status, determines the timer time and the negative response reply status, and performs subsequent processing based on the timer time and the target timer time.

[0102] Step S32, determine the communication mode status based on the timer time and the target timer time, where the communication mode status includes the session mode and other session modes;

[0103] It should be noted that the communication mode status reflects the characteristics of the current working mode in the automotive communication system.

[0104] It can be understood that identifying the communication mode status can ensure the correct and efficient transmission of data in the vehicle network, optimize the sending and receiving of data packets, reduce unnecessary communication load, improve the overall communication efficiency, adjust the communication behavior according to different communication mode statuses to adapt to different communication environments and requirements, and enhance the flexibility and adaptability of the system.

[0105] For easy understanding, taking the determination of the communication mode status as an example for illustration, where the information acquisition device is the information acquisition module, the storage device is the memory, and the execution device is the execution module.

[0106] The information acquisition module obtains the automotive diagnostic protocol payload information, manually preset the target timer time, verify the service identifier SID and the destination address TA in the automotive diagnostic protocol payload information to obtain the function verification status, that is, verify the service identifier and the sub-function. Preset the storage space, such as 2 bytes. If the service identifier SID is 0x3E and the sub-function SF is 0x80 or 0x00, add the total lengths of the service identifier and the sub-function, and determine whether the total length meets the storage space. At this time, that is, determine whether the total length of the service identifier and the sub-function is 2 bytes to obtain the third judgment result. Then verify whether the sub-function in the automotive diagnostic protocol payload information is valid, that is, determine whether the sub-function SF is 0x80 or 0x00 to obtain the fourth judgment result. When both the third judgment result and the fourth judgment result are successful matches, the verification result is verification success. When the third judgment result or the fourth judgment result is a failed match, the verification result is verification failure. If the verification fails, call the sendmsg system function to reply a negative response to the client. If the verification is successful, control the system to execute a sub-thread based on the function verification status, determine the timer time and the negative response reply status, judge the message sending status based on the timer time, and determine the positive response reply status, that is, restart the S3server timer and start timing again. When the timer time reaches the target timer time, such as when the S3server time reaches 5000 ms, that is, the gateway does not receive any diagnostic request messages within the S3server time, then exit the non-default session mode and return to the default session mode. Determine the communication mode status based on the timer time and the target timer time, and perform subsequent processing based on the communication mode status.

[0107] In a feasible implementation manner, step S32 may include steps C11 to C13:

[0108] Step C11, when the bypass working condition state is entering the bypass processing mode, control the system to execute a sub-thread based on the communication mode status and the automotive diagnostic protocol payload information, and determine the sub-thread response reply status;

[0109] It should be noted that the sub-thread response reply status reflects the characteristics of the processing result of the sub-thread for a specific diagnostic request in the bypass processing mode.

[0110] It can be understood that based on the sub-thread response reply status, the execution result of the sub-thread can be understood, so as to quickly respond to potential errors or exceptions, reduce the failure rate of the system, dynamically adjust resource allocation, give priority to processing important tasks, and improve the overall efficiency of the system.

[0111] In a feasible implementation manner, step C11 may include steps D11 to D14:

[0112] Step D11: Based on the communication mode status and the automotive diagnostic protocol payload information, perform a function verification to determine the function verification status, where the function verification status includes the message total length verification status and the sub-function working condition verification status;

[0113] It should be noted that the function verification status reflects the characteristics of the effective status of the verification diagnostic message after triggering the bypass processing.

[0114] It can be understood that obtaining the function verification status through verification can ensure that correctly formatted diagnostic messages are processed, reduce communication failures caused by incorrect or damaged messages, prevent the impact of malicious messages on the system, protect the system from attacks, and at the same time, can dynamically adjust resource allocation, prioritize important tasks, and improve the overall efficiency of the system.

[0115] Step D12: Based on the function verification status, control the system to execute a sub-thread, and determine the timer time and the negative response reply status;

[0116] It should be noted that the negative response reply status reflects the characteristics that the server cannot execute the client diagnostic request during the automotive diagnostic communication process.

[0117] It can be understood that the negative response reply status provides specific error information, enabling the diagnostic system to quickly identify the problem, perform accurate error diagnosis, and avoid wasting more time and resources on requests that cannot be executed, thus improving communication efficiency.

[0118] Step D13: Based on the timer time, judge the message sending status and determine the positive response reply status;

[0119] It should be noted that the positive response reply status reflects the characteristics that the server allows the execution of the client diagnostic request during the automotive diagnostic communication process.

[0120] It can be understood that the positive response reply status can quickly and accurately feedback the request execution result, enhance the user experience, and can help the diagnostic instrument quickly identify and solve problems, reducing the time consumption during the diagnostic process.

[0121] Step D14: Based on the negative response reply status and the positive response reply status, obtain the sub-thread response reply status.

[0122] It can be understood that the sub-thread can execute tasks independently of the main thread, and the main thread can continue to process other tasks or respond to user interface events, thereby improving the overall efficiency of the program. And after the sub-thread completes the task, it can timely feedback the status, better manage resources, such as timely releasing resources that are no longer needed, or dynamically adjusting task allocation according to the feedback of the sub-thread.

[0123] Step C12, when the bypass working condition state is not entering the bypass processing mode, obtain the idle state of the thread resources, and based on the idle state of the thread resources, control the system to execute the main thread to determine the main thread response reply state;

[0124] It should be noted that the main thread response reply state reflects the characteristics of the processing result of the main thread for a specific diagnostic request in the bypass processing mode.

[0125] It can be understood that the main thread can receive the response of the child thread in a timely manner and make corresponding processing. Even when performing time-consuming operations, the user interface can still remain responsive, improving the user experience.

[0126] In a feasible implementation manner, step C12 may include steps E11 to E12:

[0127] Step E11, when the idle state of the thread resources is idle, obtain the service processor information and the working unit resource information, construct the main thread based on the service processor information and the working unit resource information, submit the main thread to the thread pool for execution, and the main thread response reply state is no reply;

[0128] It should be noted that the service processor information reflects the characteristics of the server that can independently process thread tasks, and the working unit resource information reflects the characteristics of the thread task unit.

[0129] It can be understood that according to the performance of the service processor and the requirements of the working unit, tasks can be allocated more reasonably, improving the working efficiency of the server. And by clarifying the resource requirements of the working unit, resources can be better planned and allocated, avoiding resource waste and improving resource utilization rate.

[0130] Step E12, when the idle state of the thread resources is not idle, the main thread response reply state is to reply with a negative response.

[0131] It can be understood that when the thread resources are not idle, that is, all the threads in the thread pool are busy and cannot accept new tasks, the system notifies the requester through a negative response that the current cannot process additional tasks, preventing the system from being overloaded.

[0132] Step C13, obtain the response reply state based on the child thread reply state and the main thread response reply state.

[0133] It can be understood that based on the child thread reply state and the main thread response reply state, it can be ensured that the currently running tasks will not be affected by resource competition. By rejecting additional tasks, it avoids system crashes or performance degradation caused by the exhaustion of thread resources, and more efficiently utilizes the existing thread resources.

[0134] Step S33: Obtain a response reply status based on the bypass working condition state, the communication mode state, and the vehicle diagnostic protocol payload information.

[0135] It can be understood that the response reply status can represent the specific state of the system during the request processing. It can make appropriate responses according to different request types and system states, thereby maintaining the normal operation and stability of the system, accurately identifying and processing diagnostic requests, making quick responses, reducing delays and errors during the diagnosis process, maintaining stable upgrades, and improving the reliability of the system.

[0136] For easy understanding, taking the obtaining of the response reply status as an example for illustration, where the information collection device is the information collection module, the storage device is the memory, and the execution device is the execution module.

[0137] When the bypass working condition state is entering the bypass processing mode, perform function verification based on the communication mode state and the vehicle diagnostic protocol payload information to determine the function verification status. If the verification fails, call the sendmsg system function to reply a negative response to the client. If the verification is successful, control the system to execute the sub-thread based on the function verification status, determine the timer time and the negative response reply status, judge the message sending status based on the timer time, and determine the positive response reply status, that is, restart the S3server timer and start timing again. When the timer time reaches the target timer time, such as when the S3server time reaches 5000 ms, that is, when the gateway does not receive any diagnostic request messages within the S3server time, exit the non-default session mode and return to the default session mode. Judge whether the sub-function SF is 0x80, that is, judge whether the positive response suppression bit in the sub-function is 1. If the sub-function is 0x80, there is no need to reply a response to the client. If the sub-function is 0x00, call the sendmsg system function to reply a positive response to the client, thereby obtaining the sub-thread response reply status.

[0138] When the bypass working condition state is not entering the bypass processing mode, obtain the idle state of the thread resources. When the thread resources are idle, obtain the service processor information and the working unit resource information, construct the main thread based on the service processor information and the working unit resource information, submit the main thread to the thread pool for execution, and the response reply state of the main thread is no reply. When the thread resources are not idle, the response reply state of the main thread is to reply with a negative response, that is, obtain the corresponding service processor and working unit resources for processing. In the normal process, a service processor of 0x3E is also configured. Determine whether the thread resources are idle. If not idle, reply with a negative response to obtain the response reply state of the main thread. If idle, obtain the corresponding service processor according to the SID, construct a working unit thread based on the service processor and the automotive diagnostic protocol load information, and submit it to the thread pool for execution.

[0139] Obtain the response reply state based on the sub-thread reply state and the main thread response reply state, and control the normal software upgrade of the system based on the response reply state.

[0140] A diagnostic instrument online service bypass processing method proposed in this embodiment obtains the timer time and the target timer time; determines the communication mode state based on the timer time and the target timer time, and the communication mode state includes the session mode and other session modes; obtains the response reply state based on the bypass working condition state, the communication mode state, and the automotive diagnostic protocol load information. This solves the technical problem of how to accurately divert the thread resource occupation in the diagnostic instrument online service bypass processing. Compared with the prior art, this application accurately controls the communication mode in the automotive diagnostic process, including the session mode and other session modes, by obtaining the timer time and the target timer time, ensures effective communication in different states, and combines the bypass working condition state and the automotive diagnostic protocol load information to intelligently determine the response reply state, thereby improving the response speed and accuracy of the diagnosis, enhancing the flexibility and adaptability of the system, improving the user experience, reducing energy consumption, and improving efficiency.

[0141] Exemplarily, to help understand the implementation process of the diagnostic instrument online service bypass processing method obtained by combining the above Embodiment 1, please refer to Figure 3 , Figure 3 A brief process schematic diagram of a diagnostic instrument online service bypass processing method is provided, specifically:

[0142] Referring to Embodiment 1, obtain the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information, divert the thread resource occupation to determine the bypass working condition state; based on the bypass working condition state and the automotive diagnostic protocol payload information to process the thread occupation, determine the response reply state, and based on the response reply state, control the system to perform software upgrade normally. Referring to Embodiment 2, obtain the timer time and the target timer time; based on the timer time and the target timer time, determine the communication mode state, and the communication mode state includes the session mode and other session modes; obtain the response reply state based on the bypass working condition state, the communication mode state and the automotive diagnostic protocol payload information. That is, obtain the ReceiveMessages thread, the function recvmsg() reads the DoIP message header in the socket, verifies the DoIP message header, the function recv() reads the DoIP payload in the socket, judges whether the SID is 0x3E and the TA is the function address, if the verification is successful, trigger the bypass processing, verify the UDS message length and sub-function in the DoIP payload, first stop the S3 timer, if the current is not the default session, then restart the S3 timer, judge whether to suppress the positive response, if suppress the positive response, then end, otherwise, reply the positive response, if the verification fails, judge whether the current work_unit resource is idle, if not idle, then reply the negative response, if idle, obtain the corresponding service processor serviceprocessor according to the SID, construct the work_unit according to the service processor and the DoIP payload, and submit it to the thread pool for execution, so as to perform normal upgrade.

[0143] It should be noted that the above examples are only for understanding the present application and do not constitute a limitation to the bypass processing method of the diagnostic instrument online service of the present application. Based on this technical concept, more forms of simple transformation are within the protection scope of the present application.

[0144] The present application also provides a bypass processing device for diagnostic instrument online service. Please refer to Figure 4 , the bypass processing device for diagnostic instrument online service includes:

[0145] An obtaining module 10, configured to obtain the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information;

[0146] A processing module 20, configured to divert the thread resource occupation based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information to determine the bypass working condition state;

[0147] An execution module 30, configured to determine the response reply state based on the bypass working condition state and the automotive diagnostic protocol payload information to process the thread occupation, and control the system to perform software upgrade normally based on the response reply state.

[0148] The obtaining module 10 is further configured to obtain gateway thread information and a gateway function set, where the gateway thread information includes main thread information and sub-thread information;

[0149] Determine the header information of the vehicle diagnostic protocol based on the gateway thread information and the gateway function set;

[0150] Determine the payload information of the vehicle diagnostic protocol based on the header information of the vehicle diagnostic protocol and the gateway function, where the payload information of the vehicle diagnostic protocol includes source address information, destination address information, service identifier information, and sub-function information.

[0151] The processing module 20 is further configured to obtain target header check information, target service identifier information, and gateway configuration information, where the gateway configuration information includes a configured function address and a configured logical address;

[0152] Check the target thread based on the header of the vehicle diagnostic protocol, the payload information of the vehicle diagnostic protocol, the target header check information, the target service identifier information, and the gateway configuration information to determine the check status;

[0153] Shunt and bypass the processing sub-thread based on the check status to obtain the bypass working condition status.

[0154] The execution module 30 is further configured to obtain the timer time and the target timer time;

[0155] Determine the communication mode status based on the timer time and the target timer time, where the communication mode status includes a session mode and other session modes;

[0156] Obtain the response reply status based on the bypass working condition status, the communication mode status, and the payload information of the vehicle diagnostic protocol.

[0157] The execution module 30 is further configured to, when the bypass working condition status is entering the bypass processing mode, control the system to execute the sub-thread based on the communication mode status and the payload information of the vehicle diagnostic protocol to determine the sub-thread response reply status;

[0158] When the bypass working condition status is not entering the bypass processing mode, obtain the idle status of the thread resources, and control the system to execute the main thread based on the idle status of the thread resources to determine the main thread response reply status;

[0159] Obtain the response reply status based on the sub-thread reply status and the main thread response reply status.

[0160] The execution module 30 is further configured to perform function verification based on the communication mode status and the vehicle diagnostic protocol payload information, and determine a function verification status, where the function verification status includes a message total length verification status and a sub-function working condition verification status;

[0161] Control the execution of the sub-thread of the system based on the function verification status, and determine the timer time and the negative response reply status;

[0162] Judge the message sending status based on the timer time, and determine the positive response reply status;

[0163] Obtain the sub-thread response reply status based on the negative response reply status and the positive response reply status.

[0164] When the thread resource idle state is idle, the execution module 30 is further configured to obtain service processor information and work unit resource information, construct a main thread based on the service processor information and the work unit resource information, submit the main thread to the thread pool for execution, and the main thread response reply status is no reply;

[0165] When the thread resource idle state is not idle, the main thread response reply status is to reply a negative response.

[0166] The diagnostic instrument online service bypass processing device provided by the present application adopts the diagnostic instrument online service bypass processing method in the above embodiment, and can solve the technical problem of how to perform diagnostic instrument online service bypass processing to efficiently and accurately divert the occupation of thread resources. Compared with the prior art, the beneficial effects of the diagnostic instrument online service bypass processing device provided by the present application are the same as those of the diagnostic instrument online service bypass processing method provided by the above embodiment, and other technical features in the diagnostic instrument online service bypass processing device are the same as the features disclosed in the above embodiment method, and will not be elaborated here.

[0167] The present application provides a diagnostic instrument online service bypass processing device, where the diagnostic instrument online service bypass processing device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the diagnostic instrument online service bypass processing method in the first embodiment above.

[0168] Next, refer to Figure 5, which shows a schematic structural diagram of a diagnostic instrument online service bypass processing device suitable for implementing the embodiments of the present application. The diagnostic instrument online service bypass processing device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The shown diagnostic instrument online service bypass processing device is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0169] As Figure 5 shown, the diagnostic instrument online service bypass processing device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the diagnostic instrument online service bypass processing device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the diagnostic instrument online service bypass processing device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a diagnostic instrument online service bypass processing device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.

[0170] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product that includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by a processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.

[0171] The diagnostic instrument online service bypass processing device provided by the present application adopts the diagnostic instrument online service bypass processing method in the above embodiment, and can solve the technical problem of how to perform diagnostic instrument online service bypass processing to efficiently and accurately split the occupation of thread resources. Compared with the prior art, the beneficial effects of the diagnostic instrument online service bypass processing device provided by the present application are the same as those of the diagnostic instrument online service bypass processing method provided by the above embodiment, and other technical features in the diagnostic instrument online service bypass processing device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.

[0172] It should be understood that each part disclosed in the present application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.

[0173] As described above, the above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present application can easily think of changes or substitutions, and all should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0174] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the diagnostic instrument online service bypass processing method in the above embodiment.

[0175] The computer-readable storage medium provided by the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0176] The above computer-readable storage medium can be included in the diagnostic instrument online service bypass processing device; it can also exist separately without being assembled into the diagnostic instrument online service bypass processing device.

[0177] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the diagnostic instrument online service bypass processing device, the diagnostic instrument online service bypass processing device is caused to: obtain the automotive diagnostic protocol message header and automotive diagnostic protocol payload information; determine the bypass operating condition state based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information by diverting thread resource occupancy; determine the response reply state based on the bypass operating condition state and the automotive diagnostic protocol payload information by processing thread occupancy; and control the normal software upgrade of the system based on the response reply state.

[0178] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).

[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes may occur in a different order than that marked in the accompanying drawings. For example, two consecutively represented boxes may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0180] The modules involved in the embodiments described in this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.

[0181] The readable storage medium provided in this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned diagnostic instrument online service bypass processing method, and can solve the technical problem of how to efficiently and accurately divert thread resource occupation in the diagnostic instrument online service bypass processing. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the diagnostic instrument online service bypass processing method provided in the above embodiments, and will not be elaborated here.

[0182] The above are only some embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or any direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. An online service bypass processing method for a diagnostic instrument, characterized in that, The method described includes: Obtaining the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; Based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information, shunting the thread resource occupancy to determine the bypass operating condition status; Based on the bypass operating condition status and the automotive diagnostic protocol payload information processing thread occupancy, determining the response reply status, and controlling the normal software upgrade of the system based on the response reply status.

2. The method according to claim 1, wherein The step of obtaining the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information includes: Obtaining the gateway thread information and the gateway function set, where the gateway thread information includes the main thread information and the sub-thread information; Based on the gateway thread information and the gateway function set, determining the automotive diagnostic protocol message header information; Based on the automotive diagnostic protocol message header information and the gateway function, determining the automotive diagnostic protocol payload information, where the automotive diagnostic protocol payload information includes the source address information, the destination address information, the service identifier information, and the sub-function information.

3. The method according to claim 1, wherein The step of shunting the thread resource occupancy based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information to determine the bypass operating condition status includes: Obtaining the target message header check information, the target service identifier information, and the gateway configuration information, where the gateway configuration information includes the configured function address and the configured logical address; Based on the automotive diagnostic protocol message header, the automotive diagnostic protocol payload information, the target message header check information, the target service identifier information, and the gateway configuration information, checking the target thread to determine the check status; Based on the check status, shunting the bypass processing sub-thread to obtain the bypass operating condition status.

4. The method according to claim 1, characterized in that, The step of determining the response reply status based on the bypass operating condition status and the automotive diagnostic protocol payload information processing thread occupancy includes: Obtaining the timer time and the target timer time; Based on the timer time and the target timer time, determining the communication mode status, where the communication mode status includes the session mode and other session modes; Based on the bypass operating condition status, the communication mode status, and the automotive diagnostic protocol payload information, obtaining the response reply status.

5. The method according to claim 4, wherein The step of obtaining the response reply status based on the bypass operating condition status, the communication mode status, and the automotive diagnostic protocol payload information includes: When the bypass operating condition status is entering the bypass processing mode, based on the communication mode status and the automotive diagnostic protocol payload information, controlling the system to execute the sub-thread to determine the sub-thread response reply status; When the bypass operating condition status is not entering the bypass processing mode, obtaining the thread resource idle status, and based on the thread resource idle status, controlling the system to execute the main thread to determine the main thread response reply status; Based on the sub-thread reply status and the main thread response reply status, obtaining the response reply status.

6. The method according to claim 5, characterized in that, The step of controlling the system to execute the sub-thread based on the communication mode status and the automotive diagnostic protocol payload information to determine the sub-thread response reply status includes: Based on the communication mode status and the automotive diagnostic protocol payload information, performing a function check to determine the function check status, where the function check status includes the message total length check status and the sub-function operating condition check status; Based on the function verification status, the control system executes a sub-thread to determine the timer time and the negative response reply status; Based on the timer time, judge the message sending status and determine the positive response reply status; Based on the negative response reply status and the positive response reply status, obtain the sub-thread response reply status.

7. The method according to claim 5, wherein The step of determining the main thread response reply status by the control system executing the main thread based on the thread resource idle status includes: When the thread resource idle status is idle, obtain the service processor information and the work unit resource information, construct the main thread based on the service processor information and the work unit resource information, submit the main thread to the thread pool for execution, and the main thread response reply status is no reply; When the thread resource idle status is not idle, the main thread response reply status is to reply a negative response.

8. An on-line service bypass processing device for a diagnostic instrument, characterized in that, The device includes: An acquisition module, configured to acquire the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; A processing module, configured to determine the bypass working condition status by splitting the thread resource occupation based on the automotive diagnostic protocol message header and the automotive diagnostic protocol payload information; An execution module, configured to determine the response reply status by processing the thread occupation based on the bypass working condition status and the automotive diagnostic protocol payload information, and control the software upgrade of the system normally based on the response reply status.

9. An on-line service bypass processing device for a diagnostic instrument, characterized in that The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the diagnostic instrument online service bypass processing method according to any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the diagnostic instrument online service bypass processing method according to any one of claims 1 to 7 are implemented.