Interface parameter processing method and device, medium and equipment

The interface parameters are filled in the payload data through the UDP protocol and transparently transmitted to the vehicle controller, which solves the problem of low efficiency and high cost caused by the vehicle controller's internal variable changes relying on the calibration protocol, and realizes fast and simple parameter changes and debugging.

CN118540391APending Publication Date: 2024-08-23BEIJING CHJ AUTOMOTIVE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310160988.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-21
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The change of internal variables of the vehicle controller relies on the calibration protocol, resulting in low efficiency and high cost of parameter change.

Method used

The UDP protocol is used to fill the interface parameters in the payload data, generate a UDP message, and transparently transmit it to the controller. Function identifiers and encoded characters are assigned to the function to be tested, simplifying the parameter change process.

Benefits of technology

It improves the efficiency of changing interface parameters, reduces work costs, and enables fast and simple debugging and testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118540391A
    Figure CN118540391A
Patent Text Reader

Abstract

The invention relates to an interface parameter processing method and device, equipment and a medium, and the method comprises the steps that a data transmitting end obtains a to-be-debugged interface parameter, payload data is filled with the interface parameter based on a UDP protocol, a UDP message is obtained, and the UDP message comprises a function identifier and a coding character corresponding to the interface parameter; the UDP message is transmitted to the controller in a transparent mode, and the controller assigns the interface parameters to the function to be tested according to the UDP message. According to the technical scheme, the working efficiency can be improved, and the working cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a method, device, medium and equipment for processing interface parameters. Background Art

[0002] In order to ensure the safe operation of the vehicle, during the development and testing of the MCU (Micro Controller Unit), the basic software reserves a large number of unconnected function interfaces to be tested. The test content is mainly to change the transmission parameters between the MCU and the controller to verify whether the code logic meets the expected design effect.

[0003] The modification of the internal variables of the vehicle controller needs to rely on the calibration protocol. The parameter modification method relying on the calibration protocol is very complicated, resulting in low efficiency and high cost of parameter modification. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a method, device, medium and equipment for processing interface parameters to improve the working efficiency of higher interface parameters and reduce working costs.

[0005] The present disclosure provides a method for processing interface parameters, the method being applied to a data sending end, the method comprising:

[0006] Get the interface parameters to be debugged;

[0007] Fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, wherein the UDP message includes a function identifier and a coded character corresponding to the interface parameters;

[0008] The UDP message is transparently transmitted to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

[0009] In some embodiments, the interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; and filling the interface parameter in the payload data based on the UDP protocol includes:

[0010] Filling a preset function identifier in the first byte of the UDP protocol; wherein the UDP message containing the function identifier is a message used to change the function input parameters;

[0011] According to the preset encoding rules and the serial number identifier, the interface parameters are sequentially encoded to obtain encoded characters;

[0012] The encoded characters are filled in the payload data of the UDP protocol in sequence.

[0013] In some embodiments, transparently transmitting the UDP message to the controller includes:

[0014] A destination Socket interface preset for the controller is obtained, and the UDP message is transparently transmitted to the controller through the destination Socket interface.

[0015] In some embodiments, the method further includes: configuring the IP address of the data sender to be in the same network segment as the IP address of the controller.

[0016] The present disclosure provides a method for processing interface parameters, the method being applied to a controller, the method comprising:

[0017] Receive a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and a coded character corresponding to the interface parameters;

[0018] The interface parameters are assigned to the function to be tested according to the UDP message.

[0019] In some embodiments, assigning the interface parameter to the function to be tested according to the UDP message includes:

[0020] Extract data from the UDP message to obtain the character of the first byte of the UDP protocol;

[0021] Identify whether the character of the first byte is a preset function identifier;

[0022] If yes, parse the coded characters in the Payload data of the UDP protocol to obtain the interface parameters;

[0023] Assign the interface parameters to the function to be tested.

[0024] In some embodiments, the interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; and the parsing of the encoded characters in the Payload data of the UDP protocol includes:

[0025] The first byte after the function identifier in the Payload data is used as the current data position, the first sequence number is used as the current sequence number, and the following parsing operations are repeatedly performed:

[0026] Determining whether the current data position is the current sequence number identifier;

[0027] If it is the current serial number identifier, extracting the first interface parameter identified by the current serial number identifier from the Payload data according to a preset encoding rule;

