CN112181839B - Information processing method, information processing device and terminal equipment - Google Patents

Information processing method, information processing device and terminal equipment Download PDF

Info

Publication number
CN112181839B
CN112181839B CN202011061443.3A CN202011061443A CN112181839B CN 112181839 B CN112181839 B CN 112181839B CN 202011061443 A CN202011061443 A CN 202011061443A CN 112181839 B CN112181839 B CN 112181839B
Authority
CN
China
Prior art keywords
file
information
import
appointed
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011061443.3A
Other languages
Chinese (zh)
Other versions
CN112181839A (en
Inventor
刘均
舒海文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN202011061443.3A priority Critical patent/CN112181839B/en
Publication of CN112181839A publication Critical patent/CN112181839A/en
Application granted granted Critical
Publication of CN112181839B publication Critical patent/CN112181839B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/51Source to source

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An information processing method, an information processing device and a terminal device. The application provides an information processing method, which comprises the following steps: when converting a configuration file into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of the import file, and the appointed naming is associated with the first path information by the import indication information; when executing the code file, if request information of appointed data of the import file is acquired, generating an access request according to the request information and the appointed naming; and accessing the import file according to the access request and the import indication information. The method and the device can solve the problem that the information of the designated node cannot be directly applied to the code file because the setting mode of the designated node for importing other files in the configuration file is different from the setting mode of the code file, so that the importing of other files in the code file cannot be realized.

Description

Information processing method, information processing device and terminal equipment
Technical Field
The present application relates to the field of information processing technologies, and in particular, to an information processing method, an information processing apparatus, and a terminal device.
Background
In an application scenario such as a vehicle diagnosis field, some developers consider configuring specific functions and flows in application software in specific types of files (in the following description, specific types of files capable of configuring information such as specific functions and flows are referred to as configuration files for brevity of description). For example, vehicle diagnostic functions may be configured in an open test sequence interchange format (Open Test sequence Exchange format, OTX) file for use in developing vehicle diagnostic software. However, since the configuration file often has no corresponding compiler, the configuration file needs to be converted into a code file capable of being compiled.
However, because the structure, terms, specific writing manners of specific functions, and the like of the configuration files are greatly different from those of the code files, some functions in the configuration files cannot be realized in the code files.
For example, in an OTX or the like type of configuration file, data of other files can be imported by declaring a specified node. The information architecture and description mode of the designated node are different from those of the code file, so that the information of the designated node cannot be directly applied to the code file, and the introduction of other files cannot be conveniently realized in the code file.
Disclosure of Invention
In view of this, embodiments of the present application provide an information processing method, an information processing apparatus, and a terminal device, which can solve the problem that in an OTX or other type of configuration file, the information architecture and description mode of a designated node used for importing other files are different from the setting of a code file, so that the designated node information cannot be directly applied in the code file, and thus the importing of other files cannot be conveniently implemented in the code file.
A first aspect of an embodiment of the present application provides an information processing method, including:
when converting a configuration file into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of an import file associated with the configuration file, the import indication information contains the first path information and appointed naming, and the import indication information is used for associating the appointed naming with the first path information in the code file;
when executing the code file, if request information of appointed data of the import file is acquired, generating an access request according to the request information and the appointed naming;
And accessing the import file according to the access request and the import indication information.
Optionally, the information processing method further includes:
when converting a configuration file into a code file, adding a name space in the code file, wherein the name space is used for representing second path information of the configuration file so as to import data of the configuration file into other configuration files through the name space.
Optionally, the code file includes a source file and a header file;
the adding a namespace in the code file when converting the configuration file into the code file comprises the following steps:
the step of when the configuration file is converted into the code file, declaring the name space in the header file obtained by conversion, and defining the name space in the source file obtained by conversion so that the name space can represent the second path information.
Optionally, the namespaces include a first namespace and a second namespace, the first namespace is determined according to a package attribute name of a package where the configuration file is located, the second namespace is determined according to a file name of the configuration file, the second namespace is defined in the first namespace, and the second path information is determined based on the package attribute name of the package where the configuration file is located and the file name of the configuration file.
Optionally, the code file includes a source file and a header file;
when the configuration file is converted into the code file, if the configuration file is detected to contain the appointed node information, the instruction information is added into the code file, including:
when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, import instruction information is added into the source file.
Optionally, the guiding indication information includes a preset sentence and pointing information, where the preset sentence includes the first path information, and the pointing information is used to point the specified name to the first path information in the code file;
and when executing the code file, if the request information of the appointed data of the imported file is acquired, generating an access request according to the request information and the appointed naming, wherein the access request comprises the following steps:
when executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the accessing the import file according to the access request and the import indication information includes:
And accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
Optionally, the first path information includes a package attribute name of a package where the import file is located and a file name of the import file, and the specified name is obtained according to an alias of the import file.
A second aspect of an embodiment of the present application provides an information processing apparatus including:
an adding module, configured to, when converting a configuration file into a code file, if it is detected that the configuration file includes specified node information, add, in the code file, import instruction information, where the specified node information includes first path information and a specified name of an import file associated with the configuration file, the import instruction information includes the first path information and the specified name, and the import instruction information is configured to associate, in the code file, the specified name with the first path information;
the request module is used for generating an access request according to the request information and the appointed naming if the request information of the appointed data of the imported file is acquired when the code file is executed;
And the access module is used for accessing the import file according to the access request and the import indication information.
Optionally, the information processing apparatus further includes:
and the second adding module is used for adding a name space into the code file when the configuration file is converted into the code file, wherein the name space is used for representing second path information of the configuration file so as to import data of the configuration file into other configuration files through the name space.
Optionally, the code file includes a source file and a header file;
the second adding module is specifically configured to:
the step of when the configuration file is converted into the code file, declaring the name space in the header file obtained by conversion, and defining the name space in the source file obtained by conversion so that the name space can represent the second path information.
Optionally, the second path information includes a package attribute name of a package in which the configuration file is located and a file name of the configuration file, the namespace includes a first namespace and a second namespace, the first namespace is determined according to the package attribute name of the package in which the configuration file is located, the second namespace is determined according to the file name of the configuration file, and the second namespace is defined in the first namespace.
Optionally, the code file includes a source file and a header file;
the adding module is specifically used for:
when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, import instruction information is added into the source file.
Optionally, the guiding indication information includes a preset sentence and pointing information, where the preset sentence includes the first path information, and the pointing information is used to point the specified name to the first path information in the code file;
the request module is specifically configured to:
when executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the access module is specifically configured to:
and accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
Optionally, the first path information includes a package attribute name of a package where the import file is located and a file name of the import file, and the specified name is obtained according to an alias of the import file.
A third aspect of the embodiments 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, the processor implementing the steps of the method as described above when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described above.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the embodiment of the application, when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of an import file associated with the configuration file, the import indication information contains the first path information and the appointed naming, and the import indication information is used for associating the appointed naming with the first path information in the code file; at this time, the import instruction information may record, in the code file converted, first path information and a specified name in the specified node information by the import instruction information, and may associate the specified name with the first path information. Then, when executing the code file, if obtaining request information of appointed data of the import file, generating an access request according to the request information and the appointed naming, and accessing the import file according to the access request and the import indication information; at this time, since the import instruction information may associate the specified naming with the first path information, the first path information may be associated with the specified naming, that is, after the request information is acquired, an access request may be generated and made through the request information and the specified naming, and the import file may be accessed according to the access request and the import instruction information, so that import of information of the import file may be conveniently implemented in the code file.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an implementation of an information processing method according to a first embodiment of the present application;
fig. 2 is a schematic diagram of an information processing apparatus according to a second embodiment of the present application;
fig. 3 is a schematic diagram of a terminal device according to a third embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
In an application scenario such as the field of vehicle diagnostics, functions and flows such as vehicle diagnostic functions may be configured in an open test sequence interchange format (Open Test sequence Exchange format, OTX) file for subsequent application development. However, since the configuration file often has no corresponding compiler, the configuration file needs to be converted into a code file capable of being compiled.
However, because the structure, terms, specific writing manners of specific functions, and the like of the configuration files are greatly different from those of the code files, some functions in the configuration files cannot be realized in the code files.
For example, the inventors have found that in OTX or the like type of configuration files, data of other files can be imported by declaring a specified node. The information architecture and description mode of the designated node are different from those of the code file, so that the information of the designated node cannot be directly applied to the code file, and the introduction of other files cannot be conveniently realized in the code file.
By the embodiment of the application, the access request can be generated and put forward in the code file by requesting the request information and the designated name of the designated data of the imported file, and the imported file is accessed according to the access request and the imported instruction information, so that the information of the imported file is conveniently imported in the code file.
The execution subject of the information processing method provided by the embodiment of the application can be a terminal device. By way of example, the terminal device may be a server, desktop computer, cell phone, tablet computer, wearable device, vehicle-mounted device, augmented Reality (AR)/Virtual Reality (VR) device, notebook computer, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (personal digital assistant, PDA), etc. The embodiment of the application does not limit the specific type of the terminal equipment.
Specifically, in order to illustrate the technical scheme of the present application, the following description is made by specific examples.
Fig. 1 is a schematic flow chart of an implementation of an information processing method according to a first embodiment of the present application, where the information processing method shown in fig. 1 may include the following steps:
in step S101, when converting a configuration file into a code file, if it is detected that the configuration file includes specified node information, adding import indication information into the code file, where the specified node information includes first path information and a specified name of an import file associated with the configuration file, the import indication information includes the first path information and the specified name, and the import indication information is used to associate the specified name with the first path information in the code file.
In the embodiment of the present application, the configuration file may be a specific type of file capable of configuring information such as specific functions and processes. The specific functions and processes configured in the configuration file may be determined based on the specific application scenario. For example, in the field of vehicle diagnostics, vehicle diagnostic function information may be included in the configuration file.
The standards referred to by the file types, structures, terms, specific writing modes of specific functions, and the like of the configuration files can be determined according to actual scene requirements. For example, in some examples, the configuration file may be an open test sequence exchange format (Open Test sequence Exchange format, OTX) file. The OTX file may be written based on OTX language. The OTX language is a high-level programming language and can be applied to the fields of automobile diagnosis and the like. The OTX language may be defined according to the ISO13209 series of standards. The OTX file may be in the extensible markup language (Extensible Markup Language, EML) format.
It will be appreciated that the configuration file may also be a file written based on user-defined criteria or other criteria. The specific type of configuration file is not limited herein.
Since the configuration file often does not have a corresponding compiler, the configuration file needs to be converted into a code file that can be compiled. The code file may be a file written based on a programming language such as c++, java, etc., and is subsequently compiled in application software such as automobile diagnostic software to implement the functions in the corresponding configuration file.
The file type of the imported file may be various. The file type of the import file may be the same as the configuration file, for example, if the configuration file is an OTX file, the type of the import file may also be an OTX file. Of course, in some cases, the file type of the import file may also be different from the configuration file, for example, the configuration file is an OTX file, and the type of the import file may be a text file.
In the embodiment of the present application, the specified node information may include first path information and a specified name of an import file associated with the configuration file. The specific form of the designated node information can be determined based on the configuration mode of the configuration file. The specific manner of detecting that the configuration file contains the information of the designated node may also be various, for example, when detecting that the configuration file contains the information of the name of the designated node or the data associated with the designated node, it may be determined that the configuration file contains the information of the designated node.
For example, if the configuration file is an OTX file, for the OTX file, the designated node may be an Import node, and the designated node information may be information associated with the Import node. The OTX file can be used for importing data of imported files such as other OTX files by declaring an Import node, so that the purposes of data multiplexing and sharing are achieved.
The Import node specifies the packet path of the OTX file by the package attribute name, that is, the name of the packet in which the OTX file is located, and specifies the file name of the Import file by the document attribute value. In addition, an alias name of the import file may be specified by the prefix attribute value.
An example of an application of the setup of the Import node of the OTX file is given below.
<?xml version="1.0"encoding="UTF-8"?>
<otx id="Otx202004091036188699238"name="procedureCall"package="package">
<imports>
<import prefix="imp1"package="package"document="validity"/>
<import prefix="imp2"package="package"document="validity1"/>
<import prefix="imp3"package="package"document="signature"/>
</imports>
<procedures>
<procedure id="Procedure202004091037401429246"name="p2"visibility="PRIVATE"implements="imp3:sig2"validFor="imp1:v2">
<realisation>
<flow>
<return id="Return202004091054220119253">
</return>
</flow>
</realisation>
</procedure>
</procedures>
</otx>
The specific form of the introduction instruction information may be various. For example, the import indication information may include a mapping relationship of a specified naming to the first path information; or the guiding indication information may include a preset statement and pointing information, where the preset statement includes the first path information, and the pointing information is used to point the specified name to the first path information in the code file. Of course, the introduction instruction information may be represented in other forms.
Wherein the specified naming can be set according to the scene. For example, in some scenarios, if the file name of the import file is too long, for ease of reference, a name with a shorter length may be set as the alias of the file name of the import file, and the alias may be used as the specified naming.
In the embodiment of the present application, the import instruction information may record, in the code file obtained by conversion, the first path information and the specified name in the specified node information through the import instruction information, and may associate the specified name with the first path information. Since the import indication information can associate the specified naming with the first path information, the first path information can be associated by the specified naming.
In some embodiments, the code files include source files and header files;
when the configuration file is converted into the code file, if the configuration file is detected to contain the appointed node information, the instruction information is added into the code file, including:
when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, import instruction information is added into the source file.
In the embodiment of the application, the code file can be a file written based on a programming language such as C++, java and the like, and the code file is compiled in application software such as automobile diagnosis software and the like subsequently to realize functions in the corresponding configuration file.
The code file may be a c++ program file, where the header file of the c++ program file may be a header file with a suffix of.h, where the.h file includes contents such as function declarations, macro definitions, and structure definitions. The source file of the C++ program file may be a source file with suffix of cpp, where the cpp file contains contents such as function implementation, variable definition, and the like.
Since the import instruction information has no function, macro, or other variable newly defined with respect to the configuration file, when the configuration file is converted into a code file, if it is detected that the configuration file contains the designated node information, the import instruction information is added to the code file.
Step S102, when executing the code file, if obtaining the request information of the appointed data of the import file, generating an access request according to the request information and the appointed naming.
In the embodiment of the application, the code file may be a file written based on a programming language such as c++, java, and the like. Thus, by compiling the code file, an executable file may be obtained for load execution of the executable file by a specified operating system.
In the embodiment of the present application, since the import indication information may associate the specified name with the first path information, the specified name may be associated with the first path information. Therefore, the access request can be generated according to the request information and the designated naming, and the access request does not need to carry a large amount of information such as the first path information and the like for searching the imported file, so that the information processing amount is simplified, and the processing efficiency is improved.
Step S103, accessing the import file according to the access request and the import instruction information.
After the access request is acquired, the first path information of the import file can be acquired according to the import indication information and the designated name in the access request, so that the import file is accessed, and the required data is acquired according to the request information in the access request.
It can be seen that, in the embodiment of the present application, since the import instruction information may associate the specified naming with the first path information, the specified naming may be associated with the first path information, that is, after the request information is acquired, an access request may be generated and made through the request information and the specified naming, and the import file is accessed according to the access request and the import instruction information, so that the import of the information of the import file is conveniently implemented in the code file.
In some embodiments, the information processing method further comprises:
when converting a configuration file into a code file, adding a name space in the code file, wherein the name space is used for representing second path information of the configuration file so as to import data of the configuration file into other configuration files through the name space.
In the embodiment of the present application, the Namespace (Namespace) is also called a Namespace. The namespaces may determine the scope of the corresponding element to avoid element naming conflicts. Therefore, in the embodiment of the application, when the configuration file is converted into the code file, a naming space can be added in the code file. So as to avoid the conflict between the second path information in the name space and the names of the first path information, the appointed names and other information in the guiding indication information.
And, the namespace added in the code file may be used to represent the second path information of the configuration file, so that when other configuration files need to Import the data of the configuration file, specific node information such as the Import node information of the configuration file can be generated according to the second path information in the namespace, so as to Import the data of the configuration file into other configuration files.
In some embodiments, the code files include source files and header files;
the adding a namespace in the code file when converting the configuration file into the code file comprises the following steps:
the step of when the configuration file is converted into the code file, declaring the name space in the header file obtained by conversion, and defining the name space in the source file obtained by conversion so that the name space can represent the second path information.
In the embodiment of the application, the code file can be a file written based on a programming language such as C++, java and the like, and the code file is compiled in application software such as automobile diagnosis software and the like subsequently to realize functions in the corresponding configuration file.
The code file may be a c++ program file, where the header file of the c++ program file may be a header file with a suffix of.h, where the.h file includes contents such as function declarations, macro definitions, and structure definitions. The source file of the C++ program file may be a source file with suffix of cpp, where the cpp file contains contents such as function implementation, variable definition, and the like.
In the embodiment of the application, the namespace is declared in the header file obtained by conversion, and the namespace is defined in the source file obtained by conversion, so that the namespace can represent the second path information, and further, other configuration files can import the data of the configuration files according to the namespace.
In some embodiments, the second path information includes a package attribute name of a package in which the configuration file is located and a file name of the configuration file, the namespace includes a first namespace and a second namespace, the first namespace is determined according to the package attribute name of the package in which the configuration file is located, the second namespace is determined according to the file name of the configuration file, and the second namespace is defined in the first namespace.
In the embodiment of the present application, the Package (Package) may correspond to a space. For example, in some scenarios, a folder may be considered a package, and each package may include some elements therein, e.g., may include files, or classes, etc. The package attribute name may be determined according to a setting manner of the configuration file.
In the embodiment of the present application, the second namespace is defined in the first namespace, so that the second namespace can be considered to be nested in the first namespace. At this time, the relationship between the first namespace and the second namespace may correspond to the relationship between the package in which the profile is located and the profile, and thus, the second path information of the profile may be indicated through the first namespace and the second namespace.
In some embodiments, the import indication information includes a preset sentence and pointing information, where the preset sentence includes the first path information, and the pointing information is used to point the specified naming to the first path information in the code file;
and when executing the code file, if the request information of the appointed data of the imported file is acquired, generating an access request according to the request information and the appointed naming, wherein the access request comprises the following steps:
When executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the accessing the import file according to the access request and the import indication information includes:
and accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
In the embodiment of the present application, the preset sentence may be an include sentence. The preset statement may include the first path information, and direct the specified name to the first path information through the direction information, so that when an access request is subsequently generated and made, only the data name of the specified data and the specified name are required to be carried, and the first path of the import file can be determined through the direction information and the preset statement, thereby accessing the import file, and the specified data is obtained from the import file according to the data name.
For example, if the configuration file is an OTX file, for the OTX file, the designated node may be an Import node, and the designated node information may be information associated with the Import node. The Import node specifies the packet path of the OTX file by the package attribute name, that is, the name of the packet in which the OTX file is located, and specifies the file name of the Import file by the document attribute name. In addition, the alias of the import file may be specified by the prefix attribute name.
At this time, the first path information includes a package attribute name of the import file and a document attribute name of the import file, and the pointing information is used to point the prefix attribute name to the first path information, that is, to an information set of the package attribute name of the import file and the document attribute name of the import file.
If the request information of the appointed data of the import file is obtained, an access request carrying the appointed data name and the preset attribute name is generated, and the first path information of the import file can be determined according to the access request and the pointing information, and the import file is accessed to obtain the appointed data from the import file according to the data name.
In some embodiments, the first path information includes a package attribute name of a package in which the import file is located and a file name of the import file, and the specified naming is obtained according to an alias of the import file.
In the embodiment of the application, the appointed naming is obtained according to the alias of the imported file, a name with a shorter length can be set as the alias of the file name of the imported file according to scene requirements, and the alias is used as the appointed naming, so that subsequent quotation is facilitated, the processing flow is simplified, and the processing efficiency is improved.
In the embodiment of the application, when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of an import file associated with the configuration file, the import indication information contains the first path information and the appointed naming, and the import indication information is used for associating the appointed naming with the first path information in the code file; at this time, the import instruction information may record, in the code file converted, first path information and a specified name in the specified node information by the import instruction information, and may associate the specified name with the first path information. Then, when executing the code file, if obtaining request information of appointed data of the import file, generating an access request according to the request information and the appointed naming, and accessing the import file according to the access request and the import indication information; at this time, since the import instruction information may associate the specified naming with the first path information, the first path information may be associated with the specified naming, that is, after the request information is acquired, an access request may be generated and made through the request information and the specified naming, and the import file may be accessed according to the access request and the import instruction information, so that import of information of the import file may be conveniently implemented in the code file.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 2 is a schematic diagram of an information processing apparatus according to a second embodiment of the present application. For convenience of explanation, only portions relevant to the embodiments of the present application are shown.
The information processing apparatus 2 includes:
an adding module 201, configured to, when converting a configuration file into a code file, if it is detected that the configuration file includes specified node information, add, in the code file, import instruction information, where the specified node information includes first path information and a specified name of an import file associated with the configuration file, the import instruction information includes the first path information and the specified name, and the import instruction information is configured to associate, in the code file, the specified name with the first path information;
a request module 202, configured to, when executing the code file, generate an access request according to the request information and the specified name if request information for requesting to use specified data of the import file is obtained;
And the access module 203 is configured to access the import file according to the access request and the import instruction information.
Optionally, the information processing apparatus further includes:
and the second adding module is used for adding a name space into the code file when the configuration file is converted into the code file, wherein the name space is used for representing second path information of the configuration file so as to import data of the configuration file into other configuration files through the name space.
Optionally, the code file includes a source file and a header file;
the second adding module is specifically configured to:
the step of when the configuration file is converted into the code file, declaring the name space in the header file obtained by conversion, and defining the name space in the source file obtained by conversion so that the name space can represent the second path information.
Optionally, the second path information includes a package attribute name of a package in which the configuration file is located and a file name of the configuration file, the namespace includes a first namespace and a second namespace, the first namespace is determined according to the package attribute name of the package in which the configuration file is located, the second namespace is determined according to the file name of the configuration file, and the second namespace is defined in the first namespace.
Optionally, the code file includes a source file and a header file;
the adding module 201 is specifically configured to:
when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, import instruction information is added into the source file.
Optionally, the guiding indication information includes a preset sentence and pointing information, where the preset sentence includes the first path information, and the pointing information is used to point the specified name to the first path information in the code file;
the request module 202 is specifically configured to:
when executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the access module 203 is specifically configured to:
and accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
Optionally, the first path information includes a package attribute name of a package where the import file is located and a file name of the import file, and the specified name is obtained according to an alias of the import file.
In the embodiment of the application, when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of an import file associated with the configuration file, the import indication information contains the first path information and the appointed naming, and the import indication information is used for associating the appointed naming with the first path information in the code file; at this time, the import instruction information may record, in the code file converted, first path information and a specified name in the specified node information by the import instruction information, and may associate the specified name with the first path information. Then, when executing the code file, if obtaining request information of appointed data of the import file, generating an access request according to the request information and the appointed naming, and accessing the import file according to the access request and the import indication information; at this time, since the import instruction information may associate the specified naming with the first path information, the first path information may be associated with the specified naming, that is, after the request information is acquired, an access request may be generated and made through the request information and the specified naming, and the import file may be accessed according to the access request and the import instruction information, so that import of information of the import file may be conveniently implemented in the code file.
Fig. 3 is a schematic diagram of a terminal device according to a third embodiment of the present application. As shown in fig. 3, the terminal device 3 of this embodiment includes: a processor 30, a memory 31 and a computer program 32 stored in said memory 31 and executable on said processor 30. The processor 30, when executing the computer program 32, implements the steps of the various information processing method embodiments described above, such as steps 101 to 103 shown in fig. 1. Alternatively, the processor 30 may perform the functions of the modules/units of the apparatus embodiments described above, such as the functions of the modules 201 to 203 shown in fig. 2, when executing the computer program 32.
Illustratively, the computer program 32 may be partitioned into one or more modules/units that are stored in the memory 31 and executed by the processor 30 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions for describing the execution of the computer program 32 in the terminal device 3. For example, the computer program 32 may be divided into an adding module, a requesting module, and an accessing module, each of which specifically functions as follows:
An adding module, configured to, when converting a configuration file into a code file, if it is detected that the configuration file includes specified node information, add, in the code file, import instruction information, where the specified node information includes first path information and a specified name of an import file associated with the configuration file, the import instruction information includes the first path information and the specified name, and the import instruction information is configured to associate, in the code file, the specified name with the first path information;
the request module is used for generating an access request according to the request information and the appointed naming if the request information of the appointed data of the imported file is acquired when the code file is executed;
and the access module is used for accessing the import file according to the access request and the import indication information.
In the embodiment of the application, when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, adding import indication information into the code file, wherein the appointed node information contains first path information and appointed naming of an import file associated with the configuration file, the import indication information contains the first path information and the appointed naming, and the import indication information is used for associating the appointed naming with the first path information in the code file; at this time, the import instruction information may record, in the code file converted, first path information and a specified name in the specified node information by the import instruction information, and may associate the specified name with the first path information. Then, when executing the code file, if obtaining request information of appointed data of the import file, generating an access request according to the request information and the appointed naming, and accessing the import file according to the access request and the import indication information; at this time, since the import instruction information may associate the specified naming with the first path information, the first path information may be associated with the specified naming, that is, after the request information is acquired, an access request may be generated and made through the request information and the specified naming, and the import file may be accessed according to the access request and the import instruction information, so that import of information of the import file may be conveniently implemented in the code file.
The terminal device 3 may be a vehicle-mounted device, a desktop computer, a notebook computer, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 30, a memory 31. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the terminal device 3 and does not constitute a limitation of the terminal device 3, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the terminal device may further include an input-output device, a network access device, a bus, etc.
The processor 30 may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 31 may be an internal storage unit of the terminal device 3, such as a hard disk or a memory of the terminal device 3. The memory 31 may be an external storage device of the terminal device 3, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the terminal device 3. The memory 31 is used for storing the computer program as well as other programs and data required by the terminal device. The memory 31 may also be used for temporarily storing data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of 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.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product enabling a terminal device to carry out the steps of the method embodiments described above when the computer program product is run on the terminal device.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. An information processing method, characterized by comprising:
when converting a configuration file into a code file, if the configuration file is detected to contain designated node information, adding import indication information into the code file, wherein the designated node information contains first path information and designated naming of an import file associated with the configuration file, the import indication information contains the first path information and the designated naming, the import indication information is used for associating the designated naming with the first path information in the code file, the configuration file is an open test sequence exchange format file or a file written based on a user-defined standard, and the code file is a file written based on the existing programming language;
When executing the code file, if request information of appointed data of the import file is acquired, generating an access request according to the request information and the appointed naming;
accessing the import file according to the access request and the import indication information;
the guiding indication information comprises a preset statement and pointing information, wherein the preset statement comprises the first path information, and the pointing information is used for pointing the appointed naming to the first path information in the code file; and when executing the code file, if the request information of the appointed data of the imported file is acquired, generating an access request according to the request information and the appointed naming, wherein the access request comprises the following steps:
when executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the accessing the import file according to the access request and the import indication information includes:
and accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
2. The information processing method according to claim 1, characterized by further comprising:
when converting a configuration file into a code file, adding a name space in the code file, wherein the name space is used for representing second path information of the configuration file so as to import data of the configuration file into other configuration files through the name space.
3. The information processing method according to claim 2, wherein the code file includes a source file and a header file;
the adding a namespace in the code file when converting the configuration file into the code file comprises the following steps:
the step of when the configuration file is converted into the code file, declaring the name space in the header file obtained by conversion, and defining the name space in the source file obtained by conversion so that the name space can represent the second path information.
4. The information processing method according to claim 2, wherein the second path information includes a package attribute name of a package in which the profile is located and a file name of the profile, the namespace includes a first namespace determined from the package attribute name of the package in which the profile is located and a second namespace determined from the file name of the profile, and the second namespace is defined within the first namespace.
5. The information processing method according to claim 1, wherein the code file includes a source file and a header file;
when the configuration file is converted into the code file, if the configuration file is detected to contain the appointed node information, the instruction information is added into the code file, including:
when a configuration file is converted into a code file, if the configuration file is detected to contain appointed node information, import instruction information is added into the source file.
6. The information processing method according to any one of claims 1 to 5, wherein the first path information includes a package attribute name of a package in which the import file is located and a file name of the import file, and the specified naming is obtained based on an alias of the import file.
7. An information processing apparatus, characterized by comprising:
the system comprises an adding module, a storage module and a storage module, wherein the adding module is used for adding import indication information into a code file when the configuration file is converted into the code file if the configuration file is detected to contain designated node information, wherein the designated node information contains first path information and designated naming of an import file associated with the configuration file, the import indication information contains the first path information and the designated naming, the import indication information is used for associating the designated naming with the first path information in the code file, the configuration file is an open test sequence exchange format file or a file written based on a user-defined standard, and the code file is a file written based on the existing programming language;
The request module is used for generating an access request according to the request information and the appointed naming if the request information of the appointed data of the imported file is acquired when the code file is executed;
the access module is used for accessing the import file according to the access request and the import indication information;
the guiding indication information comprises a preset statement and pointing information, wherein the preset statement comprises the first path information, and the pointing information is used for pointing the appointed naming to the first path information in the code file; the request module is specifically configured to:
when executing the code file, if request information of appointed data requesting to use the import file is obtained, generating a data name carrying the appointed data and an access request of the appointed name;
the access module is specifically configured to:
and accessing the import file according to the designated naming in the access request, the pointing information and the preset statement, and acquiring the designated data from the import file according to the data name.
8. Terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the information processing method according to any of claims 1 to 6 when the computer program is executed.
9. A computer-readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the steps of the information processing method according to any one of claims 1 to 6.
CN202011061443.3A 2020-09-30 2020-09-30 Information processing method, information processing device and terminal equipment Active CN112181839B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011061443.3A CN112181839B (en) 2020-09-30 2020-09-30 Information processing method, information processing device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011061443.3A CN112181839B (en) 2020-09-30 2020-09-30 Information processing method, information processing device and terminal equipment

Publications (2)

Publication Number Publication Date
CN112181839A CN112181839A (en) 2021-01-05
CN112181839B true CN112181839B (en) 2023-10-10

Family

ID=73948444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011061443.3A Active CN112181839B (en) 2020-09-30 2020-09-30 Information processing method, information processing device and terminal equipment

Country Status (1)

Country Link
CN (1) CN112181839B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771762A (en) * 2009-01-06 2010-07-07 北京邮电大学 Method and system for dynamically loading services in service system
CN110308908A (en) * 2018-03-20 2019-10-08 北京小米移动软件有限公司 The generation of the configuration file of application and methods of exhibiting, device and the storage medium of application page

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7269823B2 (en) * 2001-11-29 2007-09-11 Microsoft Corporation System and method for identifying namespaces

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771762A (en) * 2009-01-06 2010-07-07 北京邮电大学 Method and system for dynamically loading services in service system
CN110308908A (en) * 2018-03-20 2019-10-08 北京小米移动软件有限公司 The generation of the configuration file of application and methods of exhibiting, device and the storage medium of application page

Also Published As

Publication number Publication date
CN112181839A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN110601880B (en) Cloud platform, service processing method, command interface and computer equipment
US20140207826A1 (en) Generating xml schema from json data
CN111324396B (en) Block chain intelligent contract execution method, device and equipment
CN111552267B (en) Vehicle diagnosis method and device and vehicle diagnosis equipment
CN111143446A (en) Data structure conversion processing method and device of data object and electronic equipment
CN110162544A (en) Heterogeneous data source data capture method and device
US11269611B2 (en) Data interface processing method, device, server and medium
CN112147983B (en) Vehicle diagnosis method and device, electronic equipment and storage medium
CN112181924A (en) File conversion method, device, equipment and medium
CN107766036B (en) Module construction method and device and terminal equipment
CN112083709A (en) Vehicle diagnosis method, system, terminal device and storage medium
CN109062906B (en) Translation method and device for program language resources
CN111767056A (en) Source code compiling method, executable file running method and terminal equipment
CN112631649A (en) Intelligent contract management method, device, terminal equipment and medium
CN111338716A (en) Data processing method and device based on rule engine and terminal equipment
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN112181839B (en) Information processing method, information processing device and terminal equipment
US9064042B2 (en) Instrumenting computer program code by merging template and target code methods
CN109324838B (en) Execution method and execution device of single chip microcomputer program and terminal
CN109814916B (en) IVR flow configuration method, device, storage medium and server
CN115934537A (en) Interface test tool generation method, device, equipment, medium and product
CN114218175A (en) Resource cross-platform sharing method and device, terminal equipment and storage medium
CN113032820B (en) File storage method, access method, device, equipment and storage medium
CN113313492A (en) Electronic certificate generation method and related device
CN113760237A (en) Compiling address updating method and device, terminal equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant