Data stream analysis algorithm determination method and electronic equipment

By matching with the data flow analysis algorithm in the preset algorithm library and using the algorithm inference model to determine the data category, the problem that vehicle diagnostic equipment is difficult to analyze data when the unknown data flow sequence organization rules are implemented, and fast and accurate data flow analysis and vehicle diagnosis are achieved.

CN119577466APending Publication Date: 2025-03-07AUTEL INTELLIGENT TECHNOLOGY CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411611217.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

When vehicle diagnostic equipment cannot know the organization rules of data flow sequence data, it is difficult for a vehicle to quickly find an adapted data flow analysis algorithm, resulting in the inability to correctly process data flow sequence data and complete vehicle diagnosis.

Method used

By obtaining the data flow sequence data to match multiple trusted data flow analysis algorithms in the preset algorithm library, if the matching degree is low, a pre-trained algorithm inference model is used to determine the data category of the data flow sequence data, and analyzing the data flow sequence of this category to determine the target data flow analysis algorithm.

Benefits of technology

Even if you don’t know the organization rules of the data flow sequence, you can quickly determine the target data flow analysis algorithm, improve the analysis speed of the data flow sequence data, and ensure that the vehicle diagnostic equipment can work normally.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577466A_ABST
    Figure CN119577466A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle diagnosis, and discloses a data stream analysis algorithm determination method and electronic equipment, and the method comprises the steps: obtaining data stream sequence data, matching the data stream sequence data with a plurality of trusted data stream analysis algorithms in a preset algorithm library, and obtaining a plurality of trusted data stream analysis algorithms; determining a matching degree between each credible data stream analysis algorithm and the data stream sequence data, and if the matching degree corresponding to each credible data stream analysis algorithm is smaller than a preset matching degree, firstly determining a data category corresponding to each data stream sequence in the data stream sequence data through a pre-trained algorithm reasoning model, analyzing the data stream sequence corresponding to each data category to obtain a data stream analysis algorithm corresponding to each data category, and finally integrating and determining a target data stream analysis algorithm corresponding to the data stream sequence data. By means of the mode, the target data flow analysis algorithm corresponding to the data flow sequence data can be rapidly and accurately determined, and the vehicle diagnosis speed is increased.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of vehicle diagnosis technology, and in particular to a method for determining a data stream parsing algorithm and an electronic device. Background Art

[0002] The vehicle's control unit and data acquisition devices such as sensors and actuators usually interact using data stream sequence data. When diagnosing the vehicle, the vehicle diagnostic equipment reads these data stream sequence data from the control unit and obtains the parameters of each component by parsing these data stream sequence data to display these parameters to the user, so that the user can complete the vehicle diagnosis through these parameters.

[0003] However, when the vehicle diagnostic equipment is unable to know the organization rules of the data stream sequence data, it not only needs to spend a lot of time to find an adaptive data stream parsing algorithm, but also when the adaptive data stream parsing algorithm is not found, the vehicle diagnostic equipment will not be able to obtain the parameters of each component, which will lead to the inability to complete the vehicle diagnosis. Summary of the invention

[0004] In view of the above problems, an embodiment of the present application provides a method for determining a data stream parsing algorithm, an electronic device and a computer-readable storage medium, which are used to solve the problems in the prior art that a lot of time is required to find a data stream parsing algorithm corresponding to data stream sequence data, and that data stream sequence data cannot be processed when an adapted data stream parsing algorithm is not found.

[0005] According to one aspect of an embodiment of the present application, a method for determining a data flow parsing algorithm is provided, the method comprising: obtaining data flow sequence data, the data flow sequence data comprising a data flow sequence; matching the data flow sequence data with a plurality of trusted data flow parsing algorithms in a preset algorithm library, and determining a degree of matching between each trusted data flow parsing algorithm and the data flow sequence data; if the degree of matching corresponding to each trusted data flow parsing algorithm is less than a preset degree of matching, determining a data category corresponding to the data flow sequence in the data flow sequence data through a pre-trained algorithm inference model, analyzing the data flow sequence corresponding to the data category, determining a data flow parsing algorithm corresponding to the data category, and determining a target data flow parsing algorithm corresponding to the data flow sequence data according to the data flow parsing algorithm corresponding to the data category.

[0006] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement any of the above-mentioned methods for determining a data flow parsing algorithm.

[0007] The embodiment of the present application first determines the matching degree between the data stream sequence data and each trusted data stream parsing algorithm in the preset algorithm library. When the matching degree of each trusted data stream parsing algorithm is low, the data stream sequence data is analyzed through the algorithm reasoning model to obtain the target data stream parsing algorithm. Even if the organization rules of the data stream sequence are unknown, the target data stream parsing algorithm can be directly determined based on the data stream sequence data, so that the vehicle diagnostic equipment can quickly obtain the target data stream parsing data to parse the data stream sequence data, effectively improving the parsing speed of the data stream sequence data.

[0008] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present application. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0010] Figure 1 A schematic diagram of a flow chart of a method for determining a data stream parsing algorithm provided in the first embodiment of the present application is shown;

[0011] Figure 2 A schematic diagram of a flow chart of a method for determining a data stream parsing algorithm provided in a second embodiment of the present application is shown;

[0012] Figure 3 A schematic diagram of a flow chart of a method for determining a data stream parsing algorithm provided in a third embodiment of the present application is shown;

[0013] Figure 4 A schematic diagram of a flow chart of a method for determining a data stream parsing algorithm provided in a fourth embodiment of the present application is shown;

[0014] Figure 5 A schematic diagram showing the flow of the training steps of the algorithm reasoning model provided in the embodiment of the present application is shown;

[0015] Figure 6 A schematic diagram of a flow chart showing the training steps of another algorithm reasoning model provided in an embodiment of the present application is shown;

[0016] Figure 7 A schematic diagram showing the structure of a data stream parsing algorithm determination device provided in an embodiment of the present application is shown;

[0017] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein.

[0019] The data stream sequence data on the vehicle can provide important parameters for vehicle diagnosis. For example, when diagnosing the battery pack of the high-voltage battery on the vehicle, the voltage, temperature and other parameters of the battery cells in the battery pack can directly reflect whether the battery pack is faulty. In addition, after obtaining the voltage, temperature and other parameters, the data acquisition device will actively transmit the parameters to the vehicle's control unit in the form of a data stream sequence. The vehicle diagnostic equipment directly obtains the data stream sequence data corresponding to the battery pack from the control unit, and then parses the data stream sequence data according to the organization rules of the data stream sequence to obtain the parameters of the battery pack. The working status of the battery pack is determined based on these parameters, and the diagnosis of the battery pack can be completed. Therefore, the correct acquisition and parsing of data stream sequence data is very important in the vehicle diagnosis process.

[0020] However, there is no unified standard for the organization rules of data stream sequences. When vehicle diagnostic equipment parses data stream sequence data, it usually needs to know the organization rules of the data stream sequence (i.e., the data stream parsing algorithm required to parse the data stream sequence data) in advance before it can parse the data stream sequence data according to the organization rules of the data stream sequence.

[0021] Data stream sequences whose organization rules are unknown usually cannot be parsed directly. Especially in the scenario where the organization rules of the data stream sequence cannot be predicted, the vehicle diagnostic equipment cannot directly derive the data stream parsing algorithm corresponding to the data stream sequence data, and needs to spend a lot of time to match the data stream sequence data with the known data stream parsing algorithm to find the data stream parsing algorithm corresponding to the data stream sequence data. In addition, since there is no unified standard for the organization rules of data stream sequences, the parameters obtained by parsing the data stream sequence data using an unmatched data stream parsing algorithm are also wrong. When the data stream parsing algorithm corresponding to the data stream sequence data is not found from the known data stream parsing algorithm (that is, the matching degree between the known data stream parsing algorithm and the data stream sequence data is low), the vehicle diagnostic equipment will not be able to correctly process the data stream sequence data, and thus will not be able to complete the diagnosis of the vehicle.

[0022] Based on this, in order to quickly and accurately determine the data stream parsing algorithm corresponding to the data stream sequence data, the present application provides a method for determining a data stream parsing algorithm. When the matching degree between the known data stream parsing algorithm and the data stream sequence data is low, the pre-trained algorithm reasoning model can be used to mine the implicit information in the data stream sequence data according to the rules of the data stream sequence data (that is, the data stream sequence data is usually a group of data organized according to specific rules and repeated), and then the data stream parsing algorithm corresponding to the data stream sequence data can be inferred based on the mined information. In this way, when the data stream parsing algorithm corresponding to the data stream sequence data is not found from the known data stream parsing algorithm, the data stream parsing algorithm corresponding to the data stream sequence data can also be accurately derived through the algorithm reasoning model, so that the vehicle diagnostic equipment can also parse the data stream sequence data normally when receiving unknown data stream sequence data.

