Master and slave communication methods for reducing data transmission quantity, computer equipment and computer readable storage medium

By using diagnostic codes to transmit diagnostic service command data in vehicle electronic systems, the transmission delay or loss caused by excessive bus data is solved, and communication efficiency and reliability are improved.

CN118890323APending Publication Date: 2024-11-01LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410905836.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-08
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The excessive amount of bus data in vehicle electronic systems leads to delay or loss of data transmission, affecting communication efficiency and reliability.

Method used

By using diagnostic codes to transmit diagnostic service command data, the amount of data transmission is reduced, the pre-registration and dynamic update of diagnostic codes is realized, repeated transmission is avoided, and the communication process is optimized.

Benefits of technology

It reduces the probability of bus congestion, improves communication efficiency and reliability, and reduces data transmission volume.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118890323A_ABST
    Figure CN118890323A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of communication, and provides a master communication method, a slave communication method, computer equipment and a computer readable storage medium for reducing data transmission quantity. The diagnosis service command or a diagnosis code execution request corresponding to the diagnosis service command is sent to the target control device, and the diagnosis code execution request comprises a diagnosis code of the diagnosis service command; and receiving an execution result sent by the target control device. According to the method provided by the invention, the diagnosis service command data is transmitted by using the diagnosis code, so that the data transmission quantity is reduced, the probability of bus congestion is reduced, and the communication efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and in particular, relates to a master-slave communication method, a computer device, and a computer-readable storage medium for reducing data transmission volume. Background Art

[0002] With the rapid development of modern automotive electronic technology, the demand for communication within the vehicle is increasing, especially in the communication between electronic control units (ECUs) and the transmission of diagnostic messages of diagnostic equipment. ECU, as the "on-board computer" of the car, collects and exchanges data through various sensors and data buses to determine the vehicle status and the driver's intentions, and controls the operation of the car through actuators. Currently, vehicles are usually equipped with multiple ECUs, such as engine ECU, transmission ECU, etc., to achieve precise control and management of different systems.

[0003] However, as the complexity of vehicle electronic systems increases, the amount of data transmitted on the bus has also increased significantly. In practical applications, various data such as communication messages between ECUs and diagnostic messages from diagnostic equipment need to be frequently transmitted on the bus. When the amount of data transmitted on the bus is too much, it is easy to cause data congestion, causing data transmission delays or even losses, and ultimately may lead to diagnostic failures.

[0004] If the diagnosis fails, the diagnostic service command needs to be resent, which further increases the burden of data transmission. Especially in some diagnostic services that need to be executed multiple times, the complete command needs to be retransmitted each time, which leads to a significant increase in the amount of data transmitted. When the amount of data on the bus is too large and causes congestion, it will cause data transmission delays or losses, thus affecting communication efficiency and reliability. Summary of the invention

[0005] In view of this, the embodiments of the present application provide a main communication method, a computer device and a computer-readable storage medium for reducing the amount of data transmitted, so as to solve the problem in the prior art that excessive bus data volume causes congestion, causes data transmission delay or loss, and affects communication efficiency and reliability.

[0006] A first aspect of an embodiment of the present application provides a main communication method for reducing data transmission volume, which is applied to a terminal device and includes:

[0007] In the case where a diagnostic service command needs to be sent to a target control device, sending the diagnostic service command or a diagnostic code execution request corresponding to the diagnostic service command to the target control device, wherein the diagnostic code execution request includes the diagnostic code of the diagnostic service command;

[0008] Receive the execution result fed back by the target control device based on the target diagnosis service command.

[0009] In an implementation of the first aspect, before the step of sending the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device, the method further includes:

[0010] Querying the registration status of the diagnostic service command in the target control device;

[0011] The sending of the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device includes:

[0012] If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command does not meet the preset registration condition, sending the diagnostic service command to the target control device;

[0013] If the registration status of the diagnostic service command in the target control device is registered, a diagnostic code execution request corresponding to the diagnostic service command is sent to the target control device.

