Joint management tool execution method and system, terminal and storage medium

By introducing a thread management module and a functional task scheduling mechanism, the functional limitations and task scheduling problems of traditional J2534 diagnostic connector management tools have been solved, realizing comprehensive management and efficient task execution of J2534 diagnostic connector devices, and improving the stability and scalability of the system.

CN121455729APending Publication Date: 2026-02-03NANCHANG XINGWEI SOFTWARE DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511592741.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-03
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Traditional J2534 diagnostic connector management tools only support wired connections, which limits their functionality and cannot meet the management needs of new wireless connection methods. Furthermore, they lack task abstraction and thread management mechanisms, resulting in difficulties in expanding functionality, weak multi-task concurrent processing capabilities, and untimely user interface responses.

Method used

A thread management module, a functional task scheduling mechanism, and a multi-connection management mechanism are introduced. The thread management module manages business threads and functional tasks in a unified manner, supports wired and wireless connections, and decouples task scheduling and execution logic.

Benefits of technology

It improves the stability and execution efficiency of the system in multi-task concurrent execution scenarios, enhances the functional integrity and scalability of the system architecture, and supports the flexibility and compatibility of multiple connection methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455729A_ABST
    Figure CN121455729A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle diagnosis technology, and discloses a joint management tool execution method and system, a terminal and a storage medium, and the method comprises the steps: in response to a joint management tool starting operation, creating a connection management thread and at least one service thread through a thread management module, creating and loading at least one function task in each service thread; triggering the connection management thread to start, so that the thread management module establishes communication connection with the diagnosis connector equipment through a connection mode configured in the connection management thread; and in response to a task operation instruction triggered by the interface display module, the thread management module schedules a corresponding function task based on a task identifier in the task operation instruction, and the corresponding function task is executed by the associated service thread. According to the application, the thread management module, the function task scheduling mechanism and the multi-connection mode management mechanism are introduced, so that the comprehensive management of the J2534 diagnosis connector equipment is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicle diagnosis, and in particular to a connector management tool execution method, system, terminal and storage medium. BACKGROUND

[0002] The J2534 protocol diagnostic connector (based on the SAE J2534 standard) is a standardized interface in the automotive aftermarket diagnosis field, and its core value lies in solving vehicle compatibility problems and building an open technology ecosystem. With the development of technology, new J2534 diagnostic connectors support LAN, WLAN, Bluetooth and other network connection methods to communicate with diagnostic devices, greatly improving the flexibility of use and the convenience of deployment. However, some J2534 diagnostic connector management tools still have many limitations. First, it only supports device management through wired connection, and the function is limited to connector information reading and firmware upgrading, and cannot perform wireless network configuration (such as WIFI configuration), local area network device discovery, connection mode switching and other operations on the connector, making it difficult to meet the comprehensive management needs of new wireless diagnostic connectors. Second, the traditional tool lacks task abstraction and thread management mechanisms in software architecture, resulting in difficulties in function expansion, weak multi-task concurrent processing capability, and slow user interface response. SUMMARY

[0003] Therefore, the embodiments of the present application provide a connector management tool execution method, system, terminal device and computer readable storage medium.

[0004] In a first aspect, the embodiments of the present application provide a connector management tool execution method, comprising: In response to a connector management tool startup operation, creating a connection management thread and at least one business thread through a thread management module, and creating and loading at least one function task in each of the business threads; Triggering the connection management thread to start, so that the thread management module establishes a communication connection with the diagnostic connector device through the connection mode configured in the connection management thread; In response to a task operation instruction triggered through an interface display module, the thread management module schedules the corresponding function task based on the task identifier in the task operation instruction, and executes the corresponding function task by the associated business thread.

[0005] In some embodiments, further comprising: in response to a connection mode selection instruction through the interface display module, the connection management thread calls the communication interface corresponding to the specified connection mode in the connection mode selection instruction, and makes the thread management module and the diagnostic connector device communicate through the specified connection mode; wherein the connection mode includes wired connection and wireless connection; The specified connection mode is configured as the connection mode after the next start of the joint management tool.

[0006] In some embodiments, the creating and loading at least one function task in each of the business threads comprises: The thread management module loads at least one function task in each of the business threads based on the mapping relationship between the function task and the created business thread; wherein each function task comprises a unique task identifier for identification and matching in the task scheduling and execution process.

