CN109710571B - File analysis method, device and storage medium - Google Patents

File analysis method, device and storage medium Download PDF

Info

Publication number
CN109710571B
CN109710571B CN201811614480.5A CN201811614480A CN109710571B CN 109710571 B CN109710571 B CN 109710571B CN 201811614480 A CN201811614480 A CN 201811614480A CN 109710571 B CN109710571 B CN 109710571B
Authority
CN
China
Prior art keywords
information
file
file data
target
data
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
CN201811614480.5A
Other languages
Chinese (zh)
Other versions
CN109710571A (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.)
Tencent Music Entertainment Technology Shenzhen Co Ltd
Original Assignee
Tencent Music Entertainment Technology Shenzhen 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 Tencent Music Entertainment Technology Shenzhen Co Ltd filed Critical Tencent Music Entertainment Technology Shenzhen Co Ltd
Priority to CN201811614480.5A priority Critical patent/CN109710571B/en
Publication of CN109710571A publication Critical patent/CN109710571A/en
Application granted granted Critical
Publication of CN109710571B publication Critical patent/CN109710571B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a file analysis method, equipment and a storage medium, wherein the method comprises the following steps: acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data; extracting second information associated with a second file storage format from the first information set as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. By adopting the invention, the management of the interface file data can be facilitated, the efficiency of file management is improved, and the maintenance cost of development is saved.

Description

File analysis method, device and storage medium
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to a method, an apparatus, and a storage medium for file parsing.
Background
Along with the continuous development and perfection of electronic technology, mobile application and intelligent equipment explosion increase, the interface call volume is continuously and violently increased, the current interface document management system supports simple input, inquiry, test and adjustment of interface data are not very convenient, for example, in a music background, JCE (Java Cryptography Extension) files are imported into the system, the data input interface document management system needs to be manually input, the process is excessively complicated, a great deal of time is required, meanwhile, the risk of data error is greatly increased in the manual input process, the deletion and addition of interface data are also relatively complicated, the management efficiency of interface data is low, and the maintenance of the system is also not facilitated.
Disclosure of Invention
The embodiment of the invention provides a file analysis method, equipment and a storage medium, which can improve the efficiency of interface file management and save the maintenance cost of development.
In one aspect, the embodiment of the invention provides a file parsing method, which may include:
acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data;
extracting second information associated with a second file storage format from the first information set as target information;
acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
and storing the second file data in a file database.
Wherein the extracting, in the first information set, second information associated with a second file storage format as target information includes:
acquiring a target class identifier associated with a second file storage format;
extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information;
the second information includes name information, structure information, interface information, method information.
The obtaining the target parameter information corresponding to the target information, storing the target parameter information as second file data in the second file storage format, including:
acquiring an objective function identifier associated with a second file storage format;
extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information;
and storing the target parameter information as second file data in the second file storage format.
Wherein, still include:
if a first selection instruction aiming at second file data is acquired, acquiring the second file data indicated by the first selection instruction from the file database;
and displaying the target parameter information in the second file data on a display interface corresponding to the file database.
After the target parameter information in the target file data is displayed on the display interface corresponding to the file database, the method further comprises the following steps:
if a second selection instruction aiming at the target parameter information in the second file data is acquired;
acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file;
And storing the updated target file data in a file database.
After the target parameter information in the target file data is displayed on the display interface corresponding to the file database, the method further comprises the following steps:
if a deleting instruction aiming at the target parameter information in the second file data is acquired;
deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database;
after the target parameter information in the target file data is displayed on the display interface corresponding to the file database, the method further comprises the following steps:
if an adding instruction aiming at the target parameter information in the second file data is obtained;
obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
In one aspect, an embodiment of the present invention provides a file parsing apparatus, which may include:
the data acquisition unit is used for acquiring first file data with a first file storage format and acquiring a first information set corresponding to the first file data;
A second information acquisition unit configured to extract second information associated with a second file storage format in the first information set as target information;
the data generation unit is used for acquiring target parameter information corresponding to the target information and storing the target parameter information into second file data in the second file storage format;
and the data storage unit is used for storing the second file data in a file database.
The second information acquisition unit is specifically configured to:
acquiring a target class identifier associated with a second file storage format;
extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information;
the second information includes name information, structure information, interface information, method information.
The data generation unit is specifically configured to:
acquiring an objective function identifier associated with a second file storage format;
extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information;
and storing the target parameter information as second file data in the second file storage format.
Wherein, still include:
the display unit is used for acquiring the second file data indicated by the first selection instruction from the file database if the first selection instruction aiming at the second file data is acquired; and displaying the target parameter information in the second file data on a display interface corresponding to the file database.
Wherein, still include:
the updating unit is used for acquiring a second selection instruction aiming at the target parameter information in the second file data; acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file; and storing the updated target file data in a file database.
Wherein, still include:
the deleting unit is used for acquiring a deleting instruction aiming at the target parameter information in the second file data; and deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database.
Wherein, still include:
the adding unit is used for obtaining an adding instruction aiming at the target parameter information in the second file data; obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
In one aspect, embodiments of the present invention provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In one aspect, the embodiment of the invention provides a file parsing device, which comprises a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data;
extracting second information associated with a second file storage format from the first information set as target information;
acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
and storing the second file data in a file database.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the conversion and storage of the files are avoided by manpower, the management of the interface file data is convenient, the efficiency of file management is improved, and the maintenance cost of development is saved.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a file parsing method according to an embodiment of the present invention;
FIG. 2 is an exemplary schematic diagram of a method for parsing a file according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating another method for parsing a file according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating an example of extracting parameter information according to an embodiment of the present invention;
FIG. 5 is a schematic diagram showing a second file according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a file parsing device according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of another file parsing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of still another file parsing apparatus according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The file analysis method provided by the embodiment of the invention can be applied to the conversion of file data types, for example, a JCE file is converted into a JSON (JavaScript Object Notation) file, and concretely, the file analysis equipment acquires first file data with a first file storage format and a first information set corresponding to the first file data, and extracts second information associated with a second file storage format from the first information set as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. For example, JCE files can be converted into JSON files and stored in a database, so that management of interface file data is facilitated, file management efficiency is improved, and development maintenance cost is saved.
The file parsing device according to the embodiment of the present invention may include: terminal devices with file processing such as tablet computers, smart phones, personal Computers (PCs), notebook computers, palm computers, mobile Internet Devices (MIDs), and the like.
Referring to fig. 1, a flow chart of a file parsing method is provided in an embodiment of the present invention. As shown in fig. 1, the method according to the embodiment of the present invention may include the following steps S101 to S104.
S101, acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data;
specifically, the file parsing device obtains first file data with a first file storage format, and obtains a first information set corresponding to the first file data, where it can be understood that the first file data is a file stored in the first file storage format, where the file storage format is a special encoding mode of information used for storing information, and is used for identifying data stored in a computer, and the storage format includes JSON, JCE, JAVA Archive (JAR) and the like, and for example, the first file data may be a JCE file stored in the JCE file format.
The file analysis device obtains first file data selected by a user or automatically obtains first file data in a first file storage format, and it should be noted that the first file data may be one or more, the file analysis device may obtain multiple first file data at the same time, the first file data includes multiple second information, the first information set is used for storing multiple second information in the first file data, and each of the second information is content data of different parameters contained in the first file data, that is, one of the second information is content data of one parameter in the first file data. For example, the second information may be one of module name information, structure body information, interface information and method information, the module name information stores name information of a file, the structure body information stores parameters of various structures, the interface information stores interface information of file data, and the method information stores function information of the file data.
S102, extracting second information associated with a second file storage format from the first information set as target information;
Specifically, the file parsing device extracts second information associated with the second file storage format from the first information set as target information, where the first information set may be a set including the second information such as the module name information, the structure information, the interface information, and the method information described above. It may be understood that the second file storage format is a file storage format different from the first file storage format, is a storage format for storing the converted first file data, for example, if a JCE file stored in a JCE file format is converted into a JSON file stored in a JSON file format, the first file format is a JCE file format, the second file format is a JSON file format, and the file parsing apparatus extracts second information associated with the second file storage format in the first information set as target information, which is second information required to be acquired for converting the first file data into file data stored in the second file storage format, and the target information may be at least one second information in the first information set. For example, the module name information, the structure information, the interface information, and the method information in the first information set may all be determined as the target information.
S103, acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
specifically, the file parsing device obtains the target parameter information corresponding to the target information, stores the target parameter information in the second file storage format as second file data, and it can be understood that the target parameter information is parameter information in the target information, and may include a plurality of target parameter information.
S104, storing the second file data in a file database.
Specifically, the file parsing device stores the second file data in a file database, it can be understood that the file database is a database for storing the second file data, the file database is used for querying, storing and calling the second file data, a user can select the second file data in the file database, the second file data is displayed on a display device corresponding to the file database, parameter information in the second file data is queried on the display device, the user can delete and add the parameter information, the file database can be used for storing the modified second file data, and the file database can be a database for storing the file data in the interface document management system.
Referring to fig. 2, an exemplary schematic diagram of a file parsing method is provided in an embodiment of the present invention. As shown in fig. 2, the JCE file is converted into a JSON file to be described below, the file parsing device obtains the JCE file and a first information set corresponding to the JCE file, where the first information set includes module name information, structure information, interface information and method information, extracts second information associated with the JSON file from the first information set as target information, further obtains target parameter information corresponding to the target information, stores the target parameter information in a JSON file format as the JSON file, stores the JSON file in a file database, and uses the file database to query, store and call the JSON file, and displays the target parameter information in the JSON file on a display interface corresponding to the file database according to a selection instruction of a user for the JSON file.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the conversion and storage of the files are avoided by manpower, the management of the interface file data is convenient, the efficiency of file management is improved, and the maintenance cost of development is saved.
Referring to fig. 3, a flow chart of a file parsing method is provided in an embodiment of the present invention. As shown in fig. 2, the method according to the embodiment of the present invention may include the following steps S201 to S208.
S201, acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data;
s202, acquiring a target class identifier associated with a second file storage format; extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information; the second information comprises name information, structure information, interface information and method information;
specifically, the file parsing device obtains a target class identifier associated with the second file storage format; extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information; the second information includes name information, structure information, interface information and method information, it is understood that the file analysis device obtains a target class identifier associated with the second file storage format, where the target class identifier is a symbol indicating the second information, and may specifically be a name of the second information, where the target class identifier may be a preset class identifier, or may be set according to an actual situation, and the file analysis device extracts, from the first information set, the second information having the same class identifier as the target class identifier, and uses the second information as target information, where the second information includes name information, structure information, interface information and method information, and the first information set includes but is not limited to name information, structure information, interface information and method information.
S203, acquiring an objective function identifier associated with the second file storage format; extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information; storing the target parameter information as second file data in the second file storage format;
specifically, the file parsing device obtains an objective function identifier associated with the second file storage format; extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information; the target parameter information is stored in the second file storage format as second file data, it can be understood that the file analysis device obtains a target function identifier associated with the second file storage format, the target function identifier is a symbol indicating parameter information, specifically may be a name of the parameter information, the target function identifier may be a preset function identifier, or may be set according to an actual situation, and the file analysis device extracts parameter information having the same function identifier as the target function identifier from the target information, and uses the parameter information as target parameter information.
Referring to fig. 4, an exemplary schematic diagram of extracting parameter information is provided in an embodiment of the present invention. As shown in fig. 4, the file parsing device converts the JCE file into the JSON file, and in the following description, the parameter information in the structure information is obtained, the first file data is the JCE file, the target information in the JCE file may include module name information, structure information, interface information, and method information, for example, the name of the structure information in the JCE file is "struct", when the file parsing device obtains the second information with the target class identifier of "struct" in the first information set, the second information "struct" is used as the target information, in the above example, the name of the target function in the JCE file is annotation "desc", the parameter name "map/vecter" and "normal type", and the file parsing device detects whether the parameter information with the target function identifier of "desc" exists in the target information, and if so, obtains the parameter information 1 corresponding to the target function identifier "desc". If not, detecting whether parameter information of which the target function identifier is map/vecter exists, and if so, acquiring parameter information 2 corresponding to the target function identifier map/vecter; if not, detecting whether parameter information of which the objective function identifier is of a common type exists, and if so, acquiring parameter information 3 corresponding to the objective function identifier of the common type; if the identifier is not present, the detection stop identifier is detected, and the detection process is ended.
S204, storing the second file data in a file database;
s205, if a first selection instruction aiming at second file data is acquired, acquiring the second file data indicated by the first selection instruction from the file database; displaying the target parameter information in the second file data on a display interface corresponding to a file database;
specifically, if the file analysis device acquires a first selection instruction aiming at second file data, acquiring the second file data indicated by the first selection instruction from the file database; the target parameter information in the second file data is displayed on a display interface corresponding to a file database, it can be understood that the second file data is any one of file data stored in the file database in the second file storage format, the first selection instruction is an instruction input by a user, the first selection instruction can be a touch screen instruction or a key instruction, specifically, the first selection instruction can be input through a touch screen on a file analysis device or through an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the file analysis device obtains the second file data indicated by the first selection instruction from the file database, and the parameter information in the second file data is displayed on the display interface corresponding to the file database, and the display interface is a display device associated with the file analysis device, can be a display screen on the file analysis device, or an external display device connected with the file analysis device.
Referring to fig. 5, an exemplary diagram of displaying the second file data is provided in an embodiment of the invention. As shown in fig. 5, the file data in the file database is displayed on the display interface, the file analysis device obtains a first selection instruction for the second file data selected by the user, where the second file data may be any one of the file data stored in the file database in the second file storage format, the file data in the file database is displayed in a file data list 300 of the display interface, the file name of the second file data in the file database is displayed in the file data list 300, the content displayed on the display interface may further include an attribute of the file data in the display area 100, parameter information of the file data in the display area 200, for example, the second file data with a name of "XXXX" is selected by the user, the file analysis device displays the target parameter information in the second file data with a name of "XXXX" on the display interface corresponding to the file database, the display area 100 includes names, address information, updated event information, and the like of the file data, the display area 200 includes information such as a type of parameters, name of parameters, and the like, for example, the parameter in the second file data a "is displayed in the display area 200" a "and the display device is a" which may be connected to the display device, the display device may be an external display device, and the display device may be connected to the display device.
S206, if a second selection instruction aiming at the target parameter information in the second file data is acquired; acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file; storing the updated target file data in a file database;
specifically, if the file analysis device obtains a second selection instruction aiming at the target parameter information in the second file data; acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file; the updated target file data is stored in a file database, it can be understood that the second file data is any file data stored in the file database in the second file storage format, the second selection instruction is an instruction input by a user, the second selection instruction can be a touch screen instruction or a key instruction, specifically, the second selection instruction can be input through a touch screen on a file analysis device or through an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the target parameter information is parameter information in the second file data, the file analysis device acquires parameter information to be updated, the parameter information to be updated can be input by a user, the parameter information to be updated can also be acquired by importing the existing parameter information through the file analysis device, the target parameter information in the second file data is replaced by the parameter information to be updated, the updated target file is obtained, and the updated target file data is stored in the file database.
S207, if a deleting instruction aiming at the target parameter information in the second file data is acquired; deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database;
specifically, if the file analysis device acquires a deleting instruction aiming at the target parameter information in the second file data; the method comprises the steps of deleting target parameter information indicated by a deleting instruction from second file data, and storing the second file data of the deleting target parameter information in a file database, wherein it is understood that the second file data is any file data stored in the second file storage format in the file database, the deleting instruction is an instruction input by a user, the deleting instruction can be a touch screen instruction or a key instruction, particularly, the deleting instruction can be input through a touch screen on a file analysis device or an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the target parameter information is parameter information in the second file data, the file analysis device deletes the target parameter information indicated by the deleting instruction from the second file data, and stores the second file data of the deleting target parameter information in the file database.
S208, if an adding instruction aiming at the target parameter information in the second file data is obtained; obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
Specifically, if the file analysis device obtains an adding instruction aiming at the target parameter information in the second file data; obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database, wherein it can be understood that the second file data is any one of file data stored in the second file storage format in the file database, the adding instruction is an instruction input by a user, the adding instruction can be a touch screen instruction or a key instruction, specifically, the adding instruction can be input through a touch screen on a file analysis device or an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the file analysis device obtains the newly added parameter information, the newly added parameter information can be input by the user, the newly added parameter information can also be obtained by importing the existing parameter information through the file analysis device, the newly added parameter information is added into the second file data indicated by the adding instruction, and the second file data added with the newly added parameter information is stored in the file database.
Steps S201 and S204 of the embodiment of the present invention refer to specific descriptions of steps S101 and S104 of the embodiment shown in fig. 1, and are not described herein.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the parameter information of the file data in the database can be updated, deleted and added, the conversion and storage of the files are avoided by manual implementation, the management of interface file data is convenient, the file management efficiency is improved, and the development maintenance cost is saved.
Referring to fig. 6, a schematic structural diagram of a file parsing device is provided in an embodiment of the present invention. As shown in fig. 6, the file parsing apparatus 1 according to the embodiment of the present invention may include: a data acquisition unit 11, a second information acquisition unit 12, a data generation unit 13, and a data storage unit 14.
A data acquisition unit 11, configured to acquire first file data having a first file storage format, and acquire a first information set corresponding to the first file data;
specifically, the data obtaining unit 11 obtains first file data having a first file storage format, and obtains a first information set corresponding to the first file data, and it is understood that the first file data is a file stored in the first file storage format, where the file storage format is a special encoding mode of information used for storing information, and is used for identifying data stored in a computer, and the storage format includes JSON, JCE, JAR, and for example, the first file data may be a JCE file stored in a JCE file format.
The file analysis device obtains first file data selected by a user or automatically obtains first file data in a first file storage format, and it should be noted that the first file data may be one or more, the file analysis device may obtain multiple first file data at the same time, the first file data includes multiple second information, the first information set is used for storing multiple second information in the first file data, and each of the second information is content data of different parameters contained in the first file data, that is, one of the second information is content data of one parameter in the first file data. For example, the second information may be one of module name information, structure body information, interface information and method information, the module name information stores name information of a file, the structure body information stores parameters of various structures, the interface information stores interface information of file data, and the method information stores function information of the file data.
A second information acquisition unit 12 for extracting second information associated with a second file storage format in the first information set as target information;
specifically, the second information acquisition unit 12 extracts, as the target information, second information associated with the second file storage format from the first information set, where the first information set may be a set including the second information such as the above-described module name information, structure information, interface information, and method information. It may be understood that the second file storage format is a file storage format different from the first file storage format, is a storage format for storing the converted first file data, for example, if a JCE file stored in a JCE file format is converted into a JSON file stored in a JSON file format, the first file format is a JCE file format, the second file format is a JSON file format, and the file parsing apparatus extracts second information associated with the second file storage format in the first information set as target information, which is second information required to be acquired for converting the first file data into file data stored in the second file storage format, and the target information may be at least one second information in the first information set. For example, the module name information, the structure information, the interface information, and the method information in the first information set may all be determined as the target information
A data generating unit 13, configured to obtain target parameter information corresponding to the target information, and store the target parameter information as second file data in the second file storage format;
specifically, the data generating unit 13 obtains the target parameter information corresponding to the target information, stores the target parameter information in the second file storage format as second file data, and it may be understood that the target parameter information is parameter information in the target information, where the target information may include multiple target parameter information, the data generating unit 13 obtains the target parameter information, stores the target parameter information in the second file storage format as second file data, for example, converts a JCE file into a JSON file, and uses the target information as structure information to describe, and obtains the target parameter information corresponding to the target information, that is, obtains the target parameter information in the structure information, where the target parameter information includes a name and a type of a parameter, and comment information in the structure, and stores the target parameter information as the JSON file.
A data storage unit 14 for storing the second file data in a file database.
Specifically, the data storage unit 14 stores the second file data in a file database, and it can be understood that the file database is a database for storing the second file data, the file database is used for querying, storing and calling the second file data, a user can select the second file data in the file database, the second file data is displayed on a display device corresponding to the file database, parameter information in the second file data is queried on the display device, the user can delete and add the parameter information, the file database can be used for storing the modified second file data, and the file database can be a database for storing the file data in the interface document management system.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the conversion and storage of the files are avoided by manpower, the management of the interface file data is convenient, the efficiency of file management is improved, and the maintenance cost of development is saved.
Referring to fig. 7, a schematic structural diagram of a file parsing device is provided in an embodiment of the present invention. As shown in fig. 7, the file parsing apparatus 1 according to the embodiment of the present invention may include: a data acquisition unit 11, a second information acquisition unit 12, a data generation unit 13, a data storage unit 14, a display unit 15, an update unit 16, a deletion unit 17, and an addition unit 18.
A data acquisition unit 11, configured to acquire first file data having a first file storage format, and acquire a first information set corresponding to the first file data;
a second information acquiring unit 12, configured to acquire a target class identifier associated with a second file storage format; extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information; the second information comprises name information, structure information, interface information and method information;
specifically, the second information acquiring unit 12 acquires the target class identifier associated with the second file storage format; extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information; the second information includes name information, structure information, interface information, and method information, it is understood that the second information obtaining unit 12 obtains a target class identifier associated with the second file storage format, where the target class identifier is a symbol indicating the second information, and may specifically be a name of the second information, where the target class identifier may be a preset class identifier, or may be set according to an actual situation, and the file analysis device extracts, from the first information set, the second information having the same class identifier as the target class identifier, and uses the second information as target information, where the second information includes name information, structure information, interface information, and method information, and the first information set includes, but is not limited to, name information, structure information, interface information, and method information.
A data generating unit 13, configured to obtain an objective function identifier associated with the second file storage format; extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information; storing the target parameter information as second file data in the second file storage format;
specifically, the data generating unit 13 acquires the target function identifier associated with the second file storage format; extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information; the target parameter information is stored in the second file storage format as second file data, it may be understood that the data generating unit 13 obtains an objective function identifier associated with the second file storage format, where the objective function identifier is a symbol indicating parameter information, specifically may be a name of the parameter information, and the objective function identifier may be a preset function identifier, or may be set according to an actual situation, and the file analyzing device extracts parameter information having the same function identifier as the objective function identifier from the objective information, and uses the parameter information as the target parameter information.
A data storage unit 14 for storing the second file data in a file database;
a display unit 15, configured to obtain, if a first selection instruction for second file data is obtained, second file data indicated by the first selection instruction from the file database; displaying the target parameter information in the second file data on a display interface corresponding to a file database;
specifically, if the display unit 15 obtains a first selection instruction for the second file data, the display unit obtains the second file data indicated by the first selection instruction from the file database; the target parameter information in the second file data is displayed on a display interface corresponding to a file database, it can be understood that the second file data is any one of file data stored in the file database in the second file storage format, the first selection instruction is an instruction input by a user, the first selection instruction can be a touch screen instruction or a key instruction, specifically, the first selection instruction can be input through a touch screen on a file analysis device or through an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the file analysis device obtains the second file data indicated by the first selection instruction from the file database, and the parameter information in the second file data is displayed on the display interface corresponding to the file database, and the display interface is a display device associated with the file analysis device, can be a display screen on the file analysis device, or an external display device connected with the file analysis device.
An updating unit 16, configured to, if a second selection instruction for the target parameter information in the second file data is acquired; acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file; storing the updated target file data in a file database;
specifically, if the updating unit 16 obtains the second selection instruction for the target parameter information in the second file data; acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file; the updated target file data is stored in a file database, it can be understood that the second file data is any file data stored in the file database in the second file storage format, the second selection instruction is an instruction input by a user, the second selection instruction can be a touch screen instruction or a key instruction, specifically, the second selection instruction can be input through a touch screen on a file analysis device or through an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the target parameter information is parameter information in the second file data, the file analysis device acquires parameter information to be updated, the parameter information to be updated can be input by a user, the parameter information to be updated can also be acquired by importing the existing parameter information through the file analysis device, the target parameter information in the second file data is replaced by the parameter information to be updated, the updated target file is obtained, and the updated target file data is stored in the file database.
A deleting unit 17, configured to, if a deleting instruction for the target parameter information in the second file data is acquired; deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database;
specifically, if the deleting unit 17 obtains a deleting instruction for the target parameter information in the second file data; the method comprises the steps of deleting target parameter information indicated by a deleting instruction from second file data, and storing the second file data of the deleting target parameter information in a file database, wherein it is understood that the second file data is any file data stored in the second file storage format in the file database, the deleting instruction is an instruction input by a user, the deleting instruction can be a touch screen instruction or a key instruction, particularly, the deleting instruction can be input through a touch screen on a file analysis device or an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the target parameter information is parameter information in the second file data, the file analysis device deletes the target parameter information indicated by the deleting instruction from the second file data, and stores the second file data of the deleting target parameter information in the file database.
An adding unit 18, configured to, if an adding instruction for the target parameter information in the second file data is acquired; obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
Specifically, if the adding unit 18 obtains an adding instruction for the target parameter information in the second file data; obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database, wherein it can be understood that the second file data is any one of file data stored in the second file storage format in the file database, the adding instruction is an instruction input by a user, the adding instruction can be a touch screen instruction or a key instruction, specifically, the adding instruction can be input through a touch screen on a file analysis device or an external input device connected with the file analysis device, the external input device can be a mouse or a keyboard, the file analysis device obtains the newly added parameter information, the newly added parameter information can be input by the user, the newly added parameter information can also be obtained by importing the existing parameter information through the file analysis device, the newly added parameter information is added into the second file data indicated by the adding instruction, and the second file data added with the newly added parameter information is stored in the file database.
The data acquisition unit 11 and the data storage unit 14 according to the embodiment of the present invention refer to the specific description of the data acquisition unit 11 and the data storage unit 14 according to the embodiment shown in fig. 6, and are not described herein.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the parameter information of the file data in the database can be updated, deleted and added, the conversion and storage of the files are avoided by manual implementation, the management of interface file data is convenient, the file management efficiency is improved, and the development maintenance cost is saved.
The embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are adapted to be loaded by a processor and execute the method steps of the embodiment shown in fig. 1 to 5, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 5, which is not repeated herein.
Referring to fig. 8, a schematic structural diagram of a file parsing device is provided in an embodiment of the present invention. As shown in fig. 8, the file parsing apparatus 1000 may include: at least one processor 1001, such as a CPU, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may further include a standard wired interface, a wireless interface, among others. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 8, an operating system, a network communication module, a user interface module, and a file parsing application program may be included in a memory 1005, which is one type of computer storage medium.
In terminal 1000 shown in fig. 8, user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to call a file parsing application stored in the memory 1005, and specifically perform the following operations:
Acquiring first file data with a first file storage format, and acquiring a first information set corresponding to the first file data;
extracting second information associated with a second file storage format from the first information set as target information;
acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
and storing the second file data in a file database.
In one embodiment, the processor 1001, when executing the extracting, in the first information set, second information associated with a second file storage format as target information, specifically executes the following operations:
acquiring a target class identifier associated with a second file storage format;
extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information;
the second information includes name information, structure information, interface information, method information.
In one embodiment, when executing the obtaining the target parameter information corresponding to the target information, the processor 1001 stores the target parameter information as second file data in the second file storage format, specifically executes the following operations:
Acquiring an objective function identifier associated with a second file storage format;
extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information;
and storing the target parameter information as second file data in the second file storage format.
In one embodiment, the processor 1001 specifically further performs the following operations:
if a first selection instruction aiming at second file data is acquired, acquiring the second file data indicated by the first selection instruction from the file database;
and displaying the target parameter information in the second file data on a display interface corresponding to the file database.
In one embodiment, after the displaying the target parameter information in the target file data on the display interface corresponding to the file database, the processor 1001 specifically performs the following operations:
if a second selection instruction aiming at the target parameter information in the second file data is acquired;
acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file;
And storing the updated target file data in a file database.
In one embodiment, after the displaying the target parameter information in the target file data on the display interface corresponding to the file database, the processor 1001 specifically performs the following operations:
if a deleting instruction aiming at the target parameter information in the second file data is acquired;
and deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database.
In one embodiment, after the displaying the target parameter information in the target file data on the display interface corresponding to the file database, the processor 1001 specifically performs the following operations:
if an adding instruction aiming at the target parameter information in the second file data is obtained;
obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
In the embodiment of the invention, first file data with a first file storage format and a first information set corresponding to the first file data are obtained, and second information associated with a second file storage format is extracted from the first information set to serve as target information; acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format; and storing the second file data in a file database. Therefore, the automatic conversion of the files in two file storage formats can be realized, the converted files are automatically stored in the database, the conversion and storage of the files are avoided by manpower, the management of the interface file data is convenient, the efficiency of file management is improved, and the maintenance cost of development is saved.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present invention and is not to be construed as limiting the scope of the invention, which is defined by the appended claims.

Claims (10)

1. A method for parsing a file, comprising:
acquiring first file data with a first file storage format, acquiring a first information set corresponding to the first file data, wherein the first information set is used for storing a plurality of second information in the first file data, each second information is content data of different parameters contained in the first file data, the second information comprises module name information, structure body information, interface information and method information, the name information of a file is stored in the module name information, the parameters of the structure body are stored in the structure body information, the interface information of the file data is stored in the interface information, and the function information of the file data is stored in the method information;
Extracting second information associated with a second file storage format from the first information set as target information;
acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
and storing the second file data in a file database.
2. The method of claim 1, wherein the extracting second information associated with a second file storage format in the first information set as target information comprises:
acquiring a target class identifier associated with a second file storage format;
extracting second information with the same class identifier as the target class identifier from the first information set to serve as target information;
the second information includes name information, structure information, interface information, method information.
3. The method according to claim 2, wherein the obtaining the target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format, includes:
acquiring an objective function identifier associated with a second file storage format;
Extracting parameter information with the same function identifier as the target function identifier from the target information to serve as target parameter information;
and storing the target parameter information as second file data in the second file storage format.
4. The method as recited in claim 1, further comprising:
if a first selection instruction aiming at second file data is acquired, acquiring the second file data indicated by the first selection instruction from the file database;
and displaying the target parameter information in the second file data on a display interface corresponding to the file database.
5. The method of claim 4, wherein after displaying the target parameter information in the second file data on the display interface corresponding to the file database, further comprises:
if a second selection instruction aiming at the target parameter information in the second file data is acquired;
acquiring parameter information to be updated, and replacing target parameter information in the second file data with the parameter information to be updated to obtain an updated target file;
and storing the updated target file data in a file database.
6. The method of claim 4, wherein after displaying the target parameter information in the second file data on the display interface corresponding to the file database, further comprises:
if a deleting instruction aiming at the target parameter information in the second file data is acquired;
and deleting the target parameter information indicated by the deleting instruction from the second file data, and storing the second file data of which the target parameter information is deleted in a file database.
7. The method of claim 4, wherein after displaying the target parameter information in the second file data on the display interface corresponding to the file database, further comprises:
if an adding instruction aiming at the target parameter information in the second file data is obtained;
obtaining newly added parameter information, adding the newly added parameter information into second file data indicated by the adding instruction, and storing the second file data added with the newly added parameter information in a file database.
8. A document parsing apparatus, comprising:
a data acquisition unit, configured to acquire first file data having a first file storage format, acquire a first information set corresponding to the first file data, where the first information set is configured to store a plurality of second information in the first file data, each of the second information is content data of different parameters included in the first file data, the second information includes module name information, structure information, interface information, and method information, the module name information stores name information of a file, the structure information stores parameters of a structure, the interface information stores interface information of the file data, and the method information stores function information of the file data;
A second information acquisition unit configured to extract second information associated with a second file storage format in the first information set as target information;
the data generation unit is used for acquiring target parameter information corresponding to the target information and storing the target parameter information into second file data in the second file storage format;
and the data storage unit is used for storing the second file data in a file database.
9. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method steps of any of claims 1-7.
10. A document parsing apparatus, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the steps of:
acquiring first file data with a first file storage format, acquiring a first information set corresponding to the first file data, wherein the first information set is used for storing a plurality of second information in the first file data, each second information is content data of different parameters contained in the first file data, the second information comprises module name information, structure body information, interface information and method information, the name information of a file is stored in the module name information, the parameters of the structure body are stored in the structure body information, the interface information of the file data is stored in the interface information, and the function information of the file data is stored in the method information;
Extracting second information associated with a second file storage format from the first information set as target information;
acquiring target parameter information corresponding to the target information, and storing the target parameter information as second file data in the second file storage format;
and storing the second file data in a file database.
CN201811614480.5A 2018-12-27 2018-12-27 File analysis method, device and storage medium Active CN109710571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811614480.5A CN109710571B (en) 2018-12-27 2018-12-27 File analysis method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811614480.5A CN109710571B (en) 2018-12-27 2018-12-27 File analysis method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109710571A CN109710571A (en) 2019-05-03
CN109710571B true CN109710571B (en) 2023-06-23

Family

ID=66258720

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811614480.5A Active CN109710571B (en) 2018-12-27 2018-12-27 File analysis method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109710571B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110404253A (en) * 2019-07-31 2019-11-05 网易(杭州)网络有限公司 Interface data acquisition methods and device, electronic equipment, storage medium
CN112347112B (en) * 2020-09-16 2022-03-15 北京中兵数字科技集团有限公司 Aviation data management method, aviation data management device and storage medium
CN115495442B (en) * 2022-11-16 2023-08-04 深圳市明源云采购科技有限公司 Database operation file generation method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101101592A (en) * 2006-07-04 2008-01-09 联想(北京)有限公司 File format automatic conversion method and device
CN105786912A (en) * 2014-12-25 2016-07-20 远光软件股份有限公司 Data acquisition and transformation method and device
CN107203574A (en) * 2016-03-18 2017-09-26 伊姆西公司 Data management and the polymerization of data analysis
CN107688618A (en) * 2017-08-08 2018-02-13 平安科技(深圳)有限公司 Data comparison method, apparatus, computer equipment and storage medium
WO2018033063A1 (en) * 2016-08-16 2018-02-22 中兴通讯股份有限公司 Interface file parsing method and apparatus
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8825592B2 (en) * 2008-03-12 2014-09-02 Web Access, Inc. Systems and methods for extracting data from a document in an electronic format
CN101770470B (en) * 2008-12-31 2012-11-28 中国银联股份有限公司 File type identifying and analyzing method and system
JP5780259B2 (en) * 2013-03-26 2015-09-16 ソニー株式会社 Information processing apparatus, information processing method, and program
US9483477B2 (en) * 2015-01-19 2016-11-01 Sas Institute Inc. Automated data intake system
CN106484779B (en) * 2016-09-14 2020-05-05 Oppo广东移动通信有限公司 File operation method and device
CN107291459A (en) * 2017-06-09 2017-10-24 深圳市金立通信设备有限公司 A kind of method and server for arranging information
CN108830547A (en) * 2018-05-09 2018-11-16 深圳壹账通智能科技有限公司 Item argument configuration method, device, terminal device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101101592A (en) * 2006-07-04 2008-01-09 联想(北京)有限公司 File format automatic conversion method and device
CN105786912A (en) * 2014-12-25 2016-07-20 远光软件股份有限公司 Data acquisition and transformation method and device
CN107203574A (en) * 2016-03-18 2017-09-26 伊姆西公司 Data management and the polymerization of data analysis
WO2018033063A1 (en) * 2016-08-16 2018-02-22 中兴通讯股份有限公司 Interface file parsing method and apparatus
WO2018201978A1 (en) * 2017-05-04 2018-11-08 平安科技(深圳)有限公司 Interface call data processing method, apparatus, computer device and storage medium
CN107688618A (en) * 2017-08-08 2018-02-13 平安科技(深圳)有限公司 Data comparison method, apparatus, computer equipment and storage medium

Also Published As

Publication number Publication date
CN109710571A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
CN108255925B (en) Method and terminal for displaying data table structure change condition
CN109710571B (en) File analysis method, device and storage medium
TWI478558B (en) Method, apparatus and computer program product for providing analysis and visualization of content items association
CN106708496B (en) Processing method and device for label page in graphical interface
CN103902589B (en) Management method and device for downloaded files
CN104243273A (en) Method and device for displaying information on instant messaging client and information display system
US10853564B2 (en) Operation for copied content
CN103678704A (en) Picture recognition method, system, equipment and device based on picture information
CN111381913B (en) Front-end multilingual loading adaptation method, device, computer equipment and storage medium
CN112394908A (en) Method and device for automatically generating embedded point page, computer equipment and storage medium
US20150106701A1 (en) Input support method and information processing system
CN111274263A (en) Visual database change statement generation method and device and storage medium
CN105653674B (en) File management method and system of intelligent terminal
CN110688315A (en) Interface code detection report generation method, electronic device, and storage medium
CN108011936B (en) Method and device for pushing information
CN108255898B (en) Page display method and device
CN108694172B (en) Information output method and device
CN106302821B (en) Data request method and equipment thereof
CN113590985B (en) Page jump configuration method and device, electronic equipment and computer readable medium
CN106657316B (en) Message withdrawing method and device
KR20170054497A (en) Information display method, terminal and server
CN104572743B (en) Quick-link information updating method and device
CN107885862B (en) Image display method and device
CN112632108A (en) Rendering method and device of graph and report interface and electronic equipment
CN110851346A (en) Method, device and equipment for detecting boundary problem of query statement and 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