File analysis processing method and system

The model self-developed tools analyze the header information of the Arxml file, determine the dependency package and perform parsing and compatibility processing, solving the problem that different versions of Arxml files cannot be parsed, and improving file reuse rate and development efficiency.

CN119690448APending Publication Date: 2025-03-25BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411719093.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Different versions of Arxml files cannot be parsed in the same tool, resulting in low file reuse and reduced development efficiency.

Method used

The header information of the Arxml file is obtained through the pre-configured model self-developed tools, determine the dependency package, and parse the Arxml file based on the model self-developed tools and dependency package. If the attributes are not reusable, they are compatible.

Benefits of technology

It improves the reuse rate of Arxml files, reduces development time, avoids the need to re-edit files or tools due to version updates, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690448A_ABST
    Figure CN119690448A_ABST
Patent Text Reader

Abstract

The invention discloses a file analysis processing method and system, aiming at Arxml files of various versions, header information of the Arxml files is obtained through a pre-configured model self-research tool, configuration items of a preset mapping relation are stored in the model self-research tool, the mapping relation is determined by a reference object of a service element in the Arxml file of a target version, and the mapping relation is determined by a reference object of the service element in the Arxml file of the target version. And determining a dependency package according to the header information, analyzing the Arxml file according to the model self-research tool and the dependency package to obtain an analysis result, and if the analysis result shows that the attribute of the Arxml file of the initial version cannot be reused, carrying out compatibility processing on the Arxml file of the initial version which cannot be reused.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data parsing and processing of automotive electronic software systems, and more specifically, to a file parsing and processing method and system. Background Art

[0002] Based on the file format of XML extensible markup language (AUTOSARXML, Arxml), this paper introduces how to serialize AUTOSAR models into Arxml description rules to provide support for interoperability between AUTOSAR tools. Arxml contains information such as communication protocols, data formats, signal definitions, etc. between various modules in automotive electronic systems.

[0003] In the manifest file protocol of the standard Arxml, there are differences and similarities between different versions of Arxml files. For example, different versions of Arxml files are independent of each other, and the valid content in the lower version of Arxml cannot be updated to the higher version of Arxm files. The Arxml file configuration tool can only be used to reconfigure the higher version of Arxml to parse different versions of Arxml at the same time. However, in the configuration tool, due to the open source tool platform (Artop) model officially provided by AUTOSAR, the dependent packages (jar packages) for parsing different versions of Arxml, such as autosar448, autosar451, etc., use the same ID (such as autosar40) in a certain underlying parameter, resulting in different versions of dependent packages cannot be imported into the same project, such as the major version number (Major version number) of the service interface (ServiceInterface). jorVersion) attribute in the jar package of autosar448 and the jar package of autosar450 is PortinterfacePackage.SERVICE_INTERFACE_MAJOR_VERSION. At this time, if there are two jar packages of autosar448 and autosar451 in the autosar40 project, it is impossible to distinguish which dependency package to use for parsing. Therefore, different versions of Arxml cannot be parsed in the same tool, resulting in different versions of Arxml files cannot interact. The information in the low version of the Arxml file cannot be updated to the new version (high version) of the Arxml file regardless of whether it is useful, resulting in a low reuse rate of the Arxml file, and each time the version of the Arxml file is updated, a new corresponding tool needs to be made, which reduces development efficiency.

[0004] Therefore, how to improve the reuse rate and development efficiency of Arxml files is an urgent problem to be solved in this application. Summary of the invention

[0005] In view of this, the present application discloses a file parsing and processing method and system, aiming to improve the reuse rate and development efficiency of Arxml files.

[0006] In order to achieve the above purpose, the disclosed technical solution is as follows:

[0007] The first aspect of the present application discloses a file parsing method, the method comprising:

[0008] For each version of the Arxml file, the header information of the Arxml file is obtained through a pre-configured model self-developed tool; wherein the model self-developed tool stores configuration items of preset mapping relationships; the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file;

[0009] Determine the dependent package according to the header information;

[0010] Parse the Arxml file according to the self-developed model tool and the dependent package to obtain a parsing result;

[0011] If the parsing result indicates that the attribute of the initial version of the Arxml file is not reusable, compatibility processing is performed on the initial version of the Arxml file that is not reusable.

[0012] Preferably, the configuration process of the model self-development tool includes:

[0013] Obtain business requirements and determine the required content of the initial version of the Arxml file based on the business requirements;

[0014] According to the preset protocol specification, the content required by the initial version of the Arxml file is converted into a tool custom node model;

[0015] When parsing the service element in the tool custom node model, identifying the first reference object of the Arxml file of the initial version and the second reference object of the Arxml file of the target version; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version;

[0016] In the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file, if the preset element of the initial version of the Arxml file is identified, create a node corresponding to the preset element in the target version of the Arxml file;

