File sequence processing method, device, terminal equipment and storage medium

By parsing and combining the node tags and interface functions in the XML source file, an executable test sequence code file is generated, which solves the problem that the test sequence cannot be run in the existing technology and realizes the actual operation of the source file.

CN112445491BActive Publication Date: 2024-09-10LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011304357.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-19
Publication Date
2024-09-10
Estimated Expiration
2040-11-19

AI Technical Summary

Technical Problem

Existing XML parsing tools can only simply read the data in the source file, resulting in the test sequence in the source file being unable to actually run.

Method used

By obtaining the source file, parsing and recording the order of node labels, setting interface functions for action node labels, and combining the interface functions according to the order of node labels, an executable test sequence code file is generated.

Benefits of technology

Convert formally described test actions into program files that can be compiled and executed, so that the test sequence described in the source file can actually be run.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112445491B
    Figure CN112445491B
Patent Text Reader

Abstract

The present application is applicable to the field of computer technology, and provides a file sequence processing method, device, terminal equipment and storage medium, including: obtaining a source file; parsing the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label, the node object is used to store the content contained in the node label; setting a corresponding interface function for the node object corresponding to the action node label; the interface function is used to implement the test action described by the action node label; combining the interface functions in sequence according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can compile and generate an executable test sequence. The embodiment of the present application enables the test sequence in the source file to be actually run.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of computer technology, and in particular, relates to a file sequence processing method, device, terminal equipment and storage medium. Background Art

[0002] At present, there are often some source files used to formally describe test sequences, such as Open Test Sequence eXchange (OTX) source files. OTX source files are based on the ISO13209 standard and formally describe the standardized test sequence of the vehicle automatic diagnosis process through the Extensible Markup Language (XML), thereby facilitating the unification of the data format of the diagnosis communication process.

[0003] However, existing parsing tools, such as XML parsing tools, can only perform simple data reading on the data in the source file, resulting in the inability to actually run the test sequences in the source file. Summary of the invention

[0004] In view of this, embodiments of the present application provide a file sequence processing method, apparatus, terminal device, and storage medium to solve the problem in the prior art of how to enable the test sequence in the source file to actually run.

[0005] A first aspect of an embodiment of the present application provides a file sequence processing method, including:

[0006] Get the source file;

[0007] Parsing the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label, wherein the node object is used to store the content contained in the node label;

[0008] Setting a corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label used to describe a test action in the node label; the interface function is used to implement the test action described by the action node label;

[0009] The interface functions are combined in order according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence.

[0010] Optionally, parsing the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label includes:

[0011] Parsing the source file;

[0012] If an action node tag is parsed, the content contained in the action node tag is compared with the created node object stored in the global container to determine the comparison result; the created node object is a node object that has been created and stored;

[0013] If the comparison result is that the target node object exists in the global container, the unique identification information of the action node label and the pointer of the target node object are stored in the global container accordingly to complete the setting of the node object of the action node label; wherein, the target node object is a created node object whose content is consistent with the content of the action node label.

[0014] Optionally, if an action node label is parsed, the content of the action node label is compared with the created node object stored in the global container, and after the comparison result is determined, the method further includes:

[0015] If the comparison result is that the target node object does not exist in the global container, creating a corresponding node object for the action node tag according to the content contained in the action node tag, and storing the node object as the currently created node object;

[0016] The unique identification information of the action node label and the pointer of the currently created node object are correspondingly stored in the global container to complete the setting of the node object of the action node label.

[0017] Optionally, if an action node tag is parsed, the content contained in the action node tag is compared with the created node object stored in the global container to determine the comparison result, including:

[0018] The content contained in the action node tag is stored in a temporary node object, where the temporary node object is a node object that temporarily stores the content contained in the currently parsed action node tag;

[0019] Compare the temporary node object with the type information of each created node object stored in the global container;

[0020] If the global container does not have a created node object that is consistent with the type information of the temporary node object, the comparison result is determined to be: the target node object does not exist in the global container.

[0021] Optionally, after comparing the temporary node object with the type information of each created node object stored in the global container, the method further includes:

[0022] If the global container has a created node object whose type information is consistent with that of the temporary node object, then compare the memory sizes respectively occupied by the temporary node object and the created node object;

[0023] If the memory sizes occupied by the temporary node object and the created node object are inconsistent, the comparison result is determined to be: the target node object does not exist in the global container.

[0024] Optionally, after comparing the memory sizes occupied by the temporary node object and the created node object respectively, the method further includes:

[0025] If the memory size occupied by the temporary node object is consistent with that of the created node object, then the content contained in the temporary node object is compared with the content contained in the created node object one by one;

[0026] If the content included in the temporary node object is consistent with the content included in the created node object, the comparison result is determined to be: the target node object exists in the global container; otherwise, the comparison result is determined to be: the target node object does not exist in the global container.

[0027] Optionally, after obtaining the source file, the method further includes:

[0028] If it is detected that the file name of the source file contains a preset function identifier, a template code corresponding to the preset function identifier is obtained from a storage unit as a target code; the template code is a code created in advance for a type of source file with a preset function identifier;

[0029] Obtain the electronic control unit ECU name contained in the file name of the source file, and use the ECU name as an input parameter;

[0030] The input parameters are input into the target code to obtain the program file corresponding to the source file.

[0031] A second aspect of an embodiment of the present application provides a file sequence processing device, including:

[0032] A source file acquisition unit, used for acquiring a source file;

[0033] A parsing unit, used to parse the source file, record the order of each node label in the source file and set a corresponding node object for each node label, wherein the node object is used to store the content contained in the node label;

[0034] An interface function setting unit, used to set a corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label used to describe a test action in the node label; the interface function is used to implement the test action described by the action node label;

[0035] The interface function combining unit is used to combine the interface functions in order according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence.

[0036] Optionally, the parsing unit includes a parsing module, a comparison module and a first node object setting module:

[0037] A parsing module, used for parsing the source file;

[0038] A comparison module, for comparing the content contained in the action node tag with the created node object stored in the global container to determine the comparison result if an action node tag is parsed; the created node object is a node object that has been created and stored;

[0039] The first node object setting module is used to store the unique identification information of the action node label and the pointer of the target node object in the global container accordingly if the comparison result is that the target node object exists in the global container, so as to complete the setting of the node object of the action node label; wherein the target node object is a created node object whose content is consistent with the content contained in the action node label.

[0040] Optionally, the parsing unit also includes a second node object setting module, which is used to create a corresponding node object for the action node label based on the content contained in the action node label if the comparison result is that the target node object does not exist in the global container, and store the node object as the currently created node object; store the unique identification information of the action node label and the pointer of the currently created node object in the global container accordingly, thereby completing the setting of the node object of the action node label.

[0041] Optionally, the comparison module is specifically used to store the content included in the action node label in a temporary node object, which is a node object that temporarily stores the content included in the currently parsed action node label; compare the temporary node object with the type information of each created node object stored in the global container; if the global container does not have a created node object that is consistent with the type information of the temporary node object, then the comparison result is determined to be: the target node object does not exist in the global container.

[0042] Optionally, the comparison module is further used to compare the memory sizes occupied by the temporary node object and the created node object respectively if there is a created node object in the global container that is consistent with the type information of the temporary node object; if the memory sizes occupied by the temporary node object and the created node object are inconsistent, determine the comparison result as: the target node object does not exist in the global container.

[0043] Optionally, the comparison module is also used to compare the content contained in the temporary node object with the content contained in the created node object one by one if the memory size occupied by the temporary node object is consistent with that occupied by the created node object; if the content contained in the temporary node object is consistent with that contained in the created node object, determine the comparison result as: the target node object exists in the global container; otherwise, determine the comparison result as: the target node object does not exist in the global container.

[0044] Optionally, the file sequence processing device further includes:

[0045] a file name detection unit, configured to obtain a template code corresponding to the preset function identifier from a storage unit as a target code if it is detected that the file name of the source file contains a preset function identifier; the template code is a code created in advance for a type of source file with a preset function identifier;

[0046] An ECU name determination unit, used for obtaining an electronic control unit ECU name contained in the file name of the source file, and taking the ECU name as an input parameter;

[0047] The parameter input unit is used to input the input parameters into the target code to obtain the program file corresponding to the source file.

[0048] A third aspect of an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the terminal device implements the steps of the file sequence processing method.

[0049] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, a terminal device implements the steps of the file sequence processing method.

[0050] A fifth aspect of an embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device executes the steps of the file sequence processing method described in any one of the first aspects above.

[0051] The beneficial effect of the embodiment of the present application compared with the prior art is: in the embodiment of the present application, when parsing the source file, the order of each node label in the source file is recorded and a corresponding node object is set for each node label, and then an interface function that can implement a specific test action is set for the node object corresponding to the action node label, and each interface function is combined in the order of the node labels previously recorded to obtain a code file that can compile and generate an executable test sequence. Since the action node labels that formally describe the test actions in the source file are converted into corresponding interface functions through the aforementioned steps, and each interface function is combined according to the order of the test sequence in the source file (i.e., the order of the node labels), the source file used to describe the test sequence can be accurately converted into a compilable and executable program file, so that the test sequence described in the source file can eventually be actually run. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0053] Figure 1 It is a schematic diagram of an application scenario corresponding to a file sequence processing method provided in an embodiment of the present application;

[0054] Figure 2 It is a schematic diagram of an implementation flow of a file sequence processing method provided in an embodiment of the present application;

[0055] Figure 3 is a schematic diagram of an action node label provided in an embodiment of the present application;

[0056] Figure 4 is a schematic diagram of another action node label provided in an embodiment of the present application;

[0057] Figure 5 is a schematic diagram of a file sequence processing device provided in an embodiment of the present application;

[0058] Figure 6 It is a schematic diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0060] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.

[0061] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0062] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0063] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0064] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0065] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0066] Figure 1The schematic diagram of the application scenario corresponding to a file sequence processing method of an embodiment of the present application is shown, including a vehicle diagnostic test platform 11, a diagnostic test device 12 and a vehicle 13. Among them, the vehicle diagnostic test platform 11 establishes a communication connection with the diagnostic test device 12, and the diagnostic test device 12 is connected to the on-board automatic diagnostic system (On Board Diagnostics, OBD) interface 131 of the vehicle 13. The vehicle diagnostic test platform 11 can obtain the source file, parse the source file, record the order of each node label in the source file and set the corresponding node object for each node label through the file sequence processing method of the embodiment of the present application; set the corresponding interface function for the node object corresponding to the action node label, and combine the various interface functions in sequence according to the order of the recorded node labels to obtain the corresponding program file. Afterwards, the vehicle diagnostic test platform 11 can compile the program file to obtain the executable file corresponding to the test sequence (specifically the vehicle test sequence), and by running the executable file, control the diagnostic test device 12 to execute each test action in the vehicle test sequence to complete the diagnostic test of the vehicle 13. Optionally, the vehicle diagnostic test platform 11 in the embodiment of the present application can be specifically divided into a service platform and a user platform, and the diagnostic test device 12 is specifically connected to the user platform; after the service platform obtains the program file through the file sequence processing method of the embodiment of the present application, it can be submitted to the user platform, and the user platform compiles the program file to obtain the corresponding executable file containing the executable vehicle test sequence, and then the user platform controls the diagnostic test device 12 to execute the vehicle test sequence through the executable file. Optionally, the diagnostic test device 12 in the embodiment of the present application can directly run the executable vehicle test sequence. After the vehicle diagnostic test platform 11 compiles the program file to generate an executable file containing the executable vehicle test sequence, the executable file can be directly sent to the diagnostic test device 12, and the diagnostic test device 12 runs the executable file to execute each test action in the vehicle test sequence to complete the diagnostic test of the vehicle 13. The above-mentioned vehicle diagnostic test platform, service platform, user platform, etc. are specifically software platforms running on terminal devices.

[0067] Embodiment 1:

[0068] Figure 2 A schematic diagram of a process flow of a file sequence processing method provided by an embodiment of the present application is shown. The execution subject of the embodiment of the present application is a terminal device, which is described in detail as follows:

[0069] In S201, a source file is obtained.

[0070] In an embodiment of the present application, a source file is a file that formally describes (for example, described in XML language) a test sequence, including but not limited to an OTX source file, an Open Diagnostic Data Exchange (ODX) source file, and an XML source file, wherein the test sequence is composed of various test actions required to perform certain test tasks (for example, vehicle diagnostic tests). The source file can only formally describe the test sequence and cannot be directly called by the application program to perform the corresponding test actions. The terminal device can obtain the source file from its own storage unit, or download the source file from other devices or the network. Exemplarily, when the source file is specifically an OTX source file, the source file can be obtained by reading a readable storage medium provided by the manufacturer of the vehicle to be tested that stores various source files of the vehicle to be tested, or the source file can be obtained by obtaining the vehicle model information of the vehicle to be tested and downloading the source file corresponding to the vehicle to be tested from the website according to the vehicle model information.

[0071] In S202, the source file is parsed, the order of each node label in the source file is recorded, and a corresponding node object is set for each node label, and the node object is used to store the content contained in the node label.

[0072] Specifically, the source file may be in XML format, and the data related to each test described in the source file is encapsulated and stored through node labels at various levels. Specifically, when the source file is an OTX source file, the root node label of the source file is <otx>, the first-level node label can include a metadata label for encapsulating metadata <metadata>, variable declaration tags used to encapsulate variable collections <declarations>, process collection node label used to encapsulate process collection <procedures>Among them, the content encapsulated by each first-level node label can further include the next-level node label - the second-level node label, and each second-level node label can further include the next-level node label - the third-level node label, and so on. For example, the process collection node label <procedures>The corresponding secondary node tags may include each process node tag used to encapsulate a single specific process information. <procedure>; Process node label <procedure>The corresponding third-level node labels may include action node labels for encapsulating information about a single test action. <action>.

[0073] In the embodiment of the present application, the source file in the XML format can be parsed by a third-party XML parsing tool (such as an open source xerces-c parsing tool), and the content in the node tags at all levels of the source file is parsed out and stored. Specifically, when the XML parsing tool parses each node tag in turn, the order of each node tag is recorded, and a corresponding node object is set for each node tag, and the content contained in the node tag (i.e., the content encapsulated by the node tag) is stored through the node object. Specifically, if the program file that ultimately needs to be generated in the embodiment of the present application is a C++ code file, then the node object is specifically a C++ object for storing the content contained in the node tag.

[0074] Specifically, each node label in the source file has its own corresponding unique identification information (such as a unique identification number ID), and the order of each node label can be recorded by storing the sequence number of each node label and the corresponding unique identification information (such as a unique identification number ID) in correspondence. Optionally, the sequence number of the node label and its unique identification information can be stored in correspondence through an associative container map. The associative container map in the embodiment of the present application stores each node label similar to<key,value> The key-value pair is used to realize the mapping storage of two data. In order to distinguish, the associated container here is called the first associated container map1. When the XML parsing tool parses a node tag, the current sequence number is used as the key value, and the unique identification number of the node tag is used as the value value, which is stored in the first associated container map1, and then the corresponding node object is set for the node tag. When the parsing is completed, the first associated container completely records the order of each node tag in the source file. Among them, the sequence number increases with the number of node tags parsed. For example, when the first node tag is parsed, the sequence number is 1, when the second node tag is parsed, the sequence number increases to 2, when the third node tag is parsed, the sequence number increases to 3, and so on.

[0075] Optionally, after setting a corresponding node object for each node label, the unique identification information of the node label and the pointer of the corresponding node object can be bound and stored so that the node object can be accurately searched or called later. For example, the unique identification information of each node label and the pointer mapping storage of the corresponding node object can be implemented through the second association container map2.

[0076] In S203, a corresponding interface function is set for the node object corresponding to the action node tag, where the action node tag is a node tag in the node tags used to describe a test action; and the interface function is used to implement the test action described by the action node tag.

[0077] As described in step S202 for the source file, in the node tags of the source file, there is an action node tag for encapsulating the information of a single test action. <action>, that is, the action node tag is a node tag in the source file that is used to describe the test action. For the action node tag, in addition to setting the corresponding node object to store the data contained in the action node tag, it is also necessary to further set the corresponding interface function for the node object corresponding to the action node tag, and implement the test action described by the action node through the interface function.

[0078] Specifically, various interface functions for implementing specific test actions are pre-stored in the embodiment of the present application. The function name of each interface function is consistent with or corresponds to the name attribute information in the action node label. By obtaining the name attribute information in the node object corresponding to the action node label, an interface function matching the name attribute information is selected for the node object corresponding to the action node label, and the parameter information stored in the node object corresponding to the action node label is passed into the interface function as an input parameter, thereby completing the interface function setting of the node object.

[0079] Optionally, in an embodiment of the present application, after setting a corresponding interface function for a node object corresponding to an action node label, a pointer to the node object of the action node label and a pointer to the interface function are bound and stored, thereby recording the corresponding relationship between the node object corresponding to the node label of the action node and the interface function. For example, the mapping storage of the pointer to the node object of the action node label and the pointer to the correspondingly set interface function can be implemented through a third associated container map3.

[0080] In S204, the interface functions are combined in order according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence.

[0081] In an embodiment of the present application, according to the order of the node labels recorded in step S201 and after the interface function is set in step S203, each interface function is combined in sequence according to the order of the recorded node labels to obtain the program code corresponding to the source file.

[0082] Specifically, the correspondence between the sequence number and the pointer of the interface function can be finally determined by combining the above-mentioned first associated container map1, the second associated container map2, and the third associated container map3, so as to combine the various interface functions in order. Specifically, it includes: step A1, determining the unique identification number of the node label of the current order through map1; step A2, querying map2 according to the unique identification number to determine the pointer of the node object corresponding to the current order; step A3, querying map3 according to the pointer of the node object to determine the pointer of the interface function corresponding to the current order; step A4, calling the interface function according to the pointer of the interface function; step A5, taking the next sequence as the next current sequence, returning to step A1 to continue to combine the next interface function.

[0083] Optionally, the above-mentioned sequential combination of each interface function is specifically to declare each interface function in sequence in the program file to be generated (that is, write the function name and incoming parameter information of each interface function in sequence). Afterwards, it is necessary to use a transcoding tool that has written the specific execution code of each interface function in advance to convert the interface functions declared in sequence into actual code (such as C++ code), thereby generating the final program code. Optionally, assuming that the program code is a code in the form of C++, then the .cpp file corresponding to the source file can be generated according to the transcoding tool, and the .h file corresponding to the .cpp file can be automatically generated, and the final program file includes the .cpp file and the .h file. Optionally, if the current source file has a corresponding package name directory or a reference to other source file data, the transcoding tool also automatically writes relevant declaration reference information in the .cpp file accordingly.

[0084] In the embodiment of the present application, when parsing the source file, the order of each node label in the source file is recorded and a corresponding node object is set for each node label, and then an interface function that can implement a specific test action is set for the node object corresponding to the action node label, and each interface function is combined in the order of the node labels recorded before, so as to obtain a code file-program file that can compile and generate an executable test sequence. Since the action node labels that formally describe the test actions in the source file are converted into corresponding interface functions through the aforementioned steps, and each interface function is combined according to the order of the test sequence in the source file (i.e., the order of the node labels), the source file used to describe the test sequence can be accurately converted into a compilable and executable program file, so that the test sequence described in the source file can eventually be actually run.

[0085] Optionally, the above step S202 includes:

[0086] S20201: parsing the source file;

[0087] S20202: If an action node tag is parsed, compare the content of the action node tag with the created node object stored in the global container to determine a comparison result; the created node object is a node object that has been created and stored;

[0088] S20203: If the comparison result is that the target node object exists in the global container, the unique identification information of the action node label and the pointer of the target node object are stored in the global container accordingly to complete the setting of the node object of the action node label; wherein, the target node object is a created node object whose content is consistent with the content of the action node label.

[0089] In step S20201, the source file is parsed using an XML parsing tool.

[0090] In step S20202, when the action node label is parsed, the field is <action>When a label is found, the content contained in the action node label is compared with the created node object stored in the global container to determine the comparison result. Among them, the global container is used to store the information of the created node object, specifically for correspondingly storing the unique identification information of the resolved action node label and the pointer of the corresponding created node object. The created node object is a node object that has been created and stored, specifically a node object created for the previously resolved node label before the current action node label is resolved. Specifically, the created node object is a node object that was previously created corresponding to the previously resolved action node label.

[0091] In the embodiment of the present application, the comparison result obtained in step S20202 may include two cases: Case 1: the target node object exists in the global container; Case 2: the target node object does not exist in the global container. In the embodiment of the present application, the target node object is specifically a created node object whose content is consistent with the content of the currently parsed action node tag.

[0092] In step S20203, when the comparison result obtained in step S20202 is that the target node object exists in the global container, there is no need to create a corresponding node object for the currently parsed action node label, and the target node object can be directly set as the node object corresponding to the action node label. Specifically, the unique identification information of the action node label and the pointer of the target node object are stored in the global container in correspondence, and the node object corresponding to the current action node label can be set.

[0093] In the embodiment of the present application, when an action node label is parsed, it is possible to first search the global container for a target node object that is consistent with the content contained in the action node label. When a target node object exists, the target node object can be directly set as the node object of the currently parsed action node label without having to recreate a node object for the action node label, i.e., there is no need to open up different memory spaces to store node objects with consistent content, thereby saving memory overhead. Furthermore, since the number of node objects stored in the memory is reduced, the number of operations of the interface function that needs to be set for each node object in step S203 is reduced, thereby improving the efficiency of file sequence processing.

[0094] Optionally, after step S20202, the method further includes:

[0095] If the comparison result is that the target node object does not exist in the global container, creating a corresponding node object for the action node tag according to the content contained in the action node tag, and storing the node object as the currently created node object;

[0096] The unique identification information of the action node label and the pointer of the currently created node object are correspondingly stored in the global container to complete the setting of the node object of the action node label.

[0097] When the comparison result obtained in step S20202 is that the target node object does not exist in the global container, it means that there is no created node object that can represent the content of the currently parsed action node label. Therefore, at this time, a corresponding node object is created for the action node label to store the content contained in the action node label. After creating the node object corresponding to the action node label, the created node object is stored in the memory as the current created node object (i.e., the newly obtained created node object).

[0098] Afterwards, the unique identification information of the action node label and the pointer of the currently created node object (the pointer is the storage address information of the currently created node object in the memory) are stored in the global container accordingly, thereby completing the setting of the node object of the current action node label.

[0099] In the embodiment of the present application, when the target node object does not exist in the global container, a node object is created to store the content of the currently parsed action node label, thereby ensuring that the content of each action node label with inconsistent content can be effectively stored.

[0100] Exemplarily, the first action node label of the source file is called action1, the second action node label is called action2, and the third action node label is called action3. When action1 is parsed, a corresponding node object Action1 is created for action1 and stored in the memory space. At this time, Action1 is a created node object. At the same time, the unique identification information of action1 and the pointer of the current created node object Action1 are stored in the global container in correspondence, and the setting of the node object of the current action node label action1 is completed. When action2 is parsed, the node object Action1 is the created node object stored in the current global container. At this time, the content contained in action2 is compared with the content contained in the node object Action1. If the contents of the two are inconsistent, the comparison result is that the target node object corresponding to the current action node label action2 does not exist in the global container. Therefore, the corresponding node object Action2 is created for the action2 and stored. At this time, Action2 is the current created node object. At the same time, the unique identification information of action2 and the current created node object Action2 are stored in the global container in correspondence, and the setting of the node object of the current action node label action2 is completed. When action3 is parsed, both node objects Action1 and Action2 are created node objects stored in the current global container. At this time, the content contained in the action node label action3 is compared with the content contained in the node object Action1 and the content contained in the node object Action2. If the content contained in the action node label action3 is consistent with the content contained in the node object Action1, the node object Action1 is determined as the current target node object. Therefore, the unique identification information of action3 is stored in the global container in correspondence with the current target node object - Action1, thereby completing the setting of the node object of the current action node label action3.

