Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a schematic flow chart of a method for monitoring interface data according to an embodiment of the present invention, and as shown in fig. 1, the method specifically includes:
s11, grab form/list control from graphical user interface.
The method for monitoring the interface data provided by the embodiment is applied to monitoring the form/list data in the display interface, and when the GUI interface displays the data stored in the server by calling the interface in the form of the form/list, the form/list control is captured from the GUI interface.
In the embodiment of the present invention, the manner of grabbing the table/list control from the GUI interface may be: and capturing all types of controls in the GUI interface, and filtering all types of controls to obtain a table/list control, wherein the table/list control is a table type control.
In an alternative of the embodiment of the present invention, the form/list control is captured from the GUI interface in real time, at regular time, or by a task initiated by a user, for example, the form/list control is captured from the GUI interface every 60min, and a monitoring scheme of the interface data is executed.
And S12, acquiring the information of the form/list control.
After the form/list control is obtained, the information of the form/list control is obtained from the form/list control, and the information of the form/list control may be: the table/list has a row height, a column width, and data stored in each area of the table/list.
And S13, extracting the data in the form/list control according to the information.
And extracting the stored data from the form/list control according to a set reading rule, wherein the reading rule can be as follows: and extracting data from the table/list control according to the row number or the column number or extracting data from the table/list control according to the sequence set by the user.
Specifically, the data may be, but is not limited to: text (chinese characters, numbers or letters), icons, formulas, symbols, etc.
In an alternative of the embodiment of the present invention, after each piece of data is extracted, an identifier is set for each piece of data, where the identifier may be: the data is in the form/list control location information.
In this embodiment of the present invention, the position information of the data in the table/list control is represented in the form of coordinates, for example, (1,1) is a first row and a first column, and assuming that the data in the first row and the first column is XX, the data after setting the identification may be: XX- (1, 1).
In an alternative of the embodiment of the present invention, different identifiers may be set for different rows and different columns, for example, a first row identifier a, a second row identifier B, a third row identifier C …, a first column identifier a, a second column identifier B, and a third column identifier C ….
And S14, sending the data to a server so that the server monitors the form/list control based on the data.
And sending the extracted data to a server for storing the table/list control data, so that the server matches the locally stored corresponding data based on the data, and monitoring the table/list control in the GUI interface.
According to the interface data monitoring method provided by the embodiment of the invention, the form/list control is captured from the graphical user interface, the information of the form/list control is obtained, the data in the form/list control is extracted according to the information, and the data is sent to the server, so that the server monitors the form/list control based on the data, the form/list displayed in the GUI can be monitored, and the authenticity of the data in the form/list is ensured.
Fig. 2 is a schematic flow chart of another interface data monitoring method according to an embodiment of the present invention, and as shown in fig. 2, the method specifically includes:
s21, grab form/list control from graphical user interface.
The method for monitoring the interface data provided by the embodiment is applied to monitoring the form/list data in the display interface, and when the GUI interface displays the data stored in the server by calling the interface in the form of the form/list, the form/list control is captured from the GUI interface.
For a brief description, details of a manner of capturing the table/list control may refer to the related description of S11 shown in fig. 1, and are not described herein again.
And S22, acquiring the position information, the line height information and the column width information of the table/list control.
After the table/list control in the GUI interface is captured, the position information of the table/list control in the GUI interface, the row height information (including the height and the row number) of the table/list, and the column width information (including the width and the column number) of the table/list are obtained.
For example, the form/list control may be train ticket data on 12306 software, and the GUI interface displays a 20 row 10 column form/list.
And S23, data in each area in the table/list control according to the row height information/column width information.
And extracting data from the table/list control according to the row number or the column number or extracting data from the table/list control according to the sequence set by the user.
For example, when the form/list control may be train ticket data on 12306 software, and the GUI interface displays a form/list with 20 rows and 10 columns, the data corresponding to the 8 th column is the number of remaining tickets of two seats, and the data in each area is read from the 2 nd row according to the current 8 th column until the 20 th row ends.
S24, determining the position information of the area based on the row height information/column width information.
And determining the position of each area in the GUI according to the position information of the table/list control in the GUI, and setting an identifier for the text information of each area according to the position information.
And S25, setting identification for the data based on the position information.
The set rule may be a format in which table/list control data is stored in the server.
In an alternative of the embodiment of the present invention, the data is sorted in the order in which the server performs the data matching.
The table/list control data is stored in the server in the order in which the server performs the data matching (e.g., in column-first-row order).
And S26, sending the data to a server so that the server monitors the form/list control based on the data.
The server matches the data with corresponding data stored locally and returns corresponding matching results to monitor the completed form/list control.
And S27, receiving a matching result returned by the server in response to the data.
And the matching result is generated by the server based on the matching between the data and the table/list data stored locally in the server.
And S28, if the matching result is that the data are inconsistent, determining an area with inconsistent data from the form/list control.
And S29, performing alarm in a mode of highlighting the area.
And if the matching result is inconsistent, adding area information with inconsistent data in the returned result, feeding back the matching result, determining an area with inconsistent data from the form/list control according to the matching result, and giving an alarm in a highlighted area mode.
The highlighting of the area may be in the form of: and framing the inconsistent areas by adopting highlight frames, highlighting text information in the inconsistent areas, and the like.
S210, requesting data corresponding to the area from the server according to the position information of the area; updating the text information of the region based on the data.
And S211, if the matching result is data consistency, continuing monitoring the form/list in the GUI.
According to the interface data monitoring method provided by the embodiment of the invention, the form/list control is captured from the graphical user interface, the information of the form/list control is obtained, the data in the form/list control is extracted according to the information, and the data is sent to the server, so that the server monitors the form/list control based on the data, the form/list displayed in the GUI can be monitored, if the text information in the form/list control is inconsistent with the data stored by the server, the inconsistent area is subjected to alarm display, the correct data is automatically obtained from the server for updating, and the authenticity of the data in the form/list is ensured.
Fig. 3 is a schematic structural diagram of a device for monitoring interface data according to an embodiment of the present invention, and as shown in fig. 3, the device specifically includes:
an obtaining module 31, configured to grab a table/list control from a graphical user interface;
the obtaining module 31 is further configured to obtain information of the form/list control;
an extracting module 32, configured to extract data in the form/list control according to the information;
a sending module 33, configured to send the data to a server, so that the server monitors the form/list control based on the data.
Optionally, the obtaining module 31 is specifically configured to obtain position information, line height information, and column width information of the table/list control.
Optionally, the extracting module 32 is specifically configured to extract data from each area in the table/list control according to the row height information/column width information; determining position information of the region based on the row height information/column width information; setting an identifier for the data based on the location information.
Optionally, the extracting module 32 is further configured to sort the data according to an order in which the server performs data matching.
Optionally, the apparatus further comprises: a receiving module 34, configured to receive a matching result returned by the server in response to the data;
and the matching result is generated by the server based on the matching between the data and the table/list data stored locally in the server.
Optionally, the apparatus further comprises: the warning module 35 is configured to determine an area with inconsistent data from the table/list control if it is determined that the matching result is inconsistent data; and performing alarm in a mode of highlighting the area.
Optionally, the apparatus further comprises: an updating module 36, configured to request, from the server, data corresponding to the area according to the location information of the area; updating the text information of the region based on the data.
The interface data monitoring device provided in this embodiment may be the interface data monitoring device shown in fig. 3, and may perform all the steps of the interface data monitoring method shown in fig. 1-2, so as to achieve the technical effect of the interface data monitoring method shown in fig. 1-2, which is described with reference to fig. 1-2 for brevity, and is not described herein again.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, where the terminal device 400 shown in fig. 4 includes: at least one processor 401, memory 402, at least one network interface 404, and other user interfaces 403. The various components in the terminal device 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced synchronous SDRAM (ESDRAM), synchronous link SDRAM (SLDRAM), and direct memory bus SDRAM (DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application 4022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided by the method embodiments, for example, including:
grabbing a form/list control from a graphical user interface; acquiring information of the form/list control; extracting data in the form/list control according to the information; and sending the data to a server so that the server monitors the form/list control based on the data.
Optionally, position information, line height information, and column width information of the table/list control are obtained.
Optionally, data from each region in the table/list control according to the row height information/column width information; determining position information of the region based on the row height information/column width information; setting an identifier for the data based on the location information.
Optionally, the data is sorted in the order in which the server performs the data matching.
Optionally, receiving a matching result returned by the server in response to the data; and the matching result is generated by the server based on the matching between the data and the table/list data stored locally in the server.
Optionally, if the matching result is that the data are inconsistent, determining an area with inconsistent data from the form/list control; and performing alarm in a mode of highlighting the area.
Optionally, data corresponding to the area is requested from the server according to the location information of the area; updating the text information of the region based on the data.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The processor 401 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The terminal device provided in this embodiment may be the terminal device shown in fig. 4, and may execute all steps of the method for monitoring interface data shown in fig. 1-2, so as to achieve the technical effect of the method for monitoring interface data shown in fig. 1-2, and for brevity, it is described with reference to fig. 1-2, which is not described herein again.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium can be executed by one or more processors, the method for monitoring the interface data executed on the side of the interface data monitoring device is realized.
The processor is used for executing the monitoring program of the interface data stored in the memory so as to realize the following steps of the interface data monitoring method executed on the monitoring equipment side of the interface data:
grabbing a form/list control from a graphical user interface; acquiring information of the form/list control; extracting data in the form/list control according to the information; and sending the data to a server so that the server monitors the form/list control based on the data.
Optionally, position information, line height information, and column width information of the table/list control are obtained.
Optionally, data from each region in the table/list control according to the row height information/column width information; determining position information of the region based on the row height information/column width information; setting an identifier for the data based on the location information.
Optionally, the data is sorted in the order in which the server performs the data matching.
Optionally, receiving a matching result returned by the server in response to the data; and the matching result is generated by the server based on the matching between the data and the table/list data stored locally in the server.
Optionally, if the matching result is that the data are inconsistent, determining an area with inconsistent data from the form/list control; and performing alarm in a mode of highlighting the area.
Optionally, data corresponding to the area is requested from the server according to the location information of the area; updating the text information of the region based on the data.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.