[0007] In some embodiments, the thread management module schedules a corresponding function task based on the task identifier in the task operation instruction, and executes the corresponding function task by the associated business thread, comprising: The thread management module calls a task management interface to update the task state of the function task corresponding to the task operation instruction; An asynchronous notification mechanism is used to send a wake-up signal to the business thread associated with the current function task; After the business thread is woken up, the corresponding function task is executed based on the listening result in the listening task queue.

[0008] In some embodiments, the function task comprises a device connection management task; and the device connection management task is executed by the connection management thread. In the function task execution process, the following steps are further included: In addition to the device connection management task, the remaining function tasks interact with the diagnostic joint device through the device connection management task and the diagnostic joint device.

[0009] In some embodiments, after the thread management module establishes a communication connection with the diagnostic joint device through the connection mode configured in the connection management thread, the following steps are further included: The thread management module triggers the execution of a device information reading task; wherein the device information reading task communicates with the diagnostic joint device through the device connection management task to obtain device information, and updates the device information to the user interface display through the interface display module.

[0010] In some embodiments, during the function task execution process, the task execution progress or result is sent to the interface display module through the Windows message mechanism to update the user interface display.

[0011] In a second aspect, the embodiments of the present application provide a joint management tool execution system, comprising: an interface display module and a thread management module. The thread management module is configured to, in response to the joint management tool starting operation, create a connection management thread and at least one service thread, and create and load at least one function task in each of the service threads. The thread management module is further configured to, after triggering the connection management thread to start, establish a communication connection with the diagnostic joint device through a connection mode configured in the connection management thread. The interface display module is configured to generate a task operation instruction in response to a user operation. The thread management module is further configured to, in response to the task operation instruction, schedule a corresponding function task based on a task identifier in the task operation instruction, and execute the corresponding function task by the associated service thread.

[0012] In a third aspect, an embodiment of the present application provides a terminal device, which comprises a processor and a memory, the memory stores a computer program, and the processor is configured to execute the computer program to implement the joint management tool execution method described in the foregoing embodiments.

[0013] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program, when executed on a processor, implements the joint management tool execution method described in the foregoing embodiments.

[0014] The embodiments of the present application have the following beneficial effects: the present application optimizes the design from the aspects of system architecture and task execution mechanism by introducing a thread management module, a function task scheduling mechanism and a multi-connection mode management mechanism, and effectively overcomes the limitations of the traditional J2534 diagnostic joint management tool in terms of function coverage range, task scheduling mode and connection mode support. Through the unified management of the thread management module on the service thread and the function task, the decoupling of the task scheduling and execution logic is realized, and the stability and execution efficiency of the system in the multi-task concurrent execution scenario are effectively improved. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0016] Figure 1 Fig. 1 shows a structural schematic diagram of a joint management tool execution system according to an embodiment of the present application; Figure 2 Fig. 2 shows a first flowchart of a joint management tool execution method according to an embodiment of the present application; Figure 3 FIG. 2 shows a second flowchart illustrating a method for performing a joint management tool according to an embodiment of the present application; Figure 4 FIG. 3 shows a third flowchart illustrating a method for performing a joint management tool according to an embodiment of the present application. DETAILED DESCRIPTION

[0017] The technical solutions in the embodiments of the present application will be apparently and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, but not all the embodiments of the present application.

[0018] The components of the embodiments of the present application generally described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by a person skilled in the art without creative work, belong to the scope of protection of the present application.

[0019] Hereinafter, the terms "include", "have", and their conjugates used in the various embodiments of the present application, are only intended to denote that there are certain features, numbers, steps, operations, elements, components, or combinations thereof, and should not be understood as excluding the presence or addition of one or more other features, numbers, steps, operations, elements, components, or combinations thereof. In addition, the terms "first", "second", "third", and the like are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0020] Unless otherwise defined, all terms used herein (including technical terms and scientific terms) have the same meaning as commonly understood by a person of ordinary skill in the art to which the various embodiments of the present application belong. The terms (such as those defined in a generally used dictionary) will be interpreted as having the same meaning as the contextual meaning in the relevant technical field and will not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the present application.

[0021] Some embodiments of the present application will be described below in detail with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0022] Based on the fact that some conventional J2534 diagnostic connector management tools (such as GODIAG GD101 or LAUNCH J2534 J-Box, etc.) in the prior art only support wired connection of diagnostic connector devices, and have great limitations in functions, and cannot meet the efficient management requirements of new J2534 diagnostic connectors supporting wireless connection modes (such as LAN, WLAN, Bluetooth, etc.), the embodiment proposes a connector management tool execution method, system, terminal device and computer readable storage medium. The scheme introduces a thread management module 200, a function task scheduling mechanism and a multi-connection mode management mechanism, thereby realizing comprehensive management and efficient task execution of the diagnostic connector device, and effectively improving the functional integrity of the tool.

[0023] Firstly, the diagnostic connector device and the diagnostic connector management tool in the embodiment are introduced below.

[0024] The diagnostic connector device refers to a vehicle communication interface device (VCI) conforming to the SAE J2534 standard, which is used to establish a communication connection between a diagnostic device (such as a PC, a handheld diagnostic instrument, etc.) and a vehicle electronic control unit (ECU). The device supports multiple communication modes, including wired connection (such as USB) and wireless connection (such as WLAN, Bluetooth, LAN), and can realize device information reading, firmware upgrading, network configuration, etc. through a standardized interface.

[0025] The diagnostic connector management tool refers to a software system running on a terminal device (such as a PC), which is used to uniformly manage the connector device. The tool of the embodiment can schedule multiple function tasks through the thread management module 200, and support connection mode configuration, device information reading, local area network scanning, wireless network configuration, firmware upgrading, system upgrading, etc. of the connector device.

[0026] The connector management tool execution system is described below in combination with some specific embodiments.

[0027] Figure 1A structural schematic diagram of a joint management tool execution system of an embodiment of the present application is shown. Exemplarily, the joint management tool execution system comprises an interface display module 100 and a thread management module 200; the thread management module 200 is configured to, in response to a joint management tool starting operation, create a connection management thread and at least one service thread, and create and load at least one function task in each service thread; the thread management module 200 is further configured to, after triggering the connection management thread to start, establish a communication connection with a diagnostic joint device through a connection mode configured in the connection management thread; the interface display module 100 is configured to generate a task operation instruction in response to a user operation; and the thread management module 200 is further configured to, in response to the task operation instruction, schedule a corresponding function task based on a task identifier in the task operation instruction, and execute the corresponding function task by an associated service thread.

[0028] The modules and tasks involved in the system are described below.

[0029] The interface display module 100 is responsible for user interaction and interface display, and is a core module of user operation and state feedback. The module does not directly execute specific tasks, but triggers execution of a function task through an asynchronous communication mechanism between the module and the thread management module 200, and receives state information and execution results in a task execution process, so as to realize dynamic update and real-time feedback of a user interface.

[0030] The thread management module 200 is a unified manager of service threads, connection management threads and function tasks, and is responsible for creation and destruction of service threads, creation and destruction of connection management threads, loading and scheduling of function tasks, and updating and synchronization of task states. The module modifies task states and execution parameters through a unified task management interface, and sends task change notifications to service threads by means of a condition variable mechanism, so as to wake up or block the service threads to execute corresponding function tasks.

[0031] The service thread is responsible for executing specific diagnostic management function tasks, such as device information reading, WiFi configuration, firmware upgrading, system upgrading, etc. The service thread acquires task scheduling instructions from the thread management module 200 by listening to a task queue, and feeds back task states, execution progress and results to the interface display module 100 through an asynchronous message mechanism in a task execution process, so as to realize visualization of the task execution process.

[0032] The function task is an abstract representation of each management function in the system, and each function task has a unique task identification for identification and matching in task scheduling and execution. The creation and destruction of the function task are uniformly managed by the thread management module 200, and the execution is responsible for the corresponding business thread. The tasks are communicated and coordinated by the thread management module 200, and the task information is transmitted to the interface display module 100 through the Windows message mechanism during the execution process, so as to realize the dynamic update of the interface.

[0033] The connection management thread is a separate thread specially used for realizing the connection management of the diagnostic connector device, supports multiple connection modes including USB, Bluetooth, WIFI, etc. The thread encapsulates the specific implementation details of the underlying connection mode, and provides a unified communication interface for other function tasks, so that the tasks can interact with the diagnostic connector device through the interface without caring about the specific connection mode, and the compatibility and scalability of the system are improved.

