CN113342627A - Application service monitoring method and monitoring system of terminal - Google Patents

Application service monitoring method and monitoring system of terminal Download PDF

Info

Publication number
CN113342627A
CN113342627A CN202110601209.3A CN202110601209A CN113342627A CN 113342627 A CN113342627 A CN 113342627A CN 202110601209 A CN202110601209 A CN 202110601209A CN 113342627 A CN113342627 A CN 113342627A
Authority
CN
China
Prior art keywords
picture
monitoring system
application service
terminal
target application
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.)
Granted
Application number
CN202110601209.3A
Other languages
Chinese (zh)
Other versions
CN113342627B (en
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.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN202110601209.3A priority Critical patent/CN113342627B/en
Publication of CN113342627A publication Critical patent/CN113342627A/en
Application granted granted Critical
Publication of CN113342627B publication Critical patent/CN113342627B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3438Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment monitoring of user actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Computer Hardware Design (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the field of financial technology (Fintech), and discloses a method and a system for monitoring application services of a terminal, wherein the monitoring system sends a test operation instruction to the terminal; the test operation instruction is used for indicating an automatic test tool positioned in the terminal to run the target application service in the terminal according to the test operation instruction; the monitoring system receives a first picture sent by a terminal; the first picture is a screenshot of an actual page of the target application service after responding to the test operation instruction; the monitoring system determines whether the target application service is abnormal or not according to the first picture and the reference picture; the reference picture is a preset page screenshot of the target application service after responding to the test operation instruction. In this way, when the monitoring system determines whether the target application service responds to the operation instruction according to the intention designed by the developer, the calculation amount is not large, and the whole determination process is more flexible.

Description

Application service monitoring method and monitoring system of terminal
Technical Field
The embodiment of the application relates to the field of financial technology (Fintech), in particular to an application service monitoring method and system of a terminal.
Background
With the development of computer technology, more and more technologies (such as big data, cloud computing or block chain) are applied in the financial field, and the traditional financial industry is gradually shifting to the financial technology. In the context of big data technology, it is often necessary to monitor the availability of services, i.e. to make service dial tests.
Among them, APP (Application) dial testing is a common type of service dial testing. The realization process of APP dialing test is as follows: for terminals located in different geographic positions, belonging to different network environments and having different equipment types, the APP installed on the terminal can initiate a network request to the server side and receive a response result returned by the server side about the network request. When the APP receives a response result returned by the server, the APP can report the response result to the monitoring system; the availability of the APP can then be determined by analyzing the collected response results by the monitoring system.
The above APP dial test range includes, in addition to detecting the availability of the server port, a detection item for displaying whether the APP has an intention designed by the developer. At present, when detecting whether an APP is displayed according to the intention designed by a developer, page screenshots (namely operation screenshots) of the APP in an APP dial test scene after an operation instruction is operated are mainly compared with page screenshots (namely preset screenshots) of the APP designed by the developer after the same operation instruction is operated, if the two screenshots are the same, the APP is determined to be normal, otherwise, the APP is determined to be abnormal.
Obviously, in the APP dialing test process, it is determined whether the APP has a problem of displaying according to the intention designed by the developer, and a process of calculating whether the running screenshot and the preset screenshot are the same screenshot needs to consume a large amount of calculation, and the determination method is not so flexible.
Disclosure of Invention
The application provides a monitoring method and a monitoring system for an application service of a terminal, which are used for solving the problems of large calculation amount and inflexible detection mode when content is detected in a service dial testing process.
In a first aspect, an embodiment of the present application provides an application service monitoring method for a terminal, where the method includes: the monitoring system sends a test operation instruction to the terminal; the test operation instruction is used for indicating an automatic test tool in the terminal to operate a target application service in the terminal according to the test operation instruction; the monitoring system receives a first picture sent by the terminal; the first picture is an actual page screenshot of the target application service after responding to the test operation instruction; the monitoring system determines a second picture matched with a reference picture from the first picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction; and the monitoring system determines whether the target application service is abnormal or not according to the image similarity of the second picture and the reference picture.
Based on the scheme, a test operation instruction is sent to the terminal through the monitoring system, the test operation instruction is used for instructing an automatic test tool located in the terminal to operate a target application service in the terminal according to the test operation instruction, a corresponding operation result can be generated after the target application service is automatically operated, at the moment, the terminal captures a page where the operation result is located and takes the captured image as a first picture, the first picture is sent to the monitoring system, and finally, after the monitoring system receives the first picture, the monitoring system can determine whether the target application service is abnormal or not according to the first picture and a reference picture. The reference picture represents the part of the fixed content in the preset page screenshot after the target application service responds to the same test operation instruction, and in view of the fact that the selection of the part of the fixed content is relatively flexible and the selected part of the fixed content is a subset of the preset page screenshot, when the monitoring system determines whether the target application service responds to the operation instruction according to the intention designed by a developer, the calculation amount consumed by the monitoring system is not large, and the whole determination process is more flexible.
In a possible implementation method, before the monitoring system sends the test operation instruction to the terminal, the method further includes: the monitoring system sends starting information to the terminal, and the starting information is used for starting a log acquisition module in the terminal; the log acquisition module is used for acquiring a log file corresponding to the target application service in real time; and the monitoring system receives the log file sent by the terminal and determines whether the target application service is abnormal in operation according to the log file.
When the current APP dial testing technology is realized, monitoring SDKs (Software Development kits) are integrated in the APP, so that embedded point logs printed by developers are continuously collected through the SDKs, the operation logs are continuously sent to a monitoring system, and the monitoring system realizes monitoring of the APP through checking reported log contents so as to know the operation condition of the APP. However, in this method, when the APP is abnormal or the APP itself is dead due to other reasons, the APP cannot continue to report its own log to the monitoring system, which results in failure of the monitoring system in monitoring the running condition of the APP. Aiming at the problem, the scheme provides that a log acquisition module for acquiring the logs corresponding to the APP operation condition is arranged in the terminal, the logs corresponding to the application service operation condition in the terminal are acquired by the log acquisition module in real time, and the acquired logs are sent to the monitoring system, so that the monitoring system can judge whether the monitored application service has the abnormal operation condition according to the received log content. In the method, the log collection module is selected to be arranged in the terminal instead of integrating the log reporting module in the application service (for example, integrating the monitoring SDK in the APP), so that the problem that the monitoring process of the monitoring system on the operation condition of the application service is invalid due to the fact that the operation log cannot be sent to the monitoring system when the application service is abnormally operated can be solved.
In one possible implementation method, the determining, by the monitoring system, a second picture matching a reference picture from the first pictures includes: the monitoring system determines an area, the matching degree of which meets a first set requirement, of the reference picture under the gray scale image from the first picture, and the area is used as a second picture; the monitoring system determines whether the target application service is abnormal or not according to the image similarity between the second picture and the reference picture, and the method comprises the following steps: and the monitoring system determines whether the target application service is abnormal or not according to the similarity of the second picture and the reference picture in each set color channel.
Based on the scheme, when the monitoring system determines whether the target application service is abnormal or not based on the fact that the first picture and the reference picture are received, the monitoring system firstly matches an area, the matching degree of which meets the first setting requirement, with the reference picture from the first picture and uses the area as a second picture when the first picture and the reference picture are both gray pictures, and finally the monitoring system calculates the similarity of the second picture and the reference picture under each set color channel so as to determine whether the target application service is abnormal or not. According to the method, the second picture meeting the requirements is matched from the first picture under the condition of the gray-scale image, instead of the second picture meeting the requirements on the basis of the condition of the color picture, so that the calculated amount can be greatly reduced, the identification efficiency of whether the monitoring system responds to the target application service according to the intention designed by a developer is effectively improved, and the monitoring system is also helpful for quickly judging whether the target application service is abnormal.
In one possible implementation method, the monitoring system determines, from the first picture, an area whose matching degree with the reference picture under a grayscale map meets a first setting requirement, and uses the area as a second picture, including: the monitoring system respectively converts the first picture and the reference picture into a first gray picture and a second gray picture; the monitoring system determines the matching degree of the second gray scale picture in each area of the first gray scale picture according to a preset translation mode; and the monitoring system correspondingly intercepts the first picture according to the region with the maximum matching degree in the matching degrees of the regions, and determines the first picture as a second picture.
Based on the scheme, when the monitoring system determines a second picture meeting the requirement from the first picture, the first picture and the reference picture can be converted into pictures under the condition of the gray-scale picture, namely, the first gray-scale picture and the second gray-scale picture are respectively converted, then the monitoring system can translate the second gray-scale picture on the first gray-scale picture in a preset translation mode, so that the monitoring system can calculate the matching degree of the second gray-scale picture in each area on the first gray-scale picture, finally, the monitoring system can take the area corresponding to the matching degree of the maximum value in the calculated matching degrees as an interception reference, and intercept the area with the same position from the first picture according to the interception reference, so that the intercepted picture can be taken as the second picture. According to the method, the second picture meeting the requirements is matched from the first picture under the condition of the gray-scale image, instead of the second picture meeting the requirements on the basis of the condition of the color picture, so that the calculated amount can be greatly reduced, the identification efficiency of whether the monitoring system responds to the target application service according to the intention designed by a developer is effectively improved, and the monitoring system is also helpful for quickly judging whether the target application service is abnormal.
In a possible implementation method, the determining, by the monitoring system, whether the target application service is abnormal according to the similarity of the second picture and the reference picture in each set color channel includes: the monitoring system determines the pixel similarity of a first pixel point and a second pixel point under any set color channel according to the first pixel point and the second pixel point under the set color channel; the first pixel points and the second pixel points are pixel points of the second picture and the reference picture at the same position respectively; determining the image similarity of the second picture and the reference picture under the set color channel according to the pixel similarity between the pixel points; and if the monitoring system determines that the image similarity with the minimum image similarity under each set color channel meets a second set requirement, determining that the target application service is normal.
Based on the scheme, after the monitoring system determines a second picture meeting the requirement from the first picture based on the condition of the gray picture, the monitoring system can determine the pixel similarity of a group of pixel points at the same position on the second picture and the reference picture in the set color channel aiming at any set color channel under each set color channel, further determine the image similarity of the two pictures (the second picture and the reference picture) in the set color channel according to the pixel similarity between the pixel points, finally the monitoring system can compare the minimum image similarity in the determined image similarities with the second set requirement, and when the minimum image similarity meets the second set requirement, the monitoring system can determine that the target application service is normal. In the method, the image similarity of the second picture which is the same as the color picture and the reference picture in each set color channel is calculated, and the image similarity of the minimum value is compared with the second set requirement, so that when the image similarity of the minimum value can meet the second set requirement, the image similarity of the rest set color channels can also meet the second set requirement, and therefore, the efficiency of the monitoring system for judging whether the target application service is abnormal can be improved.
In a possible implementation method, determining a pixel similarity of the first pixel point and the second pixel point in the set color channel includes: the monitoring system respectively performs normalization processing on the first pixel points and the second pixel points to obtain first coordination pixels and second coordination pixels of the first pixel points and the second pixel points under the set color channels; and the monitoring system performs linear correlation processing on the first coordination pixel and the second coordination pixel to obtain the pixel similarity of the first pixel and the second pixel under the set color channel.
Based on the scheme, in the process of determining the pixel similarity of a group of pixel points at the same position on the second picture and the reference picture under any set color channel, the monitoring system firstly performs normalization processing on each pixel point in the group of pixel points to obtain corresponding coordination pixels, and finally performs linear correlation processing on each group of coordination pixels to determine the pixel similarity of the group of pixel points under the set color channel. In the method, the second picture and the reference picture are standardized by normalizing the pixel points, that is, the brightness can no longer be an influence factor for determining the pixel similarity of the two pictures in the set color channel, so that the monitoring system can completely perform the process based on the content when judging whether the target application service is abnormal or not, but not other factors, and the accuracy of judging whether the target application service is abnormal or not by the monitoring system is improved.
In one possible implementation, the monitoring system sends a test termination instruction to the terminal; the test termination instruction is generated after the monitoring system determines that the target application service is abnormal, and the test termination instruction is used for indicating the automatic test tool to stop running the target application service; and the monitoring system sends termination information to the terminal, wherein the termination information is used for terminating the real-time collection of the log files by the log collection module.
Based on the scheme, in the process that the monitoring system monitors the target application service, if the target application service is determined to be abnormal, the monitoring system can send a test termination instruction to the terminal to indicate the automatic test tool to stop running the target application service, and can send termination information to the terminal to terminate the real-time collection behavior of the log collection module on the log file. By the method, the resources of the terminal can be effectively saved.
In a second aspect, an embodiment of the present application provides a monitoring system, including: the receiving and sending unit is used for sending a test operation instruction to the terminal; the test operation instruction is used for indicating an automatic test tool in the terminal to operate a target application service in the terminal according to the test operation instruction; the receiving and sending unit is further used for receiving a first picture sent by the terminal; the first picture is an actual page screenshot of the target application service after responding to the test operation instruction; the matching unit is used for determining a second picture matched with a reference picture from the first picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction; and the processing unit is used for determining whether the target application service is abnormal or not according to the image similarity of the second picture and the reference picture.
Based on the scheme, a test operation instruction is sent to the terminal through the monitoring system, the test operation instruction is used for instructing an automatic test tool located in the terminal to operate a target application service in the terminal according to the test operation instruction, a corresponding operation result can be generated after the target application service is automatically operated, at the moment, the terminal captures a page where the operation result is located and takes the captured image as a first picture, the first picture is sent to the monitoring system, and finally, after the monitoring system receives the first picture, the monitoring system can determine whether the target application service is abnormal or not according to the first picture and a reference picture. The reference picture represents the part of the fixed content in the preset page screenshot after the target application service responds to the same test operation instruction, and in view of the fact that the selection of the part of the fixed content is relatively flexible and the selected part of the fixed content is a subset of the preset page screenshot, when the monitoring system determines whether the target application service responds to the operation instruction according to the intention designed by a developer, the calculation amount consumed by the monitoring system is not large, and the whole determination process is more flexible.
In a possible implementation method, the transceiver unit is further configured to: sending starting information to the terminal, wherein the starting information is used for starting a log acquisition module in the terminal; the log acquisition module is used for acquiring a log file corresponding to the target application service in real time; and receiving the log file sent by the terminal, and determining whether the target application service is abnormal in operation according to the log file.
When the current APP dial testing technology is realized, monitoring SDKs (Software Development kits) are integrated in the APP, so that embedded point logs printed by developers are continuously collected through the SDKs, the operation logs are continuously sent to a monitoring system, and the monitoring system realizes monitoring of the APP through checking reported log contents so as to know the operation condition of the APP. However, in this method, when the APP is abnormal or the APP itself is dead due to other reasons, the APP cannot continue to report its own log to the monitoring system, which results in failure of the monitoring system in monitoring the running condition of the APP. Aiming at the problem, the scheme provides that a log acquisition module for acquiring the logs corresponding to the APP operation condition is arranged in the terminal, the logs corresponding to the application service operation condition in the terminal are acquired by the log acquisition module in real time, and the acquired logs are sent to the monitoring system, so that the monitoring system can judge whether the monitored application service has the abnormal operation condition according to the received log content. In the method, the log collection module is selected to be arranged in the terminal instead of integrating the log reporting module in the application service (for example, integrating the monitoring SDK in the APP), so that the problem that the monitoring process of the monitoring system on the operation condition of the application service is invalid due to the fact that the operation log cannot be sent to the monitoring system when the application service is abnormally operated can be solved.
In a possible implementation method, the matching unit is specifically configured to: determining an area with matching degree meeting a first set requirement with the reference picture under a gray scale image from the first picture, and taking the area as a second picture; the processing unit is specifically configured to: and determining whether the target application service is abnormal or not according to the similarity of the second picture and the reference picture under each set color channel.
Based on the scheme, when the monitoring system determines whether the target application service is abnormal or not based on the fact that the first picture and the reference picture are received, the monitoring system firstly matches an area, the matching degree of which meets the first setting requirement, with the reference picture from the first picture and uses the area as a second picture when the first picture and the reference picture are both gray pictures, and finally the monitoring system calculates the similarity of the second picture and the reference picture under each set color channel so as to determine whether the target application service is abnormal or not. According to the method, the second picture meeting the requirements is matched from the first picture under the condition of the gray-scale image, instead of the second picture meeting the requirements on the basis of the condition of the color picture, so that the calculated amount can be greatly reduced, the identification efficiency of whether the monitoring system responds to the target application service according to the intention designed by a developer is effectively improved, and the monitoring system is also helpful for quickly judging whether the target application service is abnormal.
In a possible implementation method, the matching unit is specifically configured to: converting the first picture and the reference picture into a first gray picture and a second gray picture respectively; determining the matching degree of the second gray scale picture in each area of the first gray scale picture according to a preset translation mode; and correspondingly intercepting the first picture according to the area with the maximum matching degree in the matching degrees of the areas, and determining the first picture as a second picture.
Based on the scheme, when the monitoring system determines a second picture meeting the requirement from the first picture, the first picture and the reference picture can be converted into pictures under the condition of the gray-scale picture, namely, the first gray-scale picture and the second gray-scale picture are respectively converted, then the monitoring system can translate the second gray-scale picture on the first gray-scale picture in a preset translation mode, so that the monitoring system can calculate the matching degree of the second gray-scale picture in each area on the first gray-scale picture, finally, the monitoring system can take the area corresponding to the matching degree of the maximum value in the calculated matching degrees as an interception reference, and intercept the area with the same position from the first picture according to the interception reference, so that the intercepted picture can be taken as the second picture. According to the method, the second picture meeting the requirements is matched from the first picture under the condition of the gray-scale image, instead of the second picture meeting the requirements on the basis of the condition of the color picture, so that the calculated amount can be greatly reduced, the identification efficiency of whether the monitoring system responds to the target application service according to the intention designed by a developer is effectively improved, and the monitoring system is also helpful for quickly judging whether the target application service is abnormal.
In a possible implementation method, the processing unit is specifically configured to: aiming at a first pixel point and a second pixel point under any set color channel, determining the pixel similarity of the first pixel point and the second pixel point under the set color channel; the first pixel points and the second pixel points are pixel points of the second picture and the reference picture at the same position respectively; determining the image similarity of the second picture and the reference picture under the set color channel according to the pixel similarity between the pixel points; and if the image similarity with the minimum image similarity under each set color channel meets a second set requirement, determining that the target application service is normal.
Based on the scheme, after the monitoring system determines a second picture meeting the requirement from the first picture based on the condition of the gray picture, the monitoring system can determine the pixel similarity of a group of pixel points at the same position on the second picture and the reference picture in the set color channel aiming at any set color channel under each set color channel, further determine the image similarity of the two pictures (the second picture and the reference picture) in the set color channel according to the pixel similarity between the pixel points, finally the monitoring system can compare the minimum image similarity in the determined image similarities with the second set requirement, and when the minimum image similarity meets the second set requirement, the monitoring system can determine that the target application service is normal. In the method, the image similarity of the second picture which is the same as the color picture and the reference picture in each set color channel is calculated, and the image similarity of the minimum value is compared with the second set requirement, so that when the image similarity of the minimum value can meet the second set requirement, the image similarity of the rest set color channels can also meet the second set requirement, and therefore, the efficiency of the monitoring system for judging whether the target application service is abnormal can be improved.
In a possible implementation method, the processing unit is specifically configured to: respectively carrying out normalization processing on the first pixel points and the second pixel points to obtain first coordination pixels and second coordination pixels of the first pixel points and the second pixel points under the set color channels; and performing linear correlation processing on the first coordination pixel and the second coordination pixel to obtain the pixel similarity of the first pixel point and the second pixel point under the set color channel.
Based on the scheme, in the process of determining the pixel similarity of a group of pixel points at the same position on the second picture and the reference picture under any set color channel, the monitoring system firstly performs normalization processing on each pixel point in the group of pixel points to obtain corresponding coordination pixels, and finally performs linear correlation processing on each group of coordination pixels to determine the pixel similarity of the group of pixel points under the set color channel. In the method, the second picture and the reference picture are standardized by normalizing the pixel points, that is, the brightness can no longer be an influence factor for determining the pixel similarity of the two pictures in the set color channel, so that the monitoring system can completely perform the process based on the content when judging whether the target application service is abnormal or not, but not other factors, and the accuracy of judging whether the target application service is abnormal or not by the monitoring system is improved.
In a possible implementation method, the transceiver unit is further configured to: sending a test termination instruction to the terminal; the test termination instruction is generated after the monitoring system determines that the target application service is abnormal, and the test termination instruction is used for indicating the automatic test tool to stop running the target application service; and sending termination information to the terminal, wherein the termination information is used for terminating the real-time collection of the log files by the log collection module.
Based on the scheme, in the process that the monitoring system monitors the target application service, if the target application service is determined to be abnormal, the monitoring system can send a test termination instruction to the terminal to indicate the automatic test tool to stop running the target application service, and can send termination information to the terminal to terminate the real-time collection behavior of the log collection module on the log file. By the method, the resources of the terminal can be effectively saved.
In a third aspect, an embodiment of the present application provides a computing device, including:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory and executing the implementation method of the first aspect according to the obtained program.
In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the method according to any one of the first aspects.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a possible system architecture provided by an embodiment of the present application;
fig. 2 is a method for monitoring an application service of a terminal according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a preset page screenshot provided in an embodiment of the present application;
fig. 4 is a schematic diagram of three reference pictures provided in an embodiment of the present application;
fig. 5 is a schematic diagram of determining a most similar region under a gray scale map according to an embodiment of the present application;
fig. 6 is a monitoring system provided in an embodiment of the present application;
fig. 7 is a computing device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all 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 application.
The APP dial test is a specific example of a service dial test, and the range of the current APP dial test includes, in addition to detecting the availability of the server-side interface, a detection item for displaying whether the APP has the intention designed by the developer. The method comprises the steps of calculating whether an operation screenshot and a preset screenshot are the same screenshot or not by aiming at the problem that whether the APP is displayed according to the intention designed by a developer or not in the APP dialing and testing process, and consuming a large amount of calculation, wherein the judging mode is not flexible.
In summary, the existing service dial testing technology has the disadvantages of large calculation amount and inflexible testing method when testing content.
In view of the above technical problem, the present application provides a possible system architecture, as shown in fig. 1, which includes a terminal 110 and a monitoring system 120. The terminal may be a smart phone, a computer, an Ipad, or other devices, and the monitoring system 120 may be an independent server or a server cluster formed by multiple servers, which is not limited in this application.
The terminal 110 may include at least one application service 1101, an automated testing tool 1102, and a log collection module 1103 therein. Wherein:
the application services 1101 may include types of APP, applet, WEBAPP, and the like.
The automated test tool 1102 may be adaptively selected based on the operating system of the terminal 110. For example, when the operating system of the terminal 110 is an Android system, the automated testing tool 1102 may be an ADB (Android Debug Bridge), where the ADB is an official Android Debug tool of Google and can play a role of a Debug Bridge, and debugging and control of a terminal adopting the Android system can be freely realized through the ADB; when the operating system of the terminal 110 is an iOS system, the automatic test tool 1102 may be a WebDriverAgent, where the WebDriverAgent is an iOS mobile test framework released by Facebook, and a WebDriver server is implemented at the iOS end, and with the help of the server, the iOS device may be remotely controlled to implement debugging and control of the terminal using the iOS system.
Further, the automatic test tool 1102 may be configured to receive a test operation instruction sent by the monitoring system 120, where the test operation instruction is used to instruct the automatic test tool 1102 to operate an application service, which is targeted by the test operation instruction and installed in the terminal 110, where the application service is the target application service. After the automated testing tool 1102 operates the target application service according to the test operation instruction, the terminal 110 may capture a screenshot of a response page after the target application service is operated and send the screenshot to the monitoring system 120 as a first picture, and the monitoring system 120 determines whether the target application service really responds according to an intention designed by a developer. The automated testing tool 1102 may further be configured to receive a test termination instruction sent by the monitoring system 120, where the test termination instruction is sent by the monitoring system 120 to the automated testing tool 1102 after determining that the target application service is abnormal, and the test termination instruction is used to instruct the automated testing tool 1102 to stop running the target application service.
The log collection module 1103 is disposed within the terminal 110, rather than being integrated in the application service 1101. The log collection module 1103 may be configured to feed back, to the monitoring system 120, a log file formed by collecting a log corresponding to the running state of the application service 1101, so that the monitoring system 120 determines whether the application service 1101 is abnormal in the running process. The log collection module 1103 may receive start information sent by the monitoring system 120, where the start information is sent to the log collection module 1103 before the monitoring system 120 sends a test operation instruction to the automatic test tool 1102 in the terminal 110, and the start information is used to start the log collection module 1103, so as to collect a log file corresponding to the target application service in real time, and send the collected log file to the monitoring system 120, so that the monitoring system 120 determines whether the target application service is abnormal in operation according to the log file. The log collection module 1103 may further receive termination information sent by the monitoring system 120, where the termination information is sent to the log collection module 1103 after the monitoring system 120 determines that the target application service is abnormally operated, so as to terminate a real-time collection behavior of the log collection module 1103 on the log file.
The monitoring system 120 may be configured to send a control message to the terminal 110, and specifically may include two aspects: on one hand, the monitoring system 120 may send a test operation instruction and a test termination instruction to the automated test tool 1102 in the terminal 110, and on the other hand, the monitoring system 120 may also send start information and termination information to the log collection module 1103 in the terminal 110.
In view of the foregoing technical problems and the system architecture provided in the embodiment of the present application, an embodiment of the present application provides a method for monitoring an application service of a terminal, as shown in fig. 2, where the method may be executed by the monitoring system shown in fig. 1. The method comprises the following steps:
step 201, a monitoring system sends a test operation instruction to a terminal; and the test operation instruction is used for indicating an automatic test tool positioned in the terminal to operate the target application service in the terminal according to the test operation instruction.
In this step, when the terminal adopts the android system, the automated testing tool in the terminal may be the ADB, and therefore, when abnormality monitoring is performed on a certain application service in the terminal, the monitoring system may send a test operation instruction to the ADB in the terminal, where the test operation instruction is used to instruct the ADB to run the application service according to the test operation instruction. The test operation instruction can be of a screen click type, a screen long-time press type, a screen sliding type, an input box content input type and the like, and the application service is a target application service.
In this step, when the terminal adopts the iOS system, the automated testing tool in the terminal may be the WebDriverAgent, and therefore, when abnormality monitoring is performed on a certain application service in the terminal, the monitoring system may send a test operation instruction to the WebDriverAgent in the terminal, where the test operation instruction is used to instruct the WebDriverAgent to run the application service according to the test operation instruction. The test operation instruction can be of a screen click type, a screen long-time press type, a screen sliding type, an input box content input type and the like, and the application service is a target application service.
Step 202, the monitoring system receives a first picture sent by the terminal; and the first picture is an actual page screenshot of the target application service after responding to the test operation instruction.
In the last step 201, after the monitoring system sends a test operation instruction to the automated testing tool in the terminal, the automated testing tool may run the target application service according to the test operation instruction, and once the target application service runs, a response page corresponding to the test operation instruction is generated. Therefore, in this step, the terminal captures the response page, and sends the picture obtained by capturing the picture to the monitoring system as the first picture, and the corresponding monitoring system can receive the first picture sent by the terminal. The response page is the actual page screenshot.
Step 203, the monitoring system determines a second picture matched with a reference picture from the first picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction.
In this step, for a test operation instruction, in order to detect whether the target application service really responds according to the intention designed by the developer, the monitoring system may locally store a screenshot of the target application service really responding to the test operation instruction according to the intention designed by the developer in advance, so that after the automatic test tool runs the target application service according to the test operation instruction, the screenshot is performed on a running page, and when the two screenshots are the same, it may be determined that the target application service is normal. In order to improve the flexibility of determining whether the target application service really has a response according to the intention designed by a developer, and reduce the calculation amount when determining whether the two screenshots are the same, the method selects the prestored screenshots of the monitoring system as the parts of the fixed contents in the preset page screenshots after the target application service responds to the test operation instruction, namely the monitoring system stores the reference pictures in advance, wherein the reference pictures are the subsets of the preset page screenshots after the target application service responds to the test operation instruction.
And 204, the monitoring system determines whether the target application service is abnormal or not according to the image similarity of the second picture and the reference picture.
Since the monitoring system has already matched the second picture in the previous step 203, in this step, the monitoring system determines the image similarity between the second picture and the reference picture, and then determines whether the target application service really has a response to the test operation instruction according to the intention designed by the developer according to the determined image similarity, that is, the monitoring system can determine whether the target application service is abnormal.
In the scheme, the reference picture represents the part of the fixed content in the preset page screenshot after the target application service responds to the same test operation instruction, and in view of the fact that the selection of the part of the fixed content is relatively flexible and the selected part of the fixed content is a subset of the preset page screenshot, when the monitoring system determines whether the target application service responds to the operation instruction according to the intention designed by a developer, the consumed calculation amount is not large, and the whole determination process is more flexible.
Some of the above steps will be described in detail with reference to examples.
In one implementation of step 201, before the monitoring system sends the test operation instruction to the terminal, the method further includes: the monitoring system sends starting information to the terminal, and the starting information is used for starting a log acquisition module in the terminal; the log acquisition module is used for acquiring a log file corresponding to the target application service in real time; and the monitoring system receives the log file sent by the terminal and determines whether the target application service is abnormal in operation according to the log file.
As a common type of service dial-up test, when an existing APP dial-up test technology is implemented, a monitoring SDK (Software Development Kit) is integrated inside an APP, so that embedded logs printed by a developer are continuously collected by the SDK, and the running logs are continuously sent to a monitoring system, and the monitoring system monitors the APP by checking reported log contents, so as to know the running condition of the APP. However, in this method, when the APP is abnormal or the APP itself is dead due to other reasons, the APP cannot continue to report its own log to the monitoring system, which results in failure of the monitoring system in monitoring the running condition of the APP. Aiming at the problem, the scheme provides that a log acquisition module for acquiring the logs corresponding to the APP operation condition is arranged in the terminal, the logs corresponding to the application service operation condition in the terminal are acquired by the log acquisition module in real time, and the acquired logs are sent to the monitoring system, so that the monitoring system can judge whether the monitored application service has the abnormal operation condition according to the received log content. In the method, the log collection module is selected to be arranged in the terminal instead of integrating the log reporting module in the application service (for example, integrating the monitoring SDK in the APP), so that the problem that the monitoring process of the monitoring system on the operation condition of the application service is invalid due to the fact that the operation log cannot be sent to the monitoring system when the application service is abnormally operated can be solved.
In one implementation of step 203, the monitoring system determines a second picture matching the reference picture from the first pictures, including: the monitoring system determines an area, the matching degree of which meets a first set requirement, of the reference picture under the gray scale image from the first picture, and the area is used as a second picture; the monitoring system determines whether the target application service is abnormal or not according to the image similarity between the second picture and the reference picture, and the method comprises the following steps: and the monitoring system determines whether the target application service is abnormal or not according to the similarity of the second picture and the reference picture in each set color channel.
As an example of a figure, the target application service is a WeChat (version 8.0.5), and after the automated testing tool clicks "me" from a main interface of the WeChat according to the testing operation instruction, a corresponding preset page screenshot may be as shown in fig. 3, where fig. 3 is a schematic diagram of a preset page screenshot provided in an embodiment of the present application. Obviously, the 3 items of the avatar in the area 1, the nickname in the area 2, and the micro signal in the area 3 in fig. 3 vary in content depending on the micro account number, but the 11 items of the area 4 to the area 14 in fig. 3 do not vary depending on the micro account number. Therefore, based on fig. 3, the embodiment of the present application provides schematic diagrams of three reference pictures, as shown in fig. 4, the reference picture shown in fig. 4(a) is obtained by extracting the area 8, which is the fixed content in the preset page screenshot shown in fig. 3, the reference picture shown in fig. 4(b) is obtained by extracting the area 14, which is the fixed content in the preset page screenshot shown in fig. 3, and the reference picture shown in fig. 4(c) is obtained by extracting the area 1, which is the fixed content in the preset page screenshot shown in fig. 3, and the area 7, which is the fixed content in the preset page screenshot shown in fig. 3, and it should be noted that, in fig. 4(c), the contents of the area 1, the area 3 are empty, and only the contents of the areas 4, 7 are reserved. It should be noted that, regarding the preset screenshot in fig. 3, all possible reference pictures are not listed in this application.
According to the above-described generation process of the reference picture, since the reference picture is directed to the fixed content in the preset page screenshot, rather than the whole preset page screenshot, that is, since the fixed content is a subset of the preset page screenshot, the time duration consumed in the subsequent matching process can be effectively reduced.
Since most of the application services in the current terminal are displayed in a color mode when the application services interact with the user, the first picture and the reference picture are color pictures. In the embodiment of the application, taking a color picture as RGB color as an example, each pixel point in the color picture is composed of three channels, namely red, green and blue, so that if the first picture is directly matched with the reference picture, for any region of the reference picture on the first picture, the image similarity between the reference picture and the region needs to be calculated once, and then a region with the largest similarity is selected from the regions, so as to finally determine whether the target application service really has a response according to the intention designed by a developer. When the image similarity between the reference picture and any region on the first picture is calculated, for each pixel point on the reference picture, it needs to be determined that the values of the pixel point under the red, green and blue channels are respectively the same as the values of the pixel point at the same position of the region under the red, green and blue channels, that is, it needs to be determined how many pixel points on the reference picture are the same as the pixel points at the same position of the region, and then the ratio of the number of all the same pixel points in the reference picture to the number of all the pixel points of the reference picture can be used as the image similarity between the reference picture and the region, so it is obvious that the calculated amount corresponding to the mode of determining whether the target application service really responds according to the intention designed by a developer is quite large.
Therefore, in the scheme of the application, the monitoring system can determine an area, the matching degree of which with the reference picture under the gray scale image meets the first setting requirement, from the first picture and use the area as the second picture, so that the monitoring system can calculate the similarity between the second picture and the reference picture under the condition of a color picture, and finally judge whether the target application service really responds to the test operation instruction according to the intention designed by a developer according to the calculated similarity. Obviously, in the method, the second picture meeting the requirement is selected to be matched from the first picture under the condition of the gray-scale image, instead of being matched with the second picture meeting the requirement directly based on the condition of the color picture, so that the calculation amount can be greatly reduced, the identification efficiency of whether the monitoring system responds to the target application service according to the intention designed by a developer is effectively improved, and the monitoring system is also helpful for quickly judging whether the target application service is abnormal.
In some implementations of the present application, the determining, by the monitoring system, a region, in which a matching degree with the reference picture in a grayscale map meets a first setting requirement, from the first picture, and using the region as a second picture includes: the monitoring system respectively converts the first picture and the reference picture into a first gray picture and a second gray picture; the monitoring system determines the matching degree of the second gray scale picture in each area of the first gray scale picture according to a preset translation mode; and the monitoring system correspondingly intercepts the first picture according to the region with the maximum matching degree in the matching degrees of the regions, and determines the first picture as a second picture.
As described in the foregoing example, when the first picture and the reference picture are both color pictures, if the monitoring system matches an area that meets the first setting requirement with the content of the reference picture from the first picture directly based on the color pictures, the amount of calculation at this time is considerable. Therefore, the monitoring system converts the first picture and the reference picture into pictures under the condition of the gray-scale pictures respectively, namely converts the pictures into the first gray-scale picture and the second gray-scale picture correspondingly. As an example, the preset translation mode is from left to right, from top to bottom, and with 1 pixel as the translation distance, sequentially translating the second grayscale picture on the first grayscale picture. Therefore, for each area covered by the second gray scale picture on the first gray scale picture, the monitoring system can calculate the matching degree of the second gray scale picture in the area on the first gray scale picture. The matching calculation mode may refer to a determination mode of image similarity in the prior art, specifically: when the matching degree between the second gray scale picture and any region on the first gray scale picture is calculated, for each pixel point on the second gray scale picture, it needs to be determined that the gray value of the pixel point is respectively the same as the gray value of the pixel point at the same position of the region, that is, it needs to be determined how many pixel points on the second gray scale picture are the same as the pixel points at the same position of the region, and then the ratio of the number of all the same pixel points in the second gray scale picture to the number of all the pixel points on the second gray scale picture can be used as the matching degree between the reference picture and the region.
It is noted that, as an example, when an RGB color picture is converted into a gray scale picture, the calculation method of the gray scale value of each pixel point may be obtained by referring to the following psychological formula:
Gray=0.1140*B+0.5870*G+0.2989*R
wherein Gray represents the Gray value of the pixel point, B represents the pixel value of the pixel point under the blue channel, G represents the pixel value of the pixel point under the green channel, and R represents the pixel value of the pixel point under the red channel.
For example, if the size of the first picture is m × n and the size of the reference picture is w × h, the sizes of the corresponding first grayscale picture and the corresponding second grayscale picture are m × n and w × h, respectively. Then, according to the above example, when the second grayscale image is translated on the first grayscale image, the (m-w) × (n-h) translation operations need to be performed in total, that is, (m-w) × (n-h) regions can be obtained; correspondingly, after the monitoring system calculates the matching degree of each region, the monitoring system can obtain (m-w) × (n-h) matching degrees.
As an example, if the first preset requirement is that the matching degree is the maximum, the monitoring system may select a region with the maximum matching degree (i.e., the most similar region) from the (m-w) × (n-h) matching degrees, and use the region as a reference, and correspondingly cut out from the first picture according to the reference, so that the picture extracted from the first picture is the second picture.
Fig. 5 is a schematic diagram illustrating a determination of a most similar region in a gray scale map according to an embodiment of the present application. The image A is a second gray picture, the image B is a first gray picture, 1 pixel is used as a translation distance, and the image A is translated on the image B according to the rule of from left to right and from top to bottom. In the image B, only 8 regions are taken as an example for explanation, and by calculation, the matching degree corresponding to each of the 8 regions is shown in the parentheses at the upper right corner of the region. Referring to the matching degrees corresponding to the 8 regions of the image B in fig. 5, the matching degree 1.0 corresponding to the region in the second row and the first column in the image B is the maximum of the 8 matching degrees. Therefore, the monitoring system may take the area in the second row and the first column in the image B as a reference, and correspondingly cut out the color picture corresponding to the image B according to the reference, so that the cut-out color picture is the second picture.
In some implementations of the present application, the determining, by the monitoring system, whether the target application service is abnormal according to the similarity of the second picture and the reference picture in each set color channel includes: the monitoring system determines the pixel similarity of a first pixel point and a second pixel point under any set color channel according to the first pixel point and the second pixel point under the set color channel; the first pixel points and the second pixel points are pixel points of the second picture and the reference picture at the same position respectively; determining the image similarity of the second picture and the reference picture under the set color channel according to the pixel similarity between the pixel points; and if the monitoring system determines that the image similarity with the minimum image similarity under each set color channel meets a second set requirement, determining that the target application service is normal.
In some implementations of the present application, determining a pixel similarity of the first pixel point and the second pixel point under the set color channel includes: the monitoring system respectively performs normalization processing on the first pixel points and the second pixel points to obtain first coordination pixels and second coordination pixels of the first pixel points and the second pixel points under the set color channels; and the monitoring system performs linear correlation processing on the first coordination pixel and the second coordination pixel to obtain the pixel similarity of the first pixel and the second pixel under the set color channel.
For example, if the size of the reference picture is w × h in the above example, it is explained that the size of the second picture will also be w × h. For a group of pixel points of the reference picture and the second picture at the same position, firstly, the coordination pixel of each pixel point in the group of pixel points under the same set color channel can be calculated respectively through a normalization processing mode. For example, when the reference picture and the second picture are both color pictures in RGB mode, T is set for any one of three color channels of red, green, and blue(x, y) represents a coordinate pixel of a pixel point in the x-th row and y-th column in the reference picture, and is represented by I(x, y) represents the coordinating pixel of the pixel point in the x-th row and the y-th column in the second picture, then:
Figure BDA0003093063260000201
Figure BDA0003093063260000211
wherein, T (x, y) represents the pixel value of the pixel point in the x-th row and y-th column in the reference picture, and T (x ', y') represents any one of all the pixel points of the reference picture, therefore
Figure BDA0003093063260000212
Represents the average pixel value of all the pixel points of the reference picture,
Figure BDA0003093063260000213
represents the variance of all pixels of the reference picture; i (x, y) represents the pixel value of the pixel point in the x-th row and y-th column in the second picture, and I (x ', y') represents any one of all the pixel points of the second picture, so that
Figure BDA0003093063260000214
Representing the average pixel value of all the pixel points of the second picture,
Figure BDA0003093063260000215
representing the variance of all pixels of the reference picture.
After obtaining the coordinated pixels of a group of pixel points at the same position of the reference picture and the second picture under any set color channel, calculating the pixel similarity of the group of pixel points in a linear correlation processing mode for the same set color channel; then, for the pixel similarity between all the pixel points in the reference picture and the second picture, the image similarity of the reference picture and the second picture under the set color channel can be obtained by calculating the sum of the pixel similarities. For example, if the image similarity is R (x, y), then the calculation method of R (x, y) is:
R(x,y)=∑(T′(x′,y′)*I′(x′,y′))
where T '(x', y ') represents a coordinating pixel corresponding to any one of all the pixel points of the reference picture, and I' (x ', y') represents a coordinating pixel corresponding to any one of all the pixel points of the second picture.
For example, when the reference picture and the second picture are both color pictures in RGB mode, according to the above method, an image similarity R can be calculated based on the red channel portionR(x, y) an image similarity R is calculated based on the green channel portionG(x, y) an image similarity R is calculated based on the blue channel portionB(x, y). If the similarity of the three images is compared, determining R in the three imagesR(x, y) is the minimum of the three, then R can be substitutedR(x, y) is compared to a second set requirement, where the second set requirement is 0.8:
1. if R isR(x, y) is not less than 0.8, the monitoring system can determine that the target application service really responds to the test operation instruction according to the intention designed by the developer;
2. if R isR(x, y) is less than 0.8, the monitoring system may determine that the target application service is abnormal.
It should be noted that the second setting requirement may be 0.8, or may be other values, and specifically, the second setting requirement may be flexibly set by a person skilled in the art, which is not limited in the present application.
In some implementations of the present application, the monitoring system sends a test termination instruction to the terminal; the test termination instruction is generated after the monitoring system determines that the target application service is abnormal, and the test termination instruction is used for indicating the automatic test tool to stop running the target application service; and the monitoring system sends termination information to the terminal, wherein the termination information is used for terminating the real-time collection of the log files by the log collection module.
Based on the scheme, in the process that the monitoring system monitors the target application service, if the target application service is determined to be abnormal, the monitoring system can send a test termination instruction to the terminal to indicate the automatic test tool to stop running the target application service, and can send termination information to the terminal to terminate the real-time collection behavior of the log collection module on the log file. By the method, the resources of the terminal can be effectively saved.
In addition, after the monitoring task is finished, a monitoring result report is generated according to the current monitoring design scheme (comprising a series of test operation instructions) and the log/screenshot generated by monitoring operation, and a user can check the monitoring result report on the monitoring platform. The monitoring result report comprises various logs, the APP operation screenshot, the result picture of the preset operation node and the embedded point log in the design scheme script facilitate users to know the real field phenomenon in the APP operation process, obtain the root cause of the abnormity through log analysis, and optimize and repair the APP.
Based on the same concept, the embodiment of the present application provides a monitoring system, as shown in fig. 6, the monitoring system includes a transceiver unit 601, a matching unit 602, and a processing unit 603;
a transceiving unit 601, configured to send a test operation instruction to a terminal; and the test operation instruction is used for indicating an automatic test tool positioned in the terminal to operate the target application service in the terminal according to the test operation instruction.
The receiving and sending unit 601 is further configured to receive a first picture sent by the terminal; and the first picture is an actual page screenshot of the target application service after responding to the test operation instruction.
A matching unit 602, configured to determine, from the first picture, a second picture that matches a reference picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction.
The processing unit 603 is configured to determine whether the target application service is abnormal according to the image similarity between the second picture and the reference picture.
Further, for the monitoring system, the transceiver 601 is further configured to: sending starting information to the terminal, wherein the starting information is used for starting a log acquisition module in the terminal; the log acquisition module is used for acquiring a log file corresponding to the target application service in real time; and receiving the log file sent by the terminal, and determining whether the target application service is abnormal in operation according to the log file.
Further, for the monitoring system, the reference picture is a fixed content in the preset page screenshot; the matching unit 602 is specifically configured to: determining an area with matching degree meeting a first set requirement with the reference picture under a gray scale image from the first picture, and taking the area as a second picture; and determining whether the target application service is abnormal or not according to the similarity of the second picture and the reference picture under each set color channel.
Further, for the monitoring system, the matching unit 602 is specifically configured to: converting the first picture and the reference picture into a first gray picture and a second gray picture respectively; determining the matching degree of the second gray scale picture in each area of the first gray scale picture according to a preset translation mode; and correspondingly intercepting the first picture according to the area with the maximum matching degree in the matching degrees of the areas, and determining the first picture as a second picture.
Further, for the monitoring system, the processing unit 603 is specifically configured to: aiming at a first pixel point and a second pixel point under any set color channel, determining the pixel similarity of the first pixel point and the second pixel point under the set color channel; the first pixel points and the second pixel points are pixel points of the second picture and the reference picture at the same position respectively; determining the image similarity of the second picture and the reference picture under the set color channel according to the pixel similarity between the pixel points; and if the image similarity with the minimum image similarity under each set color channel meets a second set requirement, determining that the target application service is normal.
Further, for the monitoring system, the processing unit 603 is specifically configured to: respectively carrying out normalization processing on the first pixel points and the second pixel points to obtain first coordination pixels and second coordination pixels of the first pixel points and the second pixel points under the set color channels; and performing linear correlation processing on the first coordination pixel and the second coordination pixel to obtain the pixel similarity of the first pixel point and the second pixel point under the set color channel.
Further, for the monitoring system, the transceiver 601 is further configured to: sending a test termination instruction to the terminal; the test termination instruction is generated after the monitoring system determines that the target application service is abnormal, and the test termination instruction is used for indicating the automatic test tool to stop running the target application service; and sending termination information to the terminal, wherein the termination information is used for terminating the real-time collection of the log files by the log collection module.
The embodiment of the present application further provides a computing device, which may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The computing device may include a Central Processing Unit (CPU), memory, input/output devices, etc., the input devices may include a keyboard, mouse, touch screen, etc., and the output devices may include a Display device, such as a Liquid Crystal Display (LCD), a Cathode Ray Tube (CRT), etc.
Memory, which may include Read Only Memory (ROM) and Random Access Memory (RAM), provides the processor with program instructions and data stored in the memory. In the embodiment of the present application, the memory may be configured to store program instructions of an application service monitoring method of the terminal;
and the processor is used for calling the program instruction stored in the memory and executing the application service monitoring method of the terminal according to the obtained program.
As shown in fig. 7, a schematic diagram of a computing device provided in an embodiment of the present application includes:
a processor 701, a memory 702, a transceiver 703, a bus interface 704; the processor 701, the memory 702 and the transceiver 703 are connected by a bus 705;
the processor 701 is configured to read a program in the memory 702 and execute the application service monitoring method of the terminal;
the processor 701 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP. But also a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory 702 is used for storing one or more executable programs, and may store data used by the processor 701 in performing operations.
In particular, the program may include program code including computer operating instructions. The memory 702 may include a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 702 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory 702 may also comprise a combination of the above types of memory.
The memory 702 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof:
and (3) operating instructions: including various operational instructions for performing various operations.
Operating the system: including various system programs for implementing various basic services and for handling hardware-based tasks.
The bus 705 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
The bus interface 704 may be a wired communication access port, a wireless bus interface, or a combination thereof, wherein the wired bus interface may be, for example, an ethernet interface. The ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless bus interface may be a WLAN interface.
The embodiment of the application also provides a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used for enabling a computer to execute the application service monitoring method of the terminal.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. An application service monitoring method of a terminal is characterized by comprising the following steps:
the monitoring system sends a test operation instruction to the terminal; the test operation instruction is used for indicating an automatic test tool in the terminal to operate a target application service in the terminal according to the test operation instruction;
the monitoring system receives a first picture sent by the terminal; the first picture is an actual page screenshot of the target application service after responding to the test operation instruction;
the monitoring system determines a second picture matched with a reference picture from the first picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction;
and the monitoring system determines whether the target application service is abnormal or not according to the image similarity of the second picture and the reference picture.
2. The method of claim 1,
before the monitoring system sends a test operation instruction to the terminal, the method further comprises the following steps:
the monitoring system sends starting information to the terminal, and the starting information is used for starting a log acquisition module in the terminal; the log acquisition module is used for acquiring a log file corresponding to the target application service in real time;
and the monitoring system receives the log file sent by the terminal and determines whether the target application service is abnormal in operation according to the log file.
3. The method of claim 1,
the monitoring system determines a second picture matched with a reference picture from the first picture, and the method comprises the following steps: the monitoring system determines an area, the matching degree of which meets a first set requirement, of the reference picture under the gray scale image from the first picture, and the area is used as a second picture;
the monitoring system determines whether the target application service is abnormal or not according to the image similarity between the second picture and the reference picture, and the method comprises the following steps:
and the monitoring system determines whether the target application service is abnormal or not according to the similarity of the second picture and the reference picture in each set color channel.
4. The method of claim 3,
the monitoring system determines an area, the matching degree of which meets a first set requirement, of the reference picture under the gray scale image from the first picture, and the area is used as a second picture, and the method comprises the following steps:
the monitoring system respectively converts the first picture and the reference picture into a first gray picture and a second gray picture;
the monitoring system determines the matching degree of the second gray scale picture in each area of the first gray scale picture according to a preset translation mode;
and the monitoring system correspondingly intercepts the first picture according to the region with the maximum matching degree in the matching degrees of the regions, and determines the first picture as a second picture.
5. The method of claim 3,
the monitoring system determines whether the target application service is abnormal according to the similarity of the second picture and the reference picture in each set color channel, and the determining method comprises the following steps:
the monitoring system determines the pixel similarity of a first pixel point and a second pixel point under any set color channel according to the first pixel point and the second pixel point under the set color channel; the first pixel points and the second pixel points are pixel points of the second picture and the reference picture at the same position respectively; determining the image similarity of the second picture and the reference picture under the set color channel according to the pixel similarity between the pixel points;
and if the monitoring system determines that the image similarity with the minimum image similarity under each set color channel meets a second set requirement, determining that the target application service is normal.
6. The method of claim 5,
determining the pixel similarity of the first pixel point and the second pixel point under the set color channel, including:
the monitoring system respectively performs normalization processing on the first pixel points and the second pixel points to obtain first coordination pixels and second coordination pixels of the first pixel points and the second pixel points under the set color channels;
and the monitoring system performs linear correlation processing on the first coordination pixel and the second coordination pixel to obtain the pixel similarity of the first pixel and the second pixel under the set color channel.
7. The method of claim 1,
the method further comprises the following steps:
the monitoring system sends a test termination instruction to the terminal; the test termination instruction is generated after the monitoring system determines that the target application service is abnormal, and the test termination instruction is used for indicating the automatic test tool to stop running the target application service;
and the monitoring system sends termination information to the terminal, wherein the termination information is used for terminating the real-time collection of the log files by the log collection module.
8. A monitoring system, comprising:
the receiving and sending unit is used for sending a test operation instruction to the terminal; the test operation instruction is used for indicating an automatic test tool in the terminal to operate a target application service in the terminal according to the test operation instruction;
the receiving and sending unit is further used for receiving a first picture sent by the terminal; the first picture is an actual page screenshot of the target application service after responding to the test operation instruction;
the matching unit is used for determining a second picture matched with a reference picture from the first picture; the reference picture is a part of fixed content in a preset page screenshot after the target application service responds to the test operation instruction;
and the processing unit is used for determining whether the target application service is abnormal or not according to the image similarity of the second picture and the reference picture.
9. A computer device, comprising:
a memory for storing a computer program;
a processor for calling a computer program stored in said memory, for executing the method according to any one of claims 1-7 in accordance with the obtained program.
10. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1-7.
CN202110601209.3A 2021-05-31 2021-05-31 Application service monitoring method and monitoring system of terminal Active CN113342627B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110601209.3A CN113342627B (en) 2021-05-31 2021-05-31 Application service monitoring method and monitoring system of terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110601209.3A CN113342627B (en) 2021-05-31 2021-05-31 Application service monitoring method and monitoring system of terminal

Publications (2)

Publication Number Publication Date
CN113342627A true CN113342627A (en) 2021-09-03
CN113342627B CN113342627B (en) 2023-03-21

Family

ID=77472810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110601209.3A Active CN113342627B (en) 2021-05-31 2021-05-31 Application service monitoring method and monitoring system of terminal

Country Status (1)

Country Link
CN (1) CN113342627B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609104A (en) * 2024-01-24 2024-02-27 盛威时代科技股份有限公司 Page exception processing method, system and equipment in client test process

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005511A (en) * 2002-03-26 2004-01-08 Toshiba Corp Monitoring system, monitoring method and monitoring program
US20100067812A1 (en) * 2008-09-12 2010-03-18 National Taiwan University Of Science And Technology Image compression method using block truncation coding
CN103678105A (en) * 2012-09-17 2014-03-26 百度在线网络技术(北京)有限公司 Page code testing method and device
JP2019067274A (en) * 2017-10-04 2019-04-25 富士通株式会社 Generation program, generation method, and information processing apparatus
CN109753419A (en) * 2018-12-29 2019-05-14 苏州思必驰信息科技有限公司 A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN109902633A (en) * 2019-03-04 2019-06-18 南京小网科技有限责任公司 Accident detection method and device based on the camera supervised video of fixed bit
CN110135324A (en) * 2019-05-09 2019-08-16 程度 A kind of logistics finance cargo monitoring system and operation method
CN110347587A (en) * 2019-05-30 2019-10-18 平安银行股份有限公司 APP compatibility test method, device, computer equipment and storage medium
CN110572641A (en) * 2018-06-05 2019-12-13 青岛海尔多媒体有限公司 display equipment testing method and device and computer readable storage medium
CN111062400A (en) * 2018-10-16 2020-04-24 浙江宇视科技有限公司 Target matching method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004005511A (en) * 2002-03-26 2004-01-08 Toshiba Corp Monitoring system, monitoring method and monitoring program
US20100067812A1 (en) * 2008-09-12 2010-03-18 National Taiwan University Of Science And Technology Image compression method using block truncation coding
CN103678105A (en) * 2012-09-17 2014-03-26 百度在线网络技术(北京)有限公司 Page code testing method and device
JP2019067274A (en) * 2017-10-04 2019-04-25 富士通株式会社 Generation program, generation method, and information processing apparatus
CN110572641A (en) * 2018-06-05 2019-12-13 青岛海尔多媒体有限公司 display equipment testing method and device and computer readable storage medium
CN111062400A (en) * 2018-10-16 2020-04-24 浙江宇视科技有限公司 Target matching method and device
CN109753419A (en) * 2018-12-29 2019-05-14 苏州思必驰信息科技有限公司 A kind of method and device of the abnormal log information of all applications of non-invasive monitoring Android system
CN109902633A (en) * 2019-03-04 2019-06-18 南京小网科技有限责任公司 Accident detection method and device based on the camera supervised video of fixed bit
CN110135324A (en) * 2019-05-09 2019-08-16 程度 A kind of logistics finance cargo monitoring system and operation method
CN110347587A (en) * 2019-05-30 2019-10-18 平安银行股份有限公司 APP compatibility test method, device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117609104A (en) * 2024-01-24 2024-02-27 盛威时代科技股份有限公司 Page exception processing method, system and equipment in client test process

Also Published As

Publication number Publication date
CN113342627B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN108307021B (en) Parallel following test equipment, cloud real machine and method for mobile terminal
CN107845113B (en) Target element positioning method and device and user interface testing method and device
CN111124888B (en) Method and device for generating recording script and electronic device
CN108579094B (en) User interface detection method, related device, system and storage medium
CN111379555B (en) Fault diagnosis method and device for oil pumping well
CN111045879B (en) Method, device and storage medium for generating pressure test report
CN110955891B (en) File detection method, device and system and data processing method
CN113342627B (en) Application service monitoring method and monitoring system of terminal
CN114996103A (en) Page abnormity detection method and device, electronic equipment and storage medium
CN111061647A (en) Software performance automatic testing method and device and electronic equipment
CN111309743A (en) Report pushing method and device
CN111782514B (en) Test data comparison method and device
CN110515834B (en) Interface testing method and device, mobile terminal and storage medium
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN115904883A (en) RPA flow execution visualization abnormity monitoring method, device and medium
US20220292011A1 (en) Automated application testing of mutable interfaces
CN111290894B (en) Method, device, terminal and storage medium for detecting splash screen
CN109739752B (en) Built-in resource testing method and device, electronic equipment and readable storage medium
CN108447107B (en) Method and apparatus for generating video
CN113313642A (en) Image denoising method and device, storage medium and electronic equipment
CN111949516A (en) Page testing method and device and electronic equipment
CN112527539A (en) Interface detection method and related device
CN114116512A (en) Test method, test device, electronic equipment and storage medium
CN115601606B (en) Store state detection method, device, equipment and storage medium
CN116126671A (en) Method, device, equipment and readable storage medium for testing electronic equipment

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
GR01 Patent grant
GR01 Patent grant