[0014] In an implementation of the first aspect, after querying the registration status of the diagnostic service command in the target control device, the method further includes:

[0015] If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command meets the preset registration condition, a registration request is sent to the target control device; the registration request includes the diagnostic service command;

[0016] Receiving the execution result and the diagnosis code fed back by the target control device based on the registration request;

[0017] The identifier of the target control device, the diagnostic code and the diagnostic service command are written together into the diagnostic code recording space of the terminal device, and the registration status of the diagnostic service command in the target control device is marked as registered; the identifier of the target control device, the diagnostic code and the diagnostic service command correspond one to one.

[0018] In an implementation of the first aspect, the method further includes:

[0019] In the case where multiple diagnostic service commands need to be sent continuously to the target control device, perform the following steps:

[0020] Querying the registration status of each of the diagnostic service commands in the target control device;

[0021] If the registration status of each of the diagnostic service commands in the target control device is registered, a diagnostic code execution request is sent to the target control device, and the sending of the multiple diagnostic service commands to the target control device is canceled; the diagnostic code execution request includes the diagnostic code of each of the diagnostic service commands.

[0022] In an implementation of the first aspect, the method further includes:

[0023] If a diagnosis code cancellation instruction is detected, obtaining the diagnosis code in the diagnosis code cancellation instruction;

[0024] Sending a diagnosis code cancellation request to a control device corresponding to the diagnosis code in the diagnosis code cancellation instruction, wherein the diagnosis code cancellation request includes the diagnosis code in the diagnosis code cancellation instruction;

[0025] If a deregistration result indicating successful deregistration is received, the diagnostic code in the diagnostic code deregistration instruction and its corresponding control device identifier and diagnostic service command are deleted from the diagnostic code record space of the terminal device.

[0026] A second aspect of an embodiment of the present application provides a slave communication method for reducing data transmission volume, which is applied to a control device and includes:

[0027] If a diagnostic service command is received, setting the diagnostic service command as a target diagnostic service command;

[0028] If a diagnosis code execution request is received, setting a target diagnosis service command according to the diagnosis service command corresponding to the diagnosis code in the diagnosis code execution request;

[0029] Executing the target diagnostic service command and generating an execution result;

[0030] The execution result is sent to the terminal device.

[0031] In an implementation of the second aspect, before executing the target diagnostic service command and generating an execution result, the method further includes:

[0032] If a registration request is received, setting the diagnostic service command in the registration request as the target diagnostic service command;

[0033] After sending the execution result to the terminal device, the method further includes:

[0034] Registering a unique diagnostic code for the diagnostic service command in the registration request, and writing the diagnostic code and the diagnostic service command in the registration request together into the diagnostic code recording space of the control device; the diagnostic code and the diagnostic service command in the registration request have a one-to-one correspondence;

[0035] The diagnosis code is sent to the terminal device.

[0036] In an implementation of the second aspect, the method further includes:

[0037] If a diagnosis code cancellation request is received, obtaining the diagnosis code in the diagnosis code cancellation request;

[0038] Deleting the diagnostic code and the corresponding diagnostic service command from the diagnostic code recording space of the control device;

[0039] A logout result indicating successful logout is sent to the terminal device.

[0040] A third aspect of an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor;

[0041] If the computer device is a terminal device, the processor implements the steps of the method described in the first aspect of the embodiment of the present application when executing the computer program;

[0042] If the computer device is a control device, the processor implements the steps of the method described in the second aspect of the embodiment of the present application when executing the computer program.

[0043] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein when the computer program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0044] The beneficial effect of the first aspect of the embodiment of the present application is: by using diagnostic codes to transmit diagnostic service command data, the data transmission volume is reduced, the probability of bus congestion is reduced, and the communication efficiency and reliability are improved.

[0045] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1This is a schematic diagram of the implementation flow of the first main communication method for reducing the amount of data transmission provided in an embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of the implementation flow of the second main communication method for reducing the amount of data transmission provided in an embodiment of the present application;

[0049] Figure 3 This is a schematic diagram of the implementation flow of the third main communication method for reducing the amount of data transmission provided in an embodiment of the present application;

[0050] Figure 4 It is a schematic diagram of the implementation flow of a slave communication method for reducing the amount of data transmission provided in an embodiment of the present application;

[0051] Figure 5 is a schematic diagram of a main communication device provided in an embodiment of the present application;

[0052] Figure 6 is a schematic diagram of a slave communication device provided in an embodiment of the present application;

[0053] Figure 7 It is a schematic diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0055] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0056] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0057] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0058] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0059] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0060] The embodiment of the present application provides a main communication method for reducing data transmission volume, which is applied to a terminal device and used for communication with reduced data transmission volume. The method reduces the communication data transmission volume, reduces the probability of bus congestion, and improves communication efficiency and reliability by transmitting diagnostic service command data using diagnostic codes.

[0061] In the application, the terminal device can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA) and other terminal devices. The embodiments of the present application do not impose any restrictions on the specific type of the terminal device.

[0062] like Figure 1 As shown, an embodiment of the present application provides a main communication method for reducing the amount of data transmission, which is applied to a terminal device, including:

[0063] Step S11, when it is necessary to send a diagnostic service command to a target control device, send the diagnostic service command or a diagnostic code execution request corresponding to the diagnostic service command to the target control device, wherein the diagnostic code execution request includes the diagnostic code of the diagnostic service command.

[0064] In the application, before applying the main communication method for reducing the amount of data transmission provided by the embodiment of the present application, the terminal device pre-selects a diagnostic service command that meets the preset registration conditions from the diagnostic service command history usage record, and pre-registers the diagnostic code. The diagnostic service command history usage record includes information such as the diagnostic service commands used by the terminal device within a first time period, such as within a month, and the target control device to which the diagnostic service command is sent.

[0065] In the application, the preset registration condition may be that the number of bytes included is large, such as greater than 8 bytes; or that the frequency of use is high, such as being used 20 times within 10 seconds.

[0066] The implementation of pre-registration of diagnosis codes can refer to the following process:

[0067] For a diagnostic service command that meets a preset registration condition in the diagnostic service command history usage record, the terminal device sends a pre-registration request for the diagnostic service command to the target control device, wherein the pre-registration request includes the diagnostic service command and an identifier of the target control device;

[0068] After receiving a pre-registration request, the target control device registers a unique diagnostic code for the diagnostic service command therein, and writes the diagnostic code and the diagnostic service command in the pre-registration request into the diagnostic code recording space of the control device; the diagnostic code and the diagnostic service command in the registration request correspond one to one; the target control device sends the diagnostic code to the terminal device;

[0069] The terminal device receives the diagnostic code sent by the target control device, writes the identifier, diagnostic code and diagnostic service command of the target control device into the diagnostic code record space of the terminal device, and marks the registration status of the diagnostic service command in the target control device as registered; the identifier, diagnostic code and diagnostic service command of the target control device correspond one to one.

[0070] According to the above process, the diagnostic service commands that meet the preset registration conditions in the historical usage record of the diagnostic service commands are pre-registered with diagnostic codes. The diagnostic service commands are represented by diagnostic codes. In the subsequent communication process, the diagnostic codes can be used to indicate the diagnostic service commands to be executed by the target control device. The diagnostic service codes have a smaller amount of data than the diagnostic service commands, which reduces the probability of congestion on the communication link and improves communication efficiency and reliability.

[0071] Step S12, receiving the execution result fed back by the target control device based on the target diagnosis service command.

[0072] In the application, the target control device will execute the request according to the received diagnostic service command or diagnostic code, set the target diagnostic service command to be executed, execute the target diagnostic service command and generate the execution result, and then send the execution result to the terminal device.

[0073] like Figure 2 As shown, in one embodiment, before the step of sending the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device, the method further includes:

[0074] Step S10, querying the registration status of the diagnostic service command in the target control device.

[0075] In the application, when it is necessary to send a diagnostic service command to the target control device, by querying the registration status of the diagnostic service command in the target control device, it is determined whether to send the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device according to the registration. It is determined whether to transmit the diagnostic service command to the target control device through the diagnostic code according to the registration status.

[0076] The sending of the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device includes:

[0077] Step S111: if the registration status of the diagnostic service command in the target control device is not found and the diagnostic service command does not meet the preset registration condition, the diagnostic service command is sent to the target control device.

[0078] In the application, if the registration status of the diagnostic service command in the target control device is not queried, it means that the diagnostic service command has not been pre-registered; the diagnostic service command does not meet the preset registration conditions, for example, the diagnostic service command has only 3 bytes, which means that the data transmission volume of the diagnostic service command is small and will not increase the probability of communication congestion. Therefore, the diagnostic service command can be sent directly to the target control device.

[0079] Step S112: If the registration status of the diagnostic service command in the target control device is registered, a diagnostic code execution request corresponding to the diagnostic service command is sent to the target control device.

[0080] In the application, if the registration status of the diagnostic service command in the target control device is queried as registered, it means that the diagnostic service command meets the preset registration conditions. For example, the bytes of the diagnostic service command are greater than 8 bytes or the frequency of use is high, and there is a large amount of data transmission, which will increase the probability of communication link congestion. Therefore, it is necessary to reduce the data transmission volume through the diagnostic code and send the diagnostic code execution request corresponding to the diagnostic service command to the target control device.

[0081] In the application, the terminal device records the sent diagnostic service command or diagnostic code execution request, and dynamically updates the usage of the diagnostic service command or diagnostic code within the second time period, such as the usage within a week, in real time.

[0082] like Figure 3 As shown, in one embodiment, after step S10, the method further includes:

[0083] Step S101, if the registration status of the diagnostic service command in the target control device is not found and the diagnostic service command meets the preset registration condition, a registration request is sent to the target control device; the registration request includes the diagnostic service command.

[0084] In the application, if the registration status of the diagnostic service command in the target control device is not queried, it means that the diagnostic service command has not been pre-registered. The reason for not pre-registering may be that the diagnostic service command has not been used in the first time period or does not meet the preset registration conditions in the first time period; however, the diagnostic service command may meet the preset registration conditions in the second time period. For example, the bytes of the diagnostic service command are greater than 8 bytes or the frequency of use in the second time period is high, and there is a large amount of data transmission, which will increase the probability of communication link congestion, and it is necessary to reduce the amount of data transmission through the diagnostic code. Therefore, for the diagnostic service command that has not queried the registration status in the target control device but meets the preset registration conditions, it is necessary to send a registration request to the target control device to register the diagnostic code; the registration request includes the diagnostic service command.

[0085] Step S102: receiving the execution result and the diagnosis code fed back by the target control device based on the registration request.

[0086] In the application, when it is necessary to send a diagnostic service command to the target control device, a registration request is sent to the target control device. The target control device will execute the diagnostic service command in the registration request and register a diagnostic code for the diagnostic service command. It can be understood that the above method not only realizes the registration of diagnostic codes for diagnostic service commands, but also avoids the secondary transmission of the same diagnostic service command or diagnostic code, thereby improving communication efficiency and saving communication resources.

[0087] Step S103, write the identifier of the target control device, the diagnostic code and the diagnostic service command into the diagnostic code recording space of the terminal device, and mark the registration status of the diagnostic service command in the target control device as registered; the identifier of the target control device, the diagnostic code and the diagnostic service command correspond one to one.

[0088] In the application, the identifier of the target control device, the diagnostic code and the diagnostic service command are written together into the diagnostic code recording space of the terminal device, and the three correspond one to one. The registration status of the diagnostic service command in the target control device is marked as registered, so as to realize real-time updating of the registration status and diagnostic code of the diagnostic service command, ensure that the diagnostic service command with a large amount of data transmission is recorded in time, and when it is necessary to send a diagnostic service command with a large amount of data transmission, it is possible to choose to reduce the data transmission amount through the diagnostic code.

[0089] In one embodiment, the method further comprises:

[0090] Step S13, when it is necessary to continuously send multiple diagnostic service commands to the target control device, perform the following steps:

[0091] Step S131, querying the registration status of each of the diagnostic service commands in the target control device;

[0092] Step S132, if the registration status of each of the diagnostic service commands in the target control device is registered, sending a diagnostic code execution request to the target control device, and canceling sending the multiple diagnostic service commands to the target control device; the diagnostic code execution request includes the diagnostic code of each of the diagnostic service commands;

[0093] Step S133, receiving the execution result sent by the target control device.

[0094] In an application, when it is necessary to send multiple diagnostic service commands to the same target control device, if the registration status of each diagnostic service command in the target control device is already registered, a diagnostic code execution request containing the diagnostic code of each diagnostic service command can be sent to the control device. For example, the diagnostic code execution request includes the target control device identifier, the execution diagnostic code identifier, and the diagnostic code; including multiple diagnostic codes in one diagnostic code execution request reduces the number of transmissions of the target control device identifier and the diagnostic execution identifier, and reduces the amount of data transmission for sending multiple diagnostic service commands. It can be understood that the above method, by sending multiple diagnostic codes in one diagnostic code execution request, further reduces the amount of data transmission, improves communication efficiency, and saves communication resources.

[0095] In one embodiment, the method further comprises:

[0096] Step S14, if a diagnosis code cancellation instruction is detected, obtaining the diagnosis code in the diagnosis code cancellation instruction;

[0097] Step S141, sending a diagnosis code cancellation request to a control device corresponding to the diagnosis code in the diagnosis code cancellation instruction, wherein the diagnosis code cancellation request includes the diagnosis code in the diagnosis code cancellation instruction;

[0098] Step S142: If a deregistration result indicating successful deregistration is received, the diagnostic code in the diagnostic code deregistration instruction and its corresponding control device identifier and diagnostic service command are deleted from the diagnostic code record space of the terminal device.

[0099] In the application, users can send diagnostic code cancellation instructions to the terminal device as needed to cancel diagnostic codes that have not been used for a period of time, or diagnostic codes that are used less frequently than the preset cancellation frequency, to free up storage space and diagnostic codes in the ECU.

[0100] In the application, the cancellation of the diagnostic code can also be actively initiated by the control device. If the terminal device receives a cancellation prompt sent by the control device indicating a successful cancellation, the diagnostic code in the cancellation prompt and its corresponding control device identifier and diagnostic service command are deleted from the diagnostic code record space of the terminal device.

[0101] The embodiment of the present application also provides a slave communication method for reducing the amount of data transmission, which is applied to a control device to achieve communication with reduced data transmission volume. The method supports receiving a diagnostic code request and sets a target diagnostic service command according to the diagnostic code request, thereby reducing the amount of communication data transmission, reducing the probability of bus congestion, and improving communication efficiency and reliability.

[0102] In applications, the control device may be an electronic control unit (ECU) or any other computer device that can communicate with a terminal device.

[0103] like Figure 4 As shown, the embodiment of the present application also provides a slave communication method for reducing the amount of data transmission, which is applied to a control device, including:

[0104] Step S21, if a diagnostic service command is received, setting the diagnostic service command as a target diagnostic service command;

[0105] Step S22, if a diagnosis code execution request is received, setting a target diagnosis service command according to the diagnosis service command corresponding to the diagnosis code in the diagnosis code execution request;

[0106] Step S23, executing the target diagnostic service command and generating an execution result;

[0107] Step S24, sending the execution result to the terminal device.

[0108] In an application, before applying the slave communication method for reducing the amount of data transmission provided in an embodiment of the present application, after receiving a pre-registration request, the control device registers a unique diagnostic code for the diagnostic service command therein, and writes the diagnostic code and the diagnostic service command in the pre-registration request into the diagnostic code record space of the control device; the diagnostic code and the diagnostic service command in the registration request correspond one-to-one; the target control device sends the diagnostic code to the terminal device.

