Multi-thread diagnosis method and device, electronic equipment and storage medium
Through the multi-thread diagnosis method, the diagnostic connector is used to establish a wireless connection with the car and independent thread processing, which solves the problems of long waiting time and repeated labor in existing car maintenance, realizes the simultaneous diagnosis of multiple cars, improves efficiency and saves costs. .
Patent Information
- Application Number
- CN202410872320.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-01
- Publication Date
- 2024-10-11
AI Technical Summary
In the existing car maintenance process, maintenance personnel need to inspect vehicles one by one, resulting in long waiting times, time-consuming work, and a lot of duplication of work, which increases labor and time costs.
The multi-threaded diagnosis method is adopted to establish a wireless connection with the car through the diagnostic connector, respond to the socket request command, establish an independent thread to connect with the diagnostic connector, receive and analyze the ECU data of multiple vehicles, and realize simultaneous diagnosis and analysis.
It greatly improves the diagnostic efficiency, frees the hands of maintenance personnel, saves time and labor costs, and enables simultaneous diagnosis of multiple vehicles.
Smart Images

Figure CN118760122A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile diagnosis, and in particular to a multi-threaded diagnosis method, device, electronic equipment and storage medium. Background Art
[0002] At present, in the automobile repair shops on the market, when repairing and inspecting faulty automobiles, the maintenance personnel usually use diagnostic equipment to repair and inspect the vehicles one by one. The equipment needs to communicate with the automobile through a diagnostic connector or a diagnostic line, read the automobile ECU data, and then parse and process it through the diagnostic equipment, and then feedback the diagnostic results. The maintenance personnel determine the cause of the automobile by browsing the diagnostic results.
[0003] However, large repair shops often have a large number of customers and vehicles waiting to be repaired. In many cases, vehicles need to wait in line for repairs. Car owners have to wait for a long time for repairs, and the work of maintenance personnel is not only time-consuming but also involves a lot of repetitive work, which increases labor costs and time costs. Summary of the invention
[0004] In order to solve the defects in the prior art, the present invention provides a multi-threaded diagnosis method, device, electronic device and storage medium.
[0005] The technical document provided by the present invention is a multi-threaded diagnostic method, which is applied to a mobile terminal. The mobile terminal establishes a connection with a vehicle to be tested through a diagnostic connector and diagnoses the vehicle to be tested. The method includes:
[0006] receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith;
[0007] In response to a socket request instruction sent by at least one of the diagnostic connectors, establishing a socket connection with the diagnostic connector;
[0008] The vehicle ECU data sent by at least one of the diagnostic connectors is received, and the diagnostic result is fed back after the vehicle ECU data is analyzed and processed.
[0009] Optionally, the specific steps of receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith include:
[0010] receiving ID information sent by at least one of the diagnostic connectors, and verifying whether the ID information is bound to the mobile terminal;
[0011] If the verification is successful, a communication connection is established with the diagnostic connector.
[0012] Optionally, in response to a socket request instruction sent by at least one of the diagnostic connectors, the specific step of establishing a socket connection with the diagnostic connector includes:
[0013] receiving the socket request instructions sent by the first, second, ..., nth diagnostic connectors, and marking the socket request instructions;
[0014] Establish the first, second, ..., nth independent threads and bind them to the corresponding marked socket request instructions respectively.
[0015] Optionally, the specific steps of receiving automobile ECU data sent by at least one of the diagnostic connectors, parsing the automobile ECU data and feeding back a diagnostic result include:
[0016] Receive the first, second, ..., and nth automobile ECU data sent by the diagnostic connector; analyze and process the automobile ECU data respectively and then feed back the first, second, ..., and nth diagnostic results.
[0017] Optionally, after receiving the automobile ECU data sent by at least one of the diagnostic connectors, parsing the automobile ECU data and feeding back the diagnostic result, the method further includes:
[0018] If the vehicle ECU data sent by any of the diagnostic connectors is not received, the information is fed back to the corresponding diagnostic connector, and the diagnostic connector sends the vehicle ECU data again.
[0019] The present application also discloses an automobile diagnostic device, comprising:
[0020] A receiving module, used for receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith;
[0021] a response module, configured to establish a socket connection with the diagnostic connector in response to a socket request instruction sent by at least one of the diagnostic connectors;
[0022] The diagnosis module is used to receive the automobile ECU data sent by at least one of the diagnosis connectors, analyze the automobile ECU data and then feed back the diagnosis result.
[0023] Optionally, also include:
[0024] The feedback module is used to feedback information to the corresponding diagnostic connector if the automobile ECU data sent by any of the diagnostic connectors is not received, and the diagnostic connector sends the automobile ECU data again.
[0025] The present application also discloses an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0026] The present application also discloses a computer-readable storage medium, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0027] The present application also discloses a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0028] Beneficial effects: The present invention establishes a socket connection with the diagnostic connector and a communication connection with multiple vehicles in response to a socket request instruction sent by at least one of the diagnostic connectors, so that ECU data of multiple vehicles can be obtained at one time, which greatly improves efficiency; by receiving the vehicle ECU data sent by at least one of the diagnostic connectors, the vehicle ECU data is analyzed and processed and then the diagnosis result is fed back. After the vehicle ECU data is obtained, the analysis and processing can be performed simultaneously, or one item of vehicle ECU data can be selected separately for diagnosis, thereby realizing simultaneous diagnosis of multiple vehicles, freeing the hands of maintenance personnel, and also saving time and labor costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic diagram of a flow chart of a multi-threaded diagnostic method of the present invention;
[0030] Figure 2 It is a structural schematic diagram of the multi-threaded diagnostic device of the present invention;
[0031] Figure 3 It is a schematic diagram of the structure of the electronic device of the present invention.
[0032] As shown in the figure: 10, receiving module 10; 20, diagnosis module 20; 30, response module 30. DETAILED DESCRIPTION
[0033] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0034] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "fixed", "integrally formed", "left", "right" and similar expressions used in this specification are for illustrative purposes only. In the drawings, units with similar structures are marked with the same reference numerals.
[0035] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0036] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0037] Embodiment 1:
[0038] See also Figure 1 A multi-threaded diagnostic method is applied to a mobile terminal, wherein the mobile terminal establishes a connection with a vehicle to be tested through a diagnostic connector and diagnoses the vehicle to be tested, and the method comprises:
[0039] Step S1, receiving a wireless connection request sent by a diagnostic connector and establishing a communication connection therewith;
[0040] Step S2, in response to a socket request instruction sent by at least one of the diagnostic connectors, establishing a socket connection with the diagnostic connector;
[0041] Step S3, receiving the automobile ECU data sent by at least one of the diagnostic connectors, analyzing the automobile ECU data and feeding back a diagnostic result.
[0042] As described in the above steps S1-S3, when the vehicle needs to be repaired and inspected, the mobile terminal and the vehicle to be tested can establish a communication connection through the diagnostic connector, and the diagnostic connector and the mobile terminal can be connected through Bluetooth. After the diagnostic connector is connected to the vehicle to be tested, it is powered on and started, and the connectable Bluetooth is automatically searched and connected. After the connection, the diagnostic connector can send data through Bluetooth. After the Bluetooth connection, the diagnostic connector creates a socket object and sends it to the mobile terminal. At this time, there can be multiple diagnostic connectors connected to the vehicle. Each diagnostic connector sends a socket object to the mobile terminal to request a connection. After the mobile terminal identifies it, it establishes a connection with each socket request, and then each diagnostic connector sends the read car ECU data to the mobile terminal. The mobile terminal can parse and process each ECU data, and finally feedback the diagnostic results. The staff can diagnose and test multiple vehicles at one time, saving a lot of time and improving work efficiency.
[0043] In this embodiment, the diagnostic connector is a connector used in conjunction with the car OBD interface, which is an international standard car communication interface. The diagnostic connector can read car ECU data from the car computer through the OBD interface. The mobile terminal includes a mobile phone, a tablet and a diagnostic device.
[0044] Optionally, the specific steps of receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith include:
[0045] Step S11, receiving ID information sent by at least one of the diagnostic connectors, and verifying whether the ID information is bound to the mobile terminal;
[0046] Step S12: If the verification is successful, a communication connection is established with the diagnostic connector.
[0047] As described in the above steps S11 and S12, before the mobile terminal establishes a connection with the diagnostic connector, the information of the diagnostic connector needs to be verified to verify whether it is the connector bound to the mobile terminal. If not, the communication connection is not allowed to be established, avoiding the use of non-standard connectors for diagnosis and protecting the legitimate rights and interests of manufacturers.
[0048] Optionally, in response to a socket request instruction sent by at least one of the diagnostic connectors, the specific step of establishing a socket connection with the diagnostic connector includes:
[0049] Step S21, receiving the socket request instructions sent by the first, second, ..., nth diagnostic connectors, and marking the socket request instructions;
[0050] Step S22: establish the first, second, ..., nth independent threads and bind them to the corresponding marked socket request instructions respectively.
[0051] As described in the above steps S21 and S22, each vehicle can be connected to a diagnostic connector. Each diagnostic connector needs to create a socket object and send it to the mobile terminal. The mobile terminal marks the received requests in order to facilitate the user to identify the corresponding diagnostic connector and vehicle. The mobile terminal then establishes and binds independent threads according to the corresponding tags to ensure that one thread receives ECU data transmitted by a diagnostic connector, and the user can intuitively see each piece of data received.
[0052] Optionally, the specific steps of receiving automobile ECU data sent by at least one of the diagnostic connectors, parsing the automobile ECU data and feeding back a diagnostic result include:
[0053] Step S31, receiving the automobile ECU data sent by the first, second, ..., nth diagnostic connector; and feeding back the first, second, ..., nth diagnostic results after respectively analyzing the automobile ECU data.
[0054] As described in the above step S31, after each diagnostic connector establishes a socket connection with the mobile terminal, it can directly send the vehicle ECU data it reads. The mobile terminal parses and processes the received vehicle ECU data one by one in the marked order and then feeds back the diagnostic results. The diagnostic results display the fault information of each electronic unit of the vehicle. The user can obtain the desired information by viewing the diagnostic results.
[0055] Optionally, after receiving the automobile ECU data sent by at least one of the diagnostic connectors, parsing the automobile ECU data and feeding back the diagnostic result, the method further includes:
[0056] Step S32: If the automobile ECU data sent by any of the diagnostic connectors is not received, feedback information is sent to the corresponding diagnostic connector, and the diagnostic connector sends the automobile ECU data again.
[0057] As described in step S32 above, after the mobile terminal establishes a socket connection with each diagnostic connector, if one of the diagnostic connectors sends data and the mobile terminal does not receive it, a message will be fed back to the diagnostic connector, and the diagnostic connector will send the data again to avoid missed detection due to missed data transmission, thereby ensuring the accuracy of the diagnosis.
[0058] Embodiment 2:
[0059] The present application also discloses an automobile diagnostic device, comprising:
[0060] The receiving module 10 is used to receive the wireless connection request sent by the diagnostic connector and establish a communication connection therewith;
[0061] A response module 30, configured to establish a socket connection with the diagnostic connector in response to a socket request instruction sent by at least one of the diagnostic connectors;
[0062] The diagnosis module 20 is used to receive the automobile ECU data sent by at least one of the diagnosis connectors, analyze the automobile ECU data and then feed back the diagnosis result.
[0063] Optionally, also include:
[0064] The feedback module is used to feedback information to the corresponding diagnostic connector if the automobile ECU data sent by any of the diagnostic connectors is not received, and the diagnostic connector sends the automobile ECU data again.
[0065] Furthermore, the receiving module 10 further includes:
[0066] A receiving subunit, used to receive ID information sent by at least one of the diagnostic connectors, and verify whether the ID information is bound to the mobile terminal;
[0067] The verification unit is used to establish a communication connection with the diagnostic connector if the verification is passed.
[0068] Furthermore, the response module 30 further includes:
[0069] a marking unit, used for receiving the socket request instructions sent by the first, second, ..., nth diagnostic connector, and marking the socket request instructions;
[0070] The establishing unit is used to establish and bind the first, second, ..., and nth independent threads to the corresponding marked socket request instructions respectively.
[0071] Furthermore, the response module 30 further includes:
[0072] The feedback unit is used to receive the automobile ECU data sent by the first, second, ..., nth diagnostic connector; and feed back the first, second, ..., nth diagnostic results after respectively analyzing the automobile ECU data.
[0073] Embodiment three:
[0074] See also Figure 3 The present application also discloses an electronic device, which includes a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call the computer program so that the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0075] The present application also discloses a computer-readable storage medium, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0076] The present application also discloses a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method as described above.
[0077] In the embodiments provided in the present application, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, and units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another diagnostic system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.
[0078] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0079] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0080] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable an electronic device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only processor (ROM, Read-Only Memory), a disk or an optical disk.
[0081] It should be noted that the above-mentioned technical features are further combined with each other to form various embodiments not listed above, which are all deemed to be within the scope of the present invention; and, for ordinary technicians in this field, they can be improved or transformed according to the above description, and all these improvements and transformations should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A multi-threaded diagnostic method, applied to mobile terminals, Features: The mobile terminal establishes a connection with the vehicle to be tested through the diagnostic connector and diagnoses the vehicle to be tested, and the method includes: receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith; In response to a socket request instruction sent by at least one of the diagnostic connectors, establishing a socket connection with the diagnostic connector; The vehicle ECU data sent by at least one of the diagnostic connectors is received, and the diagnostic result is fed back after the vehicle ECU data is analyzed and processed.
2. According to the PCB board testing method of claim 1, It is characterized in that The specific steps of receiving the wireless connection request sent by the diagnostic connector and establishing a communication connection therewith include: receiving ID information sent by at least one of the diagnostic connectors, and verifying whether the ID information is bound to the mobile terminal; If the verification is successful, a communication connection is established with the diagnostic connector.
3. According to the PCB board testing method of claim 1, It is characterized in that In response to a socket request instruction sent by at least one of the diagnostic connectors, the specific steps of establishing a socket connection with the diagnostic connector include: receiving the socket request instructions sent by the first, second, ..., nth diagnostic connectors, and marking the socket request instructions; Establish the first, second, ..., nth independent threads and bind them to the corresponding marked socket request instructions respectively.
4. According to the PCB board testing method of claim 1, It is characterized in that The specific steps of receiving the automobile ECU data sent by at least one of the diagnostic connectors, analyzing and processing the automobile ECU data, and feeding back the diagnostic result include: Receive the automobile ECU data sent by the first, second, ..., nth diagnostic connector; and feed back the first, second, ..., nth diagnostic results after respectively analyzing the automobile ECU data.
5. According to the PCB board testing method of claim 4, It is characterized in that After receiving the automobile ECU data sent by at least one of the diagnostic connectors, analyzing and processing the automobile ECU data and feeding back the diagnostic result, the method further includes: If the vehicle ECU data sent by any of the diagnostic connectors is not received, the information is fed back to the corresponding diagnostic connector, and the diagnostic connector sends the vehicle ECU data again.
6. An automobile diagnostic device, It is characterized in that include: A receiving module, used for receiving a wireless connection request sent by the diagnostic connector and establishing a communication connection therewith; a response module, configured to establish a socket connection with the diagnostic connector in response to a socket request instruction sent by at least one of the diagnostic connectors; The diagnosis module is used to receive the automobile ECU data sent by at least one of the diagnosis connectors, analyze the automobile ECU data and then feed back the diagnosis result.
7. The vehicle diagnostic device according to claim 6, It is characterized in that Also includes: The feedback module is used to feedback information to the corresponding diagnostic connector if the automobile ECU data sent by any of the diagnostic connectors is not received, and the diagnostic connector sends the automobile ECU data again.
8. An electronic device, comprising a memory and a processor, in, The memory is used to store a computer program, and the processor is used to call the computer program, characterized in that the electronic device executes the steps of the PCB board testing method according to any one of claims 1 to 5.
9. A computer-readable storage medium comprising instructions, It is characterized in that When the instructions are executed on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method according to any one of claims 1 to 5.
10. A computer program product, It is characterized in that The computer program product comprises computer instructions, and when the computer instructions are run on an electronic device, the electronic device executes the steps of the multi-threaded diagnostic method according to any one of claims 1 to 5.
