Interface file verification method and device, electronic equipment and storage medium
By classifying interface configuration files and establishing mapping tables, inconsistency issues can be directly identified, solving the problem of low interface verification efficiency in existing technologies and achieving efficient and low-cost interface configuration file verification.
Patent Information
- Application Number
- CN202511031122.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-24
- Publication Date
- 2025-11-25
AI Technical Summary
In existing technologies, the validation of interface configuration files in the Autosar architecture requires updating the Arxml file and reconfiguring the RTE code, resulting in long configuration cycles, high costs, and low efficiency.
By obtaining information from the interface configuration files, classifying them, and establishing an interface mapping table, inconsistent interface issues can be directly identified, reducing redundant RTE configurations.
It improves interface verification efficiency, reduces the error rate and cost of RTE configuration, and ensures the correctness of interface configuration files.
Smart Images

Figure CN121008945A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive technology, and in particular to an interface file verification method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] The AUTOSAR architecture is widely used in the automotive industry and mainly consists of an application software layer, a middleware layer (RTE), and a base software layer. The RTE acts as a bridge between the application software layer and the base software layer, enabling communication between software components, between different base software components, and between software components and the base software.
[0003] Arxml files, as interface configuration files describing component interfaces and runtime behavior, are crucial input files for the RTE layer configuration. The information in the Arxml file directly impacts software quality. For example, incorrect design in the Arxml file will cause the RTE to deviate from expectations during configuration, leading to problems with signal transmission between components. Due to the complexity of Arxml files, it is often difficult to directly extract the necessary information.
[0004] In related technologies, the interface information in the interface configuration file of the Autosar architecture is compared with the RTE code to check the consistency of the interface information. This requires obtaining the RTE code first, which is generated by importing the Armxml file into the Autosar development tool and undergoing a series of configurations. During this process, if inconsistencies in interface information are found, the Armxml file needs to be updated, and the RTE code needs to be reconfigured based on the updated Armxml file. This approach not only increases the workload of RTE configuration, wasting configuration time and increasing costs, but also reduces the efficiency of interface verification. Summary of the Invention
[0005] This application provides an interface file verification method, apparatus, electronic device, and storage medium to at least solve the problem in related technologies where, when interface verification information is inconsistent, the Arxml file needs to be updated and the RTE code reconfigured based on the updated Arxml file. This results in a long RTE code configuration cycle, increased costs, and low interface verification efficiency. The technical solution of this application is as follows:
[0006] According to a first aspect of the embodiments of this application, an interface file verification method is provided, including:
[0007] Obtain the interface information from the configuration file of the interface to be verified;
[0008] The interface information is classified to obtain the classified interface information;
[0009] Based on the classified interface information, determine the interface mapping relationship table for all corresponding interfaces;
[0010] The consistency of each pair of interface information in the interface mapping table is verified.
[0011] This application categorizes the interface information in the configuration file of the interface to be verified, and suggests an interface mapping table for each pair of interfaces based on the categorized interface information. Based on the interface mapping table, it determines whether the interface information of each pair of interfaces is consistent, identifies interface problems that are not within the expected range in advance, reduces the cycle and error rate of RTE reconfiguration due to inconsistent interface information, and improves the efficiency of interface verification.
[0012] Optionally, the interface information for obtaining the configuration file of the interface to be verified includes:
[0013] Obtain the configuration file of the interface to be verified;
[0014] The interface configuration file is parsed to determine the interface tags to be verified;
[0015] Extract the interface information to be verified according to the interface label to be verified.
[0016] This application parses the configuration file of the interface to be verified to obtain multiple tags in the configuration file, determines the interface tag to be verified from the multiple tags, and can accurately extract key information (i.e. interface information) in the configuration file based on the interface tag, saving time and improving verification efficiency.
[0017] Optionally, classifying the interface information to obtain the classified interface information includes:
[0018] The interface information is categorized according to the functions of the in-vehicle modules to obtain the categorized interface information.
[0019] This application categorizes interface information according to in-vehicle modules for easier subsequent classification and storage.
[0020] Optionally, after classifying the interface information to obtain the classified interface information, the method further includes:
[0021] The categorized interface information is stored in dictionary form;
[0022] The step of determining the interface mapping relationship table for each pair of interfaces based on the classified interface information includes: establishing the interface mapping relationship for each pair of interfaces according to the interface direction of the same interface based on the interface information stored in dictionary form, combining all interface mapping relationships to obtain the interface mapping relationship table for all interface information.
[0023] This application improves the efficiency of establishing mapping relationships by storing the categorized interface information in dictionary form and forming a mapping relationship table based on the interface information stored in dictionary form according to the interface direction of the same interface.
[0024] Optionally, the interface mapping table includes: the interface mapping relationship of the SR interface and the interface mapping relationship of the CS interface, wherein,
[0025] For the SR interface, a 1:n interface mapping relationship is formed between the transmitting interface direction SR_S and the receiving interface method SR_R;
[0026] For the CS interface, a 1:m interface mapping relationship is formed between the server and the client with the server interface direction CS_S and the client interface direction CS_C.
[0027] Wherein, n and m are natural numbers that are equal or unequal.
[0028] The interface mapping table established in this application has a one-to-many mapping relationship, which improves the flexibility and scalability of the mapping table.
[0029] Optionally, the consistency verification of each pair of interface information in the interface mapping table includes:
[0030] Determine whether the interface status of each pair of interfaces in the interface mapping table is consistent;
[0031] When the interface status of the two interfaces at both ends of the interface mapping table is consistent, it is determined that the interface information of the corresponding two interfaces is consistent.
[0032] When the interface status of the two ends of the interface in the interface mapping table is inconsistent, it is determined that the interface information of the corresponding two ends is inconsistent.
[0033] When the interface status of both ends of the interface in the interface mapping table is abnormal, it is determined that only the interface information of the provider or the receiver exists.
[0034] In this application, the interface status of the same interface in different modules of the interface mapping table is searched to determine whether the interface information of each pair of interfaces is consistent, so as to identify interface problems that are not within the expected range in advance, reduce the error rate in the RTE configuration process, and improve the efficiency of interface mapping.
[0035] Optionally, the method further includes:
[0036] When the interface information of the corresponding interface is found to be inconsistent, the party with the problem is identified, and an instruction to update the interface configuration file of the corresponding interface is sent to the party with the problem. The step of obtaining the interface information of the configuration file of the interface to be verified is then executed; or
[0037] When the interface information of the provider or receiver is determined to be abnormal, an instruction is sent to the provider or receiver to determine whether the corresponding interface is a redundant interface or whether there is an instruction that meets the expectations.
[0038] In this application, when an interface status is determined to be inconsistent or abnormal, a configuration instruction or a redundancy judgment instruction is sent to the party experiencing the problem. This allows the provider or receiver of the instruction to reconfigure and make judgments, thereby improving the validity and reliability of the interface data and reducing the interface development cost.
[0039] According to a second aspect of the embodiments of this application, an interface file verification device is provided, comprising:
[0040] The acquisition module is used to obtain the interface information of the configuration file of the interface to be verified;
[0041] The classification module is used to classify the interface information to obtain the classified interface information;
[0042] The determination module is used to determine the interface mapping relationship table of all corresponding interfaces based on the classified interface information;
[0043] The verification module is used to verify the consistency of each pair of interface information in the interface mapping table.
[0044] Optionally, the acquisition module includes:
[0045] The file acquisition module is used to obtain the interface configuration file to be verified.
[0046] The parsing module is used to parse the interface configuration file and determine the interface tags to be verified.
[0047] The extraction module is used to extract the interface information to be verified according to the interface tag to be verified.
[0048] Optionally, the classification module is specifically used to classify the interface information according to the functions of the in-vehicle modules to obtain the classified interface information.
[0049] Optionally, the device further includes:
[0050] The storage module is used to store the interface information obtained after classification by the classification module in dictionary form;
[0051] The determining module is specifically used to establish an interface mapping relationship table for each pair of interfaces based on the interface information stored in the form of a dictionary, according to the interface direction of the same interface, and combine all the interface mapping relationships to obtain an interface mapping relationship table for all interface information.
[0052] Optionally, the interface mapping table determined by the determining module includes: the interface mapping relationship of the SR interface and the interface mapping relationship of the CS interface, wherein,
[0053] For the SR interface, an interface mapping relationship of 1:n is formed between SR_S and SR_R for sending and receiving;
[0054] For the CS interface, a 1:m interface mapping relationship is formed between the server and the client using CS_S and CS_C;
[0055] Wherein, n and m are natural numbers that are equal or unequal.
[0056] Optionally, the verification module includes:
[0057] The judgment module is used to determine whether the interface status of each pair of interfaces in the interface mapping table is consistent;
[0058] The first interface status determination module is used to determine that the interface information of the corresponding two interfaces is consistent when the judgment module determines that the interface status of the two interfaces at both ends of the interface mapping relationship table is consistent.
[0059] The second interface status determination module is used to determine that the interface information of the corresponding two interfaces is inconsistent when the judgment module determines that the interface status of the two interfaces at both ends of the interface mapping relationship table is inconsistent.
[0060] The third interface status determination module is used to determine that only the provider's or receiver's interface information exists when the judgment module determines that the interface status of the interfaces at both ends of the interface mapping relationship table is abnormal.
[0061] Optionally, the device further includes:
[0062] The first instruction sending module is used to identify the party with a problem when the second interface status determination module determines that the interface information of the corresponding interface is inconsistent, and to send an instruction to the party with a problem to update the interface configuration file of the corresponding interface, and to execute the step of obtaining the interface information of the interface configuration file to be verified.
[0063] The acquisition module is further configured to acquire the interface information of the interface configuration file to be verified after the first instruction sending module sends an instruction to update the interface configuration file of the corresponding interface.
[0064] The second instruction sending module is used to send an instruction to the provider or receiver to determine whether the corresponding interface is a redundant interface or whether there is an instruction that meets the expectations when the third interface status determination module determines that the interface information of the provider or receiver is abnormal.
[0065] According to a third aspect of the embodiments of this application, an electronic device is provided, comprising:
[0066] processor;
[0067] Memory used to store the processor's executable instructions;
[0068] The processor is configured to execute the instructions to implement the interface file verification method described above.
[0069] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the interface file verification method as described above.
[0070] According to a fifth aspect of the embodiments of this application, a computer program product is provided, including a computer program or instructions, which, when executed by a processor of an electronic device, implement the interface file verification method as described above.
[0071] The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0072] In this embodiment, the interface information of the interface configuration file to be verified is obtained; the interface information is classified to obtain classified interface information; an interface mapping relationship table for all corresponding interfaces is determined based on the classified interface information; and the consistency of each pair of interface information in the interface mapping relationship table is verified. In other words, this application classifies the interface information of the obtained interface configuration file to be verified and determines an interface mapping relationship table for all corresponding interfaces in the classified interface information. Then, the consistency of the interface information for each pair of interfaces in the interface mapping relationship standard is verified to identify inconsistent interface information in advance, ensuring the correctness of the interface configuration file (arxml configuration file), reducing the error rate during the repeated configuration process of RTE due to misaligned interface information in the interface configuration file, saving costs, and improving interface verification efficiency.
[0073] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0074] The accompanying drawings, incorporated in and forming part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. They do not constitute an undue limitation of this application. To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0075] Figure 1 This is a flowchart of an interface file verification method provided in an embodiment of this application.
[0076] Figure 2 This is a block diagram of an interface file verification device provided in an embodiment of this application.
[0077] Figure 3 This is a block diagram of an acquisition module provided in an embodiment of this application.
[0078] Figure 4 This is another block diagram of an interface file verification device provided in an embodiment of this application.
[0079] Figure 5 This is a block diagram of a verification module provided in an embodiment of this application.
[0080] Figure 6 This is another block diagram of an interface file verification device provided in the embodiments of this application.
[0081] Figure 7 This is a block diagram of an electronic device provided in an embodiment of this application.
[0082] Figure 8 This is a block diagram of an apparatus for interface file verification provided in an embodiment of this application. Detailed Implementation
[0083] To enable those skilled in the art to better understand the technical solutions of this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0084] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0085] Figure 1 This is a flowchart of an interface file verification method provided in an embodiment of this application, such as... Figure 1 As shown, the method includes the following steps:
[0086] Step 101: Obtain the interface information of the configuration file of the interface to be verified.
[0087] Step 102: Classify the interface information to obtain the classified interface information.
[0088] Step 103: Determine the interface mapping relationship table for all corresponding interfaces based on the classified interface information.
[0089] Step 104: Verify the consistency of each pair of interface information in the interface mapping table.
[0090] This application categorizes the interface information obtained from the interface configuration file to be verified, determines the mapping of all corresponding interface relationships in the categorized interface information, and then verifies the consistency of the mapping of all corresponding interface relationships to identify inconsistent interface information, ensuring the correctness of the interface configuration file (arxml configuration file), and ensuring that the RTE code generated by the subsequent RTE configuration can be released with high quality. This reduces the need for repeated RTE configuration due to misalignment of interface information in the arxml configuration file, reduces the configuration cycle and cost, and improves the efficiency of interface verification.
[0091] The interface file verification method described in this application can be applied to vehicle-side devices, servers, etc., without limitation. The vehicle-side implementation device can be an in-vehicle terminal, vehicle control platform, industrial control computer, electric control platform, or other electronic equipment. The server can be an independent server, a server cluster, or a server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks, or big data and artificial intelligence platforms, etc., without limitation.
[0092] The following is combined Figure 1The specific implementation steps of an interface file verification method provided in this application embodiment will be described in detail.
[0093] In step 101, the interface information of the interface configuration file to be verified is obtained.
[0094] In this step, the interface configuration file to be verified is first obtained; the interface configuration file is parsed to determine the interface tags to be verified; and the interface information to be verified is extracted according to the interface tags to be verified.
[0095] In other words, this step first collects one or more interface configuration files to be verified (or processed) (such as arxml configuration files for different functional modules), and imports all collected interface configuration files into an interface configuration file parsing tool (such as an arxml parsing tool). The interface configuration files are then parsed to obtain multiple functional module tags (such as seats, doors and windows, input interfaces, output interfaces, etc.). Based on the parsed tags, the interface tags to be verified are determined, such as SR interface tags, CS interface tags, or partial tags of SR interfaces, partial tags of CS interfaces, etc. Then, the interface information to be verified is extracted according to the interface tags to be verified; that is, the key information of each interface tag is extracted, such as: the interface name, interface direction, and data type of the SR interface, and the interface name, interface direction, function name, parameter name, and parameter direction of the CS interface. In this implementation, this key information of the corresponding interfaces is referred to as interface information.
[0096] In this embodiment, since the interface (arxml) configuration file contains numerous tags, for ease of understanding, this embodiment only needs to determine the tags in the arxml that actually need to be validated. The following examples show some of the tags that need validation, but in practical applications, this is not the only possible scenario:
[0097] ①SR Interface Label
[0098] <sender-receiver-interface>
[0099] <short-name> SR_PortName< / short-name>
[0100] ②CS interface label
[0101] <client-server-interface>
[0102] <short-name> CS_PortName< / short-name>
[0103] ③SR Interface Information Labels
[0104] <data-elements>
[0105] <variable-data-prototype>
[0106] <short-name> DataElement_Name< / short-name>
[0107] ④CS Interface Information Label
[0108]
[0109]
[0110] This embodiment obtains the aforementioned tags by parsing the interface configuration file.
[0111] In step 102, the interface information is classified to obtain the classified interface information.
[0112] In this step, after obtaining the interface information to be verified, the interface information is classified. Specifically, the interface information can be classified according to the interface function (i.e., module). The module can be understood as the function or application of the module, such as seat module, door and window module, input module or output module, etc.
[0113] In this embodiment, after classifying the interface information, the classified interface information can also be stored in a dictionary, that is, stored in dictionary form.
[0114] In this implementation, the dictionary can be defined as follows, using the "SWCA" and "SWCB" modules (i.e., two components inside the vehicle, for example) as illustrations. Of course, in practical applications, other modules inside the vehicle can also be defined in the following manner, and this embodiment does not impose any restrictions:
[0115] "SWCA": [[PortA,SR_S,DataElementA][PortB,CS_C,OperationB,[Argu0,Argu1]]
[0116] "SWCB": [[PortA,SR_R,DataElementA][PortC,CS_C,OperationC,[Argu0,Argu1]]
[0117] SWCB stands for a module within the vehicle, which can also be understood as a module function or module application, such as seats, doors, and windows within the vehicle.
[0118] PortA, PortB, and PortC represent the interface names of different interfaces.
[0119] SR_S, SR_R: represent different directions of the interface, respectively.
[0120] DataElementA: Data type.
[0121] OperationB and OperationC represent functions, respectively.
[0122] Argu0 and Argu1 are the parameter names of the function, respectively.
[0123] In this embodiment, the function name typically includes the interface name and the function, that is, it consists of the interface name and the function's attributes.
[0124] In this embodiment, the categorized interface information is stored in the form of a dictionary, which facilitates the storage and comparison of different interface information.
[0125] In step 103, an interface mapping table for all corresponding interfaces is determined based on the classified interface information.
[0126] In this embodiment, based on the interface information stored in the form of a dictionary, an interface mapping relationship is established for each pair of interfaces according to the interface direction of the same interface; by combining all interface mapping relationships, an interface mapping relationship table for all interface information is obtained.
[0127] The interface mapping table may include the interface mapping relationship between the SR interface and the CS interface, wherein...
[0128] For the SR interface, a 1:n interface mapping relationship is formed between the transmitting interface direction SR_S and the receiving interface method SR_R; for the CS interface, a 1:m interface mapping relationship is formed between the server interface direction CS_S and the client interface direction CS_C, where n and m are natural numbers, and n and m can be equal or unequal, which is not limited in this embodiment.
[0129] In this embodiment, a corresponding interface mapping relationship is established for each pair of interfaces. By combining the interface mapping relationships of all interfaces, an interface mapping relationship table for all interface information is obtained. To improve the readability of the data, this embodiment can be displayed using Excel, as shown in Table 1. Table 1 is an example of the interface mapping relationship table for the SR interface. This table is only an example and is not limited to this in actual applications.
[0130] Table 1
[0131] Interface status Provider Interface Name Data types … Recipient Interface Name Data types ·· Consistent SWCA PortA DataElementA SWCB PortA DataElementA Consistent SWCA PortA DataElementB SWCC PortA DataElementB Inconsistent SWCB PortB DataElementA SWCC PortB DataElementB abnormal SWCC PortC
[0132] It should be noted that Table 1 uses the SR interface as an example, taking the provider, interface name and data type in the interface information of each pair of interfaces as an example, and the receiver, interface name and data type as an example. If the interface information of each pair of interfaces is the same, the corresponding interface status will be displayed as consistent; otherwise, it will be displayed as inconsistent or abnormal.
[0133] In practical applications, different types of interfaces have different parameter attributes included in their interface information. For example, the interface information of an SR interface may include parameters such as interface name, interface direction, and data type. Similarly, the interface information of a CR interface may include attributes such as interface name, function name, parameters, and parameter direction. For any type of interface, the interface status will only be displayed as consistent if all parameter attributes in the interface information are consistent. Otherwise, if even one parameter attribute is inconsistent, it indicates that the interface information of the corresponding interface is inconsistent, and the interface status will also be displayed as inconsistent. Of course, if only one side's interface attribute exists, such as the provider's interface parameter attribute or the receiver's parameter attribute, the corresponding interface status will be displayed as abnormal. Specific details will not be elaborated upon in this implementation.
[0134] In step 104, the consistency of each pair of interface information in the interface mapping table is verified.
[0135] This step specifically includes: First, determining whether the interface status of each pair of interfaces in the interface mapping table is consistent; if the interface status of the two ends of the interface mapping table is consistent, determining that the interface information of the corresponding two ends of the interface is consistent; or if the interface status of the two ends of the interface mapping table is inconsistent, determining that the interface information of the corresponding two ends of the interface is inconsistent; or if the interface status of the two ends of the interface mapping table is abnormal, determining that only the interface information of the provider or the receiver exists.
[0136] In other words, this step involves looking up the interface status of each pair of interfaces in the interface mapping table.
[0137] If the interface status is consistent, it means that the interface information of the corresponding two interfaces is consistent.
[0138] If the interface status is inconsistent, it means that the interface information of the corresponding two interfaces is inconsistent. Find the cause of the problem and the party with the problem, and send an instruction to the party with the problem (such as the network administrator, R&D personnel or maintenance personnel of the problematic interface, etc., the same below) to update the interface configuration file of the corresponding interface. The party with the problem will then update the interface configuration file of the corresponding interface based on the received instruction and perform the step of obtaining the interface information of the interface configuration file to be verified.
[0139] If the interface status of the two ends found is abnormal, it is determined that only the interface information of the provider or the receiver exists, and an instruction is sent to the provider or receiver to determine whether the corresponding interface is a redundant interface or whether it meets the expectations, so that the corresponding receiver or provider can determine whether the corresponding interface is a redundant interface or whether it meets the expectations.
[0140] In this embodiment, the interface information of the interface configuration file to be verified is obtained; the interface information is classified to obtain classified interface information; an interface mapping relationship table for all corresponding interfaces is determined based on the classified interface information; and the consistency of each pair of interface information in the interface mapping relationship table is verified. In other words, this application classifies the interface information of the obtained interface configuration file to be verified and determines an interface mapping relationship table for all corresponding interfaces in the classified interface information. Then, the consistency of the interface information for each pair of interfaces in the interface mapping relationship standard is verified, thereby identifying inconsistent interface information, ensuring the correctness of the interface configuration file (arxml configuration file), and ensuring that the RTE code generated through RTE configuration can be released with high quality. This reduces the need for repeated RTE configuration due to misalignment of interface information in the interface configuration file, reduces configuration cycle and cost, and improves interface verification efficiency.
[0141] In other words, this application directly starts with the arxml configuration file, parsing and verifying the interface information within it to obtain the mapping of each pair of interfaces. This allows for the early identification of interface information that does not meet expectations.
[0142] This ensures the correctness of the arxml file and guarantees that the RTE code generated through the RTE configuration can be released with high quality, thereby reducing the need for repeated RTE configuration due to misalignment of arxml information.
[0143] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that this disclosure is not limited to the described order of actions, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to this application.
[0144] Please also see Figure 2 This is a block diagram of an interface file verification device provided in an embodiment of this application. The device includes: an acquisition module 201, a classification module 202, a determination module 203, and a verification module 304, wherein...
[0145] The acquisition module 201 is used to acquire the interface information of the configuration file of the interface to be verified;
[0146] The classification module 202 is used to classify the interface information to obtain the classified interface information;
[0147] The determining module 203 is used to determine the interface mapping relationship table of all corresponding interfaces based on the classified interface information;
[0148] The verification module 204 is used to verify the consistency of each pair of interface information in the interface mapping relationship table.
[0149] Optionally, in another embodiment, based on the above embodiment, the acquisition module 201 includes: a file acquisition module 301, a parsing module 302, and an extraction module 303, the structural block diagram of which is shown below. Figure 3 As shown, where,
[0150] The file acquisition module 301 is used to acquire the interface configuration file to be verified.
[0151] The parsing module 302 is used to parse the interface configuration file and determine the interface tags to be verified.
[0152] Extraction module 303 is used to extract interface information to be verified according to the interface label to be verified.
[0153] Optionally, in another embodiment, based on the above embodiment, the classification module is specifically used to classify the interface information according to the functions of the in-vehicle modules to obtain the classified interface information.
[0154] Optionally, in another embodiment, based on the above embodiments, the device further includes: a storage module 404, the structural block diagram of which is shown below. Figure 4 As shown, where,
[0155] The storage module 404 is used to store the interface information obtained by the classification module 202 after classification in the form of a dictionary;
[0156] The determining module 203 is specifically used to establish an interface mapping relationship table for each pair of interfaces based on the interface information stored in the form of a dictionary, according to the interface direction of the same interface, and combine all the interface mapping relationships to obtain an interface mapping relationship table for all interface information.
[0157] Optionally, in another embodiment, based on the above embodiments, the interface mapping relationship table determined by the determining module includes: the interface mapping relationship of the SR interface and the interface mapping relationship of the CS interface, wherein,
[0158] For the SR interface, an interface mapping relationship of 1:n is formed between SR_S and SR_R for sending and receiving;
[0159] For the CS interface, a 1:m interface mapping relationship is formed between the server and the client using CS_S and CS_C;
[0160] Wherein, n and m are natural numbers that are equal or unequal.
[0161] Optionally, in another embodiment, based on the above embodiment, the verification module 204 includes: a judgment module 501, a first interface state determination module 502, a second interface state determination module 503, and a second interface state determination module 504, the structural block diagram of which is shown below. Figure 5 As shown, where,
[0162] The judgment module 501 is used to determine whether the interface status of each pair of interfaces in the interface mapping relationship table is consistent;
[0163] The first interface status determination module 502 is used to determine that the interface information of the corresponding two interfaces is consistent when the judgment module 501 determines that the interface status of the two interfaces at both ends of the interface mapping relationship table is consistent.
[0164] The second interface status determination module 503 is used to determine that the interface information of the corresponding two interfaces is inconsistent when the judgment module 501 determines that the interface status of the two interfaces at both ends of the interface mapping relationship table is inconsistent.
[0165] The third interface status determination module 504 is used to determine that only the interface information of the provider or the receiver exists when the judgment module 501 determines that the interface status of the interfaces at both ends of the interface mapping relationship table is abnormal.
[0166] Optionally, in another embodiment, based on the above embodiments, the device further includes: a first instruction sending module 601 and a second instruction sending module 602, the structural block diagram of which is shown below. Figure 6 As shown, where,
[0167] The first instruction sending module 601 is used to identify the party with a problem when the second interface status determination module 503 determines that the interface information of the corresponding interface is inconsistent, and to send an instruction to the party with a problem to update the interface configuration file of the corresponding interface, and to execute the step of obtaining the interface information of the interface configuration file to be verified.
[0168] The acquisition module 201 is further configured to acquire the interface information of the interface configuration file to be verified after the first instruction sending module 601 sends an instruction to update the interface configuration file of the corresponding interface.
[0169] The second instruction sending module 602 is used to send an instruction to the provider or receiver to determine whether the corresponding interface is a redundant interface or whether there is an instruction that meets the expectations when the third interface status determination module 504 determines that the interface information of the provider or receiver is abnormal.
[0170] Optionally, embodiments of this application also provide an electronic device, including:
[0171] processor;
[0172] Memory used to store the processor's executable instructions;
[0173] The processor is configured to execute the instructions to implement the interface file verification method described above.
[0174] Optionally, embodiments of this application also provide a computer-readable storage medium, which, when the instructions in the computer-readable storage medium are executed by the processor of an electronic device, enables the electronic device to perform the interface file verification method as described above.
[0175] Optionally, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor of an electronic device, implement the interface file verification method described above.
[0176] This application categorizes the interface information obtained from the interface configuration file to be verified, and determines the interface mapping relationship table for all corresponding interfaces in the categorized interface information. Then, it verifies the consistency of the interface information of each pair of interfaces in the interface mapping relationship standard, thereby identifying inconsistent interface information, ensuring the correctness of the interface configuration file (arxml configuration file), and ensuring that the RTE code generated by the subsequent RTE configuration can be released with high quality. This reduces the need for repeated RTE configuration due to misalignment of interface information in the arxml configuration file, reduces the configuration cycle and cost, and improves the efficiency of interface verification.
[0177] In this embodiment, a batch of interface configuration files to be verified can be obtained, parsed, and interface information (i.e., key information in the configuration files) can be extracted. This interface information is then categorized by module and stored in a dictionary. Next, a mapping table is formed for the same interface based on its interface direction. By comparing the attributes of the same interface across different modules in the mapping table, the consistency of the interface information in each mapping pair can be determined. Using this method, interface problems outside the expected range can be identified in advance by parsing the data in the arxml file, reducing the error rate during RTE configuration and improving the efficiency of interface mapping.
[0178] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0179] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0180] Figure 7 This application provides a frame of an electronic device 700. Figure 7 As shown in the figure, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704. The processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704.
[0181] Memory 703 is used to store processor-executable instructions;
[0182] The processor 701, when executing executable instructions on the memory 703, implements the method described above.
[0183] In this embodiment, the communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used to represent it in the figure, but this does not mean that there is only one bus or one type of bus.
[0184] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0185] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0186] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0187] In another embodiment provided in this application, a computer-readable storage medium is also provided, which, when executed by a processor of an electronic device, enables the electronic device to perform the interface file verification method described above. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.
[0188] In another embodiment provided in this application, a computer program product is also provided, including a computer program or instructions, which, when executed by a processor of an electronic device, implement the interface file verification method described above.
[0189] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0190] Figure 8 This is a block diagram of an apparatus 800 for interface file verification provided in an embodiment of this application. For example, apparatus 800 can be provided as a server. See also... Figure 8 The apparatus 800 includes a processing component 822, which further includes one or more processors, and memory resources represented by memory 832 for storing instructions, such as application programs, that can be executed by the processing component 822. The application programs stored in memory 832 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 822 is configured to execute instructions to perform the methods described above.
[0191] Device 800 may also include a power supply component 826 configured to perform power management of device 800, a wired or wireless network interface 850 configured to connect device 800 to a network, and an input / output (I / O) interface 858. Device 800 may operate on an operating system stored in memory 832, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0192] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0193] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims. < / data-elements>
Claims
1. A method for verifying interface files, characterized in that, include: Obtain the interface information from the configuration file of the interface to be verified; The interface information is classified to obtain the classified interface information; Based on the classified interface information, determine the interface mapping relationship table for all corresponding interfaces; The consistency of each pair of interface information in the interface mapping table is verified.
2. The interface file verification method according to claim 1, characterized in that, The interface information for obtaining the configuration file of the interface to be verified includes: Obtain the configuration file of the interface to be verified; The interface configuration file is parsed to determine the interface tags to be verified; Extract the interface information to be verified according to the interface label to be verified.
3. The interface file verification method according to claim 1, characterized in that, The classification of the interface information to obtain the classified interface information includes: The interface information is categorized according to the functions of the in-vehicle modules to obtain the categorized interface information.
4. The interface file verification method according to claim 1, characterized in that, After classifying the interface information to obtain the classified interface information, the method further includes: The categorized interface information is stored in dictionary form; The step of determining the interface mapping relationship table for each pair of interfaces based on the classified interface information includes: establishing the interface mapping relationship for each pair of interfaces according to the interface direction of the same interface based on the interface information stored in dictionary form, combining all interface mapping relationships to obtain the interface mapping relationship table for all interface information.
5. The interface file verification method according to any one of claims 1 to 4, characterized in that, The interface mapping table includes: the interface mapping relationship of the SR interface and the interface mapping relationship of the CS interface, wherein, For the SR interface, a 1:n interface mapping relationship is formed between the transmitting interface direction SR_S and the receiving interface method SR_R; For the CS interface, a 1:m interface mapping relationship is formed between the server and the client with the server interface direction CS_S and the client interface direction CS_C. Wherein, n and m are natural numbers that are equal or unequal.
6. The interface file verification method according to any one of claims 1 to 4, characterized in that, The process of verifying the consistency of each pair of interface information in the interface mapping table includes: Determine whether the interface status of each pair of interfaces in the interface mapping table is consistent; When the interface status of the two interfaces at both ends of the interface mapping table is consistent, it is determined that the interface information of the corresponding two interfaces is consistent. When the interface status of the two ends of the interface in the interface mapping table is inconsistent, it is determined that the interface information of the corresponding two ends is inconsistent. When the interface status of both ends of the interface in the interface mapping table is abnormal, it is determined that only the interface information of the provider or the receiver exists.
7. The interface file verification method according to claim 6, characterized in that, The method further includes: When the interface information of the corresponding interface is found to be inconsistent, the party with the problem is identified, and an instruction to update the interface configuration file of the corresponding interface is sent to the party with the problem. The step of obtaining the interface information of the configuration file of the interface to be verified is then executed; or When the interface information of the provider or receiver is determined to be abnormal, an instruction is sent to the provider or receiver to determine whether the corresponding interface is a redundant interface or whether there is an instruction that meets the expectations.
8. An interface file verification device, characterized in that, include: The acquisition module is used to obtain the interface information of the configuration file of the interface to be verified; The classification module is used to classify the interface information to obtain the classified interface information; The determination module is used to determine the interface mapping relationship table of all corresponding interfaces based on the classified interface information; The verification module is used to verify the consistency of each pair of interface information in the interface mapping table.
9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the interface file verification method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the interface file verification method as described in any one of claims 1 to 7.