[0017] Determine the mapping relationship between the node and its port, and convert the preset mapping relationship into the configuration item of the node to complete the configuration process of the model self-developed tool.

[0018] Preferably, determining the dependent package according to the header information includes:

[0019] Determine the dependent version number of the Arxml file according to the header information;

[0020] The corresponding dependent package is determined by the dependent version number.

[0021] Preferably, the Arxml file is parsed according to the self-developed model tool and the dependent package to obtain the parsing result, including:

[0022] For each initial version of the Arxml file, determine the element attributes in the initial version of the Arxml file and the element attributes in the target version of the Arxml file according to the model self-developed tool and the dependent package;

[0023] According to a preset protocol, the element attributes in the Arxml file of the initial version are compared with the element attributes in the Arxml file of the target version to obtain difference items;

[0024] If the difference item indicates that the element attribute does not exist in the initial version of the Arxml file, and the element attribute exists in the target version of the Arxml file, the parsing result is determined to be a parsing result indicating that the attribute of the initial version of the Arxml file is not reusable.

[0025] Preferably, it also includes:

[0026] If the difference item indicates that an element attribute exists in the Arxml file of the initial version, and the element attribute does not exist in the Arxml file of the target version, determining that the parsing result is a parsing result indicating that the attribute of the Arxml file of the initial version is reusable;

[0027] Parse the attributes of the reusable initial version of the Arxml file into nodes in the interface.

[0028] Preferably, the compatibility processing at least includes modifying the attribute name or deleting the attribute, and if the parsing result indicates that the attribute of the initial version of the Arxml file is not reusable, the compatibility processing of the initial version of the Arxml file that cannot be reused includes:

[0029] If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused, and the definition of the attribute that cannot be reused in the initial version of the Arxml file is the same as the definition in the target version of the Arxml file, the name of the attribute that cannot be reused is modified to the attribute name in the target version of the Arxml file to complete the process of compatibility processing of the initial version of the Arxml file that cannot be reused;

[0030] If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused and the attribute is not needed in the target version of the Arxml file, the attribute is determined to be a deprecated attribute and deleted to complete the process of compatibility processing of the initial version of the Arxml file that cannot be reused.

[0031] The second aspect of the present application discloses a file parsing and processing system, the system comprising:

[0032] An acquisition unit is used to acquire the header information of the Arxml file of each version through a pre-configured model self-developed tool; wherein the model self-developed tool stores configuration items of preset mapping relationships; and the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file;

[0033] A first determining unit, configured to determine a dependent package according to the header information;

[0034] A first parsing unit is used to parse the Arxml file according to the self-developed model tool and the dependent package to obtain a parsing result;

[0035] The processing unit is used to perform compatibility processing on the Arxml file of the initial version that cannot be reused if the parsing result indicates that the attribute of the Arxml file of the initial version cannot be reused.

[0036] Preferably, the acquisition unit of the configuration process of the model self-developed tool includes:

[0037] An acquisition module is used to acquire business requirements and determine the required content of the initial version of the Arxml file according to the business requirements;

[0038] A conversion module, used for converting the content required by the initial version of the Arxml file into a tool custom node model according to a preset protocol specification;

[0039] An identification module, used for identifying, when parsing the service element in the tool custom node model, a first reference object of the Arxml file of the initial version and a second reference object of the Arxml file of the target version; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version;

[0040] A creation module is used to create a node corresponding to the preset element in the target version of the Arxml file if a preset element of the initial version of the Arxml file is identified during the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file;

[0041] A conversion module is determined, which is used to determine the mapping relationship between the node and its port, and convert the preset mapping relationship into a configuration item of the node to complete the configuration process of the model self-developed tool.

[0042] Preferably, the first determining unit includes:

[0043] A first determination module is used to determine the number of dependent versions of the Arxml file according to the header information;

[0044] The second determining module is used to determine the corresponding dependent package according to the dependent version number.

[0045] Preferably, the first parsing unit comprises:

[0046] A third determination module is used to determine, for each initial version of the Arxml file, the element attributes in the Arxml file of the initial version and the element attributes in the Arxml file of the target version according to the model self-developed tool and the dependent package;

[0047] A comparison module, used for comparing the element attributes in the Arxml file of the initial version with the element attributes in the Arxml file of the target version according to a preset protocol to obtain difference items;

[0048] The fourth determination module is used to determine that the parsing result is a parsing result indicating that the attribute of the initial version of the Arxml file is not reusable if the difference item indicates that the element attribute does not exist in the initial version of the Arxml file and the element attribute exists in the target version of the Arxml file.

[0049] It can be known from the above technical scheme that the present application discloses a file parsing processing method and system, which obtains the header information of the Arxml file for each version through a pre-configured model self-developed tool, wherein the model self-developed tool stores configuration items of preset mapping relationships, and the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file. The dependent package is determined according to the header information, and the Arxml file is parsed according to the model self-developed tool and the dependent package to obtain the parsing result. If the parsing result indicates that the attribute of the initial version of the Arxml file is not reusable, the non-reusable initial version of the Arxml file is processed for compatibility.

[0050] Through the above scheme, since there is header information in the Arxml file, the version of the Arxml file is defined in the header information. The header information in the Arxml file is read through the model self-developed tool, and the corresponding dependent package is selected according to the header information in the Arxml file to parse the corresponding Arxml file. Since the Arxml file is essentially an XML file, all the information in the Arxml file can be obtained by reading the XML file, such as service interface, data type, SWC and other information. By distinguishing the dependent packages, all the information is parsed together into the model self-developed tool to obtain the parsing result. If the property of the initial version of the Arxml file cannot be reused, the initial version of the Arxml file that cannot be reused is processed for compatibility, so as to achieve the purpose of reusing the lower version of the Arxml file, thereby solving the problem that different versions of Arxml files cannot be parsed in the same model self-developed tool, so as to improve the reuse rate of the Arxml file. In addition, in the process of updating the Arxml file each time, there is no need to re-edit the Arxml file or make a new model self-developed tool because the property of the initial version of the Arxml file cannot be reused, thereby improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0052] Figure 1 A flowchart of a file parsing method disclosed in an embodiment of the present application;

[0053] Figure 2 A flowchart of the configuration process of the self-developed model tool disclosed in the embodiment of the present application;

[0054] Figure 3 A schematic diagram of a process for obtaining analysis results disclosed in an embodiment of the present application;

[0055] Figure 4 A schematic diagram of the structure of a file parsing and processing system disclosed in an embodiment of the present application;

[0056] Figure 5 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0059] As can be seen from the background technology, the prior art cannot distinguish which dependency package should be used for parsing, so different versions of Arxml cannot be parsed in the same tool, resulting in different versions of Arxml files being unable to interact, and the information in the lower version of the Arxml file cannot be updated to the new version of the Arxml file regardless of whether it is useful, resulting in a low reuse rate of the Arxml file, and each time the version of the Arxml file is updated, a corresponding tool needs to be remade, thereby reducing development efficiency. Therefore, how to improve the reuse rate and development efficiency of Arxml files is a problem that this application urgently needs to solve.

[0060] In order to solve the above problems, the present application discloses a file parsing processing method and system. Since there is header information in the Arxml file, the version of the Arxml file is defined in the header information. The header information in the Arxml file is read by the model self-developed tool, and the corresponding dependent package is selected according to the header information in the Arxml file to parse the corresponding Arxml file. Since the Arxml file is essentially an xml file, all the information in the Arxml file can be obtained by reading the xml file, such as service interface, data type, SWC and other information. By distinguishing the dependent packages, all the information is parsed together into the model self-developed tool to obtain the parsing result. If the properties of the initial version of the Arxml file cannot be reused, the initial version of the Arxml file that cannot be reused is processed for compatibility, so as to achieve the effect of reusing the lower version of the Arxml file, thereby solving the problem that different versions of Arxml files cannot be parsed in the same model self-developed tool, so as to improve the reuse rate of the Arxml file. In addition, in the process of updating the Arxml file each time, there is no need to re-edit the Arxml file or make a new model self-developed tool because the properties of the initial version of the Arxml file cannot be reused, thereby improving the development efficiency. The specific implementation method is specifically described by the following embodiments.

[0061] refer to Figure 1 As shown, a file parsing method disclosed in an embodiment of the present application is provided. The parsing method mainly includes the following steps:

[0062] S101: For each version of the Arxml file, the header information of the Arxml file is obtained through a pre-configured model self-developed tool; wherein the model self-developed tool stores configuration items of preset mapping relationships; the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file.

[0063] Each version of Arxml file includes various initial version Arxml files and target version Arxml files. Among them, the initial version Arxml file is a low version Arxml file; the target version Arxml file is a high version Arxml file.

[0064] For Arxml files with a version lower than the target version, their corresponding Arxml files are all Arxml files of the initial version.

[0065] It should be noted that there is header information in the Arxml file, which defines the version of the Arxml file. The dependent version number of the Arxml file in the header information of the Arxml file is read by self-developed tools. For example, according to the header information in the Arxml file, the dependent package (jar package) of autosar448 is selected to parse the Arxml file, or the jar package of autosar451 is selected to parse the Arxml file.

[0066] The service elements include but are not limited to the service element ServiceInstanceToPortPrototypeMaping.

[0067] The configuration process of the specific model self-developed tool is as follows Figure 2 As shown, the steps of the configuration process of the model self-developed tool are shown in S201-S205.

[0068] S201: Obtain business requirements and determine the required content of the initial version of the Arxml file based on the business requirements.

[0069] The business requirements refer to requirements for service version information, required service events, method information, etc. The content corresponding to these business requirements is extracted from the initial version of the Arxml file, that is, the content required in the initial version of the Arxml file.

[0070] The required contents of the initial version of the Arxml file include communication protocols, data formats, signal definitions, SWC, EXEC, ServiceInterface and other information between modules.

[0071] Taking the adaptive platform (AUTOSAR AP) as an example, in AP, SWC can define a lot of content. In embedded development, code is generated based on the content of SWC. The Arxml file contains the content required by these SWC, EXEC, and service interface (ServiceInterface).

[0072] S202: According to a preset protocol specification, the content required by the initial version of the Arxml file is converted into a tool-defined node model.

[0073] Among them, the preset protocol specifications include but are not limited to AUTOSAR_TPS_ManifestSpecification_R19-11, AUTOSAR_TPS_ManifestSpecification_R22-11, AUTOSAR_TPS_SoftwareComponentTemplate, etc.

[0074] Tool-defined node models refer to the node models that users can define and create according to their own needs in a specific tool or framework. Such tool-defined node models are usually used to extend the functionality of the tool to enable it to handle specific tasks or data types.

[0075] The advantages of tool-customized node models are as follows:

[0076] 1. Personalization: Developers can choose the appropriate model according to their own requirements and personal preferences to improve development efficiency and code quality.

[0077] 2. Flexibility: Custom models can be replaced or upgraded at any time to keep the development tools advanced.

[0078] By using tool-customized node models, developers can create tools that meet specific business logic and requirements, thereby improving work efficiency and system maintainability.

[0079] For example, a project inputs an Arxml file of version 19-11 (initial version), in which the software component (SWC), the minimum execution unit (EXEC) of the executable file AP, the persistent interface (PerInterface) and other information are defined. When the Arxml file of version 19-11 is imported into the self-developed model tool of version 22-11 (target version), the SWC, EXEC, PerInterface and other information will be converted into a tool-defined node model according to the protocol specification.

[0080] Among them, SWC is used to encapsulate the modules of automotive electronic functions, including the implementation and description of specific functions.

[0081] EXEC is used to provide an interface that supports access to persistent data.

[0082] S203: When parsing the service element in the tool custom node model, identify the first reference object of the initial version of the Arxml file and the second reference object of the target version of the Arxml file; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version.

[0083] S204: In the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file, if a preset element of the initial version of the Arxml file is identified, a node corresponding to the preset element in the target version of the Arxml file is created.

[0084] The preset element is the attribute of the initial version of the Arxml file itself, or its aggregated sub-element. The preset element includes but is not limited to the PersistencyFileProxyInterface element, wherein the PersistencyFileProxyInterface is used to access the interface provided by the persistence file.

[0085] The nodes corresponding to the preset elements include but are not limited to custom service interface nodes.

[0086] For example, after creating the PersistencyFileStorage Interface node, the content of the node is supplemented according to the information of the higher version Arxml file, and the information of all different versions of Arxml files is displayed on the configuration interface of this node. After the configuration is completed through the model self-developed tool, the information in the interface, such as importing the lower version Arxml file into the model self-developed tool, is converted into the interface information of the higher version Arxml file.

[0087] It should be noted that the node configuration interface is designed to be compatible with the contents of different versions of Arxml files to improve the compatibility and reuse rate of different versions of Arxml files.

[0088] S205: Determine the mapping relationship between the node and its port (Port), and convert the preset mapping relationship into the configuration item of the node to complete the configuration process of the model self-developed tool.

[0089] In order to facilitate the understanding of the configuration items of the preset mapping relationship in the model self-developed tool, an example is given here:

[0090] For example, for the service element ServiceInstanceToPortPrototypeMaping, there is an attribute named Process. In version 19-11 (initial version), the reference object is the ProcessDesign attribute, and in version 22-11 (target version), the reference object is the Process attribute. Its essence is to obtain the Executable and its Port information based on the Process attribute, and establish a mapping relationship (Mapping) between ServiceInstance and Port based on the Executable and Port information.

[0091] In network programming, mapping ServiceInstance to Port is a common operation, which maps the network address and port of a ServiceInstance to a specific Port. In this way, the client can access the service interface by accessing the specific port of the host where the service interface is located.

[0092] Therefore, there is no need to pay attention to the Mapping element version in the model self-developed tool. You only need to find the Executable and Port information by reading the Process attribute in the Mapping, then you can create a custom ServiceInstance node and convert the mapping relationship into a configuration item of the ServiceInstance node, thereby achieving compatibility with different versions of Arxml files in the tool.

[0093] The Mapping element is the root element of the mapping specification.

[0094] The preset protocols include but are not limited to the protocol named AUTOSAR_TPS_Manifest. This document contains the specification of the manifest file on the AP and the modeling and functions of each module.

[0095] S102: Determine dependent packages according to header information.

[0096] In S102, the dependent version number of the Arxml file is determined according to the header information, and the corresponding dependent package is determined by the dependent version number.

[0097] For example, a parameter in the bottom layer uses the same FeatureID, autosar40. For example, the majorVersion attribute of ServiceInterface is feature-id PortinterfacePackage.SERVICE_INTERFACE_MAJOR_VERSION in autosar448 and autosar450. At this time, for the autosar40 project, the jar package of autosar448 and the jar package of autosar451 both exist. According to the header information, the dependent version number of one Arxml file is 448, and the dependent version number of the other Arxml file is 450, that is, one The jar package corresponding to the dependency version number 448 of the initial version of the Arxml file is autosar448, and the jar package corresponding to the dependency version number 448 of another initial version of the Arxml file is autosar450. For the initial version of the Arxml file with the dependency version number 448 of the Arxml file, the initial version of the Arxml file with the dependency version number 448 is parsed through the model self-developed tool and the autosar448 jar package; for the initial version of the Arxml file with the dependency version number 450 of the Arxml file, the initial version of the Arxml file with the dependency version number 450 is parsed through the model self-developed tool and the autosar450 jar package.

[0098] S103: Parse the Arxml file according to the model's self-developed tools and dependent packages to obtain the parsing results.

[0099] The specific process of obtaining the analysis results is as follows: Figure 3 The steps of obtaining the analysis result are shown in S301-S303.

[0100] S301: For each initial version of the Arxml file, determine the element attributes in the initial version of the Arxml file and the element attributes in the target version of the Arxml file according to the model self-developed tools and dependent packages.

[0101] S302: According to a preset protocol, element attributes in the Arxml file of the initial version are compared with element attributes in the Arxml file of the target version to obtain difference items.

[0102] The preset protocols include but are not limited to the AUTOSAR_TPS_Manifestmanifest protocol.

[0103] The differences include changes in element names, additions and deletions in element attributes, etc.

[0104] It should be noted that the model self-developed tool supports simultaneous parsing of different versions of Arxml files. Since Arxml files are essentially a type of xml file, all information in the Arxml file can be obtained by reading xml, such as service interface, data type, SWC and other information, thereby solving the problem that the existing technology (such as Artop model) cannot parse different versions of Arxml files.

[0105] Then, according to the official AUTOSAR_TPS_Manifest protocol, the differences between different versions of Arxml (such as changes in element names, increases and decreases in element attributes, and other differences) are compared, deleted, and converted into the model in the self-developed model tool, so as to reuse the lower version Arxml files and improve the reuse rate of Arxml files.

[0106] S303: If the difference item indicates that the element attribute does not exist in the Arxml file of the initial version, and the element attribute exists in the Arxml file of the target version, the parsing result is determined to be a parsing result indicating that the attribute of the Arxml file of the initial version is not reusable.

[0107] If the difference item indicates that there are element attributes in the initial version of the Arxml file, and the element attributes do not exist in the target version of the Arxml file, determine that the parsing result is a reusable parsing result indicating that the attributes of the initial version of the Arxml file are reusable, and parse the reusable attributes of the initial version of the Arxml file into nodes in the interface.

[0108] S104: If the parsing result indicates that the attribute of the initial version of the Arxml file is that it cannot be reused, compatibility processing is performed on the initial version of the Arxml file that cannot be reused.

[0109] The compatibility processing at least includes processing such as modifying the attribute name or deleting the attribute.

[0110] If the parsing result indicates that the attributes of the initial version of the Arxml file cannot be reused, and the definition of the non-reusable attributes in the initial version of the Arxml file is the same as that in the target version of the Arxml file, the non-reusable attribute name will be modified to the attribute name in the target version of the Arxml file to complete the process of compatible processing of the non-reusable initial version of the Arxml file.

[0111] If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused and the attribute is not needed in the target version of the Arxml file, the attribute is determined to be a deprecated attribute and deleted to complete the process of compatible processing of the initial version of the Arxml file that cannot be reused.

[0112] Taking the compatibility of high-version Arxml files with low-version Arxml files as an example, during the upgrade of low-version Arxml files, some attributes of low-version Arxml files are reusable. The reusable attributes are parsed as a node in the interface. Some non-reusable attributes are deleted or changed to other names. According to the definition of the non-reusable attributes in the low-version Arxml file and the high-version Arxml file, if the meanings are the same, such as the non-reusable attributes, the attributes are changed to other names, and the attributes changed to other names are specialized, and the content of the name in the low-version Arxml file is converted into the content of the name in the high-version Arxml file.

[0113] For the deleted non-reusable attributes, these contents are no longer needed in the higher version Arxml files, that is, the deprecated element attributes. When doing compatibility processing, the deprecated elements are deleted.

[0114] In order to facilitate understanding, if the parsing result indicates that the attribute of the initial version of the Arxml file is not reusable, the process of compatibility processing of the initial version of the Arxml file that cannot be reused is explained here with an example:

[0115] For example, a project inputs an Arxml file of version 19-11 (initial version), in which SWC, EXEC, PerInterface and other information are defined. When the Arxml file of version 19-11 is imported into the self-developed model tool of version 22-11 (target version), SWC, EXEC, PerInterface and other information will be converted into a tool-defined node model according to the protocol specification. When parsing the PerInterface element, since the element names of the PerInterface element in version 19-11 and version 22-11 are different, the PerInterface element in version 19-11 is named PersistencyFileProxyInterface, and the PerInterface element in version 22-11 is named PersistencyFileStorage Interface, but their internal parameters are basically the same, and the functions achieved are the same. Therefore, when the PersistencyFileProxyInterface element is identified during the import of the Arxml file of version 19-11, a PersistencyFileStorage Interface node is created. Element attributes that exist in the 19-11 version of the Arxml file but are deprecated in the 22-11 version of the Arxml file are directly deleted. New attributes added to the 22-11 version of the Arxml file can be directly configured in the tool without re-editing the 19-11 version of the Arxml file or re-importing a 22-11 version of the Arxml file. This achieves compatibility between different versions of Arxml files, thereby improving the reuse rate and development efficiency of Arxml files.

[0116] It should be noted that for the newly added attributes in the Arxml file of version 22-11, there is no version number configuration information for the service interface in the low-version Arxml file of 19-11. When parsing the low-version Arxml file, this configuration information cannot be parsed. After parsing the low-version Arxml file, the other information of the service interface is parsed out through the model self-developed tool. In order to be compatible with the content of the high-version Arxml file of 22-11 at the same time, a configuration item for configuring the version number is provided in the interface of the model self-developed tool. After configuring the version number, it is equivalent to adding the newly added attributes of the high-version Arxml file, and then the high-version Arxml file can be configured later, thereby improving the reuse rate of the Arxml file.

[0117] The beneficial effects of this application are as follows:

[0118] Improve the reuse rate of Arxml files during version upgrades and reduce development time. Avoid content loss or errors caused by re-editing Arxml, so that the model self-developed tools support all versions of Arxml files, and do not need to update the model self-developed tools multiple times, reducing tool development and maintenance costs.

[0119] In the embodiment of the present application, since there is header information in the Arxml file, the version of the Arxml file is defined in the header information, the header information in the Arxml file is read by the model self-developed tool, and the corresponding dependent package is selected according to the header information in the Arxml file to parse the corresponding Arxml file. Since the Arxml file is essentially an xml file, all the information in the Arxml file, such as service interface, data type, SWC and other information, can be obtained by reading the xml file and other methods. By distinguishing the dependent packages, all the information is parsed together into the model self-developed tool to obtain the parsing result. If the parsing result that the attributes of the initial version of the Arxml file cannot be reused is obtained, the initial version of the Arxml file that cannot be reused is processed for compatibility, so as to achieve the effect of reusing the lower version of the Arxml file, thereby solving the problem that different versions of Arxml files cannot be parsed in the same model self-developed tool, so as to improve the reuse rate of the Arxml file. In addition, in the process of updating the Arxml file each time, there is no need to re-edit the Arxml file or make a new model self-developed tool because the attributes of the initial version of the Arxml file cannot be reused, thereby improving development efficiency.

[0120] Based on the above embodiments Figure 1 A file parsing method is disclosed, and the present application embodiment also discloses a file parsing system, such as Figure 4 As shown, the file parsing and processing system includes:

[0121] The acquisition unit 401 is used to acquire the header information of the Arxml file for each version through a pre-configured model self-developed tool; wherein the model self-developed tool stores the configuration items of the preset mapping relationship; the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file;

[0122] A first determining unit 402, configured to determine a dependent package according to header information;

[0123] The first parsing unit 403 is used to parse the Arxml file according to the model self-developed tools and dependent packages to obtain the parsing result;

[0124] The processing unit 404 is used to perform compatibility processing on the Arxml file of the initial version that cannot be reused if the parsing result indicates that the attribute of the Arxml file of the initial version cannot be reused.

[0125] Furthermore, the configuration process acquisition unit 401 of the model self-developed tool includes:

[0126] The acquisition module is used to obtain business requirements and determine the required content of the initial version of the Arxml file based on the business requirements;

[0127] A conversion module is used to convert the content required by the initial version of the Arxml file into a tool-defined node model according to the preset protocol specification;

[0128] An identification module, used for identifying, when parsing the service element in the tool custom node model, a first reference object of the Arxml file of the initial version and a second reference object of the Arxml file of the target version; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version;

[0129] A creation module is used to create a node corresponding to the preset element in the target version of the Arxml file if a preset element of the initial version of the Arxml file is identified during the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file;

[0130] A conversion module is determined to determine the mapping relationship between a node and its port, and convert the preset mapping relationship into the configuration item of the node to complete the configuration process of the model self-developed tool.

[0131] Furthermore, the first determining unit 402 includes:

[0132] The first determination module is used to determine the number of dependent versions of the Arxml file according to the header information;

[0133] The second determination module is used to determine the corresponding dependent package according to the dependent version number.

[0134] Furthermore, the first parsing unit 403 includes:

[0135] The third determination module is used to determine the element attributes in the Arxml file of the initial version and the element attributes in the Arxml file of the target version according to the model self-developed tool and the dependency package for each Arxml file of the initial version;

[0136] A comparison module is used to compare the element attributes in the initial version of the Arxml file with the element attributes in the target version of the Arxml file according to a preset protocol to obtain difference items;

[0137] The fourth determination module is used to determine that if the difference item indicates that the element attribute does not exist in the Arxml file of the initial version and the element attribute exists in the Arxml file of the target version, the parsing result is a parsing result indicating that the attribute of the Arxml file of the initial version is not reusable.

[0138] Furthermore, the file parsing and processing system also includes:

[0139] A second determining unit is used to determine that the parsing result is a reusable parsing result indicating that the attribute of the Arxml file of the initial version exists in the Arxml file of the initial version and the element attribute does not exist in the Arxml file of the target version if the difference item indicates that the element attribute exists in the Arxml file of the initial version and the element attribute does not exist in the Arxml file of the target version;

[0140] The second parsing unit is used to parse the attributes of the reusable initial version of the Arxml file into nodes in the interface.

[0141] Furthermore, the compatibility processing at least includes modifying the attribute name or deleting the attribute. The processing unit 404 includes:

[0142] A modification module is used to modify the attribute name of the non-reusable Arxml file to the attribute name in the target version Arxml file if the parsing result indicates that the attribute of the initial version Arxml file cannot be reused, and the definition of the non-reusable attribute in the initial version Arxml file is the same as the definition in the target version Arxml file, so as to complete the process of compatibility processing of the non-reusable initial version Arxml file;

[0143] The deletion module is used to determine that the attribute of the initial version of the Arxml file cannot be reused if the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused and the attribute is not needed in the target version of the Arxml file, so as to complete the process of compatible processing of the initial version of the Arxml file that cannot be reused.

[0144] In the embodiment of the present application, since there is header information in the Arxml file, the version of the Arxml file is defined in the header information, the header information in the Arxml file is read by the model self-developed tool, and the corresponding dependent package is selected according to the header information in the Arxml file to parse the corresponding Arxml file. Since the Arxml file is essentially an xml file, all the information in the Arxml file, such as service interface, data type, SWC and other information, can be obtained by reading the xml file and other methods. By distinguishing the dependent packages, all the information is parsed together into the model self-developed tool to obtain the parsing result. If the parsing result that the attributes of the initial version of the Arxml file cannot be reused is obtained, the initial version of the Arxml file that cannot be reused is processed for compatibility, so as to achieve the effect of reusing the lower version of the Arxml file, thereby solving the problem that different versions of Arxml files cannot be parsed in the same model self-developed tool, so as to improve the reuse rate of the Arxml file. In addition, in the process of updating the Arxml file each time, there is no need to re-edit the Arxml file or make a new model self-developed tool because the attributes of the initial version of the Arxml file cannot be reused, thereby improving development efficiency.

[0145] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned file parsing and processing method.

[0146] The present application also provides an electronic device, whose structural diagram is as follows: Figure 5 As shown, it specifically includes a memory 501 and one or more instructions 502, wherein the one or more instructions 502 are stored in the memory 501 and are configured to be executed by one or more processors 503 to execute the one or more instructions 502 to perform the above-mentioned file parsing processing method.

[0147] For the aforementioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0148] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0149] The steps in the methods of the embodiments of the present application can be adjusted in order, combined, and deleted according to actual needs.

[0150] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0151] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

[0152] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A file parsing method, characterized in that: The method comprises: For each version of the Arxml file, the header information of the Arxml file is obtained through a pre-configured model self-developed tool; wherein the model self-developed tool stores configuration items of preset mapping relationships; the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file; Determine the dependent package according to the header information; Parse the Arxml file according to the self-developed model tool and the dependent package to obtain a parsing result; If the parsing result indicates that the attribute of the initial version of the Arxml file is not reusable, compatibility processing is performed on the initial version of the Arxml file that is not reusable.

2. The method according to claim 1, characterized in that The configuration process of the model self-development tool includes: Obtain business requirements and determine the required content of the initial version of the Arxml file based on the business requirements; According to the preset protocol specification, the content required by the initial version of the Arxml file is converted into a tool custom node model; When parsing the service element in the tool custom node model, identifying the first reference object of the Arxml file of the initial version and the second reference object of the Arxml file of the target version; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version; In the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file, if the preset element of the initial version of the Arxml file is identified, create a node corresponding to the preset element in the target version of the Arxml file; Determine the mapping relationship between the node and its port, and convert the preset mapping relationship into the configuration item of the node to complete the configuration process of the model self-developed tool.

3. The method according to claim 1, characterized in that The determining the dependent package according to the header information includes: Determine the dependent version number of the Arxml file according to the header information; The corresponding dependent package is determined by the dependent version number.

4. The method according to claim 1, characterized in that: The Arxml file is parsed according to the self-developed model tool and the dependent package to obtain the parsing result, including: For each initial version of the Arxml file, determine the element attributes in the initial version of the Arxml file and the element attributes in the target version of the Arxml file according to the model self-developed tool and the dependent package; According to a preset protocol, the element attributes in the Arxml file of the initial version are compared with the element attributes in the Arxml file of the target version to obtain difference items; If the difference item indicates that the element attribute does not exist in the initial version of the Arxml file, and the element attribute exists in the target version of the Arxml file, the parsing result is determined to be a parsing result indicating that the attribute of the initial version of the Arxml file is not reusable.

5. The method according to claim 4, characterized in that Also includes: If the difference item indicates that an element attribute exists in the Arxml file of the initial version, and the element attribute does not exist in the Arxml file of the target version, determining that the parsing result is a parsing result indicating that the attribute of the Arxml file of the initial version is reusable; Parse the attributes of the reusable initial version of the Arxml file into nodes in the interface.

6. The method according to claim 1, characterized in that The compatibility processing at least includes modifying the attribute name or deleting the attribute. If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused, the compatibility processing of the initial version of the Arxml file that cannot be reused includes: If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused, and the definition of the attribute that cannot be reused in the initial version of the Arxml file is the same as the definition in the target version of the Arxml file, the name of the attribute that cannot be reused is modified to the attribute name in the target version of the Arxml file to complete the process of compatibility processing of the initial version of the Arxml file that cannot be reused; If the parsing result indicates that the attribute of the initial version of the Arxml file cannot be reused and the attribute is not needed in the target version of the Arxml file, the attribute is determined to be a deprecated attribute and deleted to complete the process of compatibility processing of the initial version of the Arxml file that cannot be reused.

7. A file parsing and processing system, characterized in that: The system comprises: An acquisition unit is used to acquire the header information of the Arxml file of each version through a pre-configured model self-developed tool; wherein the model self-developed tool stores configuration items of preset mapping relationships; and the mapping relationship is determined by the reference object of the service element in the target version of the Arxml file; A first determining unit, configured to determine a dependent package according to the header information; A first parsing unit is used to parse the Arxml file according to the self-developed model tool and the dependent package to obtain a parsing result; The processing unit is used to perform compatibility processing on the Arxml file of the initial version that cannot be reused if the parsing result indicates that the attribute of the Arxml file of the initial version cannot be reused.

8. The system according to claim 7, characterized in that The acquisition unit of the configuration process of the model self-developed tool includes: An acquisition module is used to acquire business requirements and determine the required content of the initial version of the Arxml file according to the business requirements; A conversion module, used for converting the content required by the initial version of the Arxml file into a tool custom node model according to a preset protocol specification; An identification module, used for identifying, when parsing the service element in the tool custom node model, a first reference object of the Arxml file of the initial version and a second reference object of the Arxml file of the target version; wherein the function of the first reference object is consistent with the function of the second reference object; and the version number of the target version is higher than the version number of the initial version; A creation module is used to create a node corresponding to the preset element in the target version of the Arxml file if a preset element of the initial version of the Arxml file is identified during the process of importing the initial version of the Arxml file into the model self-developed tool of the target version of the Arxml file; A conversion module is determined, which is used to determine the mapping relationship between the node and its port, and convert the preset mapping relationship into a configuration item of the node to complete the configuration process of the model self-developed tool.

9. The system according to claim 7, characterized in that The first determining unit includes: A first determination module is used to determine the number of dependent versions of the Arxml file according to the header information; The second determining module is used to determine the corresponding dependent package according to the dependent version number.

10. The system according to claim 7, characterized in that The first parsing unit comprises: A third determination module is used to determine, for each initial version of the Arxml file, the element attributes in the Arxml file of the initial version and the element attributes in the Arxml file of the target version according to the model self-developed tool and the dependent package; A comparison module, used for comparing the element attributes in the Arxml file of the initial version with the element attributes in the Arxml file of the target version according to a preset protocol to obtain difference items; The fourth determination module is used to determine that if the difference item indicates that the element attribute does not exist in the initial version of the Arxml file and the element attribute exists in the target version of the Arxml file, the parsing result is a parsing result indicating that the attribute of the initial version of the Arxml file is not reusable.