CN115858079A - Data processing method and device - Google Patents

Data processing method and device Download PDF

Info

Publication number
CN115858079A
CN115858079A CN202211661584.8A CN202211661584A CN115858079A CN 115858079 A CN115858079 A CN 115858079A CN 202211661584 A CN202211661584 A CN 202211661584A CN 115858079 A CN115858079 A CN 115858079A
Authority
CN
China
Prior art keywords
interface
interface element
target
script
flow control
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
CN202211661584.8A
Other languages
Chinese (zh)
Inventor
孙秀明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202211661584.8A priority Critical patent/CN115858079A/en
Publication of CN115858079A publication Critical patent/CN115858079A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a data processing method and a device, wherein the method comprises the following steps: identifying interface elements and acquiring a flow control table; judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table; if so, executing an operation driving script and a judgment operation script in the flow control table based on the interface elements so as to archive the target interface; if not, performing fitting operation to obtain an operation result; judging whether the interface element is an operation object or not based on the operation result; and if so, executing the operation driving script and judging the operation script to archive the target interface. By applying the method provided by the invention, the interface can be archived without acquiring the ID of the interface object through an open API and manipulating the interface across the application window.

Description

Data processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data processing method and apparatus.
Background
In the information technology product type selection test, video monitoring needs to be carried out on a test site and part of key test case execution processes, and videos are uploaded, filed and backed up. Due to the fact that monitoring tools are various, monitoring pictures are more, and the video interface to be filed and interface elements are required to be kept consistent in time. Because the operations of surveillance video arrangement, archiving and backup are often required to be carried out on one monitoring station, and the associated operations are carried out on client interfaces of a plurality of monitoring tools. If the correlation operation is needed, the interface element in the interface needs to be intercepted by acquiring the interface object ID through the API, the problems of cross-window execution, technical difference realization of client interfaces of different monitoring tools and the like are involved at the moment, and particularly when the monitoring tool adopts a C/S architecture, the automatic flow is difficult to realize by directly calling the interface element in an automatic script.
Disclosure of Invention
In view of the above, the present invention provides a data processing method, by which an interface object ID and a cross-application window manipulation interface do not need to be obtained through an open API.
The invention also provides a data processing device for ensuring the realization and the application of the method in practice.
A method of data processing, comprising:
identifying interface elements of a target interface and acquiring a preset flow control table;
judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table;
if the interface element is an interface object capable of identifying an interface object ID, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element so as to archive the target interface;
if the interface element is not the interface object with the recognizable interface object ID, executing the fitting operation corresponding to the target interface to obtain an operation result;
judging whether the interface element is an operable object or not based on the operation result;
and if the interface element is an operable object, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table so as to archive the target interface.
Optionally, the method further includes, before identifying the interface element of the target interface:
constructing the flow control table;
acquiring process control parameters uploaded by a user in advance, wherein the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated respectively;
based on the process control parameters, constructing operation driving scripts and judgment operation scripts corresponding to the interface elements to be operated, which are contained in the process control parameters;
and storing each interface element graph to a preset interface element image library, and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
Optionally, in the method, the performing the fitting operation corresponding to the target interface to obtain an operation result includes:
acquiring a target interface element graph corresponding to the interface element in the interface element image library;
acquiring an interface screenshot of the target interface;
and fitting the interface screenshot with the target interface element map to obtain the matching degree of the interface screenshot and the target interface element map, wherein the matching degree is an operation result.
Optionally, the determining, based on the operation result, whether the interface element is an operable object includes:
acquiring a preset standard matching threshold;
judging whether the matching degree of the interface screenshot and the target interface element graph belongs to the standard matching threshold value or not;
if the matching degree of the interface element and the target interface element graph belongs to the standard matching threshold, determining that the interface element is an operable object;
and if the matching degree of the interface element and the target interface element graph does not belong to the standard matching threshold, determining that the interface element is not an operable object.
The above method, optionally, further includes:
and carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
A data processing apparatus comprising:
the identification unit is used for identifying interface elements of the target interface and acquiring a preset flow control table;
the first judging unit is used for judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table;
the first execution unit is used for executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element if the interface element is an interface object capable of identifying an interface object ID so as to archive the target interface;
the second execution unit is used for executing the fitting operation corresponding to the target interface to obtain an operation result if the interface element is not the interface object with the recognizable interface object ID;
a second judging unit, configured to judge whether the interface element is an operable object based on the operation result;
and the third execution unit is used for executing the operation driving script and the judgment operation script corresponding to the target interface in the flow control table if the interface element is an operable object so as to archive the target interface.
The above apparatus, optionally, further comprises:
the first constructing unit is used for constructing the flow control table;
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring process control parameters uploaded by a user in advance, and the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated;
the second construction unit is used for constructing operation driving scripts of all the identifiable interface elements contained in the process control parameters based on the process control parameters;
and the writing unit is used for storing each interface element graph to a preset interface element image library and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
The above apparatus, optionally, the second execution unit includes:
the first obtaining subunit is configured to obtain a target interface element map corresponding to the interface element in the interface element image library;
the second obtaining subunit is used for obtaining an interface screenshot of the target interface;
and the fitting subunit is used for fitting the interface screenshot and the target interface element map to obtain the matching degree of the interface element and the target interface element map, wherein the matching degree is an operation result.
The above apparatus, optionally, the second determining unit includes:
the third acquisition subunit is used for acquiring a preset standard matching threshold;
the judging subunit is used for judging whether the matching degree of the interface screenshot and the target interface element map belongs to the standard matching threshold value;
a first determining subunit, configured to determine that the interface element is an operable object if the matching degree between the interface element and the target interface element map belongs to the standard matching threshold;
and the second determining subunit is used for determining that the interface element is not an operable object if the matching degree of the interface element and the target interface element map does not belong to the standard matching threshold.
The above apparatus, optionally, further comprises:
and the processing unit is used for carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, the storage medium controls a device to execute the data processing method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the data processing method described above.
Compared with the prior art, the invention has the following advantages:
the invention provides a data processing method, which comprises the following steps: identifying interface elements of a target interface and acquiring a preset flow control table; judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on a flow control table; if the interface element is an interface object capable of identifying an interface object ID, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element so as to archive the target interface; if the interface element is not the interface object with the recognizable interface object ID, executing the fitting operation corresponding to the target interface to obtain an operation result; judging whether the interface element is an operation object or not based on the operation result; and if the interface element is an operable object, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table so as to archive the target interface. By applying the method provided by the invention, the interface can be archived without acquiring the ID of the interface object through an open API and manipulating the interface across the application window.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method of a data processing method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method of a data processing method according to an embodiment of the present invention;
FIG. 4 is a block diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
In this application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions, and the terms "comprises", "comprising", or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The invention is operational with numerous general purpose or special purpose computing device environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multi-processor apparatus, distributed computing environments that include any of the above devices or equipment, and the like.
An embodiment of the present invention provides a data processing method, which may be applied to multiple system platforms, where an execution subject of the method may be a computer terminal or a processor of various mobile devices, and a flowchart of the method is shown in fig. 1, and specifically includes:
s101: and identifying interface elements of the target interface and acquiring a preset flow control table.
It should be noted that the target interface may be a monitoring screen that can be viewed by the user, and the interface element is an object operable in monitoring.
Specifically, before identifying the interface element of the target interface, the method may further include:
constructing the flow control table;
acquiring process control parameters uploaded by a user in advance, wherein the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated respectively;
based on the process control parameters, constructing operation driving scripts and judgment operation scripts corresponding to the interface elements to be operated, which are contained in the process control parameters;
and storing each interface element graph to a preset interface element image library, and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
It should also be noted that the flow control table may be an EXCEL or database table for automatically scheduling the operation flow. The flow control table may include contents such as whether the driving interface is an ID-recognizable object, whether the judging interface is an ID-recognizable object, a driving script identifier based on the interface object ID, a judging script identifier based on the interface object ID, an image identifier acquired by the interface, an access path thereof, an operation event corresponding to the image identifier, and a judging state corresponding to the interface identifier.
In the present invention, a flow control table is purchased in advance. And uploading all interface elements needing to be operated, and interface object IDs or interface element graphs corresponding to each interface element in advance by a user. And compiling a corresponding operation driving script and a judgment operation script according to the flow control parameters. And writing the interface object ID, the interface element diagram, the operation driving script and the judgment operation script into the flow control parameters. When some interface elements in the target interface need to be processed, whether the operation is needed or not is determined by identifying the interface elements.
Further, the operation driving script is used for executing driving operation on the interface element, and the judgment operation script is used for judging whether the driving operation of the operation driving script is successful.
S102: and judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table.
In the invention, the ID corresponding to the identifiable interface is obtained from the flow control table, and whether the interface element needs to be operated or not is determined according to the ID of the identifiable interface object.
It should be noted that the interface object refers to an operation interface element on the interface, for which a certain formulation needs to be performed. The processor may determine whether the currently identified interface element is an interface object of the interface object ID by determining from the interface object ID.
If the interface element is an interface object capable of identifying an interface object ID, executing S103; and if the interface identification is not the recognizable interface object ID, executing S104.
S103: and executing the operation driving script and the judgment operation script corresponding to the target interface in the flow control table based on the interface elements so as to archive the target interface.
In the invention, the operation driving script can be used for triggering an interface event and executing an interface operation. The judgment operation script is mainly used for obtaining an operation result of the operation driving script.
S104: and executing the fitting operation corresponding to the target interface to obtain an operation result.
It should be noted that the fitting operation refers to fitting the interface elements in the target interface to the relevant images.
S105: and judging whether the interface element is an operable object or not based on the operation result.
If the interface element is an operable object, if the interface element is changed into an interface object capable of identifying an interface object ID, executing S106; otherwise, the target interface is skipped.
S106: and executing the operation driving script and the judgment operation script corresponding to the target interface in the flow control table so as to archive the target interface.
In the embodiment of the present invention, the execution modes of the operation driver script and the determination operation script in S106 are the same as the execution modes of the operation driver script and the determination operation script in S102.
It should be noted that, in the process of the fitting operation, the interface screenshot of the interface element in the target interface may be captured and stored.
In the method provided by the embodiment of the invention, when the target interface is filed, the interface elements in the target interface are identified, and the flow control table is obtained. Judging whether the interface element is an interface object capable of identifying the ID of the interface object, if so, archiving the interface according to the operation driving script and the judgment operation script; otherwise, the fitting operation is required. And judging whether the interface element is an operable object again through the fitting operation. And if so, executing the operation driving script and judging the operation script to file the target interface to skip the target interface.
By applying the method provided by the embodiment of the invention, the interface object ID and the cross-application window control interface do not need to be obtained through an open API, and the automatic process can be realized.
In the method provided in the embodiment of the present invention, the process of executing the fitting operation corresponding to the target interface and obtaining the operation result is shown in fig. 2, and may specifically include:
s201: and acquiring a target interface element graph corresponding to the interface element in the interface element image library.
It should be noted that a plurality of interface element maps are stored in the interface element image library.
S202: and acquiring an interface screenshot of the target interface.
It should be noted that, when updating to the target interface, the processor may automatically capture the interface screenshot of the target interface.
S203: and fitting the interface screenshot with the target interface element map to obtain the matching degree of the interface screenshot and the target interface element map, wherein the matching degree is an operation result.
In the method provided by the embodiment of the present invention, when it is not possible to determine whether an interface element can be operated, it is necessary to determine whether a user uploads an interface element diagram that needs to be operated on a certain element according to related parameters recorded in a flow control table. Acquiring a saved target interface element graph from an interface element image library; and then capturing the interface screenshot of the interface element on the target interface, and fitting the two images to obtain the matching degree. The matching degree is the operation result.
In the method provided in the embodiment of the present invention, the process of determining whether the interface element is an operable object based on the operation result is shown in fig. 3, and specifically may include:
s301: and acquiring a preset standard matching threshold.
It should be noted that the standard matching threshold may be 95% to 100%.
S302: and judging whether the matching degree of the interface screenshot and the target interface element graph belongs to the standard matching threshold value.
If the matching degree of the interface element and the target interface element graph belongs to the standard matching threshold, executing S303; if the matching degree of the interface element and the target interface element map does not belong to the standard matching threshold, executing S304.
S303: determining that the interface element has changed to an actionable object.
S304: determining that the interface element is not an actionable object.
The method provided by the embodiment of the invention further comprises the following steps:
and carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
It should be noted that, after the gray level processing is performed on the target interface pixel image and the interface screenshot, the resolutions of the two gray level images are consistent. Namely, the gray level processing is performed on the target interface element image and the interface screenshot according to the same resolution.
Based on the method provided by the above embodiment, in the process of data processing, the following execution contents may be included:
1. the operation flow is compiled: and compiling a parameterized operation flow control table (which can be an EXCEL or a database table) for the operation flow scheduling module to automatically schedule the operation flow. The method mainly comprises the contents of whether a driving interface is an interface object capable of identifying an interface ID, whether the driving interface is an object capable of identifying the ID, a driving script identifier based on the interface object ID, a judging script identifier based on the interface object ID, an image identifier collected by the interface, an access path of the image identifier, an operation event corresponding to the image identifier, a judging state corresponding to the interface identifier and the like.
2. Preparing an event script: for the recognizable interface object ID, it is not necessary to collect the interface image, and an automatic script including an operation driving script and a decision operation script (for the execution of the 8 th point and the 10 th point described below) is prepared by recording or manual preparation.
3. Collecting and processing interface images: the method comprises the steps of collecting an image for identifying a specific interface object (interface element) through an interface screenshot tool, and converting an original image into a uniform and standard black and white pixel image so as to reduce storage requirements and improve calculation efficiency in a subsequent image fitting operation process. And storing the processed image and the parameters thereof in an interface element image library, and taking the image identifier and the access path as parameters to be reflected in a flow control table.
4. Interface element identification: and for the interface object ID which can be recognized by the driving interface, executing the following point 5 directly based on the interface object identification in the flow control table, otherwise acquiring the interface object coordinate data required for executing the point 8 through the following points 6 and 7.
5. Event script operation: and for the interface event which can directly identify the ID of the interface object, directly calling an automatic script to complete the submission operation of the interface event.
6. Collecting images of an operation interface: and acquiring the image of the current specific application window or the current screen according to the arrangement of the operation flow, and carrying out gray processing on the image. For identifying the driver interface elements by means of an image fitting method.
7. And (3) operation interface element image fitting: and according to the arrangement of the operation flow, performing image fitting on the driving interface element image responded in the interface element image library and the interface image acquired from the 6 th point, and if the fitting degree reaches a judgment standard, outputting the position information of the interface element image in the driving interface to the 8 th point to finish the interface operation simulation action.
8. And (3) interface operation simulation: and according to the interface element positioning information given by the 7 th point and the operation process arrangement, completing the simulation of events such as responding mouse operation or keyboard operation and the like, and realizing the process driving.
9. And (3) interface operation result judgment: and for the interface object ID which can be identified by the judgment interface, judging the result at the 10 th point directly based on the object identification in the parameter table, otherwise, judging the simulation result of the event operation through the 11 th point and the 12 th point.
10. Result decision script operation: and directly calling the automatic script for a result interface capable of directly identifying the ID of the object, and judging whether the event operation result meets the expectation according to the value of the response object on the interface.
11. And response interface image acquisition: and acquiring the image of the current specific application window or the current screen according to the arrangement of the operation flow, and carrying out gray processing on the image. For determination of the result of the operation.
12. And response interface element image fitting: and according to the arrangement of the operation flow, carrying out image fitting on the corresponding response interface element image in the interface element image library and the response interface image obtained from the 11 th point, and judging whether the event operation result meets the expectation according to whether the fitting degree reaches a judgment standard.
The specific implementation procedures and derivatives thereof of the above embodiments are within the scope of the present invention.
Corresponding to the method described in fig. 1, an embodiment of the present invention further provides a data processing apparatus, which is used for implementing the method in fig. 1 specifically, the data processing apparatus provided in the embodiment of the present invention may be applied to a computer terminal or various mobile devices, and a schematic structural diagram of the data processing apparatus is shown in fig. 4, and specifically includes:
the identifying unit 401 is configured to identify an interface element of a target interface and obtain a preset flow control table;
a first judging unit 402, configured to judge whether the interface element is an interface object capable of identifying an interface object ID based on the flow control table;
a first executing unit 403, configured to, if the interface element is an interface object capable of identifying an interface object ID, execute, based on the interface element, an operation driving script and a judgment operation script corresponding to the target interface in the flow control table, so as to archive the target interface;
a second executing unit 404, configured to, if the interface element is an interface object of a non-recognizable interface object ID, execute a fitting operation corresponding to the target interface to obtain an operation result;
a second judging unit 405, configured to judge whether the interface element is an operable object based on the operation result;
a third executing unit 406, configured to execute the operation driving script and the judgment operation script corresponding to the target interface in the flow control table if the interface element is an operable object, so as to archive the target interface.
In the device provided by the embodiment of the invention, when the target interface is filed, the interface elements in the target interface are identified, and the flow control table is obtained. Judging whether the interface element is an interface object capable of identifying the ID of the interface object, if so, archiving the interface according to the operation driving script and the judgment operation script; otherwise, the fitting operation is required. And judging whether the interface element can operate the object or not through the secondary fitting operation. And if so, executing the operation driving script and judging the operation script to file the target interface.
By applying the device provided by the embodiment of the invention, the interface object ID and the cross-application window control interface do not need to be obtained through an open API, and an automatic process can be realized.
The device provided by the embodiment of the invention further comprises:
the first constructing unit is used for constructing the flow control table;
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring process control parameters uploaded by a user in advance, and the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated;
the second construction unit is used for constructing operation driving scripts of all the identifiable interface elements contained in the process control parameters based on the process control parameters;
and the writing unit is used for storing each interface element graph to a preset interface element image library and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
In the apparatus provided in the embodiment of the present invention, the second execution unit includes:
the first obtaining subunit is configured to obtain a target interface element map corresponding to the interface element in the interface element image library;
the second obtaining subunit is used for obtaining an interface screenshot of the target interface;
and the fitting subunit is configured to fit the interface screenshot and the target interface element map to obtain a matching degree of the interface element and the target interface element map, where the matching degree is an operation result.
In the apparatus provided in an embodiment of the present invention, the second determining unit includes:
the third acquisition subunit is used for acquiring a preset standard matching threshold;
the judging subunit is used for judging whether the matching degree of the interface screenshot and the target interface element map belongs to the standard matching threshold value;
a first determining subunit, configured to determine that the interface element is an operable object if the matching degree between the interface element and the target interface element map belongs to the standard matching threshold;
and the second determining subunit is used for determining that the interface element is not an operable object if the matching degree of the interface element and the target interface element map does not belong to the standard matching threshold.
The device provided by the embodiment of the invention further comprises:
and the processing unit is used for carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
A storage medium, the storage medium comprising stored instructions, wherein when the instructions are executed, the storage medium controls a device to execute the data processing method.
An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the data processing method described above.
For specific working processes of each unit and sub-unit in the data processing apparatus disclosed in the above embodiment of the present invention, reference may be made to corresponding contents in the data processing method disclosed in the above embodiment of the present invention, and details are not described here again.
The embodiment of the invention also provides a storage medium, which comprises a stored instruction, wherein when the instruction runs, the device where the storage medium is located is controlled to execute the data processing method.
An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 5, which specifically includes a memory 501 and one or more instructions 502, where the one or more instructions 502 are stored in the memory 501, and are configured to be executed by one or more processors 503 to perform the following operations according to the one or more instructions 502:
identifying interface elements of a target interface and acquiring a preset flow control table;
judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table;
if the interface element is an interface object capable of identifying an interface object ID, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element so as to archive the target interface;
if the interface element is not the interface object with the recognizable interface object ID, executing the fitting operation corresponding to the target interface to obtain an operation result;
judging whether the interface element is an operable object or not based on the operation result;
and if the interface element is an operable object, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table so as to archive the target interface.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
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.
To clearly illustrate this interchangeability of hardware and software, various illustrative components and steps have been described above generally in terms of their functionality. 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 previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method, comprising:
identifying interface elements of a target interface and acquiring a preset flow control table;
judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table;
if the interface element is an interface object capable of identifying an interface object ID, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element so as to archive the target interface;
if the interface element is not the interface object with the recognizable interface object ID, executing the fitting operation corresponding to the target interface to obtain an operation result;
judging whether the interface element is an operable object or not based on the operation result;
and if the interface element is an operable object, executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table so as to archive the target interface.
2. The method of claim 1, wherein prior to identifying the interface element of the target interface, further comprising:
constructing the flow control table;
acquiring process control parameters uploaded by a user in advance, wherein the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated respectively;
based on the process control parameters, constructing operation driving scripts and judgment operation scripts corresponding to the interface elements to be operated, which are contained in the process control parameters;
and storing each interface element graph to a preset interface element image library, and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
3. The method according to claim 2, wherein the performing the fitting operation corresponding to the target interface to obtain an operation result comprises:
acquiring a target interface element graph corresponding to the interface element in the interface element image library;
acquiring an interface screenshot of the target interface;
and fitting the interface screenshot with the target interface element map to obtain the matching degree of the interface screenshot and the target interface element map, wherein the matching degree is an operation result.
4. The method according to claim 3, wherein the determining whether the interface element is an operable object based on the operation result comprises:
acquiring a preset standard matching threshold;
judging whether the matching degree of the interface screenshot and the target interface element graph belongs to the standard matching threshold value or not;
if the matching degree of the interface element and the target interface element graph belongs to the standard matching threshold, determining that the interface element is an operable object;
and if the matching degree of the interface element and the target interface element graph does not belong to the standard matching threshold, determining that the interface element is not an operable object.
5. The method of claim 3, further comprising:
and carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
6. A data processing apparatus, comprising:
the identification unit is used for identifying interface elements of the target interface and acquiring a preset flow control table;
the first judging unit is used for judging whether the interface element is an interface object capable of identifying the ID of the interface object or not based on the flow control table;
the first execution unit is used for executing an operation driving script and a judgment operation script corresponding to the target interface in the flow control table based on the interface element if the interface element is an interface object capable of identifying an interface object ID so as to archive the target interface;
the second execution unit is used for executing the fitting operation corresponding to the target interface to obtain an operation result if the interface element is not the interface object with the recognizable interface object ID;
a second judging unit, configured to judge whether the interface element is an operable object based on the operation result;
and the third execution unit is used for executing the operation driving script and the judgment operation script corresponding to the target interface in the flow control table if the interface element is an operable object so as to archive the target interface.
7. The apparatus of claim 6, further comprising:
the first constructing unit is used for constructing the flow control table;
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring process control parameters uploaded by a user in advance, and the process control parameters comprise interface object IDs or interface element graphs corresponding to a plurality of interface elements to be operated;
the second construction unit is used for constructing operation driving scripts of all the identifiable interface elements contained in the process control parameters based on the process control parameters;
and the writing unit is used for storing each interface element graph to a preset interface element image library and writing the interface object ID, the interface element graph, the operation driving script and the judgment operation script of each interface element to be operated into the flow control table.
8. The apparatus of claim 7, wherein the second execution unit comprises:
the first obtaining subunit is configured to obtain a target interface element map corresponding to the interface element in the interface element image library;
the second obtaining subunit is used for obtaining an interface screenshot of the target interface;
and the fitting subunit is used for fitting the interface screenshot and the target interface element map to obtain the matching degree of the interface screenshot and the target interface element map, wherein the matching degree is an operation result.
9. The apparatus of claim 8, wherein the second determining unit comprises:
the third acquisition subunit is used for acquiring a preset standard matching threshold;
the judging subunit is used for judging whether the matching degree of the interface screenshot and the target interface element map belongs to the standard matching threshold value;
a first determining subunit, configured to determine that the interface element is an operable object if the matching degree between the interface element and the target interface element map belongs to the standard matching threshold;
and the second determining subunit is used for determining that the interface element is not an operable object if the matching degree of the interface element and the target interface element map does not belong to the standard matching threshold.
10. The apparatus of claim 8, further comprising:
and the processing unit is used for carrying out gray processing on the target interface element image and the interface screenshot to obtain gray images corresponding to the target interface element image and the interface screenshot respectively.
CN202211661584.8A 2022-12-23 2022-12-23 Data processing method and device Pending CN115858079A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211661584.8A CN115858079A (en) 2022-12-23 2022-12-23 Data processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211661584.8A CN115858079A (en) 2022-12-23 2022-12-23 Data processing method and device

