Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
For the purpose of facilitating an understanding of the embodiments of the present invention, reference will now be made to the following description of specific embodiments, taken in conjunction with the accompanying drawings, which are not intended to limit the embodiments of the invention.
Fig. 1 is a schematic flow chart of a method for monitoring interface data according to an embodiment of the present invention, as shown in fig. 1, where the method specifically includes:
s11, grabbing a form/list control from a graphical user interface.
The method for monitoring the interface data is applied to monitoring the table/list data in the display interface, and when the data stored in the server is displayed in the form of the table/list in the GUI interface, the interface is called to capture the table/list control from the GUI interface.
In the embodiment of the present invention, the manner of capturing the form/list control from the GUI interface may be: capturing all types of controls in the GUI interface, and filtering all types of controls to obtain form/list controls, wherein the form/list controls are table type controls.
In an alternative of the embodiment of the present invention, the form/list control is grabbed from the GUI interface in real time, at a fixed time, or in a manner that the user starts a task, for example, each 60min grabs the form/list control from the GUI interface, and the monitoring scheme of the interface data is performed.
S12, acquiring information of the table/list control.
After the table/list control is acquired, the information of the table/list control is acquired from the table/list control, wherein the information of the table/list control can be: the row height, column width of the table/list, and the data stored for each region in the table/list.
S13, extracting data in the form/list control according to the information.
Extracting stored data from the form/list control according to a set reading rule, wherein the reading rule can be as follows: data is extracted from the form/list control by row number or column number or according to an order set by the user.
Specifically, the data may be, but is not limited to: text (kanji, numbers or letters), icons, formulas, symbols, etc.
In an alternative aspect of the embodiment of the present invention, after each data is extracted, an identifier is set for each data, where the identifier may be: the data is in the form/list control for 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 the first row and the first column, and assuming that the data in the first row and the first column is XX, the data after the setting of the identifier may be: XX- (1, 1).
In an alternative solution of the embodiment of the present invention, different identifiers may be set for different rows and different columns, for example, a first row setting identifier a, a second row setting identifier B, and a third row setting identifier C …, a first column setting identifier a, a second column setting identifier B, and a third column setting identifier C ….
And S14, the data are sent to a server, so that the server monitors the form/list control based on the data.
And sending the extracted data to a server storing the form/list control data so that the server can be matched with the corresponding data stored locally based on the data to complete the monitoring of the form/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 grabbed 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 interface can be monitored, and the authenticity of the data in the form/list is ensured.
Fig. 2 is a flow chart of another method for monitoring interface data according to an embodiment of the present invention, as shown in fig. 2, where the method specifically includes:
s21, grabbing a form/list control from a graphical user interface.
The method for monitoring the interface data is applied to monitoring the table/list data in the display interface, and when the data stored in the server is displayed in the form of the table/list in the GUI interface, the interface is called to capture the table/list control from the GUI interface.
The specific manner of grabbing the form/list control may refer to the related description of S11 shown in fig. 1, and for brevity, a detailed description is omitted herein.
S22, acquiring position information, row height information and column width information of the table/list control.
After grabbing the table/list control in the GUI interface, position information of the table/list control in the GUI interface, row height information (including: height and row number) of the table/list, column width information (including: width and column number) of the table/list are acquired.
For example, the form/list control may be train ticket data on 12306 software, with the GUI interface displaying a 20 row 10 column form/list.
S23, data in each area in the table/list control is selected according to the row height information/column width information.
Data is extracted from the form/list control by row number or column number or according to an order set by the user.
For example, when the form/list control may be the train ticket data on the 12306 software, and the GUI interface displays a 20 row 10 column form/list, the 8 th column corresponds to the number of remaining tickets of the second class, 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 interface according to the position information of the form/list control in the GUI interface, and setting an identifier for the text information of each area according to the position information.
S25, setting an identification for the data based on the position information.
The set rules may be in a format that stores form/list control data in the server.
In an alternative of the embodiment of the present invention, the data is ordered according to the order in which the servers perform data matching.
The order in which the data matching is performed by the server is the order in which the form/list control data is stored in the server (e.g., in a column-first-row order).
And S26, the data are sent to a server, so that the server monitors the form/list control based on the data.
The server matches the data with the corresponding data stored locally and returns a corresponding matching result to monitor the completed form/list control.
And S27, receiving a matching result returned by the server in response to the data.
The matching result is generated by the server based on the matching of the data and table/list data stored locally to the server.
And S28, if the matching result is that the data is inconsistent, determining a region of inconsistent data from the table/list control.
S29, alarming in a mode of highlighting the area.
If the matching result is inconsistent data, adding area information of inconsistent data into the returned result, feeding back the matching result, determining the area of inconsistent data from the form/list control according to the matching result, and alarming in the form of highlighting the area.
The form of highlighting the region may be: the area of the inconsistency is framed by a highlight frame, text information in the area of the inconsistency is highlighted, and the like.
S210, requesting data corresponding to the area from the server according to the position information of the area; and updating the text information of the area based on the data.
And S211, if the matching result is consistent with the data, continuing to monitor the table/list in the GUI.
According to the method for monitoring the interface data, the information of the form/list control is acquired by grabbing the form/list control from the graphical user interface, the data in the form/list control is extracted according to the information, 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 interface can be monitored, if the text information in the form/list control is inconsistent with the data stored by the server, an alarm is displayed in an inconsistent area, correct data is automatically acquired from the server to update, and the authenticity of the data in the form/list is ensured.
Fig. 3 is a schematic structural diagram of an interface data monitoring device according to an embodiment of the present invention, where, as shown in fig. 3, the device specifically includes:
an acquisition module 31 for grabbing form/list controls from the graphical user interface;
the acquiring module 31 is further configured to acquire information of the table/list control;
an extraction module 32 for extracting data in the form/list control according to the information;
and 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 acquiring module 31 is specifically configured to acquire location information, row 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 location information of the region based on the row height information/column width information; and setting an identification for the data based on the position information.
Optionally, the extracting module 32 is further configured to sort the data according to the order in which the data matching is performed by the server.
Optionally, the apparatus further comprises: a receiving module 34, configured to receive a matching result returned by the server in response to the data;
the matching result is generated by the server based on the matching of the data and table/list data stored locally to the server.
Optionally, the apparatus further comprises: an alarm module 35, configured to determine, if the matching result is determined to be inconsistent with data, an area where the data is inconsistent from the table/list control; and alarming in a form 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; and updating the text information of the area based on the data.
The monitoring device for interface data provided in this embodiment may be the monitoring device for interface data shown in fig. 3, and may perform all steps of the monitoring method for interface data shown in fig. 1-2, so as to achieve the technical effects of the monitoring method for interface data shown in fig. 1-2, and the detailed description will be omitted herein for brevity.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present invention, and a 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 terminal device 400 are coupled together by bus system 405. It is understood that the bus system 405 is used to enable connected communications 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. But for clarity of illustration 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, a trackball, a touch pad, or a touch screen, etc.).
It will be appreciated that the memory 402 in embodiments of the invention can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (ProgrammableROM, PROM), an erasable programmable Read-only memory (ErasablePROM, EPROM), an electrically erasable programmable Read-only memory (ElectricallyEPROM, EEPROM), or a flash memory, among others. The volatile memory may be a random access memory (RandomAccessMemory, RAM) that acts as an external cache. By way of example, and not limitation, many forms of RAM are available, such as Static RAM (SRAM), dynamic random access memory (DynamicRAM, DRAM), synchronous dynamic random access memory (SynchronousDRAM, SDRAM), double data rate synchronous dynamic random access memory (ddr SDRAM), enhanced Synchronous Dynamic Random Access Memory (ESDRAM), synchronous link dynamic random access memory (SynchlinkDRAM, SLDRAM), and direct memory bus random access memory (DirectRambusRAM, DRRAM). The memory 402 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some implementations, the memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an extended 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, for implementing various basic services and processing hardware-based tasks. The application programs 4022 include various application programs such as a media player (MediaPlayer), a Browser (Browser), and the like for realizing various application services. A program for implementing the method of the embodiment of the present invention may be included in the application program 4022.
In the embodiment of the present invention, the processor 401 is configured to execute the method steps provided in the method embodiments by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application program 4022, for example, including:
capturing form/list controls 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, row 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 location information of the region based on the row height information/column width information; and setting an identification for the data based on the position information.
Optionally, the data is ordered in the order in which the servers perform data matching.
Optionally, receiving a matching result returned by the server in response to the data; the matching result is generated by the server based on the matching of the data and table/list data stored locally to the server.
Optionally, if the matching result is inconsistent data, determining an area of inconsistent data from the table/list control; and alarming in a form of highlighting the area.
Optionally, requesting data corresponding to the area from the server according to the position information of the area; and updating the text information of the area based on the data.
The method disclosed in the above embodiment 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 in the processor 401 or by instructions in the form of software. The processor 401 described above may be a general purpose processor, a digital signal processor (DigitalSignalProcessor, DSP), an application specific integrated circuit (application specific IntegratedCircuit, ASIC), an off-the-shelf programmable gate array (FieldProgrammableGateArray, FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component. The disclosed methods, steps, and logic blocks 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 embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software elements in a decoding processor. The software elements may be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 402, and the processor 401 reads the information in the memory 402 and, in combination with its hardware, performs the steps of the above method.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (ApplicationSpecificIntegratedCircuits, ASIC), digital signal processors (DigitalSignalProcessing, DSP), digital signal processing devices (dspev), programmable logic devices (ProgrammableLogicDevice, PLD), field programmable gate arrays (Field-ProgrammableGateArray, FPGA), 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 that perform 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 a terminal device as shown in fig. 4, and may perform all steps of the method for monitoring interface data as shown in fig. 1-2, so as to achieve the technical effects of the method for monitoring interface data as shown in fig. 1-2, and refer to the related description of fig. 1-2, which is omitted herein for brevity.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium here stores one or more programs. Wherein the storage medium may comprise volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid state disk; the memory may also comprise a combination of the above types of memories.
When one or more programs in the storage medium are executable by one or more processors, the above-mentioned interface data monitoring method executed on the monitoring device side of the interface data is implemented.
The processor is used for executing a 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:
capturing form/list controls 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, row 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 location information of the region based on the row height information/column width information; and setting an identification for the data based on the position information.
Optionally, the data is ordered in the order in which the servers perform data matching.
Optionally, receiving a matching result returned by the server in response to the data; the matching result is generated by the server based on the matching of the data and table/list data stored locally to the server.
Optionally, if the matching result is inconsistent data, determining an area of inconsistent data from the table/list control; and alarming in a form of highlighting the area.
Optionally, requesting data corresponding to the area from the server according to the position information of the area; and updating the text information of the area based on the data.
Those of skill would further appreciate that the various illustrative elements 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 elements and steps are described above generally in terms of function in order to clearly illustrate the 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 solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed 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 foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the invention, and is not meant to limit the scope of the invention, but to limit the invention to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the invention are intended to be included within the scope of the invention.