[0034] Based on the above description of the connector management tool execution system, the connector management tool execution method of the embodiment will be described in detail below in combination with Figure 2 The connector management tool execution method exemplarily includes steps S210-S230. Step S210, in response to a connector management tool start operation, creating a connection management thread and at least one business thread through the thread management module 200, and creating and loading at least one function task in each business thread.

[0035] Exemplarily, each time the user starts the connector management tool, the thread management module 200 first creates one or more business threads and a connection management thread according to the preset system configuration or running environment. Each business thread is used to execute one or more related function tasks.

[0036] In an embodiment, the thread management module 200 creates a business thread through a thread creation interface provided by the system platform (for example, using the CreateThread function on the Windows platform), and allocates an independent task queue for each thread. The task queue is used to store the function tasks executable by the current business thread, and supports the update and scheduling of the task state.

[0037] The number of business threads can be dynamically adjusted according to system resources, function complexity or concurrent demand. For example, in a resource-limited environment, only one business thread can be created to reduce memory and CPU occupation; and in a complex function and high task concurrency scenario, multiple business threads can be created to realize task parallel execution.

[0038] Each function task represents a specific diagnostic management function, such as: a device information reading task (for obtaining information such as firmware version, serial number, connection status, etc. of the diagnostic adapter device), a firmware upgrade task (for sending a firmware update package to the diagnostic adapter device and completing the upgrade), a system upgrade task (for upgrading the operating system or running environment of the diagnostic adapter device), a device scanning and discovery task (for scanning diagnostic adapter devices available in the local area network or Bluetooth range), etc.

[0039] It can be understood that all function tasks are created when the adapter management tool is started, rather than being dynamically generated during running, so as to reduce the performance overhead caused by runtime resource application and release. In addition, when the adapter management tool is closed, the business threads, connection management threads and function tasks are released.

[0040] It should be noted that, although a preferred implementation in the embodiment is to create the business threads, connection management threads, etc. when the adapter management tool is started, the business threads and connection management threads can also be dynamically created after the adapter management tool is started according to runtime requirements.

[0041] In some embodiments, at least one function task is created and loaded in each business thread, specifically including: the thread management module 200 loads at least one function task in each business thread based on the mapping relationship between the function tasks and the created business threads.

[0042] After the business thread is created, the thread management module 200 instantiates and loads the function task into the corresponding business thread according to the preset mapping relationship between the task and the business thread.

[0043] Each function task is assigned a unique task identifier when it is created, which is used for task scheduling, state updating and execution matching. In the task scheduling process, the thread management module 200 finds and activates the corresponding function task according to the task identifier in the task operation instruction, and executes it by the corresponding business thread.

[0044] In addition, the thread management module 200 also maintains a task state table, which records the task ID, current state (such as ready, execution, completion, error), execution parameters, etc. of each task, and ensures data consistency when accessed by multiple threads through a locking mechanism.

[0045] Step S220 triggers the connection management thread to start, so that the thread management module 200 establishes a communication connection with the diagnostic adapter device through the connection mode configured in the connection management thread.

[0046] After the thread management module 200 initiates and completes the initialization of the service thread and the function task, the thread management module 200 further triggers the initiation of the connection management thread. After the connection management thread is initiated, the corresponding communication interface is called according to the connection mode (for example, one of USB, Bluetooth, WIFI or LAN) saved in the system configuration, and an attempt is made to establish a communication connection with the target diagnostic connector device.

[0047] The connection mode configured in the system can be derived from the following two modes. One is the user historical selection, that is, the connection mode selected by the user through the interface display module 100 during the last running of the connector management tool, and saved in the local configuration file or the registry by the thread management module 200. The other is the system default configuration, that is, the default connection mode preset by the system is used in the case of first running or no user specification, such as USB connection.

[0048] The connection management thread encapsulates the specific implementation modules of multiple connection modes, and provides a unified communication interface for other function tasks. For example, for WIFI connection mode, the connection management thread establishes communication with the diagnostic connector device through TCP / IP protocol stack; for Bluetooth connection mode, the system Bluetooth protocol stack (such as Windows Bluetooth API or BlueZ) is used for device discovery and connection; for USB connection mode, the data interaction is completed based on HID or CDC class communication interface.

[0049] During the connection establishment process, the connection management thread first verifies whether the current device environment meets the conditions of the selected connection mode (such as whether Bluetooth is turned on, whether WIFI is connected, etc.), and attempts to establish a connection after verification. If the connection is successful, the connection management thread returns the connection state to the thread management module 200 and provides a unified communication channel for subsequent function tasks; if the connection fails, an exception handling process is triggered, and the connection failure information is fed back to the interface display module 100 through the asynchronous message mechanism, prompting the user to reselect the connection mode or check the state of the diagnostic connector device.

