CN115048922A - Data analysis method and device - Google Patents

Data analysis method and device Download PDF

Info

Publication number
CN115048922A
CN115048922A CN202210697021.8A CN202210697021A CN115048922A CN 115048922 A CN115048922 A CN 115048922A CN 202210697021 A CN202210697021 A CN 202210697021A CN 115048922 A CN115048922 A CN 115048922A
Authority
CN
China
Prior art keywords
data
file
data based
configuration data
excel
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.)
Pending
Application number
CN202210697021.8A
Other languages
Chinese (zh)
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.)
Shanghai United Imaging Healthcare Co Ltd
Original Assignee
Shanghai United Imaging Healthcare 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 Shanghai United Imaging Healthcare Co Ltd filed Critical Shanghai United Imaging Healthcare Co Ltd
Priority to CN202210697021.8A priority Critical patent/CN115048922A/en
Publication of CN115048922A publication Critical patent/CN115048922A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • 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/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a data analysis method and a data analysis device, wherein the method comprises the following steps: acquiring configuration data based on an excel file; converting the configuration data based on the excel file into intermediate data based on a json file; and analyzing the intermediate data based on the json file into target data based on an xml file. By using the technical scheme provided by each embodiment of the application, the acquired configuration data based on the excel file can be converted into the intermediate data based on the json file firstly, and then converted into the target data based on the xml file. In this conversion process, the converted xml file may contain only attribute data and no text data. In addition, the target data conversion based on the xml file is based on the configuration data based on the excel file, and an interactive interface which is more intuitive, friendly and convenient to edit can be provided for a user based on the readability and the operability of the excel file.

Description

Data analysis method and device
Technical Field
The present application relates to the field of testing technologies, and in particular, to a data analysis method and apparatus.
Background
Generally, xml files can be used not only for storing data, network data transmission, but also as configuration files for software projects, and the like. The xml file comprises at least one xml element, and each xml element can be nested with other xml elements, and can also comprise text, attributes and other contents. In the configuration file as a software project, only the attribute content in the xml file is usually parsed, and the text content is not parsed. However, in an actual software project, text content is often also important configuration information. At present, the related art cannot provide a method for constructing an xml file in which only attribute content but not text content is included in an xml element.
Disclosure of Invention
The embodiment of the application provides a data parsing method and device, so as to at least solve the problem of constructing an XML file which only contains attribute contents but not text contents in XML elements provided in the related art.
In a first aspect, an embodiment of the present application provides a data parsing method, including:
acquiring configuration data based on an excel file;
converting the configuration data based on the excel file into intermediate data based on a json file;
and analyzing the intermediate data based on the json file into target data based on an xml file.
According to the data analysis method provided by the embodiment of the application, the acquired configuration data based on the excel file can be converted into the intermediate data based on the json file firstly, and then converted into the target data based on the xml file. In this conversion process, the converted xml file may contain only attribute data and no text data. In addition, the target data conversion based on the xml file is based on the configuration data based on the excel file, and an interactive interface which is more intuitive, friendly and convenient to edit can be provided for a user based on the readability and the operability of the excel file.
Optionally, in an embodiment of the present application, the converting the configuration data based on the excel file into the intermediate data based on the json file includes:
constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
Optionally, in an embodiment of the present application, the parsing the json file-based intermediate data into xml file-based target data includes:
converting the intermediate data based on the json file into data of a dictionary file;
and converting the data of the dictionary file into target data based on an xml file.
Optionally, in an embodiment of the present application, the obtaining of the configuration data based on the excel file includes:
acquiring configuration data based on an excel file, and converting the configuration data into data in an xlsx format;
correspondingly, the converting the excel file-based configuration data into json file-based intermediate data includes:
and converting the excel file-based configuration data into json file-based intermediate data by utilizing an excel library based on a Python development language.
Optionally, in an embodiment of the present application, the configuration data includes a plurality of test case data for interface testing, and the test case data includes at least an input parameter combination and an expected result.
In a second aspect, embodiments of the present application further provide a data storage device, including:
the data acquisition and configuration module is used for acquiring configuration data based on the excel file;
the conversion module is used for converting the configuration data based on the excel file into intermediate data based on a json file;
and the analysis module is used for analyzing the intermediate data based on the json file into target data based on an xml file.
Optionally, in an embodiment of the present application, the conversion module is specifically configured to:
constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
In a third aspect, an embodiment of the present application further provides a processing device, which includes a memory and a processor, where the memory stores a computer program, and the processor is configured to run the computer program to perform the data parsing method described in each of the foregoing embodiments.
In a fourth aspect, the present application further provides a computer storage medium, where a computer program is stored in the storage medium, where the computer program is configured to execute the data parsing method according to the foregoing embodiments when running.
In a fifth aspect, this embodiment also provides a computer program product, which includes computer readable code or a non-volatile computer readable storage medium carrying computer readable code, when the computer readable code runs in a processor of an electronic device, the processor in the electronic device executes the method described in the above embodiments.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 2 is a flowchart of a method of data parsing according to an embodiment of the present application;
fig. 3 is a schematic block diagram of a data analysis apparatus according to an embodiment of the present application;
FIG. 4 is a block diagram of a processing device provided by an embodiment of the present application;
fig. 5 is a block diagram of a computer program product according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. Reference herein to "a plurality" means greater than or equal to two. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present application. It will be understood by those skilled in the art that the present application may be practiced without some of these specific details. In some instances, devices, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present application.
In software testing, interface testing is often required between different modules in the same system, or between systems, to check correctness of interface parameter transmission, correctness of interface function implementation, correctness of output results, and the like. For example, interface testing between acquisition software and reconstruction software is required. Generally, the test cases required for the interface test can be manually input or automatically generated. In the process of analyzing the test case, only grammar analysis is usually performed on attribute contents in the xml file, and grammar analysis is not performed on text contents, so that configuration information contained in the text contents is ignored.
Based on the above technical requirements, embodiments of the present application provide a data parsing method, which can obtain an xml file that only includes attribute data but not text data by converting configuration data based on an excel file into target data based on the xml file. In addition, in the process, the hierarchical structure of the xml file can be replaced by the multi-level structure of the excel file, and a user can modify or write in the excel file to modify or write in the xml file, so that the reading experience and the use feeling of the user are improved.
In order to clearly illustrate the technical solutions of the embodiments of the present application, an application scenario of the present application is described below.
In one application scenario, as shown in fig. 1, a user (e.g., a software test engineer) may construct a test case in an excel form according to test requirements, where the test case may include a test parameter combination, an expected result, and the like. After the test case based on the excel file is generated, the test case based on the excel file may be input into the data analysis device 101, processed by the data analysis device 101, and output as a test case based on an xml file. Specifically, the data analysis device 101 may convert the excel file-based test case into a json file-based intermediate test case; the json file based intermediate test case may then be parsed into the xml file based test case. The data analysis device 101 may import the output test case based on the xml file into the test software 103, and the test software 103 executes the test case based on the xml file to perform an interface test and output an actual test result.
The data analysis method according to the present application will be described in detail below with reference to the drawings. Fig. 2 is a schematic flowchart of an embodiment of a data parsing method provided in the present application. Although the present application provides method steps as shown in the following examples or figures, more or fewer steps may be included in the method based on conventional or non-inventive efforts. In the case of steps where no necessary causal relationship exists logically, the order of execution of the steps is not limited to that provided by the embodiments of the present application. The method can be executed sequentially or in parallel (for example, in the context of a parallel processor or a multi-thread process) in the method shown in the embodiment or the figures during the actual data parsing process or when the method is executed.
Specifically, an embodiment of the data parsing method provided in the present application is shown in fig. 2, where the method may include:
s201: and acquiring configuration data based on the excel file.
In this embodiment, the configuration data may be configuration parameters of an operating system or an application program. For example, the configuration parameters of the application may be an application ID, an installation version, a functional configuration, user preference settings, and the like. In an embodiment of the application, the configuration data may be configuration data based on an excel file, and based on readability and operability of the excel file, the interaction experience of a user may be improved. In one embodiment of the application, the excel file-based configuration data can be obtained by obtaining an excel file containing information of test parameters, expected targets and the like input by a user. The configuration data based on the excel file can comprise header data, line data corresponding to the header data and the like. In one embodiment of the present application, the configuration data may include a plurality of test case data for interface testing, the test case data including at least input parameter combinations and expected results. In an embodiment of the present application, the interface test may be an interface test between different modules in the same system or between systems, for example, the correctness of interface parameter transmission may be tested, and the correctness of an output result of the test interface may also be tested. In one embodiment of the present application, the test case data may include input parameter combinations, expected results, and the like. Wherein the input parameter combination may be a combination of at least one test parameter. It should be noted that, in the process of combining, the test parameters may be combined by following an equivalence class method, a boundary value method, and the like. The expected result may include an interface return value and an output parameter of the interface.
S203: and converting the configuration data based on the excel file into intermediate data based on a json file.
In the embodiment of the application, after the configuration data based on the excel file is obtained, the configuration data based on the excel file can be converted to obtain intermediate data based on a json file. Specifically, in an embodiment of the present application, header data in the configuration data based on the excel file and line data corresponding to the header data may be read. The header data may include attribute data of the configuration data, and the line data may include an attribute value of the attribute data. After the attribute information and the attribute value are obtained, the attribute data may be used as object header data of the json file, and the attribute value may be used as object entity data of the json file, so as to convert the json file-based intermediate data into json file-based intermediate data. Specifically, in an embodiment of the present application, the converting the configuration data based on the excel file into the intermediate data based on the json file may include:
s301: constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
s303: traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
In the embodiment of the application, the header structure of the configuration data based on the excel file can be constructed as a multi-way tree. In one embodiment of the present application, for the multi-way tree structure, the root node is at the first level, the children of the root node, i.e., the children of the root node, are at the second level, the children of the children at the second level are at the third level, and so on. In an embodiment of the application, the multi-level headers of the configuration data based on the excel file can be respectively extracted, and header names included in the multi-level headers are respectively and correspondingly input into the multi-level nodes of the multi-branch tree structure. Specifically, a header name of a first-level header (for example, a first row data in the excel file-based configuration data) in the multi-level headers may be set in a root node of the multi-way tree, a header name of a second-level header (for example, a second row data in the excel file-based configuration data) in the multi-level headers may be set in a child node of the root node, and so on until a last-level header of the multi-level headers is set in the multi-way tree structure, so that the entire multi-level header may be converted into the multi-way tree structure. In this way, the header structure of the excel file-based configuration data can be constructed as a multi-way tree structure. For example, in a case that the header structure of the excel file-based configuration data includes a first-level header and a second-level header, a header name corresponding to the first-level header, such as "category", may be set in a root node of a first layer in the multi-way tree structure, and a header name corresponding to the second-level header, such as "year", "date", may be set in each child node of a second layer in the multi-way tree structure, so as to complete the construction of the multi-way tree structure. That is, the multi-way tree structure may be used to characterize a hierarchy of the excel file-based configuration data. In an embodiment of the present application, after the multi-branch tree structure is constructed, based on an association relationship between each line of data in the configuration data and the header structure, the multi-branch tree structure may be traversed and each line of data may be analyzed, so as to generate intermediate data based on a json file. Through the embodiment, the header structure of the configuration data based on the excel file can be constructed into a multi-branch tree structure, so that the scalable hierarchical relationship can be realized based on the storage characteristics of the multi-branch tree structure, and the problems that the original hierarchical structure relationship of the excel file is not fixed and the analysis is troublesome are solved. Specifically, in an embodiment of the present application, the data of each row of data may be analyzed by traversing multiple layers of nodes of the multi-way tree structure according to the structure of the multi-way tree and the data stored in each node, and the header data corresponding to each row of data may be determined. In an embodiment of the application, the json file-based intermediate data may be generated based on each line of data and header data corresponding to each line of data. For example, the configuration data based on the json file may be generated by using the header data as a key of the json file and using each line of data as a value of the json file.
S205: and analyzing the intermediate data based on the json file into target data based on an xml file.
In the embodiment of the application, after the intermediate data based on the json file is determined, the intermediate data based on the json file can be analyzed into target data based on an xml file. In one embodiment of the present application, the xml file may include at least one xml element, and each xml element may be nested with other xml elements. In particular, different xml elements may be marked with a pair of start and end markers that match each other. In an embodiment of the application, the json file-based intermediate data may be input to a preset conversion port to perform xml file format conversion processing, so as to obtain the xml file-based target data. The preset conversion port may be a processing port for performing json file format conversion processing. In other embodiments of the present application, the json file-based intermediate data may also be parsed into xml file-based target data by running a Python executable file or a Shell executable file.
It should be noted that the target data based on the xml file is obtained by converting the intermediate data based on the json file, and the intermediate data based on the json file is obtained by converting the configuration data based on the excel file. In this process, the medium of the intermediate conversion is a multi-way tree structure constructed based on the header structure. Because the data stored by each layer of nodes of the multi-branch tree structure is the attribute data of the configuration data based on the excel file, the json file and the xml file obtained by conversion only contain the attribute data and do not contain text data.
According to the data analysis method provided by the embodiment of the application, the acquired configuration data based on the excel file can be converted into the intermediate data based on the json file firstly, and then converted into the target data based on the xml file. In this conversion process, the converted xml file may contain only attribute data and no text data. In addition, the target data conversion based on the xml file is based on the configuration data based on the excel file, and an interactive interface which is more intuitive, friendly and convenient to edit can be provided for a user based on the readability and the operability of the excel file.
Specifically, in an embodiment of the present application, the parsing the json file-based intermediate data into xml file-based target data may include:
s401: converting the intermediate data based on the json file into data of a dictionary file;
s403: and converting the data of the dictionary file into target data based on an xml file.
In this embodiment of the application, the json file-based intermediate data may be converted into data of a dictionary file. Specifically, in an embodiment of the present application, the intermediate data may be converted into data of a dictionary file by using a loads function. In other embodiments of the present application, the intermediate data may also be converted into data of a dictionary file by using an eval function, and of course, the intermediate data may also be converted into data of a dictionary file by using other manners, which is not limited herein. After determining the data of the dictionary file, the data of the dictionary file may be converted into target data based on an xml file. Specifically, in an embodiment of the present application, the dictotxml function of the python language may be used to convert the data of the dictionary file into the target data based on the xml file, and a matching conversion mode may be specifically selected according to different development languages.
Further, in an embodiment of the present application, the obtaining the configuration data based on the excel file may include:
s501: acquiring configuration data based on excel files, and converting the configuration data into data in an xlsx format.
In the embodiment of the present application, the excel file may have a format in various forms, such as an xlsm format, an xls format, and the like. The format is different, and the subsequent processing method is different, so that the configuration data can be converted into data in a uniform xlsx format for the convenience of subsequent conversion processing. Specifically, in an embodiment of the present application, the to _ excel method of the Python sectors library may be used to convert the configuration data into data in the xlsx format. In other embodiments of the present application, the configuration data may also be converted into data in xlsx format using the win32com client method in VBA code.
In an embodiment of the present application, after the configuration data is converted into data in an xlsx format, in order to improve conversion efficiency and processing speed, the configuration data may be converted by using an excel library based on a Python development language. Specifically, the converting the configuration data based on the excel file into the intermediate data based on the json file may include:
s601: and converting the excel file-based configuration data into json file-based intermediate data by utilizing an excel library based on a Python development language.
In the embodiment of the application, the excel library for processing data in an xlsx format in python can be utilized to convert the configuration data based on the excel file into the intermediate data based on the json file. Wherein, the excel library can comprise openpyxl library, xlrd library, xlwt library, xlwings library, xlsxsxxwriter library and the like. The openpyxl library can read, write, modify and the like the data in the xlsx format through a mode of 'workbook-sheet-cell'. The xlrd library may be a library that reads data from excel files and formats data.
Having described the data parsing method provided in the present application in detail, the data parsing apparatus 101 provided in the present application will be described below with reference to fig. 3, and includes:
a configuration data obtaining module 301, configured to obtain configuration data based on an excel file;
a conversion module 303, configured to convert the configuration data based on the excel file into intermediate data based on a json file;
and the parsing module 305 is configured to parse the json file-based intermediate data into xml file-based target data.
Optionally, in an embodiment of the present application, the conversion module 303 is specifically configured to:
constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
Optionally, in an embodiment of the present application, the parsing module 305 is specifically configured to:
converting the intermediate data based on the json file into data of a dictionary file;
and converting the data of the dictionary file into target data based on an xml file.
Optionally, in an embodiment of the present application, the module 301 for obtaining configuration data is specifically configured to:
acquiring configuration data based on an excel file, and converting the configuration data into data in an xlsx format;
correspondingly, the conversion module is specifically configured to:
and converting the configuration data based on the excel file into intermediate data based on a json file by utilizing an excel library based on a Python development language.
Optionally, in an embodiment of the present application, the configuration data includes a plurality of test case data for interface testing, and the test case data includes at least an input parameter combination and an expected result.
The data analysis device 101 according to the embodiment of the present application may correspond to perform the method described in the embodiment of the present application, and the above and other operations and/or functions of each module in the data analysis device 101 are respectively for implementing the corresponding processes of the methods provided in the above embodiments, and for brevity, are not described again here.
It should be noted that the above-described embodiments are merely illustrative, wherein the modules described as separate parts may or may not be physically separate, and the parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiments of the apparatus provided in the present application, the connection relationship between the modules indicates that there is a communication connection therebetween, and may be implemented as one or more communication buses or signal lines.
As shown in fig. 4, an embodiment of the present application further provides a processing apparatus 400, where the processing apparatus 400 includes: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions. The processing device 400 includes a memory 401, a processor 403, a bus 405, and a communication interface 407. The memory 401, processor 403 and communication interface 407 communicate over a bus 405. The bus 405 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus. The communication interface 407 is used for communication with the outside. The processor 403 may be a Central Processing Unit (CPU). The memory 401 may include volatile memory (volatile memory), such as Random Access Memory (RAM). The memory 401 may also include a non-volatile memory (non-volatile memory), such as a read-only memory (ROM), a flash memory, an HDD, or an SSD. The memory 401 stores executable code, and the processor 403 executes the executable code to perform the data parsing method.
Embodiments of the present application provide a computer readable storage medium having stored thereon computer program instructions which, when executed by a processor, implement the above-described method.
Embodiments of the present application provide a computer program product comprising computer readable code, or a non-transitory computer readable storage medium carrying computer readable code, which when run in a processor of an electronic device, the processor in the electronic device performs the above method.
In some embodiments, the disclosed methods may be implemented as computer program instructions encoded on a computer-readable storage medium in a machine-readable format or encoded on other non-transitory media or articles of manufacture. Fig. 5 schematically illustrates a conceptual partial view of an example computer program product comprising a computer program for executing a computer process on a computing device, arranged in accordance with at least some embodiments presented herein. In one embodiment, the example computer program product 500 is provided using a signal bearing medium 501. The signal bearing medium 501 may include one or more program instructions 502 that, when executed by one or more processors, may provide the functions or portions of the functions described above with respect to fig. 2. Further, program instructions 502 in FIG. 5 also describe example instructions.
In some examples, the signal bearing medium 501 may comprise a computer readable medium 503 such as, but not limited to, a hard disk drive, a Compact Disc (CD), a Digital Video Disc (DVD), a digital tape, a Memory, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. In some implementations, the signal bearing medium 501 may comprise a computer recordable medium 504 such as, but not limited to, a memory, a read/write (R/W) CD, a R/W DVD, and so forth. In some implementations, the signal bearing medium 501 may include a communication medium 505, such as, but not limited to, a digital and/or analog communication medium (e.g., a fiber optic cable, a waveguide, a wired communications link, a wireless communication link, etc.). Thus, for example, the signal bearing medium 501 may be conveyed by a wireless form of communication medium 505 (e.g., a wireless communication medium conforming to the IEEE802.11 standard or other transmission protocol). The one or more program instructions 502 may be, for example, computer-executable instructions or logic-implementing instructions. In some examples, a computing device, such as the electronic device described with respect to fig. 5, may be configured to provide various operations, functions, or actions in response to program instructions 502 conveyed to the computing device by one or more of a computer-readable medium 503, a computer-recordable medium 504, and/or a communications medium 505. It should be understood that the arrangements described herein are for illustrative purposes only. Thus, those skilled in the art will appreciate that other arrangements and other elements (e.g., machines, interfaces, functions, orders, and groupings of functions, etc.) can be used instead, and that some elements may be omitted altogether depending upon the desired results. In addition, many of the described elements are functional entities that may be implemented as discrete or distributed components or in conjunction with other components, in any suitable combination and location.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
It is also noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by hardware (e.g., a Circuit or an ASIC) for performing the corresponding function or action, or by combinations of hardware and software, such as firmware.
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
Having described embodiments of the present application, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen in order to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A data parsing method, comprising:
acquiring configuration data based on an excel file;
converting the configuration data based on the excel file into intermediate data based on a json file;
and analyzing the intermediate data based on the json file into target data based on an xml file.
2. The method according to claim 1, wherein the converting the excel file-based configuration data into json file-based intermediate data comprises:
constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
3. The method of claim 1, wherein parsing the json file-based intermediate data into xml file-based target data comprises:
converting the intermediate data based on the json file into data of a dictionary file;
and converting the data of the dictionary file into target data based on an xml file.
4. The method according to claim 1, wherein the obtaining of the excel file-based configuration data comprises:
acquiring configuration data based on an excel file, and converting the configuration data into data in an xlsx format;
correspondingly, the converting the excel file-based configuration data into json file-based intermediate data includes:
and converting the excel file-based configuration data into json file-based intermediate data by utilizing an excel library based on a Python development language.
5. The method of claim 1, wherein the configuration data comprises a plurality of test case data for interface testing, the test case data comprising at least a combination of input parameters and an expected result.
6. A data storage device, comprising:
the data acquisition and configuration module is used for acquiring configuration data based on the excel file;
the conversion module is used for converting the configuration data based on the excel file into intermediate data based on a json file;
and the analysis module is used for analyzing the intermediate data based on the json file into target data based on an xml file.
7. The apparatus of claim 6, wherein the conversion module is specifically configured to:
constructing a table header structure of the configuration data based on the excel file into a multi-branch tree structure;
traversing the multi-branch tree structure and analyzing each line of data based on the incidence relation between each line of data in the configuration data and the header structure, and generating intermediate data based on a json file.
8. A processing device comprising a memory and a processor, wherein the memory has stored therein a computer program, and the processor is arranged to run the computer program to perform the data parsing method of any one of claims 1 to 5.
9. A computer storage medium, in which a computer program is stored, wherein the computer program is arranged to perform the data parsing method of any one of claims 1 to 5 when executed.
10. A computer program product comprising computer readable code or a non-transitory computer readable storage medium carrying computer readable code which, when run in a processor of an electronic device, the processor in the electronic device performs the method of any of claims 1-5 above.
CN202210697021.8A 2022-06-20 2022-06-20 Data analysis method and device Pending CN115048922A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210697021.8A CN115048922A (en) 2022-06-20 2022-06-20 Data analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210697021.8A CN115048922A (en) 2022-06-20 2022-06-20 Data analysis method and device

Publications (1)

Publication Number Publication Date
CN115048922A true CN115048922A (en) 2022-09-13

Family

ID=83164388

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210697021.8A Pending CN115048922A (en) 2022-06-20 2022-06-20 Data analysis method and device

Country Status (1)

Country Link
CN (1) CN115048922A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959210A (en) * 2018-07-09 2018-12-07 网易(杭州)网络有限公司 A kind of method and device of file conversion
CN109684224A (en) * 2018-12-29 2019-04-26 深圳点猫科技有限公司 The test method and device of the conversion process of python code and building blocks
US20200184008A1 (en) * 2018-12-11 2020-06-11 Change Healthcare Holdings, Llc Maintenance of a metafile using spreadheet software
CN111858472A (en) * 2020-08-03 2020-10-30 平安国际智慧城市科技股份有限公司 File format conversion method and device, computer equipment and storage medium
CN112069129A (en) * 2020-09-18 2020-12-11 浪潮云信息技术股份公司 Configuration file format conversion method, device and medium based on domestic CPU
CN112114807A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Interface display method, device, equipment and storage medium
CN114036055A (en) * 2021-11-16 2022-02-11 上海中通吉网络技术有限公司 System for converting xmind test case and jmeter script
CN114443466A (en) * 2021-12-16 2022-05-06 厦门市美亚柏科信息股份有限公司 Method for converting executable script by using case file, terminal equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108959210A (en) * 2018-07-09 2018-12-07 网易(杭州)网络有限公司 A kind of method and device of file conversion
US20200184008A1 (en) * 2018-12-11 2020-06-11 Change Healthcare Holdings, Llc Maintenance of a metafile using spreadheet software
CN109684224A (en) * 2018-12-29 2019-04-26 深圳点猫科技有限公司 The test method and device of the conversion process of python code and building blocks
CN111858472A (en) * 2020-08-03 2020-10-30 平安国际智慧城市科技股份有限公司 File format conversion method and device, computer equipment and storage medium
CN112069129A (en) * 2020-09-18 2020-12-11 浪潮云信息技术股份公司 Configuration file format conversion method, device and medium based on domestic CPU
CN112114807A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Interface display method, device, equipment and storage medium
CN114036055A (en) * 2021-11-16 2022-02-11 上海中通吉网络技术有限公司 System for converting xmind test case and jmeter script
CN114443466A (en) * 2021-12-16 2022-05-06 厦门市美亚柏科信息股份有限公司 Method for converting executable script by using case file, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
JP4148527B2 (en) Functional test script generator
CN108334609B (en) Method, device, equipment and storage medium for realizing JSON format data access in Oracle
CN111090641B (en) Data processing method and device, electronic equipment and storage medium
US8024353B2 (en) Method and system for sequentially accessing compiled schema
CN113986241B (en) Configuration method and device of business rules based on knowledge graph
JP2023541186A (en) Visualization page rendering method, device, equipment and storage medium
CN111209736A (en) Text file analysis method and device, computer equipment and storage medium
CN112181924A (en) File conversion method, device, equipment and medium
US9390073B2 (en) Electronic file comparator
CN112883088B (en) Data processing method, device, equipment and storage medium
US9679092B1 (en) Constraint handling for parameterizable hardware description language
CN115357286B (en) Program file comparison method and device, electronic equipment and storage medium
CN116028062A (en) Target code generation method, NPU instruction display method and device
CN111143310B (en) Log recording method and device and readable storage medium
CN116501415A (en) Command execution method and device, electronic equipment and computer readable storage medium
US7856344B2 (en) Method for transforming overlapping paths in a logical model to their physical equivalent based on transformation rules and limited traceability
CN115048922A (en) Data analysis method and device
US20190384825A1 (en) Method and device for data protection and computer readable storage medium
CN112818129B (en) Atlas modeling system and method
CN112699642B (en) Index extraction method and device for complex medical texts, medium and electronic equipment
CN112464636A (en) Constraint file comparison method and device, electronic equipment and storage medium
JP2018514843A (en) Declarative cascade reordering for styles
JP6802109B2 (en) Software specification analyzer and software specification analysis method
CN111858495B (en) File information acquisition method and device, storage medium and electronic equipment
EP4261691A1 (en) Method and device for optimizing computational graph

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