Flow control frame searching method and device and related equipment
By using the host computer to find and calculate the physical value of the flow control frame in the flow control frame string during vehicle testing, the problems of manual misoperation and low efficiency are solved, and the accuracy and efficiency of the flow control frame test are improved.
Patent Information
- Application Number
- CN202410864859.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-24
AI Technical Summary
In the vehicle's unified diagnostic service, the data obtained in the flow control frame test is in hexadecimal, which requires manual search and conversion processing. There is a risk of manual misoperation and low efficiency.
The host computer receives the search request input by the user, searches for the target data identifier in the preset flow control frame string, and calculates the physical value of the flow control frame according to the conversion formula to avoid manual misoperation and improve test efficiency.
It improves the accuracy and efficiency of flow control frame testing, avoids the risk of manual misoperation, and can process a large amount of flow control frame data.
Smart Images

Figure CN118694686A
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle testing technology, and in particular relates to a method and apparatus for searching a flow control frame and related equipment. Background Art
[0002] In the Unified Diagnostic Services (UDS) standard for vehicles, the Flow Control Frame is a special control frame that can be used to verify the controller's data transmission capabilities in the network and avoid data loss in the event of a vehicle failure. Currently, in flow control frame testing, the acquired flow control frame data is in hexadecimal format. To verify the accuracy of fault data transmission, testers must manually search and convert the data after acquiring the flow control frame to accurately locate the problem. However, this carries the risk of manual error and cannot guarantee the accuracy of the flow control frame test. Furthermore, the large number of flow control frames transmitted during the test makes manual processing inefficient. Summary of the Invention
[0003] The embodiments of the present application provide a method, apparatus, and related equipment for searching a flow control frame, which can avoid the risk of manual misoperation and accurately obtain the physical value of the target flow control frame.
[0004] In a first aspect, an embodiment of the present application provides a method for searching a flow control frame, which is applied to a host computer and includes:
[0005] Receive a search request input by a user, the search request including a target data identifier and a target byte length corresponding to the target data identifier;
[0006] In response to the search request, searching for the target data identifier in a preset flow control frame character string, and determining a character string of the target byte length following the target data identifier as a target flow control frame original value, the flow control frame character string including at least one flow control frame original value generated by a controller in response to a diagnostic fault code and a data identifier corresponding to each flow control frame original value, the diagnostic fault code being sent to the controller by a real-time machine, and different flow control frame original values having different byte lengths;
[0007] The target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value.
[0008] In a second aspect, an embodiment of the present application provides a flow control frame search device, which is applied to a host computer and includes:
[0009] A receiving module, configured to receive a search request input by a user, wherein the search request includes a target data identifier and a target byte length corresponding to the target data identifier;
[0010] a search module, configured to search for the target data identifier in a preset flow control frame character string in response to the search request, and determine a character string of the target byte length following the target data identifier as a target flow control frame original value, the flow control frame character string including at least one flow control frame original value generated by a controller in response to a diagnostic fault code and a data identifier corresponding to each flow control frame original value, the diagnostic fault code being sent to the controller by a real-time machine, and different flow control frame original values having different byte lengths;
[0011] The calculation module is used to calculate the original value of the target flow control frame according to a preset conversion formula to obtain the physical value of the target flow control frame.
[0012] In a third aspect, an embodiment of the present application provides a flow control frame search system, the system comprising: a real-time machine, a controller, and a host computer, wherein the real-time machine, the controller, and the host computer are communicatively connected.
[0013] The host computer is used to receive a search request input by a user, wherein the search request includes a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame character string, and the character string of the target byte length after the target data identifier is determined as the target flow control frame original value, wherein the flow control frame character string includes at least one flow control frame original value generated by the controller in response to a diagnostic fault code and a data identifier corresponding to each of the flow control frame original values, wherein the diagnostic fault code is sent to the controller by the real-time machine, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain a target flow control frame physical value.
[0014] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for searching a flow control frame as described in any one of the above items is implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method for searching a flow control frame as described in any one of the above items is implemented.
[0016] In a sixth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for searching for a flow control frame as described in any one of the above items.
[0017] The flow control frame search method, device, and related equipment of the embodiment of the present application are applied to a host computer and can receive a search request input by a user, the search request including a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame string, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, the flow control frame string including at least one flow control frame original value generated by a controller in response to a diagnostic fault code and the data identifier corresponding to each flow control frame original value, the diagnostic fault code is sent to the controller by a real-time machine, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value. In this way, in the embodiment of the present application, the target data identifier can be searched in the flow control frame string obtained after the flow control frame test by the host computer, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, and the conversion calculation is performed, which can avoid the risk of manual error operation, thereby accurately obtaining the target flow control frame physical value, and is not limited by the number of flow control frames, thereby improving the efficiency of flow control frame testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 This is an architectural diagram of a flow control frame search system provided in an embodiment of the present application;
[0020] Figure 2 1 is a flow chart of a method for searching a flow control frame provided in an embodiment of the present application;
[0021] Figure 3 This is a flow chart of a flow control frame testing method provided in an embodiment of the present application;
[0022] Figure 4 This is a logical diagram of automatically reading flow control frames provided by an embodiment of the present application;
[0023] Figure 5 This is a flowchart of the implementation process and judgment logic of the automated testing method provided in the embodiment of the present application;
[0024] Figure 6 This is a schematic diagram of the storage and processing process of the flow control frame provided in the embodiment of the present application in Matlab;
[0025] Figure 7 This is a schematic diagram of the output identifier, meaning, and conversion result provided in the embodiment of the present application;
[0026] Figure 8 Schematic diagram of the structure of the flow control frame search device provided in an embodiment of the present application;
[0027] Figure 9 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0029] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0030] In the Unified Diagnostic Services (UDS) standard for vehicles, the Flow Control Frame is a special control frame that can be used to verify the controller's data transmission capabilities in the network and avoid data loss in the event of a vehicle failure. Currently, in flow control frame testing, the acquired flow control frame data is in hexadecimal format. To verify the accuracy of fault data transmission, testers must manually search and convert the data after acquiring the flow control frame to accurately locate the problem. However, this carries the risk of manual error and cannot guarantee the accuracy of the flow control frame test. Furthermore, the large number of flow control frames transmitted during the test makes manual processing inefficient.
[0031] In order to solve the problems in the prior art, the embodiments of the present application provide a method, apparatus and related equipment for searching a flow control frame.
[0032] Figure 1 FIG1 shows an architecture diagram of a flow control frame search system provided by an embodiment of the present application. Figure 1 As shown, the flow control frame search system 100 may include: a real-time machine 101, a controller 102 and a host computer 103, and the real-time machine 101, the controller 102 and the host computer 103 are communicatively connected.
[0033] The upper computer 103 is used to receive a search request input by a user, where the search request includes a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame character string, and the character string of the target byte length after the target data identifier is determined as the target flow control frame original value, where the flow control frame character string includes at least one flow control frame original value generated by the controller 102 in response to the diagnostic fault code and the data identifier corresponding to each flow control frame original value, where the diagnostic fault code is sent to the controller 102 by the real-time machine 101, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value.
[0034] The real-time machine 101 can be a computer system capable of responding to and processing inputs promptly and generating outputs within a specified timeframe, all within strict time constraints. The core requirements of a real-time machine are predictability and reliability. It is typically used in applications requiring high precision, such as data acquisition, control, and simulation. During vehicle development, the real-time machine can simulate actual vehicle operating conditions and then simulate diagnostic equipment to observe the controller and obtain flow control frame observations.
[0035] The controller 102 may be a vehicle's electronic control unit (ECU), a core component of the vehicle's electronic system. A controller typically consists of a microprocessor and associated circuitry, and is used to control and manage various vehicle systems and functions. The controller may generate at least one flow control frame raw value in response to a diagnostic trouble code.
[0036] The host computer 103 is a computer or host computer that communicates with and controls the operation of a device or system. It can communicate with the controller via the vehicle's diagnostic interface to read at least one internal flow control frame raw value and the data identifier corresponding to each flow control frame raw value. The host computer can also send diagnostic trouble codes to the real-time machine for operations such as flow control frame testing. The host computer can include Simulink models and MATLAB models.
[0037] The controller 102, the real-time machine 101, and the host computer 103 are communicatively connected. For example, the host computer and the real-time machine communicate via Ethernet, the real-time machine and the controller communicate via the CAN bus, and the host computer and the controller communicate using the XCP protocol. XCP is a communication protocol used for diagnosing and debugging automotive electronic systems. XCP stands for "Universal Measurement and Calibration Protocol."
[0038] Figure 2 The flow chart of the method for searching the flow control frame provided by an embodiment of the present application is shown. Figure 1 The flow control frame search system shown in FIG. Figure 2 As shown, a method for searching a flow control frame is applied to a host computer. The method may include the following steps S201 to S203:
[0039] S201, receiving a search request input by a user, where the search request includes a target data identifier and a target byte length corresponding to the target data identifier;
[0040] S202: In response to the search request, search for a target data identifier in a preset flow control frame character string, and determine a character string of target byte length following the target data identifier as a target flow control frame original value, the flow control frame character string including at least one flow control frame original value generated by the controller in response to the diagnostic fault code and a data identifier corresponding to each flow control frame original value, the diagnostic fault code being sent to the controller by the real-time machine, and different flow control frame original values having different byte lengths;
[0041] S203: Calculate the original value of the target flow control frame according to a preset conversion formula to obtain a physical value of the target flow control frame.
[0042] The flow control frame search method of the embodiment of the present application is applied to a host computer and can receive a search request input by a user, the search request including a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame string, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, the flow control frame string including at least one flow control frame original value generated by a controller in response to a diagnostic fault code and the data identifier corresponding to each flow control frame original value, the diagnostic fault code is sent to the controller by a real-time machine, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value. In this way, in the embodiment of the present application, the target data identifier can be searched in the flow control frame string obtained after the flow control frame test by the host computer, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, and the conversion calculation is performed, which can avoid the risk of manual error operation, thereby accurately obtaining the target flow control frame physical value, and is not limited by the number of flow control frames, thereby improving the efficiency of flow control frame testing.
[0043] In S201, the search request may include a target data identifier and a target byte length corresponding to the target data identifier. The original flow control frame value corresponding to different data identifiers has different byte lengths. The target byte length corresponding to the target data identifier can be obtained by querying a preset UDS diagnostic fault table. The UDS diagnostic fault table includes not only the byte length of each data identifier but also descriptive information and conversion formulas for each data identifier.
[0044] The above data identifier can refer to the fault code defined in the UDS protocol, such as CF 03 for mileage. The target data identifier is the data identifier that the user needs to search for.
[0045] In S202, the flow control frame character string may include at least one flow control frame original value generated by the controller in response to a diagnostic fault code and a data identifier corresponding to each flow control frame original value, wherein the diagnostic fault code is sent to the controller by the real-time machine.
[0046] The above flow control frame original value may be a hexadecimal value. Of course, in the embodiment of the present application, it is not limited to this, and this is just a specific example.
[0047] The diagnostic trouble code may be a 0x19 service diagnostic code of the diagnostic trouble code (DTC) in the UDS standard. For example, the snapshot data (0x04) of the DTC may be 19 04 04 80 00 01.
[0048] In S203, the target flow control frame physical value may be a decimal value. Of course, in the embodiment of the present application, it is not limited to this, and this is just a specific example.
[0049] The above-mentioned preset conversion formula can specifically be a formula for converting hexadecimal to decimal. In the embodiment of the present application, it is not limited to this, and the conversion formula can also be selected according to the actual needs of the user.
[0050] As an implementation of the present application, in order to facilitate the user to find the corresponding flow control frame, before the above S202, the above method may further include:
[0051] Sending a diagnostic trouble code to the real-time machine so that the real-time machine sends the diagnostic trouble code to the controller; when the controller receives the diagnostic trouble code, sending a response signal to the real-time machine; when the real-time machine receives a positive response signal, sending a response rate to the controller; in response to the diagnostic trouble code, the controller generates a flow control frame original value of each data identifier according to the response rate; the controller sends at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to the host computer;
[0052] At least one flow control frame original value and the data identifiers corresponding to the flow control frame original values are concatenated to obtain a flow control frame character string.
[0053] After receiving the diagnostic trouble code sent by the host computer, the real-time machine can construct a fault scenario corresponding to the diagnostic trouble code.
[0054] The response signal may, for example, be a "7EB response signal." A positive response, in data transmission or message delivery, is a confirmation message returned by the recipient indicating that the data has been received and processed correctly. If the response signal received by the real-time machine is not a positive response, an error is reported.
[0055] The real-time machine sends a response rate to the controller. For example, the real-time machine sends 30 0014 00 00 00 00 00 to the controller, where the response rate is 14 in hexadecimal, which is 20 ms when converted to decimal.
[0056] The above flow control frame character string, for example, can be composed of characters such as 01 27CF 00 77CF 01 00 00CF 02 17 0A19 09 00 12CF 03 00 00 0A F4 9A 06 00 05 04D6 07 00D6 08 01D6 0B 75 30D6 0C75 30D6 0F 10 1F D6 15 01D6 16 01D6 19 36D6 1A 1B D61D 03E8 D6 1F.
[0057] In an embodiment of the present application, the upper computer sends a diagnostic fault code to the real-time machine so that the real-time machine simulates the fault scenario corresponding to the diagnostic fault code, and then sends a response rate to the controller, so that the controller generates the original value of the flow control frame of each data identifier according to the response rate under the fault scenario corresponding to the diagnostic fault code. Finally, at least one flow control frame original value and the data identifier corresponding to each flow control frame original value are spliced to obtain a flow control frame character string, which not only saves the diagnostic tool from sending and receiving flow control frames, but also makes it easier for users to find corresponding flow control frames.
[0058] In some embodiments, the above-mentioned concatenation of at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to obtain a flow control frame string includes:
[0059] Determine whether the data at the target location in the i-th group of data is the same as the data in the i-1th group of data, where the i-th group of data is the data at the i-th response rate in at least one flow control frame original value and the data identifier corresponding to each flow control frame original value, where i is a positive integer greater than 0;
[0060] If the data at the target position in the i-th group of data is different from the data at the target position in the i-1-th group of data, the i-th group of data is stored; i=i+1 is set, and the process proceeds to the step of "determining whether the data at the target position in the i-th group of data is the same as the data at the target position in the i-1-th group of data";
[0061] In the case that the data at the target position in the i-th group of data is the same as the data in the i-1-th group of data, the stored groups of data are concatenated to obtain a flow control frame character string.
[0062] The i-th group of data is data at the i-th response rate from at least one flow control frame original value and the data identifier corresponding to each flow control frame original value. Similarly, the i-1-th group of data is data at the i-1-th response rate from at least one flow control frame original value and the data identifier corresponding to each flow control frame original value.
[0063] The target position, for example, can be the first two digits in a set of data. In the embodiment of the present application, it is not limited thereto and can also be data at other positions, which is not specifically limited here.
[0064] The situation where the data at the target position in the above-mentioned i-th group of data is different from that in the i-1-th group of data means that the controller is still generating new data at the i-th response rate. Therefore, it is necessary to store this group of data and set i+1 to return to the loop to determine whether the data at the target position in the i-th group of data is the same as that in the i-1-th group of data.
[0065] Similarly, the situation where the data at the target position in the above-mentioned i-th group of data is the same as the data in the i-1-th group of data means that the controller does not generate new data at the i-th response rate. At this time, it is no longer necessary to store, but instead all stored groups of data are spliced to obtain a long string of flow control frame strings.
[0066] In an embodiment of the present application, by judging whether the data at the target position in the i-th group of data is the same as the data in the i-1th group of data, if the data at the target position in the i-th group of data is different from the data in the i-1th group of data, the i-th group of data is stored; and finally, the stored groups of data are spliced to obtain a flow control frame character string. Automated processing can reduce the risk of manual error and improve the efficiency of flow control frame testing.
[0067] As another implementation of the present application, in order to quickly locate problems in the flow control frame test, after S203, the method may further include:
[0068] Acquire at least one flow control frame observation value sent by the real-time machine, where the at least one flow control frame observation value is a value fed back to the real-time machine by the controller in response to the diagnostic fault code;
[0069] The target flow control frame physical value is compared with the target flow control frame observation value to generate a target flow control frame comparison result, where the target flow control frame observation value is a flow control frame observation value corresponding to the target data identifier in at least one flow control frame observation value.
[0070] The at least one flow control frame observation value is a value fed back to the real-time machine by the controller in response to the diagnostic fault code.
[0071] The above-mentioned flow control frame observation value is theoretically consistent with the flow control frame observation value, but in order to verify the data transmission capability of the controller in the network and avoid data loss when the vehicle fails, it is also necessary to compare the target flow control frame physical value with the target flow control frame observation value to generate a target flow control frame comparison result. The target flow control frame comparison result can be used to indicate the difference and similarities between the target flow control frame physical value and the target flow control frame observation value.
[0072] In an embodiment of the present application, by obtaining at least one flow control frame observation value sent by the real-time machine, at least one flow control frame observation value is a value that the controller feeds back to the real-time machine in response to the diagnostic fault code, and then comparing the target flow control frame physical value with the target flow control frame observation value to generate a target flow control frame comparison result, it is convenient for users to analyze data to quickly locate problems in the flow control frame test.
[0073] In order to facilitate understanding of the method for searching for flow control frames in the embodiment of the present application, the actual application process of the method for searching for flow control frames is described as follows:
[0074] like Figures 3 to 5As shown, the method for searching the flow control frame provided in the embodiment of the present application may include the following steps:
[0075] 1. The test engineer first constructs a fault. The host computer sends the UDS 0x19 service diagnostic fault code to the controller through the real-time machine according to the different faults.
[0076] 2. After the controller receives the diagnostic trouble code (e.g., 19 04 04 80 00 01) through CAN communication and replies with a positive response of 7EB, the real-time machine again sends 30 00 14 00 00 00 00 00 to the controller to control the sending rate of 7EB (i.e., the above-mentioned response rate);
[0077] 3. After obtaining the positive response, the original values of all responses (equivalent to the original values of the flow control frame of each data identifier) are stored in the model as strings and spliced into a long string (equivalent to the flow control frame string);
[0078] 4. Input the required flow control frame identifier (equivalent to the target data identifier) into the host computer's MATLAB, and find the corresponding bytes and formulas in the UDS diagnostic fault table;
[0079] 5. Find the original value of the corresponding flow control frame (equivalent to the original value of the target flow control frame mentioned above) in the Simulink model, transmit it to the real-time machine and controller through the XCP protocol, and finally calculate the original value according to the formula and feed it back to the tester;
[0080] 6. Analyze the output results (equivalent to the physical value of the target flow control frame mentioned above) and the results observed by the real-time machine (equivalent to the observed value of the target flow control frame mentioned above) to locate the problem.
[0081] like Figure 6 As shown in the figure, the storage and processing process of the above flow control frame in MATLAB is as follows:
[0082] 1. Convert the hexadecimal number of the original flow control frame into decimal to determine whether it is a positive response (there is a corresponding fault);
[0083] 2. Take the first two digits of each set of data to determine whether there is any change. If there is any change, convert the hexadecimal number into a string and store it until it stops changing.
[0084] 3. After concatenating all stored strings into a long string, input the hexadecimal identifier to be queried through the script and convert it into a string through the model;
[0085] 4. After comparison, find the identifier we need and the string of corresponding bytes, convert them into decimal numbers and output them to the script for further processing;
[0086] 5. Finally, output the identifier, meaning and conversion result for comparison, such as Figure 7 As shown, the problem was found.
[0087] The embodiments of the present application can eliminate the use of diagnostic tools (such as CANOE tools) in flow control frame testing, realize the sending and receiving of flow control frames, get rid of the limitations of tools, and use the Simulink model to process string data. There is no need to manually confirm the data before substituting it into the calculation, thereby improving test efficiency.
[0088] Based on the flow control frame search method provided in the above embodiment, the present application also provides a specific implementation of a flow control frame search device. Please refer to the following embodiment.
[0089] See Figure 8 The flow control frame search device 800 provided in the embodiment of the present application is applied to a host computer. The device 800 may include the following modules: a receiving module 801, a search module 802 and a calculation module 803.
[0090] The receiving module 801 is configured to receive a search request input by a user, wherein the search request includes a target data identifier and a target byte length corresponding to the target data identifier;
[0091] a search module 802 configured to search for a target data identifier in a preset flow control frame string in response to a search request, and determine a string of target byte length following the target data identifier as a target flow control frame original value, wherein the flow control frame string includes at least one flow control frame original value generated by the controller in response to a diagnostic fault code and an identification code corresponding to each flow control frame original value, wherein the diagnostic fault code is sent to the controller by the real-time machine, and different flow control frame original values have different byte lengths;
[0092] The calculation module 803 is configured to calculate the original value of the target flow control frame according to a preset conversion formula to obtain the physical value of the target flow control frame.
[0093] The flow control frame search device of the embodiment of the present application is applied to a host computer and can receive a search request input by a user, the search request including a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame string, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, the flow control frame string including at least one flow control frame original value generated by a controller in response to a diagnostic fault code and the data identifier corresponding to each flow control frame original value, the diagnostic fault code is sent to the controller by a real-time machine, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value. In this way, in the embodiment of the present application, the target data identifier can be searched in the flow control frame string obtained after the flow control frame test by the host computer, and the string of the target byte length after the target data identifier is determined as the target flow control frame original value, and the conversion calculation is performed, which can avoid the risk of manual error operation, thereby accurately obtaining the target flow control frame physical value, and is not limited by the number of flow control frames, thereby improving the efficiency of flow control frame testing.
[0094] As an implementation of the present application, in order to facilitate the user to find the corresponding flow control frame, the above-mentioned device 800 may further include:
[0095] The sending module is used to send a diagnostic trouble code to the real-time machine so that the real-time machine sends the diagnostic trouble code to the controller; the controller sends a response signal to the real-time machine when receiving the diagnostic trouble code; the real-time machine sends a response rate to the controller when the received response signal is a positive response; the controller generates a flow control frame original value of each data identifier according to the response rate in response to the diagnostic trouble code; the controller sends at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to the host computer;
[0096] The splicing module is used to splice at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to obtain a flow control frame character string.
[0097] In some embodiments, the splicing module may specifically include:
[0098] a determination unit, configured to determine whether the data in the i-th group of data and the data at the target location in the i-1-th group of data are identical, where the i-th group of data is data at an i-th response rate in at least one flow control frame original value and a data identifier corresponding to each flow control frame original value, where i is a positive integer greater than 0;
[0099] a storage unit for storing the i-th group of data if the data at the target position in the i-th group of data is different from the data at the target position in the i-1-th group of data; setting i=i+1, and jumping to the step of "determining whether the data at the target position in the i-th group of data is the same as the data at the target position in the i-1-th group of data";
[0100] The splicing unit is used to splice the stored groups of data to obtain a flow control frame character string when the data at the target position in the i-th group of data is the same as the data in the i-1-th group of data.
[0101] As another implementation of the present application, in order to quickly locate problems in the flow control frame test, the above-mentioned device 800 may further include:
[0102] an acquisition module, configured to acquire at least one flow control frame observation value sent by the real-time machine, wherein the at least one flow control frame observation value is a value fed back to the real-time machine by the controller in response to the diagnostic fault code;
[0103] The comparison module is used to compare the target flow control frame physical value with the target flow control frame observation value to generate a target flow control frame comparison result. The target flow control frame observation value is the flow control frame observation value corresponding to the target data identifier in at least one flow control frame observation value.
[0104] Figure 9 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0105] The electronic device may include a processor 901 and a memory 902 storing computer program instructions.
[0106] Specifically, the processor 901 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0107] The memory 902 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 902 may include removable or non-removable (or fixed) media. Where appropriate, the memory 902 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 902 is a non-volatile solid-state memory.
[0108] In certain embodiments, the memory 902 may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical / tangible memory storage devices. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0109] The processor 901 reads and executes computer program instructions stored in the memory 902 to implement any one of the flow control frame search methods in the above embodiments.
[0110] In one example, the electronic device may further include a communication interface 903 and a bus 910. Figure 9 As shown, the processor 901 , the memory 902 , and the communication interface 903 are connected via a bus 910 and communicate with each other.
[0111] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0112] Bus 910 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 910 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0113] The electronic device can execute the flow control frame search method in the embodiment of the present application, thereby realizing the combination of Figure 2 and Figure 8 The invention discloses a method and device for searching flow control frames.
[0114] In addition, in conjunction with the flow control frame search method in the above embodiments, embodiments of the present application may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the flow control frame search methods in the above embodiments is implemented.
[0115] In combination with the flow control frame search method in the above embodiments, an embodiment of the present application may provide a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device executes any one of the flow control frame search methods above.
[0116] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.
[0117] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0118] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0119] Aspects of the present disclosure have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or flowchart and the combination of the boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0120] The above description is only a specific embodiment of the present application. Those skilled in the art will clearly understand that for the convenience and brevity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application.
Claims
1. A method for searching a flow control frame, characterized in that: Applied to a host computer, the method includes: Receiving a search request input by a user, the search request including a target data identifier and a target byte length corresponding to the target data identifier; In response to the search request, the target data identifier is searched in a preset flow control frame character string, and the character string of the target byte length after the target data identifier is determined as a target flow control frame original value, the flow control frame character string includes at least one flow control frame original value generated by the controller in response to the diagnostic fault code and a data identifier corresponding to each of the flow control frame original values, the diagnostic fault code is sent to the controller by the real-time machine, and different flow control frame original values have different byte lengths; The target flow control frame original value is calculated according to a preset conversion formula to obtain the target flow control frame physical value.
2. The method according to claim 1, characterized in that Before searching for the target data identifier in a preset flow control frame character string in response to the search request and determining the character string of the target byte length after the target data identifier as the target flow control frame original value, the method further includes: Sending the diagnostic fault code to the real-time machine so that the real-time machine sends the diagnostic fault code to the controller; the controller sends a response signal to the real-time machine when receiving the diagnostic fault code; the real-time machine sends a response rate to the controller when the received response signal is a positive response; the controller generates a flow control frame original value of each data identifier according to the response rate in response to the diagnostic fault code; the controller sends the at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to the host computer; The at least one flow control frame original value and the data identifiers corresponding to the flow control frame original values are concatenated to obtain the flow control frame character string.
3. The method according to claim 2, characterized in that The step of concatenating the at least one flow control frame original value and the data identifiers corresponding to the flow control frame original values to obtain the flow control frame character string includes: Determine whether the data at the target position in the i-th group of data is the same as the data in the i-1th group of data, wherein the i-th group of data is the data at the i-th response rate in the data identifier corresponding to the at least one flow control frame original value and each of the flow control frame original values, and i is a positive integer greater than 0; In the case where the data at the target position in the i-th group of data is different from the data at the target position in the i-1th group of data, the i-th group of data is stored; i=i+1 is set, and the process proceeds to the step of "determining whether the data at the target position in the i-th group of data is the same as the data at the target position in the i-1th group of data"; In the case where the data at the target position in the i-th group of data is the same as the data in the i-1-th group of data, the stored groups of data are concatenated to obtain the flow control frame character string.
4. The method according to claim 1, characterized in that: After calculating the target flow control frame original value according to a preset conversion formula to obtain the target flow control frame physical value, the method further includes: Acquire at least one flow control frame observation value sent by the real-time machine, wherein the at least one flow control frame observation value is a value fed back to the real-time machine by the controller in response to the diagnostic fault code; The target flow control frame physical value is compared with the target flow control frame observation value to generate a target flow control frame comparison result, wherein the target flow control frame observation value is a flow control frame observation value corresponding to the target data identifier in the at least one flow control frame observation value.
5. A flow control frame search device, characterized in that: Applied to a host computer, the device comprises: A receiving module, configured to receive a search request input by a user, wherein the search request includes a target data identifier and a target byte length corresponding to the target data identifier; A search module, configured to search for the target data identifier in a preset flow control frame character string in response to the search request, and determine the character string of the target byte length after the target data identifier as the target flow control frame original value, the flow control frame character string comprising at least one flow control frame original value generated by the controller in response to the diagnostic fault code and a data identifier corresponding to each of the flow control frame original values, the diagnostic fault code being sent to the controller by the real-time machine, and different flow control frame original values having different byte lengths; The calculation module is used to calculate the original value of the target flow control frame according to a preset conversion formula to obtain the physical value of the target flow control frame.
6. The device according to claim 5, characterized in that The device also includes: A sending module, used for sending the diagnostic fault code to the real-time machine, so that the real-time machine sends the diagnostic fault code to the controller; the controller sends a response signal to the real-time machine when receiving the diagnostic fault code; the real-time machine sends a response rate to the controller when the received response signal is a positive response; the controller generates a flow control frame original value of each data identifier according to the response rate in response to the diagnostic fault code; the controller sends the at least one flow control frame original value and the data identifier corresponding to each flow control frame original value to the host computer; The splicing module is used to splice the at least one flow control frame original value and the data identifier corresponding to each of the flow control frame original values to obtain the flow control frame character string.
7. A flow control frame search system, characterized in that: The system comprises: a real-time machine, a controller and a host computer, wherein the real-time machine, the controller and the host computer are connected in communication. The host computer is used to receive a search request input by a user, wherein the search request includes a target data identifier and a target byte length corresponding to the target data identifier; in response to the search request, the target data identifier is searched in a preset flow control frame character string, and the character string of the target byte length after the target data identifier is determined as the target flow control frame original value, wherein the flow control frame character string includes at least one flow control frame original value generated by the controller in response to a diagnostic fault code and a data identifier corresponding to each of the flow control frame original values, wherein the diagnostic fault code is sent to the controller by the real-time machine, and different flow control frame original values have different byte lengths; the target flow control frame original value is calculated according to a preset conversion formula to obtain a target flow control frame physical value.
8. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the method for searching the flow control frame according to any one of claims 1 to 4 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for searching a flow control frame according to any one of claims 1 to 4 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the method for searching a flow control frame as described in any one of claims 1 to 4.