[0101] For example, there are multiple action node tags (referred to as negative response acquisition action tags for convenience of description) for describing the action of acquiring negative response information in the source file, for example Figure 3 , Figure 4 That is, two negative response action tags are obtained in the same source file. These negative response action tags encapsulate the specified content (the content here specifically refers to <action>The sub-tag structure of the tag and <realisation>The contents encapsulated by the subtags are usually consistent, so when the negative response acquisition action tag is parsed for the first time, a corresponding negative response acquisition node object can be created for the negative response acquisition action tag that is parsed for the first time. After that, when a similar negative response acquisition action tag is parsed for the second time or after the second time, there is no need to recreate the negative response acquisition node object, but only need to use the negative response acquisition node object created for the first time as the target node object to complete the setting of the corresponding node object.

[0102] Optionally, the step S20202 includes:

[0103] The content contained in the action node tag is stored in a temporary node object, where the temporary node object is a node object that temporarily stores the content contained in the currently parsed action node tag;

[0104] Compare the temporary node object with the type information of each created node object stored in the global container;

[0105] If the global container does not have a created node object that is consistent with the type information of the temporary node object, the comparison result is determined to be: the target node object does not exist in the global container.

[0106] In an embodiment of the present application, when an action node label is parsed, the content of the action node label will be stored in a temporary node object. The temporary node object is only used to temporarily store the content contained in the currently parsed action node label, and the data will not be persisted like a created node object.

[0107] Afterwards, the temporary node object is compared with the type information of each created node object stored in the global container. If there is no created node object in the global container that is consistent with the type information of the temporary node object, it can be directly determined that the comparison result is that the target node object does not exist in the global container. Specifically, in the embodiment of the present application, the type of the node object is determined according to the type information contained in the content of its corresponding node label. For example, if the currently parsed action node label is Figure 3 The tag shown in the figure contains the following type information: <realisation>"type="ns:Assignment"" in the subtag, the type of the current temporary node object can be set to Assignment according to the information.

[0108] In the embodiment of the present application, since a preliminary search is performed to determine whether the target node object exists in the global container directly based on the comparison of type information, when there is no created node object in the global container that is consistent with the type information of the temporary node object, it can be directly determined that the target node object does not exist in the current global container without having to compare all contents of the temporary node object and the created node object one by one, thereby improving the comparison efficiency and thus improving the setting efficiency of the node object.

[0109] Optionally, after comparing the temporary node object with the type information of each created node object stored in the global container, the method further includes:

[0110] If the global container has a created node object whose type information is consistent with that of the temporary node object, then compare the memory sizes respectively occupied by the temporary node object and the created node object;

[0111] If the memory sizes occupied by the temporary node object and the created node object are inconsistent, the comparison result is determined to be: the target node object does not exist in the global container.

[0112] If the temporary node object is compared with the type information of each created node object stored in the global container, and it is determined that the global container has a created node object that is consistent with the type information of the current temporary node object, it means that the created node objects that may be consistent with the temporary node object have been preliminarily screened out. At this time, the memory size information of the temporary node object and the memory size information occupied by the created node object are further obtained (the created node object is specifically a created node object that has been preliminarily screened and is consistent with the type information of the temporary node object) and compared.

[0113] Generally, if the memory occupied by one node object is inconsistent with that of another node object, it can be directly determined that the contents of the two node objects are inconsistent. Therefore, in the embodiment of the present application, when the memory size occupied by the temporary node object is inconsistent with that of the created node object, it can be directly determined that the comparison result is: the target node object does not exist in the global container.

[0114] In an embodiment of the present application, after preliminarily determining that there is a created node object in the global container that is consistent with the type information of the current temporary node object, the memory size of the temporary node object can be further compared with that of the created node object, thereby performing further screening. When there is no created node object in the global container that is consistent with the memory size of the temporary node object, it can be directly determined that the target node object does not exist in the current global container without having to compare all the contents of the temporary node object and the created node object one by one. Therefore, the comparison efficiency can be improved, thereby improving the setting efficiency of the node object.

[0115] Optionally, after comparing the memory sizes occupied by the temporary node object and the created node object, the method further includes:

[0116] If the memory size occupied by the temporary node object is consistent with that of the created node object, then the content contained in the temporary node object is compared with the content contained in the created node object one by one;

[0117] If the content included in the temporary node object is consistent with the content included in the created node object, the comparison result is determined to be: the target node object exists in the global container; otherwise, the comparison result is determined to be: the target node object does not exist in the global container.

[0118] After the above-mentioned preliminary screening of type information and memory size, if there is a created node object in the global container whose type information and memory size are consistent with those of the current temporary node object, the content contained in the current temporary node object can be further compared one by one with the content contained in the created node object.

[0119] When the comparison determines that the content of the temporary node object is consistent with the content of the currently created node object (the content consistency here can specifically be the specified content except the identification information), it means that there is already a created node object that is consistent with the content of the currently parsed action node label - that is, the target node object, so the comparison result is determined to be that the target node object exists in the global container. If the comparison determines that the content of the temporary node object is inconsistent with the content of the currently created node object, the comparison result is determined to be that the target node object does not exist in the global container.

[0120] Optionally, if the action node tag has sub-tags, and the temporary node object or the created node object contains the next-level sub-object, a method similar to the above can be used to first compare the memory size of the next-level sub-object, and then compare the specific content of the next-level sub-object when the memory size of the next-level sub-object is the same. Similarly, for the same next-level sub-object, the created next-level sub-object can be directly referenced.

[0121] In an embodiment of the present application, after preliminary screening of type information and memory size, the specific contents of the current temporary node object and the created node object can be further compared one by one, thereby accurately obtaining the comparison result and ensuring the accuracy of the node object setting.

[0122] Optionally, after step S201, the method further includes:

[0123] If it is detected that the file name of the source file contains a preset function identifier, a template code corresponding to the preset function identifier is obtained from a storage unit as a target code; the template code is a code created in advance for a type of source file with a preset function identifier;

[0124] Obtain the electronic control unit ECU name contained in the file name of the source file, and use the ECU name as an input parameter;

[0125] The input parameters are input into the target code to obtain the program file corresponding to the source file.

[0126] Usually, in different source files corresponding to different electronic control units (ECUs), there are some source files with similar functions, for example, source files for writing vehicle identification numbers (VIN) and source files for writing network functions. The file names of these source files have the same preset function identifier, and the contents in the source files are basically the same. Therefore, corresponding codes can be created in advance for the source files corresponding to various preset function identifiers for storage, and template codes corresponding to each preset function identifier can be obtained. Afterwards, when a source file is obtained, it is first detected whether the file name of the source file contains the preset function identifier. If it does, the template code corresponding to the preset function identifier is directly obtained from the storage unit as the current target code without re-parsing the source file and implementing the code. For example, the preset function identifier corresponding to the write VIN code function is "WriteVINCode", and the preset function identifier corresponding to the write network function is "WriteNetWorkCode".

[0127] In the embodiment of the present application, after obtaining the template code as the target code, it is also necessary to pass the name of the ECU to be operated corresponding to the current source file as an input parameter for the target code, so as to uniquely determine the ECU to be operated by the current target code. Usually the file name of the source file consists of the corresponding ECU name and function identifier. In addition to the preset function identifier, the source file with similar functions as mentioned above also contains the ECU name corresponding to itself. For example, for the engine management system (EMS), the file name of the source file of its VIN code writing function is: EMS_WriteVINCode; for the airbag control unit (ACU), the file name of the source file of its VIN code writing function is: ACU_WriteVINCode. Therefore, the ECU name contained in the source file can be obtained through the file name of the source file, and the ECU name can be used as the input parameter corresponding to the current target code.

[0128] Afterwards, the input parameter is passed into the target code to obtain the program file corresponding to the current source file.

[0129] In an embodiment of the present application, since corresponding template codes are set in advance for source files with the same functions, when it is detected that the file name of the current source file contains a preset function identifier, the program file of the source file can be quickly obtained directly through the template code, thereby improving the processing efficiency of the test sequence.

[0130] Optionally, after the above step S204, the method further includes:

[0131] Compile the obtained program file;

[0132] If the compilation fails, adjust the code in the program file according to the log information to solve the compilation problem.

[0133] Optionally, after compiling the obtained program file, the following steps are further included:

[0134] If the compilation is successful, the executable file or dynamic link library corresponding to the program file is obtained;

[0135] Load other preset modules, call the executable file or dynamic link library, and implement the corresponding diagnostic process.

[0136] Exemplarily, when the source file is specifically an OTX source file, the other preset modules may specifically include a diagnostic software module, a display program module, a data link protocol data unit (D-PDU) module, etc. These modules are specifically in the form of a dynamic link library (DLL) or an executable file (EXE). After the diagnostic test device loads these preset modules, it can combine the above-mentioned executable files or dynamic link libraries to run the corresponding processes, implement the call to the vehicle test sequence interface, and execute the corresponding diagnostic process.

[0137] Optionally, when calling the executable file or dynamic link library to implement the corresponding diagnostic process, it also includes:

[0138] Record the log information of the test process;

[0139] The program files mentioned above are adjusted according to the log information.

[0140] When calling the executable file or dynamic link library to implement the diagnostic process, the log information of the test sequence execution is recorded. When there is an execution failure, the corresponding code segment in the above program file is modulated through the log information to improve the program file.

[0141] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0142] Embodiment 2:

[0143] Figure 5 A schematic diagram of the structure of a file sequence processing device provided in an embodiment of the present application is shown. For the sake of convenience, only the part related to the embodiment of the present application is shown:

[0144] The file sequence processing device comprises: a source file acquisition unit 51, a parsing unit 52, an interface function setting unit 53, and an interface function combining unit 54. Among them:

[0145] The source file acquisition unit 51 is used to acquire the source file.

[0146] The parsing unit 52 is used to parse the source file, record the order of each node label in the source file and set a corresponding node object for each node label, and the node object is used to store the content contained in the node label.

[0147] The interface function setting unit 53 is used to set the corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label in the node label used to describe the test action; the interface function is used to implement the test action described by the action node label.

[0148] The interface function combining unit 54 is used to combine the interface functions in order according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence.

[0149] Optionally, the parsing unit 52 includes a parsing module, a comparison module and a first node object setting module:

[0150] A parsing module, used for parsing the source file;

[0151] A comparison module, for comparing the content contained in the action node tag with the created node object stored in the global container to determine the comparison result if an action node tag is parsed; the created node object is a node object that has been created and stored;

[0152] The first node object setting module is used to store the unique identification information of the action node label and the pointer of the target node object in the global container accordingly if the comparison result is that the target node object exists in the global container, so as to complete the setting of the node object of the action node label; wherein the target node object is a created node object whose content is consistent with the content contained in the action node label.

[0153] Optionally, the parsing unit 52 also includes a second node object setting module, which is used to create a corresponding node object for the action node label based on the content contained in the action node label if the comparison result is that the target node object does not exist in the global container, and store the node object as the currently created node object; store the unique identification information of the action node label and the pointer of the currently created node object in the global container accordingly, to complete the setting of the node object of the action node label.

[0154] Optionally, the comparison module is specifically used to store the content included in the action node label in a temporary node object, which is a node object that temporarily stores the content included in the currently parsed action node label; compare the temporary node object with the type information of each created node object stored in the global container; if the global container does not have a created node object that is consistent with the type information of the temporary node object, then the comparison result is determined to be: the target node object does not exist in the global container.

[0155] Optionally, the comparison module is further used to compare the memory sizes occupied by the temporary node object and the created node object respectively if there is a created node object in the global container that is consistent with the type information of the temporary node object; if the memory sizes occupied by the temporary node object and the created node object are inconsistent, determine the comparison result as: the target node object does not exist in the global container.

[0156] Optionally, the comparison module is also used to compare the content contained in the temporary node object with the content contained in the created node object one by one if the memory size occupied by the temporary node object is consistent with that occupied by the created node object; if the content contained in the temporary node object is consistent with that contained in the created node object, determine the comparison result as: the target node object exists in the global container; otherwise, determine the comparison result as: the target node object does not exist in the global container.

[0157] Optionally, the file sequence processing device further includes:

[0158] a file name detection unit, configured to obtain a template code corresponding to the preset function identifier from a storage unit as a target code if it is detected that the file name of the source file contains a preset function identifier; the template code is a code created in advance for a type of source file with a preset function identifier;

[0159] An ECU name determination unit, used for obtaining an electronic control unit ECU name contained in the file name of the source file, and taking the ECU name as an input parameter;

[0160] The parameter input unit is used to input the input parameters into the target code to obtain the program file corresponding to the source file.

[0161] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0162] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0163] Embodiment three:

[0164] Figure 6 Schematic diagram of a terminal device provided by an embodiment of the present application. Figure 6 As shown, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as a file sequence processing program. When the processor 60 executes the computer program 62, the steps in the above-mentioned various file sequence processing method embodiments are implemented, such as Figure 2 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 5 The functions of the units 51 to 54 are shown.

[0165] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into a source file acquisition unit, a parsing unit, an interface function setting unit, and an interface function combination unit, and the specific functions of each unit are as follows:

[0166] The source file acquisition unit is used to acquire the source file.

[0167] The parsing unit is used to parse the source file, record the order of each node label in the source file and set a corresponding node object for each node label, wherein the node object is used to store the content contained in the node label.

[0168] The interface function setting unit is used to set the corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label in the node label used to describe the test action; the interface function is used to implement the test action described by the action node label.

[0169] The interface function combining unit is used to combine the interface functions in order according to the recorded order of the node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence.

[0170] The terminal device 6 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 It is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0171] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0172] The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used to store the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.

[0173] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0174] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0175] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0176] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0177] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0178] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0179] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0180] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.< / realisation> < / realisation> < / action> < / action> < / action> < / action> < / procedure> < / procedure> < / procedures> < / procedures> < / declarations> < / metadata> < / otx>

Claims

1. A file sequence processing method, characterized in that: include: Obtaining a source file; wherein the source file is a file that formally describes a test sequence, including an XML source file, wherein the test sequence is composed of various test actions required to perform certain test tasks; Parsing the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label, wherein the node object is used to store the content contained in the node label; Setting a corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label used to describe a test action in the node label; the interface function is used to implement the test action described by the action node label; Combining the interface functions in order according to the order of the recorded node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence; The parsing of the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label includes: Parsing the source file; If an action node tag is parsed, the content contained in the action node tag is compared with the created node object stored in the global container to determine the comparison result; the created node object is a node object that has been created and stored; If the comparison result is that the target node object exists in the global container, the unique identification information of the action node label and the pointer of the target node object are stored in the global container accordingly to complete the setting of the node object of the action node label; wherein, the target node object is a created node object whose content is consistent with the content of the action node label.

2. The file sequence processing method according to claim 1, characterized in that: If an action node label is parsed, the content of the action node label is compared with the created node object stored in the global container, and after the comparison result is determined, the method further includes: If the comparison result is that the target node object does not exist in the global container, creating a corresponding node object for the action node tag according to the content contained in the action node tag, and storing the node object as the currently created node object; The unique identification information of the action node label and the pointer of the currently created node object are correspondingly stored in the global container to complete the setting of the node object of the action node label.

3. The file sequence processing method according to claim 1 or 2, characterized in that: If an action node tag is parsed, the content of the action node tag is compared with the created node object stored in the global container to determine the comparison result, including: The content contained in the action node tag is stored in a temporary node object, where the temporary node object is a node object that temporarily stores the content contained in the currently parsed action node tag; Compare the temporary node object with the type information of each created node object stored in the global container; If the global container does not have a created node object that is consistent with the type information of the temporary node object, the comparison result is determined to be: the target node object does not exist in the global container.

4. The file sequence processing method according to claim 3, characterized in that: After comparing the temporary node object with the type information of each created node object stored in the global container, the method further includes: If the global container has a created node object whose type information is consistent with that of the temporary node object, then compare the memory sizes respectively occupied by the temporary node object and the created node object; If the memory sizes occupied by the temporary node object and the created node object are inconsistent, the comparison result is determined to be: the target node object does not exist in the global container.

5. The file sequence processing method according to claim 4, characterized in that: After comparing the memory sizes occupied by the temporary node object and the created node object respectively, the method further includes: If the memory size occupied by the temporary node object is consistent with that of the created node object, then the content contained in the temporary node object is compared with the content contained in the created node object one by one; If the content included in the temporary node object is consistent with the content included in the created node object, the comparison result is determined to be: the target node object exists in the global container; otherwise, the comparison result is determined to be: the target node object does not exist in the global container.

6. The file sequence processing method according to claim 1, characterized in that: After obtaining the source file, the method further includes: If it is detected that the file name of the source file contains a preset function identifier, a template code corresponding to the preset function identifier is obtained from a storage unit as a target code; the template code is a code created in advance for a type of source file with a preset function identifier; Obtain the electronic control unit ECU name contained in the file name of the source file, and use the ECU name as an input parameter; The input parameters are input into the target code to obtain the program file corresponding to the source file.

7. A file sequence processing device, characterized in that: include: A source file acquisition unit, used to acquire a source file; wherein the source file is a file that formally describes a test sequence, including an XML source file, wherein the test sequence is composed of various test actions required to perform certain test tasks; A parsing unit, used to parse the source file, record the order of each node label in the source file and set a corresponding node object for each node label, wherein the node object is used to store the content contained in the node label; An interface function setting unit, used to set a corresponding interface function for the node object corresponding to the action node label, wherein the action node label is a node label used to describe a test action in the node label; the interface function is used to implement the test action described by the action node label; An interface function combining unit, used to combine the interface functions in order according to the order of the recorded node labels to obtain a program file corresponding to the source file; the program file is a code file that can be compiled and generate an executable test sequence; The parsing of the source file, recording the order of each node label in the source file and setting a corresponding node object for each node label includes: Parsing the source file; If an action node tag is parsed, the content contained in the action node tag is compared with the created node object stored in the global container to determine the comparison result; the created node object is a node object that has been created and stored; If the comparison result is that the target node object exists in the global container, the unique identification information of the action node label and the pointer of the target node object are stored in the global container accordingly to complete the setting of the node object of the action node label; wherein, the target node object is a created node object whose content is consistent with the content of the action node label.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the terminal device implements the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the terminal device implements the steps of the method according to any one of claims 1 to 6.