Publications (1)

Publication Number Publication Date
CN115858079A true CN115858079A (en) 2023-03-28

Family

ID=85654116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211661584.8A Pending CN115858079A (en) 2022-12-23 2022-12-23 Data processing method and device

Country Status (1)

Country Link
CN (1) CN115858079A (en)

Similar Documents

Publication Publication Date Title
CN108874268B (en) User behavior data acquisition method and device
US11080844B2 (en) System and method for testing an electronic device
CN113593071A (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
CN107045475B (en) Test method and device
CN113138925A (en) Function test method and device of application program, computer equipment and storage medium
CN112423135B (en) Information processing method, apparatus, computer device and storage medium for video playback
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN111310351A (en) Method and device for monitoring state of workshop equipment, terminal equipment and storage medium
CN112711536A (en) Automatic dial testing method and system, and computer readable storage medium
CN114253824A (en) Game compatibility testing method and system
CN115858079A (en) Data processing method and device
CN116662193A (en) Page testing method and device
CN110659376A (en) Picture searching method and device, computer equipment and storage medium
CN111258875A (en) Interface test method and system, electronic device and storage medium
JP7338791B2 (en) User operation recording device and user operation recording method
CN113468048A (en) System testing method, device, equipment and computer readable storage medium
CN106775701B (en) Client automatic evidence obtaining method and system
CN111931465A (en) Method and system for automatically generating user manual based on user operation
CN116185411B (en) RPA interface determination method, RPA interface determination device, computer equipment and storage medium
CN112437224B (en) Camera data processing method and device, computer equipment and storage medium
CN112596752B (en) Internet of things method and system for electronic evidence obtaining equipment
CN116382721B (en) Screen recording method and screen recording device of intelligent interaction panel
JP2018093357A (en) Information processing apparatus, information processing method, program
JP2018107775A (en) Information processing device, and control method and program thereof
CN113010060A (en) Task execution method, device and equipment of application program and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination