Data processing method and device for vehicles

By determining the processing strategy based on the data transmission status indication information and word count at the data receiving end, the fault data and test data of the vehicle are processed, which solves the processing problem at the data receiving end and achieves improvements in integrity and efficiency.

CN119030668BActive Publication Date: 2025-09-26SHENZHEN QINGWEI AVIATION TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411269733.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-09-26
Estimated Expiration
2044-09-11

AI Technical Summary

Technical Problem

In the prior art, how a data receiving end effectively processes fault data and test data transmitted from a vehicle has not been effectively solved.

Method used

By receiving the data to be processed sent by the carrier, the processing strategy for each word is determined based on the data transmission status indication information and the number of words of the data to be processed, and the data block to be processed is processed accordingly, including recording, storage, parsing or discarding operations.

Benefits of technology

The data receiving end can complete the processing of the data to be processed, ensure the integrity of the data processing, and improve the data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119030668B_ABST
    Figure CN119030668B_ABST
Patent Text Reader

Abstract

The present invention provides a data processing method and device for a vehicle, relating to the field of data processing technology. The method comprises: receiving data to be processed sent by a vehicle, wherein the data to be processed includes at least one word, and each word includes a data block to be processed; for each word in the data to be processed, determining a processing strategy corresponding to the data block to be processed in the word based on the number of words in the data to be processed and at least one of data transmission status indication information carried by the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the data transmission process to be processed; the number of words represents the total number of words in the data to be processed; and processing each data block to be processed based on the processing strategy corresponding to the data block to be processed in each word. Through the above method, different processing strategies are used to process different data blocks to be processed, thereby ensuring the integrity of data processing and improving data processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method and device for a vehicle. Background Art

[0002] During operation or testing, vehicles such as airplanes, cars, and trains need to send key information such as fault data and test data to a data receiver, such as a diagnostic recording device, which will diagnose and record the vehicle's fault data or test data.

[0003] In the related art, there is a data transmission protocol that supports user customization and is highly flexible, and the protocol can be applied to data transmission between a vehicle and a data receiving end.

[0004] However, how the data receiving end processes the received data is a problem that needs to be solved urgently. Summary of the Invention

[0005] In response to the problems existing in the prior art, an embodiment of the present invention provides a data processing method and device for a vehicle.

[0006] The present invention provides a data processing method for a vehicle, which is applied to a data receiving terminal in communication with the vehicle, and the method comprises:

[0007] receiving data to be processed sent by the vehicle, wherein the data to be processed includes at least one word, and each word includes a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle;

[0008] For each word in the data to be processed, determining a processing strategy corresponding to the data block to be processed in the word based on at least one of the number of words in the data to be processed and data transmission status indication information carried by the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the process of data transmission to be processed; and the number of words is used to represent the total number of words in the data to be processed;

[0009] Based on the processing strategy corresponding to the data block to be processed in each word, each data block to be processed is processed.

[0010] Optionally, determining a processing strategy corresponding to the to-be-processed data block in the word includes:

[0011] Determining whether the data transmission status indication information is a first value; the first value indicates that the data transmission status corresponding to the word is starting transmission;

[0012] When the data transmission status indication information is the first value, determining that the processing strategy is the first strategy;

[0013] The first strategy instructs the data receiving end to perform the following operations: resetting data, recording and storing the data blocks to be processed in the words, determining the number of words of the data to be processed, and subtracting 1 from the number of words.

[0014] Optionally, determining a processing strategy corresponding to the data block to be processed in the word further includes:

[0015] If the data transmission status indication information is not the first value, determining whether the data transmission status indication information is a second value and whether the word number is 1 at the current moment; the second value indicates that the data transmission status corresponding to the word is end of transmission;

[0016] When the data transmission status indication information is the second value and the word count at the current moment is 1, determining that the processing strategy is the second strategy;

[0017] The second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed.

[0018] Optionally, determining a processing strategy corresponding to the data block to be processed in the word further includes:

[0019] If the data transmission status indication information is not the second value and / or the number of words at the current moment is not 1, determining whether the data transmission status indication information is a third value and whether the number of words at the current moment is greater than 1; the third value indicates that the data transmission status corresponding to the word is transmitting;

[0020] When the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, determining that the processing strategy is the third strategy;

[0021] The third strategy instructs the data receiving end to perform the following operations: subtract 1 from the number of words at the current moment, and record and store the to-be-processed data block in the word at the current moment.

[0022] Optionally, determining a processing strategy corresponding to the data block to be processed in the word further includes:

[0023] When the data transmission status indication information is not the third value and / or the number of words at the current moment is less than or equal to 1, determining whether the data transmission status indication information is the second value and whether the number of words at the current moment is less than 1;

[0024] When the data transmission status indication information is the second value and the word count at the current moment is less than 1, determining that the processing strategy is the fourth strategy;

[0025] The fourth strategy instructs the data receiving end to perform the following operations: resetting data and resetting word count.

[0026] Optionally, before determining whether the data transmission status indication information is the first value, the method further includes:

[0027] Determining whether the data transmission status indication information is a fourth value, wherein the fourth value indicates that the data block to be processed is a control bit data block, and the control bit data block supports user customization and use;

[0028] When the data transmission status indication information is the fourth value, the to-be-processed data block is discarded.

[0029] Optionally, the method further includes:

[0030] For the data to be processed, all the data blocks to be processed that have been stored at the data receiving end are parsed.

[0031] Optionally, each word further includes a tag number, where the tag number is used to indicate the data type of the to-be-processed data block corresponding to the word;

[0032] After receiving the data to be processed, the method further includes:

[0033] When the tag number corresponding to the current data block to be processed is different from the tag number corresponding to the previous data block to be processed, determining to trigger a target event; the target event indicates that the data to be processed has changed;

[0034] The target event is recorded.

[0035] The present invention further provides a data processing device for a vehicle, which is applied to a data receiving end in communication with the vehicle, and the device comprises:

[0036] a receiving module, configured to receive data to be processed sent by the vehicle, wherein the data to be processed includes at least one word, each word including a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle;

[0037] A first determining module is configured to determine, for each word in the data to be processed, a processing strategy corresponding to the data block to be processed in the word based on at least one of the number of words in the data to be processed and the data transmission status indication information carried in the word;

[0038] a processing module, configured to process each of the data blocks to be processed based on the processing strategy corresponding to the data block to be processed in each word;

[0039] The data transmission status indication information represents the data transmission status corresponding to the word during the data transmission to be processed; and the number of words is used to represent the total number of words in the data to be processed.

[0040] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the data processing method for a vehicle as described above is implemented.

[0041] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described data processing methods for a vehicle.

[0042] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-described data processing methods for a vehicle.

[0043] The data processing method and device for a vehicle provided by the present invention receive data to be processed, and for each word in the data to be processed, determine a processing strategy corresponding to a data block to be processed in the word based on at least one of data transmission status indication information carried in the word and the number of words in the data to be processed; then, based on the processing strategy corresponding to the data block to be processed in each word, each data block to be processed is processed; through the above method, a data processing strategy is provided for a data receiving end, so that the data receiving end can completely process the data to be processed, thereby ensuring the integrity of the data processing; and, while not omitting data processing, different processing strategies are used to process different data blocks to be processed, thereby improving data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 This is one of the flow charts of the data processing method for a vehicle provided by the present invention;

[0046] Figure 2This is the second flow chart of the data processing method for a vehicle provided by the present invention;

[0047] Figure 3 It is a logical diagram of the data processing method for a vehicle provided by the present invention;

[0048] Figure 4 It is a structural diagram of a data processing device for a vehicle provided by the present invention;

[0049] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0050] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0051] In order to facilitate a clearer understanding of the various embodiments of the present application, some relevant knowledge is first introduced as follows.

[0052] During operation or testing, vehicles such as airplanes, cars, and trains need to send critical information such as fault data and test data to a data receiver, such as a diagnostic recording device. This device will diagnose and record the vehicle's fault data or test data. In related technologies, there is a user-defined and highly flexible data transmission protocol called the Customizable Data Block Protocol (CDBP), which can be applied to data transmission between vehicles and data receivers. In actual applications, CDBP, as a customizable data block protocol, is used to transmit data such as fault reports, fault detection, alarm information, and system test information between vehicles and data receivers.

[0053] In actual applications, the data sending end is the control device of the vehicle, such as an embedded system; the data receiving end is the maintenance equipment, and the equipment maintenance software in the maintenance equipment (such as the information management system, maintenance system, monitoring or alarm system diagnosis and recording application, etc.) can check and identify the data sent by the control device.

[0054] In an embodiment of the present invention, the data block structure under the CDBP protocol can be represented by the following Table 1.

[0055] Table 1

[0056]

[0057] In Table 1, the label number indicates the data type. For example, label number 381 indicates that the transmitted data is fault information, and label number 123 indicates that the transmitted data is alarm information. Label numbers can be customized. Data with the same label number form a data transmission list of the same data type. Specific bits of each label are filled in with the data block to be transmitted.

[0058] The Sign Status Matrix (SSM) is a data transmission status indication information. The SSM is used to identify the transmission status of a data block, such as start or stop.

[0059] For example, SSM = 01 indicates the start of data transmission, SSM = 00 indicates data transmission in progress, and SSM = 10 indicates the end of data transmission. SSM = 11 is defined as a user-defined control bit. It should be noted that the "total number of transmitted words" is defined starting from bit 9 in the first label number. The "total number of transmitted words" refers to the total number of data blocks to be transmitted.

[0060] The use of SSM as data transmission status indication information is merely an example. Of course, other methods may be used as data transmission status indication information to determine the data transmission status. For example, the data transmission status indication information may be a preset character segment: "CDBPBlockStart" indicates the start of data transmission, and "CDBPBlockEnd" indicates the end of data transmission.

[0061] To summarize, after the data sender sends data to the data receiver through the CDBP transmission protocol, how the data receiver processes the received data (for example, whether to record, discard, or parse the received data) is a problem that needs to be solved urgently.

[0062] The following combination Figures 1 to 3 The data processing method for a vehicle provided by the present invention is described in detail. Figure 1 This is one of the flow charts of the data processing method for a vehicle provided by the present invention, see Figure 1 As shown, the method is applied to a data receiving terminal in communication with a vehicle, and includes steps 101 to 103, wherein:

[0063] Step 101: Receive data to be processed sent by a vehicle, wherein the data to be processed includes at least one word, and each word includes a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle.

[0064] In an embodiment of the present invention, after a data receiver (e.g., a diagnostic recording device) receives data to be processed from a data transmitter (e.g., a vehicle control device), it is necessary to determine the total number of words to be processed in the received data. The number of words to be processed is defined at bits 9-20 of the first word in the data to be processed.

[0065] In practical applications, a word includes a data block to be processed, which may be vehicle fault information, test information, etc. The data receiving end needs to process this information, such as recording, storing, and parsing.

[0066] Step 102: For each word in the data to be processed, determine a processing strategy corresponding to the data block to be processed in the word based on the number of words in the data to be processed and at least one item of data transmission status indication information carried in the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the process of data transmission to be processed; and the number of words is used to represent the total number of words in the data to be processed.

[0067] In an embodiment of the present invention, the data transmission status indication information is an SSM. Each word carries an SSM to indicate the data transmission status of the word during the data transmission process. Different SSM values ​​correspond to different data transmission statuses of the corresponding words.

[0068] For example, SSM=01 indicates that during the process of transmitting the data to be processed, the data transmission status of the word is "starting transmission"; SSM=00 indicates that valid data block information is being transmitted, which can also be understood as the data transmission status of the word is "transmitting"; SSM=10 indicates that the data transmission status of the word is "ending transmission".

[0069] Optionally, the word number of the data to be processed is obtained from the first word of the data to be processed.

[0070] For each word in the data to be processed, a processing strategy for the word may be determined based on the SSM value of the word and the total number of words in the data to be processed.

[0071] Step 103: Process each of the data blocks to be processed based on the processing strategy corresponding to the data block to be processed in each word.

[0072] In the embodiment of the present invention, for different words, the data receiving end uses different processing strategies to process the data block to be processed corresponding to the word, for example, recording, storing, parsing or discarding the data block to be processed.

[0073] The data transmission method for a vehicle provided by the present invention receives data to be processed and, for each word in the data to be processed, determines a processing strategy corresponding to a data block to be processed in the word based on at least one of data transmission status indication information carried in the word and the number of words in the data to be processed; then, based on the processing strategy corresponding to the data block to be processed in each word, each data block to be processed is processed; through the above method, a data processing strategy is provided for a data receiving end, so that the data receiving end can completely process the data to be processed, thereby ensuring the integrity of the data processing; and, while not omitting data processing, different processing strategies are used to process different data blocks to be processed, thereby improving data processing efficiency.

[0074] Optionally, each word further includes a tag number, where the tag number is used to indicate the data type of the to-be-processed data block corresponding to the word;

[0075] After receiving the data to be processed, the data receiving end also needs to perform the following steps:

[0076] Step 1), when the tag number corresponding to the current data block to be processed is different from the tag number corresponding to the previous data block to be processed, determining to trigger a target event; the target event indicates that the data to be processed has changed;

[0077] Step 2) Record the target event.

[0078] In this embodiment of the present invention, the data blocks to be processed corresponding to each word in the data to be processed are all of the same type and have the same corresponding label number. For example, label = 421 indicates that the data blocks to be processed corresponding to each word in the data to be processed are of the "fault information type," and label = 422 indicates that the data blocks to be processed corresponding to each word in the data to be processed are of the "test information type."

[0079] After receiving the data to be processed, if the label number of the data block to be processed is different from the label number of the last processed data block, it means that the data to be processed has changed, and the event is recorded.

[0080] For example, if the label number of the current data block to be processed is 421 and the label number of the previous data block is 422, it means that the data to be processed changes from test information type data to fault information type data.

[0081] Optionally, determining a processing strategy corresponding to the data block to be processed in the word based on at least one of the data transmission status indication information carried in the word and the number of words of the data to be processed can be specifically implemented in the following manner:

[0082] Step 1), determine whether the data transmission status indication information is a first value; the first value indicates that the data transmission status corresponding to the word is starting transmission;

[0083] Step 2), when the data transmission status indication information is the first value, determining the processing strategy to be the first strategy;