[0050] The following will be described in combination with Figure 3 The preset connection mode determined based on the user historical selection will be described, and the determination process of the preset connection mode includes steps S310-S320: Step S310, in response to the connection mode selection instruction through the interface display module 100, the connection management thread calls the communication interface corresponding to the specified connection mode in the connection mode selection instruction, and makes the thread management module 200 and the diagnostic connector device communicate through the specified connection mode.

[0051] Exemplarily, during the running of the joint management tool, the user can select a specific connection mode for connecting the diagnostic joint device through the connection mode selection interface (such as a drop-down menu, a button group, etc.) provided by the interface display module 100. The specific connection mode can be one of wired connection (such as USB) or wireless connection (such as WLAN, Bluetooth, LAN).

[0052] After receiving the connection mode selection operation of the user, the interface display module 100 generates a corresponding connection mode selection instruction and transmits the instruction to the connection management thread. After analyzing the instruction, the connection management thread acquires the specific connection mode identifier specified by the user and calls the communication interface of the corresponding connection mode according to the identifier to complete the connection with the diagnostic joint device.

[0053] Step S320, configure the specific connection mode as the connection mode after the next start of the joint management tool.

[0054] Exemplarily, after the selection and connection establishment of the specific connection mode are completed, the joint management tool further sets the specific connection mode currently selected by the user as the default connection mode at the next start, that is, the “configured connection mode”. It can be understood that the thread management module 200 or the connection management thread can persistently store the specific connection mode identifier in the local configuration file or the system registry. When the joint management tool is started next time, the thread management module 200 will read the configuration information and automatically call the corresponding communication interface according to the specific connection mode identifier stored therein to attempt to establish a connection with the diagnostic joint device, thereby realizing the continuity of the connection mode and the convenience of the user operation.

[0055] In an embodiment, the user can manually modify the specific connection mode through the interface display module 100, or be prompted by the system to reselect the connection mode when the connection fails, so as to enhance the fault tolerance of the system.

[0056] Step S230, in response to the task operation instruction triggered through the interface display module 100, the thread management module 200 schedules the corresponding function task based on the task identifier in the task operation instruction, and executes the corresponding function task by the associated business thread.

[0057] After the joint management tool completes the communication connection with the diagnostic joint device, the user can select and trigger the function task to be executed through the interface display module 100. For example, the user clicks the “firmware upgrade” button to generate a corresponding task operation instruction, which contains the unique task identifier of the selected function task. The interface display module 100 transmits the task operation instruction to the thread management module 200, which schedules the corresponding function task according to the task identifier and arranges it to be executed in the specified business thread.

[0058] Exemplarily, asFigure 4 As shown, step S130 includes steps S410-S430: In step S410, the thread management module 200 calls the task management interface to update the task state of the function task corresponding to the task operation instruction.

[0059] After receiving the task operation instruction, the thread management module 200 first queries the task state table through the task management interface to find the function task matching the task identifier. If a matching task is found, the current state of the task is updated from “ready” to “executing”, and the start time, execution parameters, and other information of the task execution are recorded. The task state table is uniformly maintained by the thread management module 200, and the task state table includes but is not limited to the following fields: task ID, used to uniquely identify a function task; task type, indicating the function type of the task (such as device information reading, firmware upgrading, etc.); task state, including “ready”, “executing”, “completed”, “abnormal termination”, etc.; execution parameters, input parameters required for task execution, such as firmware file path, target WIFI name, etc.; execution result, execution result or error information returned after task execution.

[0060] The update of the task state adopts a mutex or critical section mechanism for thread safety control to prevent data race or state inconsistency when multiple threads access concurrently.

[0061] In step S420, an asynchronous notification mechanism is used to send a wake-up signal to the business thread associated with the current function task.

[0062] After the task state is updated, the thread management module 200 sends a wake-up signal to the corresponding business thread through an asynchronous notification mechanism (such as a condition variable) to activate the business thread in the blocked state and make it start executing the task.

[0063] Specifically, each business thread enters a waiting state (blocked state) when there is no task execution, and decides whether to wake up by listening to the changes in the task queue. The thread management module 200 triggers the wake-up by calling the synchronization mechanism provided by the system platform.