[0109] In the application, the control device sets the target diagnostic service command to be executed according to the received diagnostic service command or diagnostic code execution request, executes the target diagnostic service command and generates an execution result. The above method supports setting the target diagnostic service command according to the diagnostic code execution request, allows the diagnostic code to reduce the data transmission volume during the communication process, reduces communication congestion, and improves the quality and efficiency of communication.

[0110] In the application, the received diagnostic code execution request may include multiple diagnostic codes. In the case where the diagnostic code execution request includes multiple diagnostic codes, the control device sets the diagnostic service command corresponding to each diagnostic code in the diagnostic code execution request as the target diagnostic service command in the order of each diagnostic code in the diagnostic code execution request and executes the command. After the execution, multiple execution results are generated, and then each of the multiple execution results is sent to the terminal device in the order of each diagnostic code in the diagnostic code execution request.

[0111] In one embodiment, before step S23, the method further includes:

[0112] Step S221, if a registration request is received, setting the diagnostic service command in the registration request as the target diagnostic service command;

[0113] After step S24, the method further includes:

[0114] Step S25, registering a unique diagnosis code for the diagnosis service command in the registration request, and writing the diagnosis code and the diagnosis service command in the registration request into the diagnosis code recording space of the control device; the diagnosis code and the diagnosis service command in the registration request have a one-to-one correspondence;

[0115] Step S26, sending the diagnosis code to the terminal device.

[0116] In the application, unlike the pre-registration request, the registration request is sent by the terminal device when it needs to send a diagnostic service command to the target control device. Therefore, for the registration request, the control device will not only register a unique diagnostic code for the diagnostic service command in the registration request, but also set the diagnostic service command in the registration request as the target diagnostic service command, and execute the target diagnostic service command to generate an execution result. Finally, the control device sends the execution result and the diagnostic code to the terminal device.

[0117] In one embodiment, the method further comprises:

[0118] Step S27, if a diagnosis code cancellation request is received, obtaining the diagnosis code in the diagnosis code cancellation request;

[0119] Step S28, deleting the diagnosis code and its corresponding diagnosis service command from the diagnosis code recording space of the control device;

[0120] Step S29, sending a logout result indicating successful logout to the terminal device.

[0121] In the application, the control device receives a diagnostic code cancellation request, obtains the diagnostic code in the diagnostic code cancellation request, deletes the diagnostic code and its corresponding diagnostic service command from the diagnostic code recording space of the control device to release storage space and the diagnostic code in the control device.

[0122] In the application, the control device can also actively cancel the diagnostic code, and then send a cancellation prompt indicating successful cancellation to the terminal device, reminding the terminal device to synchronously cancel the diagnostic code. The cancellation prompt includes the cancelled diagnostic code.

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

[0124] The present application also provides a master communication device for executing the steps in the master communication method for reducing the data transmission volume. The master communication device can be a virtual device in the terminal device, which is run by the processor of the first terminal device, or it can be the first terminal device itself.

[0125] like Figure 5 As shown, the main communication device 5 provided in the embodiment of the present application includes:

[0126] The sending module 51 is used for sending the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device when it is necessary to send the diagnostic service command to the target control device, wherein the diagnostic code execution request includes the diagnostic code of the diagnostic service command;

[0127] The receiving module 52 is used to receive the execution result sent by the target control device.

[0128] In one embodiment, the main communication device 5 further includes:

[0129] The query module 53 is used to query the registration status of the diagnostic service command in the target control device.

[0130] In the application, the sending module 51 is used to:

[0131] If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command does not meet the preset registration condition, sending the diagnostic service command to the target control device;

[0132] If the registration status of the diagnostic service command in the target control device is registered, a diagnostic code execution request corresponding to the diagnostic service command is sent to the target control device.

[0133] In one embodiment, the sending module 51 is further used for:

[0134] If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command meets the preset registration condition, a registration request is sent to the target control device; the registration request includes the diagnostic service command;

[0135] The receiving module 52 is further used to receive the execution result and the diagnosis code fed back by the target control device based on the registration request;

[0136] The main communication device 5 also includes:

[0137] The diagnostic code recording module 54 is used to write the identifier of the target control device, the diagnostic code and the diagnostic service command into the diagnostic code recording space of the terminal device, and mark the registration status of the diagnostic service command in the target control device as registered; the identifier of the target control device, the diagnostic code and the diagnostic service command correspond one to one.

[0138] In one embodiment, the query module 53 is further used to query the registration status of each of the diagnostic service commands in the target control device;

[0139] The sending module 51 is also used for: if the registration status of each of the diagnostic service commands in the target control device is registered, sending a diagnostic code execution request to the target control device and canceling sending the multiple diagnostic service commands to the target control device; the diagnostic code execution request includes the diagnostic code of each of the diagnostic service commands.

[0140] In one embodiment, the main communication device 5 further includes:

[0141] The deregistration module 55 is used to:

[0142] If a diagnosis code cancellation instruction is detected, obtaining the diagnosis code in the diagnosis code cancellation instruction;

[0143] Sending a diagnosis code cancellation request to a control device corresponding to the diagnosis code in the diagnosis code cancellation instruction, wherein the diagnosis code cancellation request includes the diagnosis code in the diagnosis code cancellation instruction;

[0144] If a deregistration result indicating successful deregistration is received, the diagnostic code in the diagnostic code deregistration instruction and its corresponding control device identifier and diagnostic service command are deleted from the diagnostic code record space of the terminal device.

[0145] In application, each module in the main communication device may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.

[0146] The embodiment of the present application also provides a slave communication device for executing the steps in the slave communication method embodiment for reducing the data transmission volume. The slave communication device can be a virtual device in the control device, which is run by the processor of the control device, or it can be the control device itself.

[0147] like Figure 6 As shown, the slave communication device 6 provided in the embodiment of the present application includes:

[0148] The target diagnosis service command setting module 61 is used to:

[0149] If a diagnostic service command is received, setting the diagnostic service command as a target diagnostic service command;

[0150] If a diagnosis code execution request is received, setting a target diagnosis service command according to the diagnosis service command corresponding to the diagnosis code in the diagnosis code execution request;

[0151] An execution module 62, used for executing the target diagnosis service command and generating an execution result;

[0152] The sending module 63 is used to send the execution result to the terminal device.

[0153] In one embodiment, the target diagnostic service command setting module 61 is further used to: if a registration request is received, set the diagnostic service command in the registration request as the target diagnostic service command;

[0154] The slave communication device 6 further includes:

[0155] A registration module 64 registers a unique diagnosis code for the diagnosis service command in the registration request, and writes the diagnosis code and the diagnosis service command in the registration request into the diagnosis code recording space of the control device; the diagnosis code and the diagnosis service command in the registration request have a one-to-one correspondence;

[0156] The sending module 63 is further used to send the diagnosis code to the terminal device.

[0157] In one embodiment, the slave communication device 6 further includes:

[0158] The deregistration module 65 is used to:

[0159] If a diagnosis code cancellation request is received, obtaining the diagnosis code in the diagnosis code cancellation request;

[0160] Deleting the diagnostic code and the corresponding diagnostic service command from the diagnostic code recording space of the control device;

[0161] A logout result indicating successful logout is sent to the terminal device.

[0162] In application, each module in the data verification device may be a software program module, or may be implemented by different logic circuits integrated in a processor, or may be implemented by multiple distributed processors.

[0163] Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 7 As shown, the computer device 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one is shown in the figure) a processor, a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, and when the processor 70 executes the computer program 72, the steps in any of the above-mentioned master-slave communication method embodiments for reducing the amount of data transmission are implemented.

[0164] The computer device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7It is only an example of the computer device 7 and does not constitute a limitation on the computer device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0165] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0166] In some embodiments, the memory 71 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the computer device 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0167] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0168] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0169] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0170] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, a mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0171] 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 computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0172] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

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

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

[0175] The units described as separate components may or may not be physically separated, and the components shown 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 solution of this embodiment.