[0084] The first strategy instructs the data receiving end to perform the following operations: resetting data, recording and storing the data blocks to be processed in the words, determining the number of words of the data to be processed, and subtracting 1 from the number of words.

[0085] In the embodiment of the present invention, for each word in the data to be processed, the data receiving end needs to determine whether the data transmission status indication information corresponding to the word is the first value, that is, determine whether the value of the word SSM is equal to 01.

[0086] If SSM=01, it indicates that the transmission and analysis of valid data starts at SSM=01, that is, the data transmission status of this word is "start transmission" during the data transmission process. The data structure of this word is shown in Table 2:

[0087] Table 2 Data structure of the start transmission word

[0088]

[0089] When SSM=01, the processing strategy is determined to be the first strategy. At this time, the data receiving end performs the following operations on the valid data block at the 21-29 bit position (that is, the data block to be processed mentioned above):

[0090] 1) Start resetting data;

[0091] 2) Record and store the valid data block at bit 21-29;

[0092] 3) Reduce the total number of transmitted words at bit positions 9-20 by 1.

[0093] Specifically, when SSM = 01, the data receiver begins resetting the data and records and stores the data block corresponding to the word to be processed. Since the data receiver has already processed the word, it needs to subtract 1 from the total number of transmitted words. For example, if the total number of transmitted words is 10, 10-1 = 9, indicating that there are still 9 words in the data to be processed.

[0094] Optionally, before determining whether the data transmission status indication information is the first value, the data receiving end further needs to execute the following judgment logic:

[0095] Step 1) determining whether the data transmission status indication information is a fourth value, wherein the fourth value indicates that the data block to be processed is a control bit data block, and the control bit data block supports user customization and use;

[0096] Step 2): When the data transmission status indication information is the fourth value, discard the data block to be processed.

[0097] In this embodiment of the present invention, for each word in the data to be processed, it is determined whether the data transmission status indication information is the fourth value, that is, whether SSM is equal to 11. SSM=11 is the control bit information defined and used by the user. The data structure of this word is shown in Table 3:

[0098] Table 3 Data structure of control bit information word

[0099]

[0100] Typically, the valid data block that the user actually needs (i.e., the pending data block mentioned above) is not stored in the control bit data block. Therefore, when SSM=11, the data receiving end can discard the data block.

[0101] Optionally, when the data transmission status indication information is not the first value, the data receiving end needs to execute the following judgment logic, including:

[0102] Step 1) determining whether the data transmission status indication information is a second value and whether the number of words at the current moment is 1; the second value indicates that the data transmission status corresponding to the word is the end of transmission;

[0103] Step 2), when the data transmission status indication information is the second value and the word count at the current moment is 1, determining that the processing strategy is the second strategy;

[0104] The second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed.

[0105] In an embodiment of the present invention, for each word in the data to be processed, if the SSM corresponding to the word is not 01, it is determined whether the SSM is equal to the second value (that is, whether the SSM is equal to 10), and whether the number of unprocessed words recorded when the data receiving end processes the word at the current moment is equal to 1.

[0106] If SSM = 10, it indicates that the transmission and parsing of valid data has ended at "SSM = 10". Since the data transmission status of this word is "transmission completed" during the data transmission process, this word is the last unprocessed word in the entire data processing list. Therefore, the data receiving end needs to confirm that the number of unprocessed words recorded is 1 (recorded as the total number of words WordCount = 1). The data structure of this word is shown in Table 4:

[0107] Table 4 Data structure of the end transmission word

[0108]

[0109] When SSM=10 and WordCount=1, the processing strategy is determined to be the second strategy. At this time, the data receiving end performs the following operations on the valid data block at positions 21-29 (i.e., the data block to be processed mentioned above):

[0110] 1) Recording and storing the data blocks to be processed;

[0111] 2) Parse the currently stored data blocks to be processed.

[0112] Specifically, in the above case, the data receiving end triggers the DATA_EVENT event, that is, the data receiving end can record and store the data block to be processed of the word while parsing it.

[0113] Optionally, when the SSM≠10, and / or the WordCount≠1 at the current moment, the data receiving end further needs to execute the following judgment logic, including:

[0114] Step 1) determining whether the data transmission status indication information is a third value and whether the number of words at the current moment is greater than 1; the third value indicates that the data transmission status corresponding to the word is transmitting;

[0115] Step 2), when the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, determining that the processing strategy is the third strategy;

[0116] The third strategy instructs the data receiving end to perform the following operations: subtract 1 from the number of words at the current moment, and record and store the to-be-processed data block in the word at the current moment.

[0117] In an embodiment of the present invention, for each word in the data to be processed, if the SSM corresponding to the word is ≠10, ​​and / or WordCount is ≠1 ​​at the current moment, it is determined whether the SSM is equal to a third value (i.e., whether the SSM is equal to 00), and whether the number of unprocessed words recorded by the data receiving end when processing the word at the current moment is greater than 1 (i.e., whether WordCount is greater than 1).

[0118] If SSM=00, it indicates that during the data transmission process, the valid data block corresponding to the word is being transmitted. The data structure of this word is shown in Table 5:

[0119] Table 5 Data structure of the word being transmitted

[0120]

[0121] When SSM=00 and WordCount>1, the processing strategy is determined to be strategy 3. At this time, the data receiving end performs the following operations on the valid data block at bit positions 21-29 (i.e., the data block to be processed mentioned above):

[0122] 1) Recording and storing the data block to be processed in the word at the current moment;

[0123] 2) Subtract 1 from the number of words recorded at the data receiving end at the current moment.

[0124] Optionally, when the SSM≠10, and / or WordCount≤1 at the current moment, the data receiving end further needs to execute the following judgment logic, including:

[0125] Step 1) determining whether the data transmission status indication information is the second value and whether the word count is less than 1 at the current moment;

[0126] Step 2), when the data transmission status indication information is the second value and the number of words at the current moment is less than 1, determining that the processing strategy is the fourth strategy;

[0127] The fourth strategy instructs the data receiving end to perform the following operations: resetting data and resetting word count.

[0128] In an embodiment of the present invention, for each word in the data to be processed, if the SSM corresponding to the word is ≠00, and / or WordCount is ≤1 at the current moment, it is determined whether the SSM is equal to 10, and whether the number of unprocessed words recorded by the data receiving end when processing the word at the current moment is less than 1 (that is, whether WordCount is less than 1).

[0129] If SSM=10 and WordCount≤1, the data receiving end performs the following operations:

[0130] 1) Reset data;

[0131] 2) Reset the word count of the record.

[0132] Optionally, after processing the to-be-processed data block based on the fourth strategy, the data receiving end further needs to perform the following steps:

[0133] Receive new data to be processed and process the new data to be processed.

[0134] In the embodiment of the present invention, if SSM=10 and WordCount≤1, it indicates that a data transmission error may have occurred. In this case, the data receiving end stops processing the data to be processed and re-receives new data to be processed.

[0135] Optionally, when the data receiving end has processed all words in the data to be processed, the following operations are performed:

[0136] For the data to be processed, all the data blocks to be processed that have been stored at the data receiving end are parsed.

[0137] In the embodiment of the present invention, the data receiving end stores the to-be-processed data blocks corresponding to some words based on different processing strategies. When the data receiving end has processed all words in the to-be-processed data, it is necessary to parse all the stored data uniformly.

[0138] Figure 2 This is the second flow chart of the data processing method for a vehicle provided by the present invention, see Figure 2 As shown, the method is applied to a data receiving end in communication with a vehicle, and includes steps 201 to 216, wherein:

[0139] Step 201: Receive data to be processed sent by a vehicle, where the data to be processed includes multiple words, and each word includes a data block to be processed; wherein the data block to be processed includes fault data and / or test data of the vehicle.

[0140] If the tag number corresponding to the current data block to be processed is different from the tag number corresponding to the previous data block to be processed, execute steps 202 - 203 ; otherwise, execute step 204 .

[0141] Step 202: Determine a trigger target event; wherein the target event indicates that the data to be processed has changed.

[0142] Step 203: Record the target event.

[0143] Step 204: for each word in the data to be processed, determine whether the data transmission status indication information carried in the word is a fourth value, wherein the fourth value indicates that the data block to be processed is a control bit data block, and the control bit data block supports user customization and use.

[0144] If the data transmission status indication information is the fourth value, execute step 205; otherwise, execute step 206.

[0145] Step 205: discard the data block to be processed.

[0146] Step 206: Determine whether the data transmission status indication information is a first value; wherein the first value indicates that the data transmission status corresponding to the character is start transmission.

[0147] If the data transmission status indication information is the first value, execute step 207; otherwise, execute step 208.

[0148] Step 207: Determine that the processing strategy is the first strategy; wherein the first strategy instructs the data receiving end to perform the following operations: reset the data, record and store the data blocks to be processed in the words, determine the number of words in the data to be processed, and subtract 1 from the number of words, where the number of words is used to represent the total number of words in the data to be processed.

[0149] Step 208: Determine whether the data transmission status indication information is a second value and whether the word number at the current moment is 1; wherein the second value indicates that the data transmission status corresponding to the word is end of transmission.

[0150] If the data transmission status indication information is the second value and the word number at the current moment is 1, execute step 209; otherwise, execute step 210.

[0151] Step 209: Determine that the processing strategy is the second strategy; wherein the second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed.

[0152] Step 210: Determine whether the data transmission status indication information is a third value and whether the word number at the current moment is greater than 1; wherein the third value indicates that the data transmission status corresponding to the word is transmitting.

[0153] If the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, execute step 211; otherwise, execute steps 212 to 214.