[0064] In an embodiment, the business thread uses a “lock + condition variable” mechanism to listen to the task queue. When a new task appears in the task queue, the thread management module 200 sends a signal through the condition variable to wake up the corresponding business thread, so that it takes the current task from the task queue and starts executing.

[0065] In step S430, after the corresponding business thread is woken up, the corresponding function task is executed based on the listening result in the task queue.

[0066] After the business thread is woken up, it starts to listen to the task queue and find the function task in the "executing" state. If there is a task to be executed, the task execution interface is called to start executing the function task. During the task execution process, the function task interacts with the diagnostic adapter device through the unified communication interface provided by the connection management thread. For example, the device information reading task sends a device information query instruction through the communication interface and receives the returned device version information, serial number and other data.

[0067] The state information generated during the task execution process (such as execution progress, error information, execution result, etc.) is sent to the interface display module 100 through the asynchronous message mechanism, which is used to update the user interface display and realize the visualization of the task execution process and user feedback. After the task execution is completed, the business thread updates the task state to "completed" or "abnormal termination", and enters the blocking state again to wait for the next task to wake up.

[0068] In some embodiments, the function task includes a device connection management task; the device connection management task is executed through the connection management thread; and during the execution of the function task, the rest of the function tasks other than the device connection management task interact with the diagnostic adapter device through the device connection management task.

[0069] In some embodiments, after the thread management module 200 establishes a communication connection with the diagnostic adapter device through the preset connection mode in the connection management thread, the thread management module 200 further triggers the execution of a device information reading task, wherein the device information reading task communicates with the diagnostic adapter device through the device connection management task to obtain device information, and updates the device information to the user interface display through the interface display module 100.

[0070] Exemplarily, after the adapter management tool establishes a communication connection with the diagnostic adapter device through the connection management thread, the thread management module 200 automatically triggers the execution of the device information reading task. This task is used to obtain the basic information of the diagnostic adapter device, including but not limited to: device model, firmware version, hardware version, serial number, current connection state, supported protocol list, etc.

[0071] After the business thread is woken up, the device information reading task starts to execute. The task sends a device information query instruction to the diagnostic adapter device by calling the unified communication interface provided by the connection management thread. After receiving the instruction, the diagnostic adapter device returns the device information in the form of response data. After receiving the response data, the device information reading task parses and formats it, and encapsulates the processed device information as structured data (such as JSON, XML, or a custom data structure) for subsequent interface display and business processing. After completing the acquisition and analysis of device information, the device information reading task sends the device information to the interface display module 100 through the asynchronous message mechanism. After receiving the device information, the interface display module 100 updates it to the device information display area in the user interface, such as the device model display box, firmware version label, serial number input box, and other controls.

[0072] The embodiment introduces a thread management module 200, a function task scheduling mechanism, and a multi-connection mode management mechanism, optimizes the design from two aspects of system architecture and task execution mechanism, and effectively overcomes the limitations of traditional J2534 diagnostic adapter management tools in terms of function coverage range, task scheduling mode, and connection mode support. Through the unified management of the thread management module 200 to the business thread and the function task, the decoupling of the task scheduling and execution logic is realized, and the stability and execution efficiency of the system in the multi-task concurrent execution scene are effectively improved. At the same time, the function task scheduling mechanism abstracts various diagnostic management functions into independent task units and schedules and matches them through task identification, which not only enhances the flexibility of task scheduling, but also improves the scalability and maintainability of the system architecture. In addition, the introduction of the multi-connection mode management mechanism enables the tool to support multiple connection modes such as USB, Bluetooth, WIFI, and encapsulates the underlying communication details through the connection management thread to provide a unified communication interface for the upper task, significantly improving the access flexibility and compatibility of the diagnostic adapter device.

[0073] The application also provides a terminal device, which exemplarily includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program, so that the terminal device executes the functions of each module in the above-mentioned adapter management tool execution method or the above-mentioned adapter management tool execution device.

[0074] The processor can be an integrated circuit chip with a processing capability of signals. The processor can be a general processor, including a central processing unit (CPU), a graphics processing unit (GPU), and a network processor (NP), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, a discrete gate or transistor logic device, a discrete hardware component, at least one of the above. The general processor can be a microprocessor or the processor can be any conventional processor or the like, which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0075] The memory can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read only memory (PROM), an erasable programmable read only memory (EPROM), an electrically erasable programmable read only memory (EEPROM) and the like. The memory is used to store a computer program. After receiving an execution instruction, the processor can execute the computer program accordingly.