[0023] Specifically, the embodiment of the present application first obtains data stream sequence data, where the data stream sequence data includes a data stream sequence, and matches the data stream sequence data with multiple trusted data stream parsing algorithms in a preset algorithm library. When the matching degree between the data stream sequence data and multiple trusted data stream parsing algorithms is relatively low, a pre-trained algorithm inference model is used to determine the data category corresponding to the data stream sequence in the data stream sequence data, and then the data stream sequence corresponding to the data category is analyzed to determine the data stream parsing algorithm corresponding to the data category. Finally, the target data stream parsing algorithm corresponding to the data stream sequence data can be determined based on the data stream parsing algorithm corresponding to the data category.

[0024] Figure 1 The flowchart of the method for determining a data stream parsing algorithm provided in the first embodiment of the present application is shown, and the method is executed by an electronic device. The electronic device can be a vehicle diagnostic device, that is, the vehicle diagnostic device obtains data stream sequence data from the vehicle and directly determines the target data stream parsing algorithm based on the data stream sequence data, or it can be a server, terminal or other device, that is, the vehicle diagnostic device obtains data stream sequence data from the vehicle and sends the data stream sequence data to the electronic device, and the electronic device determines the target data stream parsing algorithm based on the data stream sequence data and transmits the target data stream parsing algorithm back to the vehicle diagnostic device. Figure 1 As shown, the method comprises the following steps:

[0025] Step S110: Acquire data stream sequence data, where the data stream sequence data includes a data stream sequence.

[0026] Among them, the data stream sequence data is the data stream sequence data obtained from the control unit after the vehicle diagnostic equipment communicates with the vehicle's control unit through the vehicle communication connection tool (that is, the data stream sequence obtained by a certain pin pair on the control unit within a certain period of time, including timing, address, content and other information). The data stream sequence data can be the main line data on the vehicle (that is, the data actively sent to the control unit after the data acquisition equipment such as sensors and actuators obtain the data stream sequence, such as the relevant parameters of the battery pack in the high-voltage battery), or it can be the data actively obtained by the control unit (that is, the data returned to the control unit by the data acquisition equipment after receiving the data acquisition instruction sent by the control unit). The data stream sequence data includes data stream sequences of multiple data categories, for example, data stream sequences of data categories such as current, voltage, and temperature.

[0027] Furthermore, when the data stream sequence data includes all data stream sequences at a certain moment on a certain pin pair, not all data stream sequences need to be used for vehicle diagnosis. For example, when the battery pack of a high-voltage battery needs to be diagnosed, only the data stream sequences related to the battery pack of the high-voltage battery (for example, temperature, current, etc.) need to be parsed. Other data stream sequences will not only increase the workload of determining the target data stream parsing algorithm, but may also affect the accuracy of the target data stream parsing algorithm. Therefore, after obtaining the data stream sequence data, the data stream sequence data needs to be further preprocessed.

[0028] Specifically, according to the specific diagnostic business scenario, unnecessary data stream sequences in the data stream sequence data can be removed. For example, when the battery pack of the high-voltage battery needs to be diagnosed, the data in the data stream sequence data that is not related to the battery pack of the high-voltage battery can be removed from the data stream sequence data. In addition, data stream sequences that are of little significance or incorrect in the data stream sequence data can also be deleted, for example, a data stream sequence in which the instruction sequence appears only once in the data stream sequence data, a data stream sequence in which the content sequence is all 0x00 or all 0xFF in the data stream sequence data, and a data stream sequence in which the data is incomplete due to an error in the data acquisition process (such as a data stream sequence in which the instruction sequence cannot be parsed, a data stream sequence in which the content sequence is insufficient in length, etc.).

[0029] Step S120: Match the data stream sequence data with a plurality of trusted data stream parsing algorithms in a preset algorithm library, and determine the matching degree between each trusted data stream parsing algorithm and the data stream sequence data.

[0030] Among them, there are many ways to match the data stream sequence data with the trusted data stream parsing algorithm. For example, the trusted data stream parsing algorithm can be directly used to parse the data stream sequence data, and then the matching degree between each trusted data stream parsing algorithm and the data stream sequence data is determined based on the parsing result. In order to reduce the workload, the instruction sequence of the data stream sequence in the data stream sequence data can be matched with the preset instruction rule first, and several candidate trusted data stream parsing algorithms can be selected from multiple trusted data stream parsing algorithms based on the matching result, and then the candidate trusted data stream parsing algorithm is used to parse the data stream sequence data, and finally the matching degree between each candidate data stream parsing algorithm and the data stream sequence data is determined based on the parsing result.

[0031] Step S130: Determine whether the matching degrees corresponding to each trusted data flow analysis algorithm are all less than a preset matching degree.

[0032] Among them, if the matching degrees corresponding to each trusted data flow parsing algorithm are less than the preset matching degrees, it means that there is no target data flow parsing algorithm matching the data flow sequence data in the preset algorithm library, and it is necessary to use a pre-trained algorithm inference model to determine the target data flow parsing algorithm corresponding to the data flow sequence data, and jump to step S140.

[0033] If the matching degree corresponding to some of the trusted data stream parsing algorithms is greater than or equal to the preset matching degree, it means that the preset algorithm library has stored the target data stream parsing algorithm corresponding to the data stream sequence data, and the target data stream parsing algorithm can be directly obtained from the preset algorithm library. Specifically, the trusted data stream parsing algorithm with the highest matching degree can be directly used as the target data stream parsing algorithm, or the process can jump to step S150 and determine the target data stream parsing algorithm in combination with other features of the data stream sequence data.

[0034] Step S140: If the matching degrees corresponding to the trusted data flow parsing algorithms are all less than the preset matching degrees, the data category corresponding to the data flow sequence in the data flow sequence data is determined through a pre-trained algorithm inference model, and the data flow sequence corresponding to the data category is analyzed to determine the data flow parsing algorithm corresponding to the data category, and the target data flow parsing algorithm corresponding to the data flow sequence data is determined according to the data flow parsing algorithm corresponding to the data category.

[0035] The algorithmic reasoning model may be a combination of one or more of the following models: bidirectional encoder representation (BERT), long short-term memory network (LSTM), recurrent neural network (RNN), gated recurrent unit (GRU), sequence-to-sequence model (Seq2Seq), generative pre-trained transformer (GPT), text-to-text converter (T5), etc. The algorithmic reasoning model is trained by obtaining a data stream training sequence. For example, the data stream training sequence is first labeled with relevant labels (e.g., instruction sequence labels, content sequence labels, data category labels, data stream parsing algorithms, etc.), and then the algorithmic reasoning model is trained through the data stream training sequence, so that the algorithmic reasoning model records and applies the internal structure and relationship of the data stream training sequence with the same label. At the same time, the algorithmic reasoning model can also identify and apply the value range of the content sequence in the data stream training sequence, the parameter tolerance of the content sequence in the data stream training sequence, the input range of the data stream sequence data, the data connectivity, periodicity and other implicit information of the data stream training sequence of the same data category during the training process.

[0036] Since the organization rules of data stream sequences of different data categories may be different, it is first necessary to use an algorithmic reasoning model to determine the data category of each data stream sequence data in the data stream sequence data, that is, to determine which data stream sequences in the data stream sequence data are temperature data, which data stream sequences are current data, etc. Further, in order to improve the accuracy of the target data stream parsing algorithm, determining the data category corresponding to the data stream sequence in the data stream sequence data through a pre-trained algorithmic reasoning model may also include the following steps:

[0037] Step S141: Detect the validity of the data stream sequence in the data stream sequence data through an algorithmic reasoning model.

[0038] Step S142: Screen the data stream sequences in the data stream sequence data to obtain multiple groups of valid data stream sequences.

[0039] Step S143: Determine the data category corresponding to the valid data stream sequence through the algorithm reasoning model.