[0176] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A main communication method for reducing data transmission volume, characterized in that: Applied to terminal equipment, including: In the case where a diagnostic service command needs to be sent to a target control device, sending the diagnostic service command or a diagnostic code execution request corresponding to the diagnostic service command to the target control device, wherein the diagnostic code execution request includes the diagnostic code of the diagnostic service command; Receive the execution result sent by the target control device.

2. The method according to claim 1, characterized in that Before the step of sending the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device, the method further includes: Querying the registration status of the diagnostic service command in the target control device; The sending of the diagnostic service command or the diagnostic code execution request corresponding to the diagnostic service command to the target control device includes: If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command does not meet the preset registration condition, sending the diagnostic service command to the target control device; If the registration status of the diagnostic service command in the target control device is registered, a diagnostic code execution request corresponding to the diagnostic service command is sent to the target control device.

3. The method according to claim 2, characterized in that After querying the registration status of the diagnostic service command in the target control device, the method further includes: If the registration status of the diagnostic service command in the target control device is not found, and the diagnostic service command meets the preset registration condition, a registration request is sent to the target control device; the registration request includes the diagnostic service command; Receiving the execution result and the diagnosis code fed back by the target control device based on the registration request; The identifier of the target control device, the diagnostic code and the diagnostic service command are written together into the diagnostic code recording space of the terminal device, and the registration status of the diagnostic service command in the target control device is marked as registered; the identifier of the target control device, the diagnostic code and the diagnostic service command correspond one to one.

4. The method according to claim 1, characterized in that The method further comprises: When multiple diagnostic service commands need to be sent to the target control device in succession, perform the following steps: Querying the registration status of each of the diagnostic service commands in the target control device; If the registration status of each of the diagnostic service commands in the target control device is registered, a diagnostic code execution request is sent to the target control device, and sending the multiple diagnostic service commands to the target control device is canceled; the diagnostic code execution request includes a diagnostic code of each of the diagnostic service commands; Receive the execution result sent by the target control device.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: If a diagnosis code cancellation instruction is detected, obtaining the diagnosis code in the diagnosis code cancellation instruction; Sending a diagnosis code cancellation request to a control device corresponding to the diagnosis code in the diagnosis code cancellation instruction, wherein the diagnosis code cancellation request includes the diagnosis code in the diagnosis code cancellation instruction; If a deregistration result indicating successful deregistration is received, the diagnostic code in the diagnostic code deregistration instruction and its corresponding control device identifier and diagnostic service command are deleted from the diagnostic code record space of the terminal device.

6. A slave communication method for reducing data transmission volume, characterized in that: Applied to control devices, including: If a diagnostic service command is received, setting the diagnostic service command as a target diagnostic service command; If a diagnosis code execution request is received, setting a target diagnosis service command according to the diagnosis service command corresponding to the diagnosis code in the diagnosis code execution request; Executing the target diagnostic service command and generating an execution result; The execution result is sent to the terminal device.

7. The method according to claim 6, characterized in that Before executing the target diagnostic service command and generating the execution result, the method further includes: If a registration request is received, setting the diagnostic service command in the registration request as the target diagnostic service command; After sending the execution result to the terminal device, the method further includes: Registering a unique diagnostic code for the diagnostic service command in the registration request, and writing the diagnostic code and the diagnostic service command in the registration request together into the diagnostic code recording space of the control device; the diagnostic code and the diagnostic service command in the registration request have a one-to-one correspondence; The diagnosis code is sent to the terminal device.

8. The method according to any one of claims 6 to 7, characterized in that: The method further comprises: If a diagnosis code cancellation request is received, obtaining the diagnosis code in the diagnosis code cancellation request; Deleting the diagnostic code and the corresponding diagnostic service command from the diagnostic code recording space of the control device; A logout result indicating successful logout is sent to the terminal device.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: If the computer device is a terminal device, the processor implements the steps of the method according to any one of claims 1 to 5 when executing the computer program; If the computer device is a control device, the processor implements the steps of the method according to any one of claims 6 to 8 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.