[0076] The present application also provides a computer readable storage medium for storing the computer program used in the terminal device. For example, the computer readable storage medium can include, but is not limited to, a U disk, a mobile hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk and various program code storage media.

[0077] In several embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented by other means. The apparatus embodiments described above are only illustrative, for example, the flowcharts and structural diagrams in the drawings show the possible implementation architecture, function and operation of the apparatus, method and computer program product according to the embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of code, which contains one or more executable instructions for implementing the specified logic function. It should also be noted that in alternative implementation, the functions noted in the block can also occur in different order from that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the structural diagram and / or flowchart, and the combination of blocks in the structural diagram and / or flowchart, can be implemented by a dedicated hardware-based system for executing the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.

[0078] In addition, each functional module or unit in the embodiments of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0079] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application.

[0080] The above describes only the specific implementation of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A method for executing a connector management tool, characterized in that, include: In response to the startup operation of the connector management tool, a connection management thread and at least one business thread are created through the thread management module, and at least one functional task is created and loaded in each of the business threads; The connection management thread is triggered to start, so that the thread management module establishes a communication connection with the diagnostic connector device through the connection method configured in the connection management thread; In response to a task operation instruction triggered by the interface display module, the thread management module schedules the corresponding functional task based on the task identifier in the task operation instruction, and the associated business thread executes the corresponding functional task.

2. The method for executing the connector management tool according to claim 1, characterized in that, Also includes: In response to the connection method selection instruction displayed on the interface module, the connection management thread calls the communication interface corresponding to the specified connection method in the connection method selection instruction, and enables the thread management module to communicate with the diagnostic connector device through the specified connection method; wherein, the connection method includes wired connection and wireless connection; Configure the specified connection method as the connection method after the connector management tool is launched next time.

3. The method for executing the connector management tool according to claim 1, characterized in that, The creation and loading of at least one functional task in each of the business threads includes: The thread management module loads at least one of the functional tasks into each of the business threads based on the mapping relationship between the functional tasks and the created business threads; wherein each of the functional tasks includes a unique task identifier for identification and matching during task scheduling and execution.

4. The method for executing the connector management tool according to claim 1, characterized in that, The thread management module schedules the corresponding functional task based on the task identifier in the task operation instruction, and the associated business thread executes the corresponding functional task, including: The thread management module calls the task management interface to update the task status of the functional task corresponding to the task operation instruction; A wake-up signal is sent to the business thread associated with the current functional task through an asynchronous notification mechanism; After the business thread is awakened, it executes the corresponding functional task based on the listening results in the listening task queue.

5. The method for executing a connector management tool according to claim 1, characterized in that, The functional tasks include device connection management tasks; The device connection management task is executed through the connection management thread; The execution of the aforementioned functional task also includes: All other functional tasks, except for the device connection management task, interact with the diagnostic connector device through the device connection management task.

6. The method for executing the connector management tool according to claim 5, characterized in that, After the thread management module establishes a communication connection with the diagnostic connector device through the connection method configured in the connection management thread, it further includes: The thread management module triggers the execution of the device information reading task; wherein, the device information reading task communicates with the diagnostic connector device through the device connection management task to obtain device information, and updates the device information to the user interface display through the interface display module.

7. The method for executing the connector management tool according to claim 1, characterized in that, During the execution of the aforementioned task, the task execution progress or result is sent to the interface display module via the Windows message mechanism to update the user interface display.

8. A connector management tool execution system, characterized in that, include: Interface display module and thread management module; The thread management module is used to create a connection management thread and at least one business thread in response to the startup operation of the connector management tool, and to create and load at least one functional task in each of the business threads; The thread management module is also used to establish a communication connection with the diagnostic connector device through the connection method configured in the connection management thread after the connection management thread is triggered to start; The interface display module is used to generate task operation instructions in response to user operations; The thread management module is further configured to respond to the task operation instruction, schedule the corresponding functional task based on the task identifier in the task operation instruction, and have the associated business thread execute the corresponding functional task.

9. A terminal device, characterized in that, The terminal device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the connector management tool execution method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the execution method of the connector management tool according to any one of claims 1-7.