[0040] Among them, the data stream sequence data usually includes many data stream sequences, and these data stream sequences are not necessarily valid. For example, the instruction sequence in the data stream sequence cannot be parsed, the content sequence length is abnormal, or the data stream sequence should not be parsed when diagnosing the vehicle. These data stream sequences will not only affect the accuracy of the target data stream parsing algorithm, but also cannot provide assistance for vehicle diagnosis. Therefore, when determining the target data stream parsing algorithm, the validity of the data stream sequence can be tested first, and only the valid data stream sequences can be analyzed in the subsequent reasoning process.

[0041] Through steps S141 to S143, the algorithm reasoning model is first used to detect the validity of the data flow sequence in the data flow sequence data, and the data flow sequence data is screened, and then the data category corresponding to the valid data flow sequence data is determined, so that the algorithm reasoning model only needs to analyze the data of the valid data flow sequence to obtain the data flow parsing algorithm corresponding to the data category, which speeds up the algorithm reasoning model to determine the target data flow parsing algorithm, and can avoid the invalid data flow sequence from affecting the target data flow parsing algorithm, thereby improving the accuracy of the target data flow parsing algorithm.

[0042] Furthermore, in order to further improve the accuracy of the target data stream parsing algorithm, a reasonable empirical threshold can be obtained through a large number of experiments to correct the processing results of the algorithm reasoning model on the data stream sequence data. For example, the data stream sequence is grouped according to the continuity and periodicity of the instruction sequence of the data stream sequence in the data stream sequence data, and the category and validity category of the data stream sequence are corrected and expanded according to the grouping results, the data category contained in the data stream sequence, and the empirical threshold, so that the algorithm reasoning model can more accurately determine the data category of the data stream sequence, thereby improving the accuracy of the target data stream parsing algorithm.

[0043] After classifying the data stream sequences in the data stream sequence data, the data stream sequences of each data category are analyzed separately. For example, the data stream sequences of the same data category are taken as a group of data. The group of data is analyzed through the algorithm reasoning model to obtain the feature information contained in the group of data. The data stream parsing algorithm corresponding to the data category is then derived based on the feature information. Finally, the data stream parsing algorithms corresponding to each data category are integrated together to obtain the target data stream parsing algorithm corresponding to the data stream sequence data.

[0044] In the above embodiment, the matching degree between the data stream sequence data and each trusted data stream parsing algorithm in the preset algorithm library is first determined. When the matching degree of each trusted data stream parsing algorithm is low, the data stream sequence data is analyzed by the algorithm reasoning model to obtain the target data stream parsing algorithm. Even if the organization rule of the data stream sequence is unknown, the target data stream parsing algorithm can be directly determined based on the data stream sequence data, so that the vehicle diagnostic equipment can quickly obtain the target data stream parsing data to parse the data stream sequence data, effectively improving the parsing speed of the data stream sequence data.

[0045] Furthermore, when the preset algorithm library stores the target data stream parsing algorithm that matches the data stream sequence data, since there is no unified standard for the organization rules of the data stream sequence, if the trusted data stream parsing algorithm with the highest matching degree is directly used as the target data stream parsing algorithm, it may be due to accidental events that the target data stream parsing algorithm that truly corresponds to the data stream sequence data is not found. Therefore, in order to make the target data stream parsing algorithm obtained from the preset algorithm library more accurate, such as Figure 1 As shown, after step S130, the following steps are also included:

[0046] Step S150: If the matching degree corresponding to at least some of the trusted data flow resolution algorithms is greater than or equal to the preset matching degree, then a candidate trusted data flow resolution algorithm is obtained from the preset algorithm library according to the matching degree corresponding to the trusted data flow resolution algorithm. Specifically, when the number of trusted data flow resolution algorithms with a matching degree greater than or equal to the preset matching degree is small, all trusted data flow resolution algorithms with a matching degree greater than or equal to the preset matching degree can be used as candidate trusted data flow resolution algorithms. When the number of trusted data flow resolution algorithms with a matching degree greater than or equal to the preset matching degree is large, several trusted data flow resolution algorithms with the highest matching degrees (for example, 5, 6, 7, etc.) can also be used as candidate trusted data flow resolution algorithms.

[0047] Step S160: Determine whether there are multiple candidate trusted data flow parsing algorithms.

[0048] If there is only one candidate trusted data stream parsing algorithm, it means that the target data stream parsing algorithm corresponding to the data stream sequence data is successfully obtained, and the process jumps to step S170a;

[0049] If there are multiple candidate trusted data flow parsing algorithms, it means that the target data flow parsing algorithm has not been found, and the target data flow parsing algorithm corresponding to the data flow sequence data needs to be determined according to the target parameter quantity of each candidate data flow sequence data, and then jump to step S170b.

[0050] Step S170a: If there is only one candidate trusted data flow parsing algorithm, the candidate trusted data flow parsing algorithm is determined as the target data flow parsing algorithm corresponding to the data flow sequence data.

[0051] Step S170b: If there are multiple candidate trusted data flow parsing algorithms, the data flow sequence data is parsed using each candidate trusted data flow parsing algorithm to obtain the target parameter quantity of each data category corresponding to each candidate trusted data flow parsing algorithm.

[0052] Step S170c: Determine the target data flow parsing algorithm corresponding to the data flow sequence data according to the number of parameters and the target number of parameters of each data category corresponding to each preset trusted data flow parsing algorithm.

[0053] The number of parameters corresponding to each group of data stream sequences in the data stream sequence data is related to the number of data acquisition devices on the vehicle used to obtain the parameters in the data stream sequence. For example, the number of temperature sensors on the vehicle used to obtain the temperature parameters of the battery pack of the high-voltage battery is the number of parameters obtained by parsing the data stream sequence of the temperature data category in the data stream sequence data of the battery pack of the high-voltage battery through the target data stream parsing algorithm.

[0054] Therefore, when determining the target data stream parsing algorithm corresponding to the data stream sequence data, in addition to the matching degree of the trusted data stream parsing algorithm, the target data stream parsing algorithm corresponding to the data stream sequence data can also be determined by combining the number of parameters of each data category corresponding to the trusted data stream parsing algorithm and the target number of parameters. For example, one of the candidate trusted data stream parsing algorithms is used to parse the data stream sequence data, and the number of parameters corresponding to each data category obtained is the target number of parameters of each data category corresponding to the trusted data stream parsing algorithm. Finally, the target parameters are compared with the actual number of parameters of each data category corresponding to the preset trusted data stream parsing algorithm, and the trusted data stream parsing algorithm with the smallest sum of the difference in the number of parameters of each data category is used as the target data stream parsing algorithm.

[0055] In the above embodiment, by first obtaining candidate trusted data flow parsing algorithms from a preset algorithm library, and then determining the target data flow parsing algorithm for finding data flow sequence data pairs from the candidate trusted data flow parsing algorithms based on the number of parameters of each data category, the occurrence of accidental events is effectively avoided and the accuracy of the target data flow parsing algorithm is improved.

[0056] When the data stream sequence in the data stream sequence data may have abnormal sequences due to data collection dislocation and other reasons, if the weights of each data stream sequence in the data stream sequence data are the same, these abnormal data stream sequences may affect the matching degree between the data stream sequence data and the trusted data stream parsing algorithm, thereby resulting in a lower accuracy of the target data stream parsing algorithm obtained based on the matching degree. Therefore, in order to improve the matching degree corresponding to each trusted data stream parsing algorithm, such as Figure 2 As shown, Figure 2 The flowchart of the method for determining the data stream parsing algorithm provided in the second embodiment of the present application is shown, and step S120 specifically includes:

[0057] Step S121: Determine whether the instruction sequence of each data stream sequence in the data stream sequence data matches a preset instruction rule.

[0058] Among them, in the same vehicle, although the instruction sequences of data stream sequences of different data categories are different, they usually have a certain correlation. For example, the instruction sequence of data stream sequences of all data categories may be an arithmetic progression (for example, an arithmetic progression with a difference of 1), or some bytes in the instruction sequence may change according to a certain rule. Therefore, it is possible to determine whether the instruction sequence in the data stream sequence in the data stream sequence data is abnormal by using a preset instruction rule. The preset instruction rule includes but is not limited to the instruction sequence forming an arithmetic progression, the instruction sequence in each group after the instruction sequence is grouped forming an arithmetic progression, the values ​​of the high bytes in the instruction sequence forming an arithmetic progression, the values ​​of the high bytes in the instruction sequence in each group after the instruction sequence is grouped forming an arithmetic progression, and the values ​​of one to three bytes in the instruction sequence changing in other rules.

