CN112328638A - Gateway upstream and downstream data comparison test method, device, equipment and storage medium - Google Patents

Gateway upstream and downstream data comparison test method, device, equipment and storage medium Download PDF

Info

Publication number
CN112328638A
CN112328638A CN202011207409.2A CN202011207409A CN112328638A CN 112328638 A CN112328638 A CN 112328638A CN 202011207409 A CN202011207409 A CN 202011207409A CN 112328638 A CN112328638 A CN 112328638A
Authority
CN
China
Prior art keywords
data
source
comparison
generated
upstream
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
CN202011207409.2A
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.)
Ping An Puhui Enterprise Management Co Ltd
Original Assignee
Ping An Puhui Enterprise Management 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN202011207409.2A priority Critical patent/CN112328638A/en
Publication of CN112328638A publication Critical patent/CN112328638A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24553Query execution of query operations
    • G06F16/24558Binary matching operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/254Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90344Query processing by using string matching techniques
    • 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/151Transformation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the field of testing, and discloses a method, a device, equipment and a storage medium for comparing and testing upstream and downstream data of a gateway. A method for comparing and testing upstream and downstream data of a gateway comprises the following steps: acquiring source data in a data source system and a generated file in an output system, wherein the generated file is obtained by inputting the source data into the output system for data conversion file operation and then outputting the data conversion file; performing a drawing operation on the source data based on a preset drawing engine to obtain target source data; performing file conversion data operation on the generated file to obtain generated data; and performing data comparison operation on the target source data and the generated data to obtain and output a comparison result of the source data and the generated data. This application can shorten artifical contrast cost greatly, reduces repeatability contrast work.

Description

Gateway upstream and downstream data comparison test method, device, equipment and storage medium
Technical Field
The invention relates to the field of testing, in particular to a method, a device, equipment and a storage medium for comparing and testing upstream and downstream data of a gateway.
Background
The gateway system processes a large amount of data, is deployed in data safety protection hardware equipment between an application system and a terminal computer, performs network examination on the circulation of electronic documents, and completes safety control on confidential data by analyzing the content of the electronic documents, capturing key information and controlling the circulation of confidential electronic documents on the premise of not influencing the conventional network architecture. The upstream of the gateway is a data source related system, a large amount of original service data are stored in a database, the downstream of the gateway is a data output system, the large amount of original service data at the upstream are output to different types of files, and the files are synchronized to clients according to various file types such as tables, json files and the like.
In the prior art, the consistency verification of the upstream and downstream data of the gateway system can only be compared one by one manually, the solution is original, the verification is slow, and the accuracy cannot be guaranteed. Different requirements correspond to different data, how to quickly verify and ensure that input and output data are consistent and accurate is not a good solution at present.
Disclosure of Invention
The invention mainly aims to solve the problems that the verification is slow and the accuracy cannot be ensured when the consistency of upstream and downstream data of a gateway system is verified.
The invention provides a gateway upstream and downstream data comparison test method in a first aspect, which comprises the following steps:
acquiring source data in a data source system, and performing a drawing operation on the source data based on a preset drawing engine to obtain target source data;
the output system inputs the target source data to the output system to perform data conversion file operation to obtain a generated file;
performing file conversion data operation on the generated file to obtain generated data;
and performing data comparison operation on the target source data and the generated data to obtain a comparison result of the target source data and the generated data.
Optionally, in a first implementation manner of the first aspect of the present invention, the performing a file conversion data operation on the generated file to obtain generated data includes:
reading the information content of the generated file to obtain a content character string;
performing character segmentation on the content character string according to the specified keywords to obtain a segmentation result;
and storing the division result into a multi-bit array to obtain generated data.
Optionally, in a second implementation manner of the first aspect of the present invention, the performing a data comparison operation on the target source data and the generated data to obtain a comparison result between the target source data and the generated data includes:
acquiring rule engine setting parameters input by a user, and performing field name matching operation on the target source data according to the rule engine setting parameters to obtain first comparison data;
performing array name matching operation on the generated data according to the rule engine setting parameters to obtain second comparison data;
and comparing the first comparison data with the second comparison data, and outputting a comparison result.
Optionally, in a third implementation manner of the first aspect of the present invention, before the performing, by the preset-based-drawing-number engine, a drawing-number operation on the source data, the method further includes:
and carrying out data source template configuration operation based on a preset data source template configuration module to obtain a data source template.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the performing, by the preset-based data source template configuration module, a data source template configuration operation to obtain a data source template includes:
creating a first data source template, and appointing a data source field for the first data source template;
and adding a service attribute query statement to the first data source template according to the data source field to obtain a second data source template.
Optionally, in a fifth implementation manner of the first aspect of the present invention, before the creating the first data source template and specifying data source fields for the first data source template, the method further includes:
and setting a database value parameter for the data source field.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the performing, by the preset-based-drawing-engine, a drawing operation on the source data includes:
inquiring the data source field according to the database value parameters to obtain and import the value of the data source field;
and inquiring the service attribute query statement based on the value of the data source field to obtain and import the value of the service attribute query statement.
The second aspect of the present invention provides a device for comparing and testing upstream and downstream data of a gateway, comprising:
the system comprises a drawing module, a data source system and a data processing module, wherein the drawing module is used for acquiring source data in the data source system and performing drawing operation on the source data based on a preset drawing engine to obtain target source data;
the output module is used for inputting the target source data to an output system by the output system for data conversion file operation to obtain a generated file;
the conversion module is used for carrying out file conversion data operation on the generated file to obtain generated data;
and the comparison module is used for carrying out data comparison operation on the target source data and the generated data to obtain a comparison result of the target source data and the generated data.
Optionally, in a first implementation manner of the second aspect of the present invention, the number-of-draws module is specifically configured to:
and carrying out data source template configuration operation based on a preset data source template configuration module to obtain a data source template.
Optionally, in a second implementation manner of the second aspect of the present invention, the number-of-draws module is specifically configured to:
creating a first data source template, and appointing a data source field for the first data source template;
and adding a service attribute query statement to the first data source template according to the data source field to obtain a second data source template.
Optionally, in a third implementation manner of the second aspect of the present invention, the number-of-draws module is specifically configured to:
and setting a database value parameter for the data source field.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the number-of-draws module is specifically configured to:
inquiring the data source field according to the database value parameters to obtain and import the value of the data source field;
and inquiring the service attribute query statement based on the value of the data source field to obtain and import the value of the service attribute query statement.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the conversion module is specifically configured to:
reading the information content of the generated file to obtain a content character string;
performing character segmentation on the content character string according to the specified keywords to obtain a segmentation result;
and storing the division result into a multi-bit array to obtain generated data.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the comparing module is specifically configured to:
acquiring rule engine setting parameters input by a user, and performing field name matching operation on the target source data according to the rule engine setting parameters to obtain first comparison data;
performing array name matching operation on the generated data according to the rule engine setting parameters to obtain second comparison data;
and comparing the first comparison data with the second comparison data, and outputting the comparison result.
The third aspect of the present invention provides a device for comparing and testing upstream and downstream data of a gateway, comprising: a memory and at least one processor, the memory having instructions stored therein; the at least one processor calls the instructions in the memory to enable the gateway upstream and downstream data comparison test equipment to execute the gateway upstream and downstream data comparison test method.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to execute the above-mentioned gateway upstream and downstream data comparison test method.
In the technical scheme provided by the invention, data in a data source system is subjected to drawing operation to obtain target source data, an output system outputs the target source data into a generated file, the generated file is converted into generated data, and then the target source data is compared with the generated data to obtain a comparison result. In the embodiment of the invention, the automatic comparison test of upstream and downstream data of the gateway system is realized, and compared with manual comparison, the efficiency is higher and the comparison result is more accurate.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for comparing and testing upstream and downstream data of a gateway in an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a device for comparing and testing upstream and downstream data of a gateway according to an embodiment of the present invention;
fig. 3 is a schematic diagram of an embodiment of a device for comparing and testing upstream and downstream data of a gateway in an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method, a device, equipment and a storage medium for comparing and testing upstream and downstream data of a gateway, which realize automatic comparison and test of the upstream and downstream data of a gateway system, and compared with manual comparison, the efficiency is higher and the comparison result is more accurate.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, an embodiment of the method for comparing and testing upstream and downstream data of a gateway in the embodiment of the present invention includes:
101. acquiring source data in a data source system, and performing a drawing operation on the source data based on a preset drawing engine to obtain target source data;
in this embodiment, the data source system is a data generating system, and corresponds to an upstream system of the output system, such as a mall system, and the mall system generates various order data when a user places an order, and directly generates data in the system. The source data is stored in the form of database fields, such as field 1 name "order number", attribute value "1001", field 2 name "unit price", attribute value "100", field 3 name "purchase quantity", attribute value "4", field 4 name "withholding red envelope", attribute value "15", field 5 name "payment sum", and attribute value "385".
The rule engine of the number of draws is really for solving the needs of the business verification scene, and can be understood as one-time configuration according to the business rules, for example, the example of the number of draws rule is to draw according to the data proportion, so that the comparison base number can be reduced, and the comparison output result is accelerated; for example, the drawing rule is drawn according to a specific time period and a specific keyword, so that specific service requirements can be met.
The data of the upstream target system is inquired according to a special condition and is inserted into the database of the current system for storage, so that the system can further process the data. In this embodiment, a template selection button in a page is clicked, a data source template stored in a database is read and loaded into a memory, and after one of the data source templates is selected through a pull-down list, the data source template is loaded on the page, and at this time, operations such as adding or deleting a service attribute query statement, changing an original service attribute query statement, and the like may be performed to adjust data. At this time, the data source template has no real data, and only the database field and the service attribute query statement are referred to as an example of the table. After clicking the data import button, the data import module is connected to the corresponding database according to the database value parameters (database type, database address, port number, field, value logic) of the specified data source field in the template, and inquires the corresponding value according to the service query statement in the data source template, and stores the value in the memory and displays the value on a page, please refer to table two examples.
Watch 1
Figure BDA0002757553430000061
Watch two
Name of template Area Data source field SalesAmount
Shenzhen sales amount Shenzhen (Shenzhen medicine) SalesAmountA ¥100000
In this embodiment, before the foregoing step 101, the method further includes:
and carrying out data source template configuration operation based on a preset data source template configuration module to obtain a data source template.
In this embodiment, before performing a drawing operation, a drawing rule needs to be set, and the setting of the drawing rule is realized by configuring a data source template, a configuration, for example, a template name "shenzhen sales amount", Area "shenzhen", and then corresponding data is specified for the "shenzhen sales amount" template, and a template saving button is clicked to save the template into a database after determining that there is no mistake, so that the configuration of a data source template is completed.
And simultaneously, the configuration page of the data source template also supports the function of importing the batch data source template, the function of importing the batch data source template comprises two related buttons of 'template downloading' and 'batch importing', firstly, the 'template downloading' button is clicked to download the template file to a local storage, the template file is opened in the local storage and is stored after data is filled in, the system reads the template file after clicking the 'batch importing', all the configurations in the template file are loaded and displayed in the page, and the template storage button is clicked to store the template in the database after the correctness is confirmed.
In this embodiment, the performing, by the preset-based data source template configuration module, a data source template configuration operation to obtain a data source template further includes:
creating a first data source template, and appointing a data source field for the first data source template;
and adding a service attribute query statement to the first data source template according to the data source field to obtain a second data source template.
In this embodiment, a configuration, for example, a template name "shenzhen sales amount" is added to the data source template configuration page, after Area is "shenzhen", a data source field "SalesAmounta" needs to be specified for the template of shenzhen sales amount "first, then a service attribute query statement" Select SalesAmount from blanket Area where Area is added according to the value logic of the data source field "SalesAmounta", please refer to an example of table.
In this embodiment, before creating the first data source template and specifying the data source field for the first data source template, the method further includes:
and setting a database value parameter for the data source field.
In this embodiment, setting the database value-taking parameters first requires clicking an add button on a data source template configuration page, selecting a database type, and inputting information, a field name, and a value-taking logic of the database. The database type comprises Oracle/SQLServer/DB2/Mysql and the like, the database information comprises a database address, a port number and a database name, and the field name is a required data source field. For example, the data source field is "salesmamounta", and the database value parameters are set for the data source field "salesmamounta": selecting the database type as ' SQLServer ', filling in a database address 10.155.25.36, a port number 9534, a database name instancel, a field name ' SalesAmounta ', and a value logic ' select salesAmount from table A where Area ' Shenzhen ', and querying the real value of the data source field from the database after setting the database value parameter for the data source field.
In this embodiment, the performing, by the foregoing 101, a snapshot operation on the source data based on a preset snapshot engine includes:
inquiring the data source field according to the database value parameters to obtain and import the value of the data source field;
and inquiring the service attribute query statement based on the value of the data source field to obtain and import the value of the service attribute query statement.
In this embodiment, values of data source fields "salesamiunt a" and "salesamiunt b" are queried in the database according to the input database type Oracle, address 10.155.25.36, port number 9534, database name "instancel" and value logic "Select salesamimount from table a where Area is deep, Select salesamimount from table b where Area is broad", such as salesamiunt a "10000 and salesamiount b" 2000, the actual business meaning is sales of deep and broad regions, the business attribute query statement is "Select amantinua (salesamiunt a) + sum (salesaminum b)", that is, the total business value of salesaminum query is calculated according to the input database type Oracle, address 10.155.25.36, port number 9534, database name "instancel" and value logic "Select salesaminum" that is obtained by substituting the business query value of the query statement "salesaminum + table b" (see the business attribute of salesaminum query statement 30000) into the business query statement "sale" and "total business value of salesaminum" (see the query statement "sale attribute 30000", that is obtained by substituting the query result from the query statement "salesaminum query statement" sale attribute of the total business value of salesaminum "(see the query statement" sale attribute 30000) and the query statement, the query result of the query statement that is obtained by the query result of the query statement "sale of the query by the query statement" salesaminum "(see example of the query statement" sale of salesaminum) (see (salesaminum) (see the query statement), please refer to table four example.
Watch III
Figure BDA0002757553430000081
Watch four
Figure BDA0002757553430000082
It is understood that the execution subject of the present invention may be a gateway upstream and downstream data comparison test device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
102. The output system inputs the target source data to the output system to perform data conversion file operation to obtain a generated file;
in this embodiment, the output system corresponds to a downstream system of the data source system, and outputs the incoming data as new data or a data type through operations such as conversion, calculation, and the like, for example, a reporting system, and outputs the data after cleaning or integrating as a reporting file, and the generated file is stored in a file form of various formats, such as txt, doc, and the like. The source data and the generated file have a content corresponding relationship, the source data is streamed into the output system and converted into the generated file, for example, the source data is a character string of "hello", the text type output system can convert a character string into a text, the character string data of "hello" is converted into a text after flowing into the text type output system, and the file content of the text is "hello".
103. Performing file conversion data operation on the generated file to obtain generated data;
in this embodiment, the idea of implementing the file conversion data operation is to read a file into a memory, then partition a character string according to a specified keyword by using a character string partition method, and store a single character string in a multi-dimensional array form. For example, a generated file a is read as "region: shenzhen, sales volume: 500, sales amount: 10000, stock: 200 ", shown in memory as a ═ region: shenzhen, sales volume: 500, sales amount: 10000, stock: 200 ", a string is split by the split method by designating comma as a key, i.e. b ═ a. split (", ") yields a common array b ═ region: shenzhen "," sales volume: 500 "," sales amount: 10000 "," stock: 200"]The elements in the array b are assigned to a two-dimensional array c ═ x][y]I.e. [ x ]0][y0]Region, [ x ]1][y0](x) sales amount [ ]2][y0]Amount of sale, [ x3][y0]Inventory, [ x0][y1]Shenzhen, [ x1][y1]=500,[x2][y1]=10000,[x3][y1]The generated data is the two-dimensional array c, 200.
In this embodiment, the aforementioned step 103 further includes:
reading the information content of the generated file to obtain a content character string;
performing character segmentation on the content character string according to the specified keywords to obtain a segmentation result;
and storing the division result into a multi-bit array to obtain generated data.
In this embodiment, a file selection button is clicked, a generated file is selected, a file type such as txt is generated, for example, information in the generated file includes "regional sales amount" and "sales amount: 10000", the information is displayed on a page first, then a file data conversion button is clicked, and the content of the generated file is converted into a character string "regional sales amount" and "sales amount in shanghai 10000" and stored in a memory.
The character string is divided by the split () method with a space as a designated keyword, such as the character string "regional sales amount" into "region" and "sales amount", the character string "shanghai 10000" into "shanghai" and "10000", and the division keyword is determined according to the content character string. Saving the segmentation results to multidimensional data [ x ]][y]In, such as [ x ]0][y0]Region, [ x ]1][y0]Amount of sale, [ x0][y1]Shanghai, [ x1][y1]=1000。
104. And performing data comparison operation on the target source data and the generated data to obtain a comparison result of the target source data and the generated data.
In this embodiment, the comparison button is clicked, and the txt file read is checked line by line. Such as: first row fetch [ x0][y1]Shenzhen, [ x1][y1]100000.00, the corresponding fields can be matched through the rule engine configuration, that is, Area Shenzhen and SalesAmount 100000.00 are obtained. And then matching the data with the memory data when the template is imported, and outputting a corresponding log.
In this embodiment, the aforementioned 104 further includes:
acquiring rule engine setting parameters input by a user, and performing field name matching operation on the target source data according to the rule engine setting parameters to obtain first comparison data;
performing array name matching operation on the generated data according to the rule engine setting parameters to obtain second comparison data;
and comparing the first comparison data with the second comparison data, and outputting the comparison result.
In this embodiment, the rule engine setting parameter is set for a corresponding name of a field in the data source template, for example, Area ═ x0][*],salesAmount ═ amount of sale ═ x1][*]Salesamount a + salesamount b is the total sales amount.
The first row of the target source data acquires "Areas salesAmount tA + salesAmount B", please refer to Table five. The rule engine sets Area as region, salesAmount as sales amount, salesAmount as total sales amount, replaces field Area as region, replaces field salesAmount as sales amount, replaces field salesAmount as total sales amount, and replaces field salesAmount a + salesAmount as total sales amount, so as to obtain the first row "total sales amount for region", please refer to table six.
Watch five
Figure BDA0002757553430000101
Watch six
Figure BDA0002757553430000102
Setting Area ═ x in parameter by rule engine0][*],salesAmount=[x1][*]Configuring the Area and salesAmount with a service map, namely [ X ]0]What is obtained is the region, and the corresponding database field is Area, [ x [ ]1]The result is a sales amount and the corresponding database field is salesmaunt. For example, the first row gets to [ x ]0][y1]Shenzhen, [ x1][y1]100000.00, the corresponding fields can be matched through the rule engine configuration, that is, Area Shenzhen and SalesAmount 100000.00 are obtained.
And comparing the first comparison data with the second comparison data line by line, if the first comparison data and the second comparison data are the same, outputting correct information on a page, and if the first comparison data and the second comparison data are wrong, outputting wrong information. For example, if the target source data and the generation data of Shenzhen sales amount are the same, outputting 'Shenzhen sales amount is correct' in the page, and if the target source data and the generation data are not the same, outputting 'system field alignment error'. In the embodiment of the invention, the automatic comparison test of upstream and downstream data of the gateway system is realized, and compared with manual comparison, the efficiency is higher and the comparison result is more accurate.
The above description of the method for comparing and testing the upstream and downstream data of the gateway in the embodiment of the present invention, and the following description of the apparatus for comparing and testing the upstream and downstream data of the gateway in the embodiment of the present invention refer to fig. 2, where an embodiment of the apparatus for comparing and testing the upstream and downstream data of the gateway in the embodiment of the present invention includes:
the drawing module 201 is configured to obtain source data in a data source system, and perform drawing operation on the source data based on a preset drawing engine to obtain target source data;
the output module 202 is configured to input the target source data to an output system for data conversion file operation, so as to obtain a generated file;
the conversion module 203 is configured to perform a file conversion data operation on the generated file to obtain generated data;
a comparison module 204, configured to perform a data comparison operation on the target source data and the generated data to obtain a comparison result between the target source data and the generated data.
Optionally, the number of draws module 201 may be further specifically configured to:
and performing data source template configuration operation based on a preset data source template configuration module to obtain a data source template T1.
Optionally, the number of draws module 201 may be further specifically configured to:
creating a first data source template, and appointing a data source field for the first data source template;
and adding a service attribute query statement to the first data source template according to the data source field to obtain a second data source template.
Optionally, the number of draws module 201 may be further specifically configured to:
and setting a database value parameter for the data source field.
Optionally, the number of draws module 201 may be further specifically configured to:
inquiring the data source field according to the database value parameters to obtain and import the value of the data source field;
and inquiring the service attribute query statement based on the value of the data source field to obtain and import the value of the service attribute query statement.
Optionally, the conversion module 203 may be further specifically configured to:
reading the information content of the generated file to obtain a content character string;
performing character segmentation on the content character string according to the specified keywords to obtain a segmentation result;
and storing the division result into a multi-bit array to obtain generated data.
Optionally, the conversion module 204 may be further specifically configured to:
acquiring rule engine setting parameters input by a user, and performing field name matching operation on the target source data according to the rule engine setting parameters to obtain first comparison data;
performing array name matching operation on the generated data according to the rule engine setting parameters to obtain second comparison data;
and comparing the first comparison data with the second comparison data, and outputting the comparison result.
In the embodiment of the invention, the modularized design ensures that the upstream and downstream data comparison of the gateway and the hardware of each part of the test device are concentrated on realizing a certain function, the performance of the hardware is realized to the maximum extent, and meanwhile, the modularized design also reduces the coupling between the modules of the device, thereby being more convenient for maintenance.
Fig. 1 and fig. 2 describe the gateway upstream and downstream data comparison test apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the gateway upstream and downstream data comparison test apparatus in the embodiment of the present invention in detail from the perspective of hardware processing.
Fig. 3 is a schematic structural diagram of a gateway upstream and downstream data comparison test device 300 according to an embodiment of the present invention, which may generate a large difference due to different configurations or performances, and may include one or more processors (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) storing applications 333 or data 332. Memory 320 and storage media 330 may be, among other things, transient or persistent storage. The program stored on the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations for the gateway upstream and downstream data comparison test equipment 300. Still further, the processor 310 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the gateway upstream and downstream data contrast test device 300.
The gateway upstream and downstream data contrast test equipment 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input-output interfaces 360, and/or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art will appreciate that the gateway upstream and downstream data contrast test equipment configuration shown in fig. 3 does not constitute a limitation on the gateway upstream and downstream data contrast test equipment, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
The invention also provides a gateway upstream and downstream data comparison test device, which comprises a memory and a processor, wherein the memory stores computer readable instructions, and the computer readable instructions, when executed by the processor, enable the processor to execute the steps of the gateway upstream and downstream data comparison test method in the above embodiments.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, or a volatile computer-readable storage medium, where instructions are stored, and when the instructions are executed on a computer, the instructions cause the computer to execute the steps of the gateway upstream and downstream data comparison test method.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A gateway upstream and downstream data comparison test method is characterized in that the gateway upstream and downstream data comparison test method comprises the following steps:
acquiring source data in a data source system, and performing a drawing operation on the source data based on a preset drawing engine to obtain target source data;
inputting the target source data into an output system to perform data conversion file operation to obtain a generated file;
performing file conversion data operation on the generated file to obtain generated data;
and performing data comparison operation on the target source data and the generated data to obtain a comparison result of the target source data and the generated data.
2. The method for testing data comparison between the upstream and downstream of the gateway according to claim 1, wherein the performing the file conversion data operation on the generated file to obtain the generated data comprises:
reading the information content of the generated file to obtain a content character string;
performing character segmentation on the content character string according to the specified keywords to obtain a segmentation result;
and storing the division result into a multi-bit array to obtain generated data.
3. The method for testing data comparison between upstream and downstream of a gateway according to claim 1, wherein the performing the data comparison operation on the target source data and the generated data to obtain the comparison result between the target source data and the generated data comprises:
acquiring rule engine setting parameters input by a user, and performing field name matching operation on the target source data according to the rule engine setting parameters to obtain first comparison data;
performing array name matching operation on the generated data according to the rule engine setting parameters to obtain second comparison data;
and comparing the first comparison data with the second comparison data, and outputting a comparison result.
4. The method for testing the comparison of the upstream and downstream data of the gateway according to claim 1, wherein before the performing the snapshot operation on the source data based on the preset snapshot engine, the method further comprises:
and carrying out data source template configuration operation based on a preset data source template configuration module to obtain a data source template.
5. The gateway upstream and downstream data comparison test method according to claim 4, wherein the performing a data source template configuration operation based on a preset data source template configuration module to obtain a data source template comprises:
creating a first data source template, and appointing a data source field for the first data source template;
and adding a service attribute query statement to the first data source template according to the data source field to obtain a second data source template.
6. The method for testing data comparison between the upstream and downstream of the gateway as recited in claim 5, wherein before creating the first data source template and specifying data source fields for the first data source template, the method further comprises:
and setting a database value parameter for the data source field.
7. The method for testing data comparison between upstream and downstream of a gateway of claim 6, wherein said performing a snapshot operation on said source data based on a preset snapshot engine comprises:
inquiring the data source field according to the database value parameters to obtain and import the value of the data source field;
and inquiring the service attribute query statement based on the value of the data source field to obtain and import the value of the service attribute query statement.
8. The utility model provides a gateway upstream and downstream data contrast testing arrangement which characterized in that, gateway upstream and downstream data contrast testing arrangement includes:
the system comprises a drawing module, a data source system and a data processing module, wherein the drawing module is used for acquiring source data in the data source system and performing drawing operation on the source data based on a preset drawing engine to obtain target source data;
the output module is used for inputting the target source data to an output system for data conversion file operation to obtain a generated file;
the conversion module is used for carrying out file conversion data operation on the generated file to obtain generated data;
and the comparison module is used for carrying out data comparison operation on the target source data and the generated data to obtain a comparison result of the target source data and the generated data.
9. The utility model provides a gateway upstream and downstream data contrast test equipment which characterized in that, gateway upstream and downstream data contrast test equipment includes: a memory and at least one processor, the memory having instructions stored therein;
the at least one processor calls the instructions in the memory to cause the gateway upstream and downstream data comparison test equipment to execute the gateway upstream and downstream data comparison test method according to any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by a processor, implement the method for comparative testing of data upstream and downstream of a gateway according to any of claims 1-7.
CN202011207409.2A 2020-11-03 2020-11-03 Gateway upstream and downstream data comparison test method, device, equipment and storage medium Pending CN112328638A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011207409.2A CN112328638A (en) 2020-11-03 2020-11-03 Gateway upstream and downstream data comparison test method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011207409.2A CN112328638A (en) 2020-11-03 2020-11-03 Gateway upstream and downstream data comparison test method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112328638A true CN112328638A (en) 2021-02-05

Family

ID=74324447

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011207409.2A Pending CN112328638A (en) 2020-11-03 2020-11-03 Gateway upstream and downstream data comparison test method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112328638A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933160A (en) * 2015-06-26 2015-09-23 河海大学 ETL (Extract Transform and Load) framework design method for safety monitoring business analysis
US20200335188A1 (en) * 2019-04-17 2020-10-22 Tempus Labs Systems and Methods for Interrogating Clinical Documents for Characteristic Data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104933160A (en) * 2015-06-26 2015-09-23 河海大学 ETL (Extract Transform and Load) framework design method for safety monitoring business analysis
US20200335188A1 (en) * 2019-04-17 2020-10-22 Tempus Labs Systems and Methods for Interrogating Clinical Documents for Characteristic Data

Similar Documents

Publication Publication Date Title
CN111177231A (en) Report generation method and report generation device
US11442939B2 (en) Configurable and incremental database migration framework for heterogeneous databases
CN110162544B (en) Heterogeneous data source data acquisition method and device
JP5298117B2 (en) Data merging in distributed computing
CN107798038B (en) Data response method and data response equipment
CN105550241A (en) Multidimensional database query method and apparatus
CN108388623B (en) ER relationship generation method and device, computer equipment and storage medium
CN111400387A (en) Conversion method and device for import and export data, terminal equipment and storage medium
CN112256684B (en) Report generation method, terminal equipment and storage medium
CN108960672B (en) Quota and time-limited wind control method and device and computer readable storage medium
CN112667733A (en) Data warehouse data importing method and system
CN110109981B (en) Information display method and device for work queue, computer equipment and storage medium
KR102172138B1 (en) Distributed Computing Framework and Distributed Computing Method
CN117493309A (en) Standard model generation method, device, equipment and storage medium
CN111598707A (en) Page generation method and electronic equipment
CN112328638A (en) Gateway upstream and downstream data comparison test method, device, equipment and storage medium
CN115375430A (en) Method, device and equipment for batch analysis and loading of additional data of bank
CN112559644B (en) Method, device, equipment and storage medium for dynamically assembling product parts
CN114416772A (en) Data query method and device, electronic equipment and storage medium
US20120109783A1 (en) Product information search
CN109739876B (en) Data query method and device for database based on Sqltoy-orm framework
CN114116712A (en) Extended field processing method and device, electronic equipment and storage medium
CN115617773A (en) Data migration method, device and system
CN111814029A (en) Data query method, system and computing device
CN111241347A (en) Graph database creating method, enterprise data query method and device

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