[0154] Step 211: Determine that the processing strategy is the third strategy; wherein the third strategy instructs the data receiving end to perform the following operations: subtract 1 from the number of words at the current moment, and record and store the data block to be processed in the word at the current moment.

[0155] Step 212: Determine whether the data transmission status indication information is the second value, and whether the word count at the current moment is less than 1.

[0156] Step 213: When the data transmission status indication information is the second value and the word count at the current moment is less than 1, determine that the processing strategy is the fourth strategy; wherein the fourth strategy instructs the data receiving end to perform the following operations: reset data and reset word count.

[0157] Step 214: Receive new data to be processed and process the new data to be processed.

[0158] Step 215: Process each data block to be processed based on the processing strategy corresponding to the data block to be processed in each word.

[0159] It should be noted that, each time the data receiving end determines a processing strategy for a word, it processes the word based on the processing strategy.

[0160] Step 216: For the data to be processed, parse all the data blocks to be processed that have been stored at the data receiving end.

[0161] Figure 3 This is a logical diagram of the data processing method for a vehicle provided by the present invention, see Figure 3 As shown, this method is applied to a data receiving end in communication with a vehicle. The data receiving end first receives the data to be processed sent by the vehicle. The data to be processed includes multiple words. For each word, the data receiving end needs to execute the following judgment logic:

[0162] First determine if SSM=11 in the word?

[0163] If so, discard the data block to be processed in the word; if not, determine whether SSM in the word is 01?

[0164] If yes, reset the data, record the word count -1 and the data; if no, check if the SSM in the word is 10? and the total number of words (WordCount) is 1?

[0165] If yes, trigger the data event (DATA_EVENT); if no, check if SSM in the word is 00? and WordCount>1?

[0166] If yes, decrement the word count and record and store the data; if no, determine if SSM=10? and WordCount<1? in the word.

[0167] If so, reset the data and word counts; then trigger the return instruction to load new data to be processed; if not, trigger the DATA_EVENT event to parse the data block to be processed in the word.

[0168] The data processing device for a vehicle provided by the present invention is described below. The data processing device for a vehicle described below and the data processing method for a vehicle described above can be referenced to each other. Figure 4 This is a schematic diagram of the structure of the data processing device for a vehicle provided by the present invention, such as Figure 4 As shown, the data processing device 400 for a vehicle is applied to a data receiving end connected to the vehicle for communication, and includes: a receiving module 401, a first determining module 402, and a processing module 403, wherein:

[0169] The receiving module 401 is configured to receive data to be processed sent by the vehicle, wherein the data to be processed includes at least one word, and each word includes a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle;

[0170] A first determining module 402 is configured to determine, for each word in the data to be processed, a processing strategy corresponding to the data block to be processed in the word based on at least one of the number of words in the data to be processed and data transmission status indication information carried by the word; wherein the data transmission status indication information indicates the data transmission status corresponding to the word during the data transmission process to be processed; and the number of words indicates the total number of words in the data to be processed;

[0171] The processing module 403 is configured to process each of the data blocks to be processed based on the processing strategy corresponding to the data block to be processed in each word.

[0172] The data processing device for a vehicle provided by the present invention receives data to be processed and, for each word in the data to be processed, determines a processing strategy corresponding to a data block to be processed in the word based on at least one of data transmission status indication information carried in the word and the number of words in the data to be processed; then, based on the processing strategy corresponding to the data block to be processed in each word, each data block to be processed is processed; through the above method, a data processing strategy is provided for a data receiving end, so that the data receiving end can completely process the data to be processed, thereby ensuring the integrity of the data processing; and, while not omitting data processing, different processing strategies are used to process different data blocks to be processed, thereby improving data processing efficiency.

[0173] Optionally, the first determining module 402 is further configured to:

[0174] Determining whether the data transmission status indication information is a first value; the first value indicates that the data transmission status corresponding to the word is starting transmission;

[0175] When the data transmission status indication information is the first value, determining that the processing strategy is the first strategy;

[0176] The first strategy instructs the data receiving end to perform the following operations: resetting data, recording and storing the data blocks to be processed in the words, determining the number of words of the data to be processed, and subtracting 1 from the number of words.

[0177] Optionally, the first determining module 402 is further configured to:

[0178] If the data transmission status indication information is not the first value, determining whether the data transmission status indication information is a second value and whether the word number is 1 at the current moment; the second value indicates that the data transmission status corresponding to the word is end of transmission;

[0179] When the data transmission status indication information is the second value and the word count at the current moment is 1, determining that the processing strategy is the second strategy;

[0180] The second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed.

[0181] Optionally, the first determining module 402 is further configured to:

[0182] If the data transmission status indication information is not the second value and / or the number of words at the current moment is not 1, determining whether the data transmission status indication information is a third value and whether the number of words at the current moment is greater than 1; the third value indicates that the data transmission status corresponding to the word is transmitting;

[0183] When the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, determining that the processing strategy is the third strategy;

[0184] The third strategy instructs the data receiving end to perform the following operations: subtract 1 from the number of words at the current moment, and record and store the to-be-processed data block in the word at the current moment.

[0185] Optionally, the first determining module 402 is further configured to:

[0186] When the data transmission status indication information is not the third value and / or the number of words at the current moment is less than or equal to 1, determining whether the data transmission status indication information is the second value and whether the number of words at the current moment is less than 1;

[0187] When the data transmission status indication information is the second value and the word count at the current moment is less than 1, determining that the processing strategy is the fourth strategy;

[0188] The fourth strategy instructs the data receiving end to perform the following operations: resetting data and resetting word count.

[0189] Optionally, the device further comprises:

[0190] a judging module, configured to judge whether the data transmission status indication information is a fourth value, wherein the fourth value indicates that the data block to be processed is a control bit data block, and the control bit data block supports user customization and use;

[0191] A discarding module is configured to discard the to-be-processed data block when the data transmission status indication information is the fourth value.

[0192] Optionally, the device further comprises:

[0193] The parsing module is used to parse all the to-be-processed data blocks stored at the data receiving end for the to-be-processed data.

[0194] Optionally, each word further includes a tag number, where the tag number is used to indicate the data type of the to-be-processed data block corresponding to the word;

[0195] The device further comprises:

[0196] A second determining module is configured to determine a triggering target event when the tag number corresponding to the current data block to be processed is different from the tag number corresponding to the previous data block to be processed; the target event indicates that the data to be processed has changed;

[0197] The recording module is used to record the target event.

[0198] Figure 5 An example of a physical structure diagram of an electronic device is shown below. Figure 5As shown, the electronic device may include: a processor (processor) 510, a communication interface (Communications Interface) 520, a memory (memory) 530 and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call the logic instructions in the memory 530 to execute a data processing method for a vehicle, the method including: receiving data to be processed sent by the vehicle, the data to be processed including at least one word, and each word including a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle; for each word in the data to be processed, based on the number of words of the data to be processed and at least one of the data transmission status indication information carried in the word, determining the processing strategy corresponding to the data block to be processed in the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the data transmission to be processed; the number of words is used to represent the total number of words in the data to be processed; based on the processing strategy corresponding to the data block to be processed in each word, processing each data block to be processed.

[0199] Furthermore, the logic instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0200] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the data processing method for a vehicle provided by the above-mentioned methods, the method including: receiving data to be processed sent by the vehicle, the data to be processed including at least one word, and each word including a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle; for each word in the data to be processed, based on the number of words of the data to be processed and at least one of the data transmission status indication information carried in the word, determining the processing strategy corresponding to the data block to be processed in the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the data transmission to be processed; the number of words is used to represent the total number of words in the data to be processed; based on the processing strategy corresponding to the data block to be processed in each word, processing each data block to be processed.

[0201] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the data processing method for a vehicle provided by the above-mentioned methods, the method comprising: receiving data to be processed sent by the vehicle, the data to be processed comprising at least one word, and each word comprising a data block to be processed; the data block to be processed comprising fault data and / or test data of the vehicle; for each word in the data to be processed, based on the number of words in the data to be processed and at least one of the data transmission status indication information carried in the word, determining a processing strategy corresponding to the data block to be processed in the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the data transmission to be processed; the number of words is used to represent the total number of words in the data to be processed; and based on the processing strategy corresponding to the data block to be processed in each word, processing each data block to be processed.

[0202] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0203] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0204] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A data processing method for a vehicle, characterized in that: Applied to a data receiving terminal in communication with a vehicle, the method comprises: receiving data to be processed sent by the vehicle via a customizable data block protocol (CDBP), wherein the data to be processed includes at least one word, and each word includes a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle; For each word in the data to be processed, determining a processing strategy corresponding to the data block to be processed in the word based on at least one of the number of words in the data to be processed and data transmission status indication information carried by the word; wherein the data transmission status indication information represents the data transmission status corresponding to the word during the process of data transmission to be processed; and the number of words is used to represent the total number of words in the data to be processed; processing each of the data blocks to be processed based on the processing strategy corresponding to the data block to be processed in each word; Determining a processing strategy corresponding to the data block to be processed in the word includes: Determining whether the data transmission status indication information is a first value; the first value indicates that the data transmission status corresponding to the word is starting transmission; When the data transmission status indication information is the first value, determining that the processing strategy is the first strategy; The first strategy instructs the data receiving end to perform the following operations: resetting data, recording and storing the data blocks to be processed in the words, determining the number of words of the data to be processed, and reducing the number of words by 1; The determining of the processing strategy corresponding to the data block to be processed in the word further includes: If the data transmission status indication information is not the first value, determining whether the data transmission status indication information is a second value and whether the word number is 1 at the current moment; the second value indicates that the data transmission status corresponding to the word is end of transmission; When the data transmission status indication information is the second value and the word count at the current moment is 1, determining that the processing strategy is the second strategy; The second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed; The determining of the processing strategy corresponding to the data block to be processed in the word further includes: If the data transmission status indication information is not the second value and / or the number of words at the current moment is not 1, determining whether the data transmission status indication information is a third value and whether the number of words at the current moment is greater than 1; the third value indicates that the data transmission status corresponding to the word is transmitting; When the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, determining that the processing strategy is the third strategy; The third strategy instructs the data receiving end to perform the following operations: subtract 1 from the word number at the current moment, and record and store the data block to be processed in the word at the current moment; The determining of the processing strategy corresponding to the data block to be processed in the word further includes: When the data transmission status indication information is not the third value and / or the number of words at the current moment is less than or equal to 1, determining whether the data transmission status indication information is the second value and whether the number of words at the current moment is less than 1; When the data transmission status indication information is the second value and the word count at the current moment is less than 1, determining that the processing strategy is the fourth strategy; The fourth strategy instructs the data receiving end to perform the following operations: resetting data and resetting word count.

2. The data processing method for a vehicle according to claim 1, characterized in that: Before determining whether the data transmission status indication information is the first value, the method further includes: Determining whether the data transmission status indication information is a fourth value, wherein the fourth value indicates that the data block to be processed is a control bit data block, and the control bit data block supports user customization and use; When the data transmission status indication information is the fourth value, the to-be-processed data block is discarded.

3. The data processing method for a vehicle according to claim 1, characterized in that: The method further comprises: For the data to be processed, all the data blocks to be processed that have been stored at the data receiving end are parsed.

4. The data processing method for a vehicle according to claim 1, characterized in that: Each word also includes a tag number, and the tag number is used to indicate the data type of the data block to be processed corresponding to the word; After receiving the data block to be processed, the method further includes: When the tag number corresponding to the current data block to be processed is different from the tag number corresponding to the previous data block to be processed, determining to trigger a target event; the target event indicates that the data to be processed has changed; The target event is recorded.

5. A data processing device for a vehicle, characterized in that: A data receiving terminal for communication with a vehicle, the device comprising: a receiving module, configured to receive data to be processed sent by the vehicle via a customizable data block protocol (CDBP), wherein the data to be processed includes at least one word, each word including a data block to be processed; the data block to be processed includes fault data and / or test data of the vehicle; A first determining module is configured to determine, for each word in the data to be processed, a processing strategy corresponding to the data block to be processed in the word based on at least one of the number of words in the data to be processed and the data transmission status indication information carried in the word; a processing module, configured to process each of the data blocks to be processed based on the processing strategy corresponding to the data block to be processed in each word; The data transmission status indication information represents the data transmission status corresponding to the word during the data transmission to be processed; the word count is used to represent the total number of words in the data to be processed; The first determining module is further configured to: Determining whether the data transmission status indication information is a first value; the first value indicates that the data transmission status corresponding to the word is starting transmission; When the data transmission status indication information is the first value, determining that the processing strategy is the first strategy; The first strategy instructs the data receiving end to perform the following operations: resetting data, recording and storing the data blocks to be processed in the words, determining the number of words of the data to be processed, and reducing the number of words by 1; The first determining module is further configured to: If the data transmission status indication information is not the first value, determining whether the data transmission status indication information is a second value and whether the word number is 1 at the current moment; the second value indicates that the data transmission status corresponding to the word is end of transmission; When the data transmission status indication information is the second value and the word count at the current moment is 1, determining that the processing strategy is the second strategy; The second strategy instructs the data receiving end to perform the following operations: record and store the data blocks to be processed and parse the currently stored data blocks to be processed; The first determining module is further configured to: If the data transmission status indication information is not the second value and / or the number of words at the current moment is not 1, determining whether the data transmission status indication information is a third value and whether the number of words at the current moment is greater than 1; the third value indicates that the data transmission status corresponding to the word is transmitting; When the data transmission status indication information is the third value and the number of words at the current moment is greater than 1, determining that the processing strategy is the third strategy; The third strategy instructs the data receiving end to perform the following operations: subtract 1 from the word number at the current moment, and record and store the data block to be processed in the word at the current moment; The first determining module is further configured to: When the data transmission status indication information is not the third value and / or the number of words at the current moment is less than or equal to 1, determining whether the data transmission status indication information is the second value and whether the number of words at the current moment is less than 1; When the data transmission status indication information is the second value and the word count at the current moment is less than 1, determining that the processing strategy is the fourth strategy; The fourth strategy instructs the data receiving end to perform the following operations: resetting data and resetting word count.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the data processing method for a vehicle as claimed in any one of claims 1 to 4 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the data processing method for a vehicle according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Communication method and system based on serial port, and receiving terminal

    CN107294976A