[0059] Step S122: If the instruction sequence of at least part of the data flow sequence matches the preset instruction rule, multiple candidate trusted data flow parsing algorithms are obtained from the preset algorithm library according to the preset instruction rule, and the weight of at least part of the data flow sequence is increased.

[0060] Among them, when the instruction sequence of part of the data stream sequence in the data stream sequence data matches the preset instruction rule, it means that the probability of abnormality in this part of the data stream sequence is smaller. Therefore, by increasing the weight of this part of the data stream sequence, this part of the data can occupy a larger proportion in the subsequent calculation of the matching degree, so as to reduce the influence of the abnormal data stream sequence on the matching degree calculation. In addition, when parsing the data stream sequence, it is usually necessary to first determine which of the data stream sequences are instruction sequences, and the remaining sequences will be used as content sequences. Therefore, multiple candidate trusted data stream parsing algorithms can be obtained from the preset algorithm library according to the instruction sequence in the data stream sequence, and these candidate trusted data stream parsing algorithms are used to determine whether there is an abnormality in the content sequence of the data stream sequence.

[0061] Step S123: Determine whether the content sequence of the data stream sequence in the data stream sequence data matches each candidate trusted data stream parsing algorithm.

[0062] Among them, when the vehicle is in a normal state, the data of the same data category obtained for the same component is usually within a certain range. If the parameters obtained after parsing the content sequence of the data stream sequence are outside the given range, it may be that there is an abnormality in the component on the vehicle (the component may be abnormal, or the data acquisition device that obtains the parameter may be abnormal) or the content sequence of the data stream sequence is abnormal during the transmission process, or the data stream parsing algorithm used to parse the data stream sequence may not match the data stream sequence, resulting in incorrect parameters obtained by parsing.

[0063] Therefore, it is possible to determine whether the content sequence of the data stream sequence is abnormal by determining whether the parameters corresponding to the content sequence of the data stream sequence are within the normal parameter range. Specifically, each candidate trusted data stream parsing algorithm can be used to parse the data stream sequence data, and then determine whether the parameters corresponding to each data stream sequence are within the parameter interval corresponding to the trusted data stream parsing algorithm used. If the parameters corresponding to the data stream sequence are within the parameter interval, it means that the content sequence of the data stream sequence matches the trusted data stream parsing algorithm used by it. If the parameters corresponding to the data stream sequence are outside the parameter interval, it means that the content sequence of the data stream sequence does not match the trusted data stream parsing algorithm used by it.

[0064] Furthermore, the data stream sequence data usually includes a large number of data stream sequences. If each candidate trusted data stream parsing algorithm is used to parse the data stream sequence data respectively, and then the content sequence of the data stream sequence is judged to be abnormal based on the parameters obtained by the parsing, a large amount of work is required to complete the matching process between the content sequence and the candidate trusted data stream parsing algorithm. Therefore, in order to further reduce the workload, steps S123a to S123c can be used to complete the matching process between the content sequence of the data stream sequence and each candidate trusted data stream parsing algorithm. Specifically, the following steps are included:

[0065] Step S123a: Obtaining a preset parameter range of each candidate trusted data flow parsing algorithm.

[0066] The preset parameter interval is the data range of the parameters acquired by the data acquisition device when the vehicle is operating normally, that is, when the vehicle is operating normally, the parameters acquired by the data acquisition device will be within the preset parameter interval. The preset parameter intervals corresponding to different data categories may be different, so a trusted data stream parsing algorithm may include multiple preset parameter intervals.

[0067] Step S123b: reversely deduce the candidate trusted data flow parsing algorithms and the preset parameter intervals to determine the data flow sequence intervals corresponding to each candidate trusted data flow parsing algorithm.

[0068] Among them, the content sequence in the data stream sequence is obtained after the data acquisition device obtains the parameters of the component and converts them according to certain organizational rules. Therefore, the content sequence in the data stream sequence corresponds to the parsed parameters one by one. Only when the content sequence of the data stream sequence is within a certain data stream sequence range, the parameters obtained after parsing the content sequence of the data stream sequence will be within a certain parameter range.

[0069] In addition, the organization rules of data stream sequences and the data stream parsing algorithm are data processing processes that correspond to each other and are in opposite directions, that is, the organization rules of data stream sequences are to convert parameters into data stream sequences, while the data stream parsing algorithm is to convert data stream sequences into parameters. The rules used by the two are essentially the same. As long as one of the data stream parsing algorithm and the organization rules of data stream sequences is known, the other rule can be reversely deduced. That is, when the data stream parsing algorithm is known, the organization rules of the data acquisition device that converts parameters into data stream sequences can be deduced according to the direction of the data stream parsing algorithm.

[0070] Therefore, after obtaining the preset parameter interval, the organization rules of the data stream sequence can be reversely deduced according to the trusted data stream parsing algorithm, and then the preset parameter interval can be converted into a data stream sequence interval. In addition, the organization rules of the data stream sequences corresponding to the data categories included in the same trusted data stream parsing algorithm may be different. Even if the preset parameter intervals of the data categories are the same, the data stream sequence intervals obtained by reverse deduction may also be different. Therefore, corresponding instruction sequences can also be added to the data stream sequence intervals corresponding to different data categories. When determining whether the content sequence of the data stream sequence is within the data stream sequence interval, it is necessary to first determine whether the instruction sequence of the data stream sequence is the same as the instruction sequence corresponding to the data stream sequence interval. Only when the instruction sequence of the data stream sequence is the same as the instruction sequence corresponding to the data stream sequence interval, it will be determined whether the content sequence of the data stream sequence is within the data stream sequence interval.

[0071] Step S123c: If the content sequences of the data stream sequences are all outside the data stream sequence intervals, the content sequences of the data stream sequences do not match any of the candidate trusted data stream parsing algorithms.

[0072] Among them, when the content sequence of the data stream sequence is outside the data stream sequence interval of the trusted data stream parsing algorithm, it means that the content sequence of the data stream sequence does not match the trusted data stream parsing algorithm. Therefore, when the content sequence of the data stream sequence is outside each data stream sequence interval, it means that the content sequence of the data stream sequence does not match each candidate trusted data stream parsing algorithm.

[0073] In step S123a to step S123c, the data stream sequence interval corresponding to the trusted data stream parsing algorithm is reversely derived through the preset parameter interval of the trusted data stream parsing algorithm. Finally, the data stream sequence interval is used to determine whether the content sequence of the data stream sequence matches the trusted data stream parsing algorithm. The data stream sequence corresponding to the trusted data stream parsing algorithm can be derived only through the minimum and maximum values ​​of the preset parameter interval, without the need to use the trusted data stream parsing algorithm to parse all the data stream sequences in the data stream sequence data. This can effectively reduce the workload of the matching process and speed up the determination of the target data stream parsing algorithm.

[0074] Step S124: if the content sequence of the data stream sequence does not match any of the candidate trusted data stream parsing algorithms, the weight of the data stream sequence is reduced.

[0075] Among them, when the content sequence of the data stream sequence does not match any candidate trusted data stream parsing algorithm, it means that the content sequence of the data stream sequence may be abnormal, and the weight of the data stream sequence needs to be reduced to avoid the influence of the abnormal data stream sequence on the matching degree calculation.

[0076] Step S125: Determine whether the parameter tolerance of the content sequence is within a preset tolerance range.

[0077] Among them, the parameter tolerance is the difference between the largest parameter and the smallest parameter among multiple parameters after the content sequence in each group of data stream sequences is parsed. The content sequence of a group of data stream sequences is the parameters obtained from the same component on the vehicle by multiple data acquisition devices at the same time. Regardless of whether the component is abnormal, the difference between the parameters obtained from the same data stream sequence is usually within a smaller range. For example, in some scenarios, the parameter tolerance of the voltage data of the battery cell in the data stream sequence data of the battery pack is usually less than 0.2 volts. If the difference between the parameters obtained from the same data stream sequence is within the preset tolerance range, it means that the data stream sequence is very likely to be normal.

[0078] Step S126: If the parameter tolerance of the content sequence is within the preset tolerance range, the weight of the data stream sequence is increased.

[0079] Among them, the matching degree corresponding to the trusted data flow parsing algorithm calculated based on the normal data flow sequence will also be more accurate. Therefore, when the parameter tolerance of the content sequence is within the preset tolerance range, the weight of the data flow sequence can also be increased, so that this part of the data flow sequence can occupy a larger proportion in the subsequent calculation of the matching degree, so as to reduce the impact of abnormal data flow sequences on the matching degree calculation.

[0080] Step S127: Match the data stream sequence data with a plurality of trusted data stream parsing algorithms in a preset algorithm library according to the weight of the data stream sequence, and determine the matching degree between each trusted data stream parsing algorithm and the data stream sequence data.

[0081] Among them, the matching degree between each trusted data flow analysis algorithm and the data flow sequence data is finally determined according to the weight of the data flow sequence. Specifically, the matching degree between each data flow sequence in the data flow sequence data and each trusted data flow analysis algorithm can be calculated first, and then the weight of each data flow sequence is used as a coefficient to calculate the matching degree between the data flow sequence data and each trusted data flow analysis algorithm. In order to reduce the amount of calculation, the data flow sequence with a relatively low weight can be eliminated, and the matching degree between the data flow sequence data and each trusted data flow analysis algorithm can be determined only according to the data flow sequence with a relatively high weight.

[0082] When calculating the matching degree between the data stream sequence data and the trusted data stream parsing algorithm, the data stream parsing algorithm and the data stream sequence can be parsed, and the matching degree corresponding to the trusted data stream parsing algorithm can be determined based on the parsing result. For example, the matching degree corresponding to each data stream parsing algorithm can be determined based on whether the instruction sequence in the parsing result is parsed normally, whether the parameters in the parsing result are consistent with the actual situation, the difference between the number of parameters in the parsing result and the preset number of parameters corresponding to the trusted data stream parsing algorithm, etc.

[0083] In the above embodiment, the weights of the data flow sequence data are changed from the instruction sequence and content sequence of the data flow sequence respectively, so that the weight of the normal data flow sequence is higher and the weight of the abnormal data flow sequence is lower, thereby being able to more accurately calculate the matching degree between the data flow sequence data and the trusted data flow parsing algorithm, thereby improving the accuracy of the target data flow parsing algorithm.

[0084] Furthermore, the data stream sequence data on the same series of vehicles are usually similar, especially the data stream sequences of the same component and the same data category usually have a relatively large similarity. Therefore, in order to further improve the accuracy of the target data stream parsing algorithm, the target data stream parsing algorithm is further adjusted according to the trusted data stream parsing algorithm in the preset algorithm library. Specifically, Figure 3 As shown, Figure 3 A schematic flow chart of a method for determining a data stream parsing algorithm provided in the third embodiment of the present application is shown, and the method further includes the following steps:

[0085] Step S180: Obtain the algorithm type of the target data stream parsing algorithm.

[0086] The algorithm type of the target data stream parsing algorithm is used to mark the target data stream parsing algorithm, for example, the target data stream parsing algorithm can parse the data stream sequence data of which component on the vehicle, the data stream sequence data of which model of vehicle can be parsed, etc. At this time, the target data stream parsing algorithm can be compared with the trusted data stream parsing algorithm of the same algorithm type by taking advantage of the fact that the data stream sequence data on the same series of vehicles are usually similar. When the target data stream parsing algorithm is determined by an algorithm reasoning model, the algorithm type of the target data stream algorithm can be determined by the algorithm reasoning model.

[0087] Step S190: comparing the target data stream parsing algorithm with the trusted data stream parsing algorithm in the preset algorithm library according to the algorithm type of the target data stream parsing algorithm, and adjusting the target data stream parsing algorithm.

[0088] Among them, when the target data stream parsing algorithm and the trusted data stream parsing algorithm are compared for differences, the data stream sequence data can be parsed by the target data stream parsing algorithm, and the parsing result can be compared with the preset parsing result of the trusted data stream parsing algorithm. Specifically, according to the parsing result, the trusted data stream parsing algorithm that is most closely related to the target data stream parsing algorithm can be first screened out from the trusted data stream parsing algorithms of the same algorithm type in the preset algorithm library, and then the trusted data stream parsing algorithm can be carefully compared with the target data stream parsing algorithm. For example, the number of parameters corresponding to each data category is determined according to the parsing result, and the number of parameters corresponding to each data category is compared with the preset number of parameters of multiple trusted data stream parsing algorithms in the preset algorithm library, and the trusted data stream parsing data with the closest number of parameters is screened out from multiple trusted data stream parsing algorithms, and then the trusted data stream parsing algorithm is carefully compared with the target data stream parsing algorithm (for example, comparing the value, tolerance, number, etc. of the parameter). Finally, the target data stream parsing algorithm is adjusted according to the comparison result, so that the target data stream parsing algorithm can restore and delete the wrong parameters, mark the abnormal parameters, etc.

[0089] In the above embodiment, by obtaining the algorithm type of the target data flow parsing algorithm, and comparing the target data flow parsing algorithm with the trusted data flow parsing algorithm according to the algorithm type, and finally adjusting the target data flow parsing algorithm according to the comparison result, while improving the accuracy of the target data flow parsing algorithm, the ability of the target data flow parsing algorithm to handle abnormal data flow sequences can also be improved through adjustment.

[0090] Furthermore, when the content sequence of a data stream sequence includes multiple parameters, in order to make the content sequence of the data stream sequence easier to parse, the content sequence of the data stream sequence, in addition to the parameters, usually also includes parameter numbers corresponding to each parameter. In addition to marking the parameters to make the data stream sequence easier to parse, these parameter numbers can also mark the data acquisition devices that obtain these parameters. When a parameter is abnormal, the corresponding data acquisition device can be quickly found according to the parameter number to perform fault detection on the data acquisition device.

[0091] In addition, the data acquisition devices used to collect parameters of the same component in the same series of vehicles are generally the same, and the parameter numbering sequences of the content sequences of the data stream sequences of the same data category in the data stream sequence data obtained from the vehicle are also generally the same. Therefore, by comparing the numbering sequences in the data stream sequence data, it can be determined whether the target data stream parsing algorithm needs to be adjusted. Step S190 may further include the following steps:

[0092] Step S191: Determine the numbering sequence corresponding to each data category in the data stream sequence data through the target data stream parsing algorithm.

[0093] Among them, when each data category in the data stream sequence number includes multiple groups of data stream sequences, in order to avoid the occurrence of accidental events, the numbering sequence corresponding to each group of data stream sequences can be obtained respectively, and the numbering sequence with the largest number of occurrences can be used as the numbering sequence corresponding to the data category.

[0094] Step S192: Obtain a preset numbering sequence of each data category corresponding to each trusted data flow parsing algorithm in a preset algorithm library according to the algorithm type corresponding to the target data flow parsing algorithm.

[0095] Step S193: Compare the numbering sequence corresponding to the data stream sequence of each data category with the preset numbering sequence.

[0096] The numbering sequence corresponding to each data category is compared with the preset numbering sequence. If the numbering sequence and the preset numbering sequence are the same, it means that the target data stream parsing algorithm is correct in parsing the data stream sequence data, so there is no need to adjust the target data stream parsing algorithm. If the numbering sequence is different from the preset numbering sequence, the target data stream parsing algorithm needs to be adjusted according to the specific situation.

[0097] Step S194: Adjust the target data stream parsing algorithm according to the comparison result.

[0098] There are many situations where the number sequence is different from the preset number sequence, for example, the number sequence in the middle position may be different, or the number sequence at the start position or the end position may be different; the number sequence may have a certain parameter number added to the preset number sequence, or the number sequence may have a certain parameter number reduced from the preset number sequence. Specifically, the number sequence includes parameter numbers corresponding to multiple parameters in the content sequence of the data stream sequence, and step S194 may include the following steps:

[0099] Step S194a: If the numbering sequence increases the first parameter number compared to the preset numbering sequence, and the parameter tolerance of the content sequence of the data stream sequence is outside the preset tolerance range, the target data stream parsing algorithm is adjusted so that the target data stream parsing algorithm deletes the first parameter number and its corresponding parameter when the first parameter number is at the beginning or end position of the numbering sequence, and marks the first parameter number and its corresponding parameter as abnormal data when the first parameter number is at the middle position of the numbering sequence.

[0100] When the data stream sequence data is obtained from a new model of vehicle, the vehicle may have a new data acquisition device added to it, which may result in the numbering sequence adding a first parameter number compared to the preset numbering sequence. In order to avoid incorrectly adjusting the target data stream parsing algorithm, which may result in a decrease in the accuracy of the target data stream parsing algorithm, when the numbering sequence adds the first parameter number, it is necessary to determine whether the target data stream parsing algorithm needs to be adjusted in combination with the parameter corresponding to the first parameter number.

[0101] Specifically, it is possible to check whether the parameter tolerance of the content sequence of the data stream sequence is within the preset tolerance range. If the parameter tolerance of the content sequence of the data stream sequence is within the preset tolerance range, the addition of the first parameter number in the numbering sequence may be due to the addition of a new data acquisition device to the vehicle, and therefore there is no need to adjust the target data stream parsing algorithm.

[0102] If the parameter tolerance of the content sequence of the data stream sequence is outside the preset tolerance range, it is necessary to perform a specific analysis based on the position of the first parameter number in the numbering sequence. When the first parameter number is located at the beginning or end of the numbering sequence, it may be that when processing the data stream sequence data, the data stream sequence has an additional erroneous sequence due to incorrect processing. Therefore, the target data stream parsing algorithm can be adjusted to enable the target data stream parsing algorithm to delete the first parameter number and its corresponding parameters. When the first parameter number is in the middle position, it may be because a new data acquisition device has been added to the vehicle. Directly deleting the first parameter number may affect the final diagnostic results of the vehicle. Therefore, the first parameter number and its corresponding parameters can be retained, but the target data stream parsing algorithm needs to be adjusted so that the target data stream parsing algorithm can mark the first parameter number and its corresponding parameters as abnormal.

[0103] Step S194b: If the numbering sequence is less than the preset numbering sequence by the second parameter number, and the second parameter number is located in the middle position of the preset numbering sequence, the target data stream parsing algorithm is adjusted so that the target data stream parsing algorithm restores the second parameter number and its corresponding parameters, wherein the second parameter number and its corresponding parameters are the sequence that is eliminated from the data stream sequence during the preprocessing process.

[0104] Among them, when the numbering sequence is less than the preset numbering sequence by the second parameter number, it may be because the data acquisition device corresponding to the second parameter number is reduced on the vehicle, or the second parameter number and its corresponding parameter are misplaced and deleted during the data processing process. When the data acquisition device needs to be reduced on the vehicle, the data acquisition device with the parameter number at the beginning or the end is usually reduced. Therefore, when the second parameter number is at the beginning or the end of the preset numbering sequence, the target data stream parsing algorithm may not be adjusted.

[0105] When the second parameter number is located in the middle of the preset number sequence, it may be because the second parameter number and its corresponding parameter were mistakenly deleted during the data processing process. At this time, it is necessary to check whether the second parameter number and its corresponding parameter of the content sequence in the data stream sequence were mistakenly deleted when preprocessing the data stream sequence data. If the second parameter number and its corresponding parameter of the content sequence in the data stream sequence are mistakenly deleted, it is necessary to adjust the target data stream parsing algorithm so that the target data leak parsing algorithm can restore the second parameter number and its corresponding parameter. If the second parameter number and its corresponding parameter of the content sequence in the data stream sequence are not mistakenly deleted, the target data stream parsing algorithm may not be adjusted.

[0106] Step S194a and step S194b respectively check various situations where the numbering sequence is different from the preset numbering sequence, and adjust the target data stream parsing algorithm according to the inspection results, taking into account the situations where the numbering sequences are different from many aspects. On the one hand, it effectively avoids the situation where the target data stream parsing algorithm is adjusted incorrectly, and on the other hand, it can also improve the accuracy of the target data stream parsing algorithm.

[0107] It should be particularly pointed out that the above steps S194a and S194b are both used to detect the numbering sequence of each data category, and the execution order between step S194a and step S194b does not necessarily have a sequence of precedence. Step S194a can be performed before step S194b, that is, when adjusting the target data stream algorithm, the target data stream algorithm is first adjusted according to the parameter number increased in the numbering sequence, and then the target data stream parsing algorithm is adjusted according to the parameter number decreased in the numbering sequence; or the target data stream parsing algorithm can be first adjusted according to the parameter number decreased in the numbering sequence, and then the target data stream parsing algorithm is adjusted according to the parameter number increased in the numbering sequence.

[0108] In the above embodiment, the target data stream parsing algorithm is used to determine the numbering sequence corresponding to each data category in the data stream sequence data, and then the numbering sequence is compared with the preset numbering sequence to adjust the target data stream parsing algorithm, so that the analysis result of the target data stream parsing algorithm on the data stream sequence data is more accurate.

[0109] Furthermore, in order to further shorten the time for the electronic device to determine the target data stream parsing algorithm corresponding to the data stream sequence data, the newly obtained target data stream parsing algorithm can also be stored in the preset algorithm library. Figure 4 As shown, Figure 4 The flowchart of the method for determining the data stream parsing algorithm provided in the fourth embodiment of the present application is shown. After step S190, the following steps are also included:

[0110] Step S200: If there is a difference between the target data flow parsing algorithm and the trusted data flow parsing algorithm in the preset algorithm library, the target data flow parsing algorithm is marked as a data flow parsing algorithm to be verified.

[0111] Among them, when the target data flow parsing algorithm is obtained by analyzing the data flow sequence data through the algorithm reasoning model, the target data flow parsing algorithm is not determined by the trusted data flow parsing algorithm in the preset algorithm library, so there will be differences between the target data flow parsing algorithm and the trusted data flow parsing algorithm in the preset algorithm library. When the target data flow parsing algorithm is adjusted because the numbering sequence of the data flow sequence is different from the preset numbering sequence, the target data flow parsing algorithm will also be different from the trusted data flow parsing algorithm in the preset algorithm library. Regardless of which of the above situations is true, it can be indicated that the target data flow parsing algorithm is not a trusted data flow parsing algorithm in the preset algorithm library. At this time, the target data flow parsing algorithm can be marked as a data flow parsing algorithm to be verified.

[0112] Step S210: storing the data stream parsing algorithm to be verified in a preset algorithm library, and updating the verification times of the data stream parsing algorithm to be verified.

[0113] Specifically, you can first check whether the data stream parsing algorithm to be verified already exists in the preset algorithm library. If it does, increase the verification times of the data stream parsing algorithm to be verified. If it does not exist, store the data stream parsing algorithm to be verified in the preset algorithm library and set the corresponding verification times.

[0114] Step S220: If the verification times of the data flow parsing algorithm to be verified are greater than the preset verification times, the data flow parsing algorithm to be verified is marked as a trusted data flow parsing algorithm.

[0115] Among them, when the verification times of the data stream parsing algorithm to be verified is greater than the preset verification times, it can be indicated that the data stream parsing algorithm to be verified is the data stream parsing algorithm corresponding to the new model of vehicle, and it can be marked as a trusted data stream parsing algorithm. When diagnosing the vehicle of this model again, the corresponding target data stream parsing algorithm can be directly obtained from the preset algorithm library according to the data stream sequence data, without the need to obtain the target data stream parsing algorithm corresponding to the data stream sequence data through the algorithm reasoning model.

[0116] In the above embodiment, when the target data stream parsing algorithm is not stored in the preset algorithm library, the target data stream parsing algorithm is marked as a data stream parsing algorithm to be verified and stored in the preset algorithm library. When the number of verifications is greater than the preset number of verifications, the data stream parsing algorithm to be verified is marked as a trusted data stream parsing algorithm. In this way, when the target data stream parsing algorithm needs to be used again to parse the data stream sequence data in the future, the target data stream parsing algorithm can be directly obtained from the preset algorithm library. While enriching the preset algorithm library, it can also make it more convenient to obtain the target data stream parsing algorithm.

[0117] Furthermore, when the data stream parsing algorithm to be verified is adjusted because the parameter numbers at the start position or the end position of the coding sequence and the preset coding sequence are different, the data stream parsing algorithm to be verified can be directly stored in the preset algorithm library as the data stream parsing algorithm corresponding to the new model of vehicle, and when the number of verifications is greater than the preset number of verifications, the data stream parsing algorithm to be verified can be directly re-marked as a trusted data stream parsing algorithm.

[0118] When the data stream parsing algorithm to be verified is adjusted because the parameter number in the middle position of the coding sequence and the preset coding sequence is different, then when the number of verifications of the data stream parsing algorithm to be verified is greater than the preset number of verifications, it is also necessary to check whether the hardware such as the data acquisition equipment has any faults, and mark the data stream parsing algorithm to be verified as a trusted data stream parsing algorithm after eliminating the hardware fault.

[0119] In the embodiment of the present application, in order to enable the algorithm reasoning model to determine the accurate target data stream parsing algorithm according to the data stream sequence data, before using the algorithm reasoning model, it is also necessary to sequence the algorithm reasoning model, such as Figure 5 As shown, Figure 5 The flowchart of the training steps of the algorithm reasoning model provided in the embodiment of the present application is shown. The sequence of steps can be executed by the same electronic device as the data flow analysis algorithm determination method, or by another training device. Figure 5 As shown, the training steps of the algorithm reasoning model include the following steps:

[0120] Step S310: Acquire a data stream training sequence, a first data category corresponding to the data stream training sequence, and a first data stream parsing algorithm corresponding to the data stream training sequence.

[0121] The data stream training sequence is a sample marked with a label, and the first data category and the first data stream parsing algorithm can both be used as labels for the data stream training sequence. The data stream training sequence can also include instruction labels, content labels, valid or invalid labels, etc. The algorithm reasoning model is trained by the data stream training sequence, so that the algorithm reasoning model learns the built-in structure and relationship of the data stream training sequence, as well as the value range of the content sequence in the data stream training sequence, parameter tolerance, data input range, continuity of data of the same data category, periodicity and other implicit information.

[0122] Step S320: Determine the second data category corresponding to the data stream training sequence through an algorithmic reasoning model.

[0123] Step S330: Determine a first loss function according to the first data category and the second data category.

[0124] Among them, the data stream training sequence is analyzed by the algorithmic reasoning model, and the second data category corresponding to the data stream training sequence is determined according to the characteristics of the data stream training sequence. The first loss function is used to measure the difference between the first data category and the second data category, so that the second data category obtained after analyzing the data stream training sequence according to the algorithmic reasoning model after optimization processing of the first loss function is closer to the first data category, that is, the second data category corresponding to the data stream training sequence determined by the algorithmic reasoning model is more accurate. The first loss function can be a cross entropy loss, a logarithmic loss, a Hinge loss, an exponential loss, etc.

[0125] Step S340: Analyze the data stream training sequences respectively through the algorithm reasoning model to determine the second data stream parsing algorithm corresponding to the data stream training sequences.

[0126] Step S350: Determine a second loss function according to the first data stream parsing algorithm and the second data stream parsing algorithm.

[0127] The second loss function is used to measure the difference between the first data stream parsing algorithm and the second data stream parsing algorithm. Specifically, it can be the difference between the two parsing results obtained after the data stream training sequence is parsed by the first data stream parsing algorithm and the second data stream parsing algorithm, or it can be the difference between the algorithms themselves, that is, the difference in the process of analyzing the data stream training sequence by the first data stream parsing algorithm and the second data stream parsing algorithm. The second loss function can be a cross entropy loss, a logarithmic loss, a Hinge loss, an exponential loss, etc.

[0128] Step S360: Optimize the algorithm reasoning model according to the first loss function and the second loss function.

[0129] Among them, when the algorithm reasoning model is optimized according to the first loss function and the second loss function, the algorithm reasoning model is optimized according to the first loss function and the second loss function respectively, that is, the algorithm reasoning model is first optimized according to the first loss function until the first loss function converges, and then the algorithm reasoning model is optimized according to the second loss function, or, the algorithm reasoning model is first optimized according to the second loss function until the second loss function converges, and then the algorithm reasoning model is optimized according to the first loss function.

[0130] The total loss function can also be determined based on the first loss function and the second loss function, and then the algorithm reasoning model can be optimized based on the total loss function. When determining the total loss function, different weights can be set for the first loss function and the second loss function, so that the algorithm reasoning model has different emphases on the determination of data categories and the determination of data flow parsing algorithms. For example, when determining the data flow parsing algorithm, it is necessary to first rely on the data category to classify the data flow sequence in the data flow sequence data. The accuracy of the data category will directly affect the accuracy of the data flow parsing algorithm. Therefore, a larger weight can be set for the first loss function and a smaller weight can be set for the second loss function.

[0131] In the above embodiment, the algorithm reasoning model is trained through the data flow training sequence, so that the optimized algorithm reasoning model can more accurately determine the data category and data flow parsing algorithm of the data flow sequence pair, thereby ensuring the accuracy of the target data flow parsing algorithm determined by the algorithm reasoning model.

[0132] Furthermore, in the above embodiment, in order to make the target data flow parsing algorithm more accurate, the target data flow parsing algorithm is compared with the trusted data flow parsing algorithm in the preset algorithm library according to the algorithm type of the target data flow parsing algorithm, so as to adjust the target data flow parsing algorithm. When the target data flow parsing algorithm is determined by the algorithm reasoning model, the algorithm type of the target data flow parsing algorithm also needs to be determined by the algorithm reasoning model. Therefore, in order to ensure that the algorithm reasoning model can accurately obtain the algorithm type of the target data flow parsing algorithm, such as Figure 6 As shown, Figure 6 A flow chart of another training step of an algorithm reasoning model provided in an embodiment of the present application is shown. The training step of the algorithm reasoning model may further include the following steps:

[0133] Step S410: obtaining a data stream parsing algorithm to be identified and a first algorithm type corresponding to the data stream parsing algorithm to be identified, wherein the data stream parsing algorithm to be identified includes data stream parsing algorithms corresponding to multiple data categories.

[0134] Step S420: Determine the second algorithm type corresponding to the data flow parsing algorithm to be identified through the algorithm reasoning model.

[0135] Step S430: Determine a third loss function according to the first algorithm type and the second algorithm type.

[0136] Step S440: Optimize the algorithm inference model according to the third loss function.

[0137] Among them, the first algorithm type is the real label of the data stream parsing algorithm to be identified, the second algorithm type is the predicted label of the data stream parsing algorithm to be identified determined by the algorithm reasoning model, and the third loss function is used to measure the difference between the first algorithm type and the second algorithm type, that is, the difference between the real label and the predicted label. The third loss function can be cross entropy loss, logarithmic loss, Hinge loss, exponential loss, etc.

[0138] In the above embodiment, the algorithm reasoning model is trained by the data flow parsing algorithm to be identified and its corresponding first algorithm type, so that the algorithm reasoning model can more accurately determine the algorithm type of the target data flow parsing algorithm.

[0139] It should be pointed out that steps S310 to S360, and steps S410 to S440 are all used to train the algorithm reasoning model, and the execution order between the two does not necessarily have a sequence. When training the algorithm reasoning model, the algorithm reasoning model can be optimized according to the first loss function and the second loss function until the first loss function and the second loss function converge, and then the algorithm reasoning model can be optimized according to the third loss function; the algorithm reasoning model can also be optimized according to the third loss function until the third loss function converges, and then the algorithm reasoning model can be optimized and adjusted according to the first loss function and the second loss function; the first loss function, the second loss function and the third loss function can also be determined first, and then the total loss function can be determined according to the first loss function, the second loss function and the third loss function, so as to optimize the algorithm reasoning model according to the total loss function.

[0140] According to another aspect of the embodiment of the present application, Figure 7 As shown, Figure 7 A schematic diagram of the structure of a data stream analysis algorithm determination device provided in an embodiment of the present application is shown. The data stream analysis algorithm determination device 1 includes: an acquisition module 11, a matching module 12 and an algorithm determination module 13.

[0141] The acquisition module 11 is used to acquire data stream sequence data, and the data stream sequence data includes a data stream sequence. The matching module 12 is used to match the data stream sequence data with multiple trusted data stream parsing algorithms in a preset algorithm library to determine the matching degree between each trusted data stream parsing algorithm and the data stream sequence data. The algorithm determination module 13 is used to determine the data category corresponding to the data stream sequence in the data stream sequence data through a pre-trained algorithm reasoning model when the matching degree corresponding to each trusted data stream parsing algorithm is less than the preset matching degree, and analyze the data stream sequence corresponding to the data category to determine the data stream parsing algorithm corresponding to the data category, and integrate the data stream parsing algorithms corresponding to the data category to determine the target data stream parsing algorithm corresponding to the data stream sequence data.

[0142] In the above embodiment, the matching degree between the data stream sequence data and each trusted data stream parsing algorithm in the preset algorithm library is first determined. When the matching degree of each trusted data stream parsing algorithm is low, the data stream sequence data is analyzed by the algorithm reasoning model to obtain the target data stream parsing algorithm. Even if the organization rule of the data stream sequence is unknown, the target data stream parsing algorithm can be directly determined based on the data stream sequence data, so that the vehicle diagnostic equipment can quickly obtain the target data stream parsing data to parse the data stream sequence data, effectively improving the parsing speed of the data stream sequence data.

[0143] According to another aspect of the embodiment of the present application, Figure 8 As shown, Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown, and the specific embodiment of the present application does not limit the specific implementation of the electronic device.

[0144] like Figure 8 As shown, the electronic device 2 may include: a processor (processor) 21 and a memory (memory) 22.

[0145] The memory 22 is used to store a computer program 23. The memory 22 may include a high-speed RAM memory, or may also include a non-volatile memory, such as at least one disk memory. The computer program 23 may include computer executable instructions.

[0146] The processor 21 is used to execute the computer program 23 to implement the above-mentioned data flow parsing algorithm determination method embodiment.

[0147] The processor 21 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the electronic device 2 may be processors of the same algorithm type, such as one or more CPUs; or processors of different algorithm types, such as one or more CPUs and one or more ASICs.

[0148] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned data flow parsing algorithm determination method embodiment is implemented.

[0149] An embodiment of the present application provides a computer program, which can be executed by a processor to implement the above-mentioned data flow parsing algorithm determination method embodiment.

[0150] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the above-mentioned data flow parsing algorithm determination method embodiment is implemented.

[0151] In several embodiments provided in the present application, if any function is implemented in the form of a software function module / unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, part or all of the technical solution of the present application can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, server or other electronic device) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (RandomAccess Memory, RAM), disk or optical disk and other media that can store computer program code.

[0152] The algorithm or display provided here are not inherently related to any specific computer, virtual system or other equipment. Various general systems can also be used together with the teaching based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present application described here, and the above description of specific languages ​​is to disclose the best mode of implementation of the present application.

[0153] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the claims that list several devices, several units or modules in these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.

[0154] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining a data stream parsing algorithm, characterized in that: The method comprises: Acquire data stream sequence data, wherein the data stream sequence data includes a data stream sequence; Matching the data stream sequence data with a plurality of trusted data stream parsing algorithms in a preset algorithm library, and determining a matching degree between each of the trusted data stream parsing algorithms and the data stream sequence data; If the matching degrees corresponding to each of the trusted data flow parsing algorithms are less than the preset matching degrees, the data category corresponding to the data flow sequence in the data flow sequence data is determined by a pre-trained algorithm inference model, and the data flow sequence corresponding to the data category is analyzed to determine the data flow parsing algorithm corresponding to the data category, and the target data flow parsing algorithm corresponding to the data flow sequence data is determined according to the data flow parsing algorithm corresponding to the data category.

2. The method for determining a data flow analysis algorithm according to claim 1, characterized in that: The method further comprises: If the matching degree corresponding to at least some of the trusted data flow parsing algorithms is greater than or equal to the preset matching degree, obtaining a candidate trusted data flow parsing algorithm from a preset algorithm library according to the matching degree corresponding to the trusted data flow parsing algorithm; If there are multiple candidate trusted data flow parsing algorithms, the data flow sequence data is parsed by each candidate trusted data flow parsing algorithm respectively to obtain the target parameter quantity of each data category corresponding to each candidate trusted data flow parsing algorithm; According to the preset parameter quantity of each data category corresponding to each of the trusted data flow parsing algorithms and the target parameter quantity, the target data flow parsing algorithm corresponding to the data flow sequence data is determined.

3. The method for determining a data flow analysis algorithm according to claim 1, characterized in that: The matching of the data stream sequence data with a plurality of trusted data stream parsing algorithms in a preset algorithm library to determine the matching degree between each of the trusted data stream parsing algorithms and the data stream sequence data specifically includes: Determining whether the instruction sequence of each data stream sequence in the data stream sequence data matches a preset instruction rule; If the instruction sequence of at least part of the data stream sequence matches the preset instruction rule, a plurality of candidate trusted data stream parsing algorithms are obtained from the preset algorithm library according to the preset instruction rule, and the weight of at least part of the data stream sequence is increased; Determining whether a content sequence of a data stream sequence in the data stream sequence data matches each candidate of the trusted data stream parsing algorithm; If the content sequence of the data stream sequence does not match any of the candidate trusted data stream parsing algorithms, then reducing the weight of the data stream sequence; Determining whether a parameter tolerance of the content sequence is within a preset tolerance range; If the parameter tolerance of the content sequence is within the preset tolerance range, increasing the weight of the data stream sequence; The data stream sequence data is matched with a plurality of trusted data stream parsing algorithms in a preset algorithm library according to the weight of the data stream sequence, and the matching degree between each of the trusted data stream parsing algorithms and the data stream sequence data is determined.

4. The method for determining a data flow analysis algorithm according to claim 3, characterized in that: The determining whether the content sequence of the data stream sequence in the data stream sequence data matches each candidate of the trusted data stream parsing algorithm specifically includes: Obtaining a preset parameter range of each candidate of the trusted data flow parsing algorithm; Perform reverse deduction based on the candidate trusted data flow parsing algorithms and the preset parameter interval to determine the data flow sequence interval corresponding to each candidate trusted data flow parsing algorithm; If the content sequences of the data stream sequence are all outside the data stream sequence intervals, then the content sequence of the data stream sequence does not match any of the candidate trusted data stream parsing algorithms.

5. The method for determining a data flow analysis algorithm according to claim 1, characterized in that: Determining the data category corresponding to the data stream sequence in the data stream sequence data by using a pre-trained algorithm inference model specifically includes: Detecting the validity of the data stream sequence in the data stream sequence data by using the algorithmic reasoning model; Screening the data stream sequences in the data stream sequence data to obtain multiple groups of valid data stream sequences; The data category corresponding to the valid data stream sequence is determined through the algorithm reasoning model.

6. The method for determining a data flow analysis algorithm according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining the algorithm type of the target data stream parsing algorithm; According to the algorithm type of the target data stream parsing algorithm, the target data stream parsing algorithm is compared with the trusted data stream parsing algorithm in the preset algorithm library, and the target data stream parsing algorithm is adjusted.

7. The method for determining a data flow analysis algorithm according to claim 6, characterized in that: The step of comparing the target data stream parsing algorithm with the trusted data stream parsing algorithm in the preset algorithm library according to the algorithm type of the target data stream parsing algorithm and adjusting the target data stream parsing algorithm specifically includes: Determine the numbering sequence corresponding to each data category in the data stream sequence data by using the target data stream parsing algorithm; Acquire, according to the algorithm type corresponding to the target data stream parsing algorithm, a preset number sequence of each data category corresponding to each trusted data stream parsing algorithm in the preset algorithm library; Compare the numbering sequence corresponding to the data stream sequence of each data category with the preset numbering sequence respectively; The target data stream parsing algorithm is adjusted according to the comparison result.

8. The method for determining a data flow analysis algorithm according to claim 7, characterized in that: The numbering sequence includes parameter numbers corresponding to a plurality of parameters in a content sequence of a data stream sequence; The adjusting the target data stream parsing algorithm according to the comparison result specifically includes: If the numbering sequence increases the first parameter number compared to the preset numbering sequence, and the parameter tolerance of the content sequence of the data stream sequence is outside the preset tolerance range, the target data stream parsing algorithm is adjusted so that the target data stream parsing algorithm deletes the first parameter number and its corresponding parameter when the first parameter number is at the beginning or end of the numbering sequence, and marks the first parameter number and its corresponding parameter as abnormal data when the first parameter number is at the middle of the numbering sequence; If the numbering sequence is less than the preset numbering sequence by a second parameter number, and the second parameter number is located in the middle position of the preset numbering sequence, the target data stream parsing algorithm is adjusted so that the target data stream parsing algorithm restores the second parameter number and its corresponding parameters, wherein the second parameter number and its corresponding parameters are the sequence that is eliminated from the data stream sequence during the preprocessing process.

9. The method for determining a data flow analysis algorithm according to claim 7, characterized in that: After adjusting the target data stream parsing algorithm according to the comparison result, the method further includes: If there is a difference between the target data flow parsing algorithm and the trusted data flow parsing algorithm in the preset algorithm library, marking the target data flow parsing algorithm as a data flow parsing algorithm to be verified; The data stream parsing algorithm to be verified is stored in the preset algorithm library, and the verification times of the data stream parsing algorithm to be verified are updated; If the verification times of the data flow parsing algorithm to be verified are greater than the preset verification times, the data flow parsing algorithm to be verified is marked as a trusted data flow parsing algorithm.

10. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the data flow analysis algorithm determination method according to any one of claims 1 to 9.