[0028] Determining a new current data position according to the current data position and the length of the first interface parameter;

[0029] Taking the sequence number identifier of the next sequence number adjacent to the current sequence number identifier as the new current sequence number identifier;

[0030] If it is not the current sequence number identifier, it is determined whether the current data position is a preset terminator, and the parsing operation is terminated according to the determination result.

[0031] In some embodiments, the step of ending the parsing operation according to the judgment result includes:

[0032] If the judgment result is that the current data position is the terminator, returning an indication result of successful parsing to the data sending end, and ending the parsing operation;

[0033] If the judgment result is that the current data position is not the end character, an indication result of parsing failure is returned to the data sending end, and the parsing operation is terminated.

[0034] In some embodiments, assigning the interface parameter to the function to be tested includes:

[0035] According to the serial number identifier of the interface parameter, the interface parameter is sequentially assigned to the global variable associated with the function to be tested.

[0036] In some embodiments, the receiving of a UDP message includes:

[0037] The destination Socket interface is opened, and the UDP message is received through the destination Socket interface.

[0038] The present disclosure provides a device for processing interface parameters, the device being applied to a data sending end, the device comprising:

[0039] The parameter acquisition module is used to obtain the interface parameters to be debugged;

[0040] A parameter filling module, used to fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, wherein the UDP message includes a function identifier and a coded character corresponding to the interface parameter;

[0041] The message transparent transmission module is used to transparently transmit the UDP message to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

[0042] The present disclosure provides a device for processing interface parameters, the device being applied to a controller, the device comprising:

[0043] A message receiving module, used for receiving a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and a coded character corresponding to the interface parameters;

[0044] A parameter assignment module is used to assign the interface parameters to the function to be tested according to the UDP message.

[0045] The present disclosure also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute the steps of any of the above-mentioned methods for processing interface parameters.

[0046] The present disclosure also provides an electronic device, comprising:

[0047] one or more processors;

[0048] A memory for storing one or more programs or instructions;

[0049] The processor is used to execute the steps of any of the above-mentioned methods for processing interface parameters by calling the program or instruction stored in the memory.

[0050] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0051] The interface parameter processing method, device, equipment and medium provided by the embodiment of the present disclosure obtain the interface parameters to be debugged through the data sending end, fill the interface parameters in the payload data based on the UDP protocol, and obtain a UDP message, which includes the function identifier and the coded characters corresponding to the interface parameters; the UDP message is transparently transmitted to the controller, and the controller assigns the interface parameters to the function to be tested according to the UDP message. This technical solution encodes the interface parameters based on the UDP protocol, and transparently transmits the interface parameters to the controller through the UDP message, so that the controller assigns the interface parameters to the function to be tested, thereby quickly and simply realizing the change and debugging of the interface parameters in the function to be tested, effectively improving the work efficiency and reducing the work cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

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

[0054] Figure 1 A flowchart of a method for processing interface parameters provided by an embodiment of the present disclosure;

[0055] Figure 2 A flowchart of another method for processing interface parameters provided by an embodiment of the present disclosure;

[0056] Figure 3 A flow chart of an assignment method provided in an embodiment of the present disclosure;

[0057] Figure 4 A structural block diagram of an interface parameter processing device provided in an embodiment of the present disclosure;

[0058] Figure 5 A structural block diagram of another interface parameter processing device provided in an embodiment of the present disclosure;

[0059] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0060] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0061] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0062] At present, changes to the internal variables of the vehicle controller need to rely on the calibration protocol. For example, special calibration tools (such as CANape, INCA) and hardware interface cards are required. The communication media are CAN (Controller Area Network) and Flexray (FlexRay Consortium), etc., and the calibration process requires the use of A2L (ASAP2description file) file parsing address. It can be seen that the parameter change method that relies on the calibration protocol is very complicated. Therefore, the current parameter change method has the problems of low work efficiency and high work cost. In response to the above problems, the embodiments of the present disclosure provide a method, device, equipment and medium for processing interface parameters.

[0063] Figure 1 A flowchart of a method for processing interface parameters provided in an embodiment of the present disclosure. This method is applicable to the scenario of vehicle parameter debugging, and can transparently transmit the interface parameters that need to be changed based on the UDP (User Datagram Protocol) protocol to assign values ​​to the function to be tested in the vehicle controller, and can be applied to autonomous driving vehicles and manned vehicles. This method can be executed by an interface parameter processing device, and the interface parameter processing device can be implemented in software and / or hardware.

[0064] In one embodiment, the method for processing interface parameters provided by the embodiment of the present disclosure can be applied to a data sending end, such as a computer. Figure 1 As shown, the method comprises the following steps:

[0065] Step S102, obtaining the interface parameters to be debugged.

[0066] For the unconnected function interface in the controller, the parameters passed need to be changed to verify the rationality of the code logic. In this embodiment, the interface parameters can be obtained in a targeted manner according to the global variables of the function to be tested pre-designed in the controller. Specifically, the data sending end can obtain one or more interface parameters to be debugged according to user operations, and the interface parameters correspond to the global variables of the function to be tested; the parameter information of each interface parameter may include: parameter sequence number, parameter length, parameter value and other information.

[0067] Step S104, filling the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, which includes a function identifier and coded characters corresponding to the interface parameters.

[0068] The interface parameter may include a serial number identifier for identifying the serial number of the interface parameter; accordingly, an embodiment of filling the interface parameter in the payload data based on the UDP protocol may include the following content:

[0069] The first byte of the UDP protocol is filled with a preset function identifier; wherein the UDP message containing the function identifier is a message used to change the function input parameters.

[0070] In the specific implementation process, the data of the UDP protocol can be divided into two parts: the header (that is, the first byte) and the payload data. In this embodiment, the first byte of the UDP protocol is used as a function identifier, and a preset function identifier is filled in the first byte. The function identifier is an identifier used to indicate the function of changing the function input parameters; in one example, 0x07 can be used as the function identifier for changing the function input parameters. The UDP message generated based on the UDP protocol including the function identifier has the function of changing the function input parameters.

[0071] For the interface parameters, data encoding can be performed on the interface parameters in sequence according to preset encoding rules and serial number identifiers to obtain encoding characters; and then the encoding characters are filled in the payload data of the UDP protocol in sequence.

[0072] The above-mentioned preset encoding rules are such as TLV (Tag-Length-Value) rules, the type (T) field is specified as the serial number identifier of the interface parameter, the length (L) field is specified as the length of the interface parameter, and the value (V) field is specified as the value of the interface parameter. The interface parameters are data encoded according to the TLV rules, and in the data encoding process, the interface parameters are data encoded in sequence according to the order represented by the serial number identifier, thereby obtaining the corresponding encoding characters. Take the following three interface parameters as an example: interface parameter 1 is of uint8 type, and the value is A; interface parameter 2 is of uint16 type, and the value is B; and interface parameter 3 is of uint32 type, and the value is C. After the above three interface parameters are data encoded in sequence according to the TLV rules and the serial number identifier, the following encoding characters are obtained respectively: 01 01 0A, 02 02 00 0B and 03 04 00 00 00 0C. The above encoding characters are filled in the payload data in sequence. The UDP message obtained through this embodiment includes at least: a function identifier representing its function and a coded character representing its transparent transmission data. Specifically, the function identifier is used to define the function implemented by the UDP message, that is, the UDP message is used to change the function input parameters, and the coded character is the specific data that needs to be transparently transmitted in the UDP message, that is, the interface parameters.

[0073] After obtaining the function identifier of the first byte of the UDP protocol and the encoding character of the payload data according to the above embodiment, a preset terminator can also be added at the end to indicate the end of the UDP message, and the terminator is, for example, 0x00. Based on this, the following encoded UDP Payload data is obtained: 07 01 01 0A 02 02 00 0B 03 04 00 00 00 0C0x00. Next, the UDP Payload data after the interface parameters are filled is used to generate a UDP message.

[0074] Step S106: transparently transmit the UDP message to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

[0075] In this embodiment, if the data sending end and the controller that need to communicate are not in the same network segment, the IP (Internet Protocol) address of the data sending end is first configured to be in the same network segment as the IP address of the controller; specifically, the Ethernet network debugging assistant or other network sending tools (such as CANoe, Python) of the data sending end can be used to configure the local IP address of the data sending end to be in the same network segment as the IP address of the controller, so that the data sending end and the controller can communicate directly.

[0076] When the data sending end transparently transmits the UDP message to the controller, it can obtain the destination Socket interface pre-set for the controller, and transparently transmit the UDP message to the controller through the destination Socket interface; the destination Socket interface is used to describe the destination IP and port number (Port Number) of the controller. In this embodiment, the UDP protocol can be used to send and receive data based on the computer network port, so that the Ethernet network debugging assistant can be used directly to send and receive data to the destination Socket interface of the controller. The physical medium only needs one network cable, which greatly reduces the cost.

[0077] After transparently transmitting the UDP message to the controller, the controller can assign interface parameters to the function to be tested according to the UDP message, and return an indication result to the data sending end.

[0078] like Figure 2 As shown, this embodiment provides a method for processing interface parameters applied to a controller, the method comprising the following steps:

[0079] Step S202, receiving a UDP message; according to the above embodiment, the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message may include the function identifier and the coded characters corresponding to the interface parameters. Specifically, the controller opens the destination Socket interface and receives the UDP message through the destination Socket interface.

[0080] Step S204: assigning interface parameters to the function to be tested according to the UDP message.

[0081] In one implementation, the controller parses the UDP message, that is, the transport layer, network layer, data link layer and physical layer protocols are parsed through the Ethernet protocol stack inside the controller to obtain interface parameters, and the interface parameters are assigned to the function to be tested. Figure 3 The illustrated embodiment is shown below with reference to the following.

[0082] Step S10, extracting data from the UDP message to obtain the character of the first byte of the UDP protocol.

[0083] Step S20, identify whether the character of the first byte is a preset function identifier. If it is a function identifier, it means that the current UDP message is a message used to change the function input parameters, and it is necessary to extract the interface parameters in the UDP message and assign the interface parameters to the function to be tested. In this case, perform the following steps S30 and S40. If it is not a function identifier, it means that the current UDP message is not used to change the function input parameters, and the parsing of the UDP message can be directly terminated.

[0084] Step S30, parse the encoded characters in the Payload data of the UDP protocol to obtain the interface parameters. The interface parameters include a serial number identifier for identifying the serial number of the interface parameters. Referring to the encoding process of the Payload data provided in the above embodiment, a method for decoding the Payload data is provided here, which may specifically include:

[0085] Step S301, taking the first byte of the Payload data as the current data position, taking the first sequence number identifier as the current sequence number identifier, and repeatedly performing the parsing operations shown in the following steps S302-S305.

[0086] Step S302, determining whether the current data position is the current sequence number identifier.

[0087] According to the encoding rules, the first byte of the Payload data is the type (T) field, which is designated as the serial number identifier of the interface parameter. The first byte of the Payload data is used as the current data position to determine whether the current data position is the current serial number identifier; if so, the following step S303 is executed to extract the interface parameter corresponding to the current serial number identifier from the current data position; if not, the following step S306 is executed.

[0088] Step S303, extracting the first interface parameter identified by the current serial number identifier from the Payload data according to a preset encoding rule. It can be understood that the encoding rule is the same as the encoding rule used in the Payload data encoding process. For example, when the interface parameter is encoded using the TLV rule, the interface parameter is also extracted from the Payload data using the TLV rule. According to the TLV rule, the current serial number identifier of the type (T) field, the length of the length (L) field, and the value of the value (V) field are extracted from the Payload data to obtain the first interface parameter consisting of the current serial number identifier, length, and value.

[0089] After extracting the first interface parameter identified by the current sequence number identifier, the current data position and the current sequence number identifier are re-determined, and other interface parameters after the first interface parameter in the Payload data are extracted in the same extraction manner.

[0090] Step S304, determine the new current data position according to the current data position and the length of the first interface parameter. Specifically, the new current data position i' can be determined by referring to the following formula: i'=i+1+1+L, i is the current data position, i starts from 1, and L is the length of the first interface parameter.

[0091] Step S305: The next sequence number adjacent to the current sequence number is used as a new current sequence number. Specifically, the new current sequence number T' can be determined by referring to the following formula: T'=T+1, T is the current sequence number, and T starts from sequence number 1.

[0092] According to the above method, the above parsing operation is re-executed with the new current data position and the new current sequence number identifier to obtain the various interface parameters in the Payload data in turn.

[0093] Step S306, determining whether the current data position is a preset end character, and terminating the parsing operation according to the determination result.

[0094] If the current data position is not the current sequence number identifier, determine whether the current data position is a preset terminator. If the determination result is that the current data position is the terminator, execute the following step S307; if the determination result is that the current data position is not the terminator, execute the following step S308.

[0095] Step S307, returning an indication result indicating successful analysis to the data sending end, and ending the analysis operation;

[0096] Step S308, returning an indication result of parsing failure to the data sending end, and ending the parsing operation.

[0097] Step S40: assigning interface parameters to the function to be tested.

[0098] In this embodiment, when each interface parameter is parsed in sequence from the payload data until the current data position is the terminator, it indicates that the parsing of all interface parameters is successfully completed, and the interface parameters can be assigned to the function to be tested. In this embodiment, the interface parameters can be assigned to the global variables associated with the function to be tested in sequence according to the serial number identifier of the interface parameter. In addition, since the global variables of the function to be tested in the controller are pre-designed, and the interface parameters are obtained for the function to be tested, accordingly, the operation process of assigning the interface parameters to the function to be tested is also targeted. Therefore, the assignment operation in this embodiment will not have the problem of operating on illegal addresses.

[0099] According to the above embodiments, in the process of transmitting interface parameters, the interface parameters to be debugged are sequentially filled in the Payload data of the UDP protocol according to the preset coding rules, and directly transmitted to the inside of the controller. The controller takes out the interface parameters from the destination Socket interface, and sequentially assigns the interface parameters to the global variables associated with the function to be tested according to the serial number. Compared with the existing parameter change method that relies on the calibration protocol, this embodiment does not need to purchase calibration software and hardware interface cards, nor does it need to make complex A2L files, and can complete the change of variables of the function to be tested in the controller, quickly and easily realizing the debugging and testing of the function, effectively reducing the operational complexity of debugging and testing, saving work costs, and improving work efficiency.

[0100] To facilitate practical application, in one embodiment, the method for processing interface parameters can be integrated into CANoe (system-level bus development tool), and CAPL (Communication Access Programming Language, a programming language used in CANoe) can be used to automatically complete the encoding of interface parameters and the transparent transmission of UDP messages. After CANoe is encapsulated into a callable interface, it is integrated into the test script to achieve full automation of the test, thereby greatly simplifying the user test operation and reducing work efficiency.

[0101] The method for processing interface parameters provided by the embodiment of the present disclosure obtains the interface parameters to be debugged through the data sending end, fills the interface parameters in the payload data based on the UDP protocol, and obtains a UDP message including a function identifier and a coded character corresponding to the interface parameter; the UDP message is transparently transmitted to the controller, and the controller assigns the interface parameters to the function to be tested according to the UDP message. This technical solution encodes the interface parameters based on the UDP protocol, and transparently transmits the interface parameters to the controller through the UDP message, so that the controller assigns the interface parameters to the function to be tested, thereby quickly and simply realizing the change and debugging of the interface parameters in the function to be tested, effectively improving the work efficiency and reducing the work cost.

[0102] Corresponding to the method for processing interface parameters provided by the embodiment of the present disclosure, the embodiment of the present disclosure also provides a device for processing interface parameters. Figure 4 The structure block diagram of the interface parameter processing device provided in the embodiment of the present disclosure is applied to the data sending end, such as Figure 4 As shown, the device comprises:

[0103] The parameter acquisition module 402 is used to acquire the interface parameters to be debugged;

[0104] The parameter filling module 404 is used to fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, wherein the UDP message includes a function identifier and a coded character corresponding to the interface parameter;

[0105] The message transparent transmission module 406 is used to transparently transmit the UDP message to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

[0106] In one embodiment, the interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; the parameter filling module 404 is further used to:

[0107] Filling a preset function identifier in the first byte of the UDP protocol; wherein the UDP message containing the function identifier is a message used to change the function input parameters;

[0108] According to the preset encoding rules and the serial number identifier, the interface parameters are sequentially encoded to obtain encoded characters;

[0109] The encoded characters are filled in the payload data of the UDP protocol in sequence.

[0110] In one embodiment, the message transparent transmission module 406 is further used for:

[0111] A destination Socket interface preset for the controller is obtained, and the UDP message is transparently transmitted to the controller through the destination Socket interface.

[0112] In one embodiment, the interface parameter processing device further includes:

[0113] A configuration module is used to configure the IP address of the data sending end to be in the same network segment as the IP address of the controller.

[0114] Figure 5 The structure block diagram of the interface parameter processing device provided in the embodiment of the present disclosure is applied to the controller, such as Figure 5 As shown, the device comprises:

[0115] The message receiving module 502 is used to receive a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and a coded character corresponding to the interface parameter;

[0116] The parameter assignment module 504 is used to assign the interface parameters to the function to be tested according to the UDP message.

[0117] In one embodiment, the parameter assignment module 504 is further configured to:

[0118] Extract data from the UDP message to obtain the character of the first byte of the UDP protocol;

[0119] Identify whether the character of the first byte is a preset function identifier;

[0120] If yes, parse the coded characters in the Payload data of the UDP protocol to obtain the interface parameters;

[0121] Assign the interface parameters to the function to be tested.

[0122] In one embodiment, the interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; the parameter assignment module 504 is further used to:

[0123] The first byte after the function identifier in the Payload data is used as the current data position, the first sequence number identifier is used as the current sequence number identifier, and the following parsing operations are repeatedly performed:

[0124] Determining whether the current data position is the current sequence number identifier;

[0125] If it is the current serial number identifier, extracting the first interface parameter identified by the current serial number identifier from the Payload data according to a preset encoding rule;

[0126] Determining a new current data position according to the current data position and the length of the first interface parameter;

[0127] Taking the sequence number identifier of the next sequence number adjacent to the current sequence number identifier as the new current sequence number identifier;

[0128] If it is not the current sequence number identifier, it is determined whether the current data position is a preset terminator, and the parsing operation is terminated according to the determination result.

[0129] In one embodiment, the parameter assignment module 504 is further configured to:

[0130] If the judgment result is that the current data position is the terminator, returning an indication result of successful parsing to the data sending end, and ending the parsing operation;

[0131] If the judgment result is that the current data position is not the end character, an indication result of parsing failure is returned to the data sending end, and the parsing operation is terminated.

[0132] In one embodiment, the parameter assignment module 504 is further configured to:

[0133] According to the serial number identifier of the interface parameter, the interface parameter is sequentially assigned to the global variable associated with the function to be tested.

[0134] In one embodiment, the message receiving module 502 is further configured to:

[0135] The destination Socket interface is opened, and the UDP message is received through the destination Socket interface.

[0136] The interface parameter processing device disclosed in the above embodiments can execute the interface parameter processing method disclosed in the above embodiments, and has the same or corresponding beneficial effects. To avoid repetition, it will not be described again here.

[0137] The embodiment of the present disclosure also provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute the following steps of any of the above methods.

[0138] Obtain the interface parameters to be debugged; fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, the UDP message includes a function identifier and coded characters corresponding to the interface parameters; transparently transmit the UDP message to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

[0139] Or perform the following steps in any of the above methods:

[0140] Receive a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and coded characters corresponding to the interface parameters; assign the interface parameters to the function to be tested according to the UDP message.

[0141] Optionally, when executed by a computer processor, the computer executable instruction can also be used to execute the technical solution of the method for processing any interface parameter provided in the embodiment of the present disclosure, thereby achieving corresponding beneficial effects.

[0142] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the embodiments of the present disclosure can be implemented with the help of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0143] The embodiment of the present disclosure also provides an electronic device, including: one or more processors; a memory for storing one or more programs or instructions; the processor calls the programs or instructions stored in the memory to execute the steps of any of the above methods to achieve corresponding beneficial effects.

[0144] Figure 6 Schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present disclosure. Figure 6As shown, the electronic device includes one or more processors 601 and a memory 602 .

[0145] The processor 601 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0146] The memory 602 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 601 may run the program instructions to implement the interface parameter processing method of the embodiment of the present disclosure described above, and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0147] In one example, the electronic device may further include: an input device 603 and an output device 604, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0148] In addition, the input device 603 may also include, for example, a keyboard, a mouse, and the like.

[0149] The output device 604 can output various information to the outside, including the determined distance information, direction information, etc. The output device 604 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0150] Of course, to simplify, Figure 6 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0151] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0152] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for processing interface parameters, characterized in that: The method comprises: Get the interface parameters to be debugged; Fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, wherein the UDP message includes a function identifier and a coded character corresponding to the interface parameters; The UDP message is transparently transmitted to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

2. The method according to claim 1, characterized in that The interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; and filling the interface parameter in the payload data based on the UDP protocol includes: Filling a preset function identifier in the first byte of the UDP protocol; wherein the UDP message containing the function identifier is a message used to change the function input parameters; According to the preset encoding rules and the serial number identifier, the interface parameters are sequentially encoded to obtain encoded characters; The encoded characters are filled in the payload data of the UDP protocol in sequence.

3. The method according to claim 1, characterized in that The transparently transmitting the UDP message to the controller includes: A destination Socket interface preset for the controller is obtained, and the UDP message is transparently transmitted to the controller through the destination Socket interface.

4. The method according to claim 1, characterized in that: The method further comprises: The IP address of the data sender is configured to be in the same network segment as the IP address of the controller.

5. A method for processing interface parameters, characterized in that: The method comprises: Receive a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and a coded character corresponding to the interface parameters; The interface parameters are assigned to the function to be tested according to the UDP message.

6. The method according to claim 5, characterized in that The step of assigning the interface parameter to the function to be tested according to the UDP message comprises: Extract data from the UDP message to obtain the character of the first byte of the UDP protocol; Identify whether the character of the first byte is a preset function identifier; If yes, parse the coded characters in the Payload data of the UDP protocol to obtain the interface parameters; Assign the interface parameters to the function to be tested.

7. The method according to claim 6, characterized in that The interface parameter includes a serial number identifier for identifying the serial number of the interface parameter; the parsing of the coded characters in the Payload data of the UDP protocol includes: The first byte after the function identifier in the Payload data is used as the current data position, the first sequence number identifier is used as the current sequence number identifier, and the following parsing operations are repeatedly performed: Determining whether the current data position is the current sequence number identifier; If it is the current serial number identifier, extracting the first interface parameter identified by the current serial number identifier from the Payload data according to a preset encoding rule; Determining a new current data position according to the current data position and the length of the first interface parameter; Taking the sequence number identifier of the next sequence number adjacent to the current sequence number identifier as the new current sequence number identifier; If it is not the current sequence number identifier, it is determined whether the current data position is a preset terminator, and the parsing operation is terminated according to the determination result.

8. The method according to claim 7, characterized in that The step of ending the parsing operation according to the judgment result includes: If the judgment result is that the current data position is the terminator, returning an indication result of successful parsing to the data sending end, and ending the parsing operation; If the judgment result is that the current data position is not the end character, an indication result of parsing failure is returned to the data sending end, and the parsing operation is terminated.

9. The method according to claim 7, characterized in that: The step of assigning the interface parameter to the function to be tested comprises: According to the serial number identifier of the interface parameter, the interface parameter is sequentially assigned to the global variable associated with the function to be tested.

10. The method according to claim 5, characterized in that The receiving of UDP message comprises: The destination Socket interface is opened, and the UDP message is received through the destination Socket interface.

11. A device for processing interface parameters, characterized in that: The device is applied to a data sending end, and comprises: The parameter acquisition module is used to obtain the interface parameters to be debugged; A parameter filling module, used to fill the interface parameters into the payload data based on the UDP protocol to obtain a UDP message, wherein the UDP message includes a function identifier and a coded character corresponding to the interface parameter; The message transparent transmission module is used to transparently transmit the UDP message to the controller, so that the controller assigns the interface parameters to the function to be tested according to the UDP message.

12. A device for processing interface parameters, characterized in that: The device is applied to a controller, and the device comprises: A message receiving module, used for receiving a UDP message; wherein the UDP message is obtained by filling the interface parameters to be debugged into the payload data of the UDP protocol, and the UDP message includes a function identifier and a coded character corresponding to the interface parameters; A parameter assignment module is used to assign the interface parameters to the function to be tested according to the UDP message.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the steps of the method according to any one of claims 1 to 4, or to execute the steps of the method according to any one of claims 5 to 10.

14. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs or instructions; The processor is used to execute the steps of the method according to any one of claims 1 to 4, or execute the steps of the method according to any one of claims 5 to 10 by calling the program or instruction stored in the memory.

15. A vehicle, characterized in that: include: The electronic device as claimed in claim 14.