CN114155239A - View analysis method and device, electronic equipment and storage medium - Google Patents

View analysis method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114155239A
CN114155239A CN202111509452.9A CN202111509452A CN114155239A CN 114155239 A CN114155239 A CN 114155239A CN 202111509452 A CN202111509452 A CN 202111509452A CN 114155239 A CN114155239 A CN 114155239A
Authority
CN
China
Prior art keywords
view
analyzed
preset condition
acquiring
visualization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111509452.9A
Other languages
Chinese (zh)
Inventor
蔡宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology 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 Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202111509452.9A priority Critical patent/CN114155239A/en
Publication of CN114155239A publication Critical patent/CN114155239A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application provides a view analysis method and device, an electronic device and a storage medium, wherein the method comprises the following steps: acquiring a view to be analyzed; acquiring a visual state of a view to be analyzed; and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state. By the method and the device, the problem that resources and time cost are high when a page view detection test is carried out in the related technology is solved.

Description

View analysis method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to a method and an apparatus for view analysis, an electronic device, and a storage medium.
Background
Currently, in the development process of an application program, detection and acceptance are generally required to be performed on a page view of the application program. The method mainly checks the style of the obtained application page view, for example: background color, border, spacing, etc. The traditional UI acceptance link is low in efficiency, and the reason that traversal auditing needs to be performed on each extracted view is very high, so that the full view needs to be detected no matter whether front-end display is needed, and the consumed resource and time cost are high.
Disclosure of Invention
The application provides a view analysis method and device, electronic equipment and a storage medium, which are used for at least solving the problem that resources and time cost are high when a page view detection test is carried out in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method of view analysis, the method including:
acquiring a view to be analyzed;
acquiring the visual state of the view to be analyzed;
and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for view analysis, the apparatus including:
the first acquisition unit is used for acquiring a view to be analyzed;
the second acquisition unit is used for acquiring the visual state of the view to be analyzed;
the first sending unit is used for sending the view to be analyzed to an acceptance platform as a target view under the condition that the visualization state meets a preset condition, wherein the preset condition is used for indicating that the view is in the visualization state.
Optionally, it is determined that the visualization state meets the preset condition as follows:
the third acquisition unit is used for acquiring a display area corresponding to the view to be analyzed on the screen;
the first determining unit is used for determining that the visualization state meets the preset condition when the display area is smaller than or equal to a first threshold value, wherein the first threshold value is the maximum value of the view range allowed to be displayed by the screen.
Optionally, it is determined that the visualization state meets the preset condition as follows:
a fourth obtaining unit, configured to obtain a hidden proportion included in the view to be analyzed;
a second determining unit, configured to determine that the visualization state meets the preset condition when the hiding ratio is smaller than or equal to a second threshold, where the second threshold is a minimum ratio value at which the view to be analyzed is blocked by other views.
Optionally, it is determined that the visualization state meets the preset condition as follows:
a fifth obtaining unit, configured to obtain a feature attribute of the view to be analyzed;
and the third determining unit is used for determining that the visualization state meets the preset condition under the condition that the feature attribute is determined to contain the visualization attribute.
Optionally, it is determined that the visualization state meets the preset condition as follows:
a sixth obtaining unit, configured to obtain a display scale of the view to be analyzed;
a fourth determining unit, configured to determine that the visualization state meets the preset condition when the display scale is greater than or equal to a third threshold, where the third threshold is a critical value of a visualization display area of the view to be analyzed.
Optionally, the apparatus comprises:
the seventh obtaining unit is used for obtaining a target page to which the view to be analyzed belongs before the view to be analyzed is taken as a target view and sent to an acceptance platform;
the eighth acquiring unit is used for acquiring screenshot information of the target page, wherein the screenshot information comprises the view to be analyzed;
the first generating unit is used for packaging the screenshot information and the view to be analyzed to generate a data packet;
and the second sending unit is used for sending the data packet to the acceptance platform.
Optionally, the apparatus further comprises:
a fifth determining unit, configured to determine a view type of the view to be analyzed;
a ninth obtaining unit, configured to obtain additional information of the view to be analyzed according to the view type, where the additional information is information associated with the view to be analyzed.
According to another aspect of the embodiments of the present application, there is also provided a view screening method, which uses the view analysis method of the above embodiments to complete view screening, and the method includes:
under the condition that indicating information of an acceptance view combination is obtained, analyzing the view combination to obtain a plurality of views to be analyzed;
and performing view analysis on the views to be analyzed, screening a plurality of target views of which the visualization states meet the preset conditions from the views to be analyzed, and generating a target view combination, wherein the target view combination is view combination information to be checked.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for view screening, the apparatus including:
a tenth obtaining unit, configured to, when obtaining indication information of an acceptance view combination, analyze the view combination to obtain a plurality of views to be analyzed;
the second generating unit is configured to perform view analysis on the multiple views to be analyzed, screen multiple target views, of which the visualization states meet the preset condition, from the multiple views to be analyzed, and generate a target view combination, where the target view combination is view combination information to be checked.
Optionally, the tenth acquiring unit includes:
a traversal module, configured to traverse a view tree using a target traversal scheme, where the view tree is generated by the view combination and sub-views constituting the view combination, and the target traversal scheme is to traverse the view tree according to a sub-view-first traversal mode and a last generated sub-view-first mode for leaf nodes constituting the view tree, where each leaf sub-node corresponds to one sub-view;
and the acquisition module is used for analyzing the view tree and acquiring a plurality of views to be analyzed.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used for storing the computer program; a processor for performing the method steps in any of the above embodiments by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the method steps of any of the above embodiments when the computer program is executed.
In the embodiment of the application, the view to be analyzed is obtained; acquiring a visual state of a view to be analyzed; and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state. According to the embodiment of the application, the acquired visual state of the view to be analyzed is compared with the preset condition, and the view is sent to the acceptance platform according to the comparison result, so that the view is directly analyzed, manual measurement is not needed, a large amount of labor cost is reduced, the measurement result is accurate and reliable, the UI view acceptance accuracy can be improved, and the problems that resources are consumed and the time cost is high during page view examination in the related technology are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
FIG. 1 is a schematic diagram of a hardware environment for an alternative method of view analysis according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart diagram of an alternative method of view analysis according to an embodiment of the present application;
FIG. 3 is a tree structure of a view tree according to an embodiment of the present application;
FIG. 4 is a schematic overall flow diagram of an alternative view analysis method according to an embodiment of the present application;
FIG. 5 is a block diagram of an alternative view analysis apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but 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.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Traditional removal end UI inspection mode too relies on the manual work, all is through intercepting application picture at cell-phone end, uploads to the computer, and the manual work uses patterns (colour, font size, frame) and the interval of each view in the tool measurement screenshots such as Sketch, PS, leads to the inspection efficiency very low like this to there is the inaccurate problem of inspection, can't satisfy the quick iterative demand of removal end product function. In order to solve the above problem, according to an aspect of an embodiment of the present application, there is provided a method of view analysis. Alternatively, in this embodiment, the method of view analysis described above may be applied to a hardware environment as shown in fig. 1. As shown in fig. 1, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional components). The terminal 102 may be communicatively coupled to a server 112 via a network 110, the server 112 may be configured to provide services (e.g., application services, etc.) for the terminal or for clients installed on the terminal, and a database 114 may be provided on the server 112 or separate from the server 112 for providing data storage services for the server 112. Additionally, a processing engine 116 may be run in the server 112, and the processing engine 116 may be used to perform the steps performed by the server 112.
Alternatively, the terminal 102 may be, but is not limited to, a terminal capable of calculating data, such as a mobile terminal (e.g., a mobile phone, a tablet Computer), a notebook Computer, a PC (Personal Computer) Computer, and the like, and the network may include, but is not limited to, a wireless network or a wired network. Wherein, this wireless network includes: bluetooth, WIFI (Wireless Fidelity), and other networks that enable Wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, and local area networks. The server 112 may include, but is not limited to, any hardware device capable of performing computations.
In addition, in this embodiment, the view analysis method may also be applied, but not limited to, to an independent processing device with a relatively high processing capability, without data interaction. For example, the processing device may be, but is not limited to, a terminal device with a relatively high processing capability, that is, each operation in the method of view analysis described above may be integrated into a single processing device. The above is merely an example, and this is not limited in this embodiment.
Optionally, in this embodiment, the view analysis method may be executed by the server 112, the terminal 102, or both the server 112 and the terminal 102. The method for the terminal 102 to perform the view analysis according to the embodiment of the present application may also be performed by a client installed thereon.
Taking an example of the method running in a server, fig. 2 is a schematic flowchart of an alternative view analysis method according to an embodiment of the present application, and as shown in fig. 2, the flowchart of the method may include the following steps:
step S201, acquiring a view to be analyzed;
step S202, acquiring the visual state of the view to be analyzed;
and S203, under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state.
Optionally, in the embodiment of the application, the UI page is used as a detection subject, then the view is built in the application program of the UI page to obtain the SDK package, and the server first obtains the view to be analyzed in the UI page by using the SDK package, where the view to be analyzed is a view that whether the view information of the view to be detected meets the visual condition of acceptance check. And then, acquiring the visual state of the view to be analyzed by using a visual view detection algorithm.
In the embodiment of the application, a preset condition is set in advance, the preset condition is used for indicating that the view is in a visual state, as long as the visual state of the view to be analyzed meets the preset condition, the view to be analyzed is determined as a target view, and the target view is sent to an acceptance platform, so that the automation of visual analysis of the view is realized.
In the embodiment of the application, the view to be analyzed is obtained; acquiring a visual state of a view to be analyzed; and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state. According to the embodiment of the application, the acquired visual state of the view to be analyzed is compared with the preset condition, and the view is sent to the acceptance platform according to the comparison result, so that the view is directly analyzed, manual measurement is not needed, a large amount of labor cost is reduced, the measurement result is accurate and reliable, the UI view acceptance accuracy can be improved, and the problems that resources are consumed and the time cost is high during page view examination in the related technology are solved.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
acquiring a display area corresponding to a view to be analyzed on a screen;
and determining that the visualization state meets a preset condition when the display area is smaller than or equal to a first threshold value, wherein the first threshold value is the maximum value of the view range allowed to be displayed by the screen.
Optionally, in this embodiment of the application, the server acquires a display area of the view to be analyzed corresponding to the terminal display screen of the UI page, and determines that the visualization state of the current view to be analyzed meets the preset condition when the display area is smaller than or equal to the first threshold. The first threshold is the maximum value of the view range allowed to be displayed by the screen, and when the display area of the view to be analyzed is smaller than or equal to the maximum value of the view range allowed to be displayed by the screen, the fact that the view to be analyzed does not exceed the display area of the screen is indicated, and the preset condition is met.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
acquiring a hidden proportion contained in a view to be analyzed;
and under the condition that the hiding ratio is smaller than or equal to a second threshold value, determining that the visualization state meets the preset condition, wherein the second threshold value is a minimum ratio value of the view to be analyzed which is blocked by other views.
Optionally, the server according to the embodiment of the present application obtains a hiding ratio corresponding to the view to be analyzed, where the hiding ratio indicates a ratio of the view to be analyzed being blocked.
When the hiding ratio is smaller than or equal to a second threshold, where the second threshold is a minimum ratio value at which the view to be analyzed is blocked by other views, for example, the minimum ratio value is 0%, it indicates that the view to be analyzed is not hidden, and at this time, it is considered that the visualization state of the view to be analyzed meets the preset condition. I.e. the display scale of the visualization of the view to be analyzed is 100%.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
acquiring the characteristic attribute of a view to be analyzed;
and under the condition that the characteristic attribute is determined to contain the visualization attribute, determining that the visualization state meets the preset condition.
Optionally, regarding the obtained characteristic attributes of the view to be analyzed, if the characteristic attributes include visualization attributes, for example, there is visible content (such as background color, text, picture, etc.) in the view to be analyzed, the visualization state of the view to be analyzed is considered to meet the preset condition.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
acquiring the display scale of a view to be analyzed;
and under the condition that the display proportion is larger than or equal to a third threshold value, determining that the visualization state meets the preset condition, wherein the third threshold value is a critical value of the visualization display area of the view to be analyzed.
Optionally, the server according to the embodiment of the present application obtains the overall display ratio of the view to be analyzed, and determines that the visualization state of the view to be analyzed meets the preset condition if the display ratio is greater than or equal to a third threshold, where the third threshold may be a critical value of the visualization display area of the view to be analyzed, for example, if the critical value is set to 100%, the current display state of the view to be analyzed is 100%.
As an alternative embodiment, it is preferable that the visualization state of the view to be analyzed satisfies the following preset condition, namely: the view to be analyzed is not hidden and does not exceed the display area of the screen, has the visualization property and is not blocked by other views, and the display proportion is 100%. At this time, it is determined that the visualization state of the view to be analyzed satisfies the preset condition.
As an alternative embodiment, before sending the view to be analyzed as the target view to the acceptance platform, the method further comprises:
acquiring a target page to which a view to be analyzed belongs;
acquiring screenshot information of a target page, wherein the screenshot information comprises a view to be analyzed;
packaging the screenshot information and the view to be analyzed to generate a data packet;
and sending the data packet to an acceptance platform.
Optionally, a UI target page to which the view to be analyzed belongs is determined, screenshot is performed on the target page to obtain screenshot information, it can be understood that the screenshot information necessarily includes the view to be analyzed, and thus the screenshot information and the view to be analyzed are packaged, a data packet is generated and sent to an acceptance platform, so that a terminal user can conveniently view each piece of visual data, and the user can conveniently view which UI view the currently analyzed visual data is specific.
In the embodiment of the application, the obtained view to be analyzed and the screenshot of the target page are packaged and uploaded to the acceptance platform together, so that the terminal user can conveniently check each piece of visual data, the user can conveniently check which UI view the visual data analyzed currently is, and the visual data can be used by subsequent staff.
As an alternative embodiment, the method further comprises:
determining a view type of a view to be analyzed;
and acquiring additional information of the view to be analyzed according to the view type, wherein the additional information is information associated with the view to be analyzed.
Optionally, the embodiment of the application acquires a view type of the view to be analyzed, such as a text type, a pattern type, and the like, and acquires additional information according to the acquired view type, such as a view of the text type, and needs to additionally acquire a font size, a font style, and the like, so as to be used as additional data when the view to be analyzed is subjected to view analysis.
In addition, the following additional information of the view to be analyzed needs to be acquired in the embodiment of the present application: width, height, position, background color, round corners, borders, opacity, shadows, and the like. It will be appreciated that these additional information are information that has an association with the view to be analyzed.
In the embodiment of the application, some additional information is acquired as parameters for view analysis of the view to be analyzed, so that the accuracy of the visual analysis of the view can be improved.
According to another aspect of the embodiments of the present application, there is also provided a view screening method, which applies the above-mentioned method embodiments of view analysis to complete view screening, and the method includes:
under the condition of acquiring the indication information of the acceptance view combination, analyzing the view combination to acquire a plurality of views to be analyzed;
and performing view analysis on the multiple views to be analyzed, screening multiple target views with visual states meeting preset conditions from the multiple views to be analyzed, and generating a target view combination, wherein the target view combination is view combination information to be checked.
Optionally, in this embodiment of the present application, the view combination is screened for view visualization, where the view combination may be composed of one view. Further, when the indication information of the view combination to be checked and accepted is acquired, the view combination is analyzed to obtain a plurality of views to be analyzed, then the view analysis methods of the above embodiments are utilized to analyze the plurality of views to be analyzed, a plurality of target views with visualization states meeting preset conditions are screened from the views to be analyzed, then the combination composed of the plurality of target views is used as the target view combination, and the views are checked and accepted.
Furthermore, the view combination may be formed by overlapping one view, and at this time, a view tree is generated according to the overlapping sequence of each sub-view in the view combination, and at this time, the view tree needs to be traversed by using a target traversal scheme according to the sub-view-first traversal and the last generated sub-view-first manner. Because each leaf node of the view tree corresponds to one sub-view, and each sub-view is a view to be analyzed, for each view to be analyzed, whether the visual state of each view to be analyzed meets the preset condition is judged according to the view analysis mode when each view to be analyzed is traversed, and then a plurality of target views are obtained.
The target traversal scheme involved in the embodiment of the present application is exemplified as follows: obtaining a view combination, wherein a corresponding view tree is as shown in fig. 3, and when traversing the view tree in fig. 3 according to a mode of traversing with a child view first and traversing with a child view generated last first, the traversing order is as follows: C-F-E-B-A. It should be explained that a is used as a root node, leaf nodes of a root node are B and C, according to the principle that the child view is traversed first and the child view generated last is traversed first, because C is the child view generated last, the obtained traversal order is: C-B-A, and because the node B has leaf nodes E and F, and F is the last generated leaf node, the corresponding traversal order of B is as follows: F-E-B, in conclusion, the final traversal order obtained is: C-F-E-B-A.
As an alternative embodiment, as shown in fig. 4, fig. 4 is an overall flow chart diagram of an alternative view analysis method according to the embodiment of the present application, and the steps are as follows:
1. and acquiring the SDK by integrating the visible view according to the application degree.
2. The user enters the page to be checked and, by using the portal, initiates the visible view acquisition.
3. The method comprises the steps that visible view data are obtained through a visible view detection algorithm and a view data obtaining module; and additionally acquiring a screenshot of the current page.
4. And the view data uploading module is used for packaging and uploading the visible view data and the page screenshots.
5. And circularly acquiring the data of the next page.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, an optical disk) and includes several instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the methods of the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for view analysis for implementing the method for view analysis described above. Fig. 5 is a block diagram of an alternative view analysis apparatus according to an embodiment of the present application, and as shown in fig. 5, the apparatus may include:
a first obtaining unit 501, configured to obtain a view to be analyzed;
the second obtaining unit 502 is connected to the first obtaining unit 501, and is configured to obtain a visualization state of a view to be analyzed;
the first sending unit 503 is connected to the second obtaining unit 502, and is configured to send the view to be analyzed as the target view to the acceptance platform when the visualization state meets a preset condition, where the preset condition is used to indicate that the view is in the visualization state.
It should be noted that the first acquiring unit 501 in this embodiment may be configured to execute the step S201, the second acquiring unit 502 in this embodiment may be configured to execute the step S202, and the first sending unit 503 in this embodiment may be configured to execute the step S203.
Through the module, the obtained visual state of the view to be analyzed is compared with the preset condition, the view is sent to the acceptance platform according to the comparison result, the view is directly analyzed, manual measurement is not needed, a large amount of labor cost is reduced, the measurement result is accurate and reliable, the UI view acceptance accuracy can be improved, and the problems that resources consumed and time cost are high during page view examination and test in the related technology are solved.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
the third acquisition unit is used for acquiring a display area corresponding to the view to be analyzed on the screen;
the first determining unit is used for determining that the visualization state meets the preset condition when the display area is smaller than or equal to a first threshold value, wherein the first threshold value is the maximum value of the view range allowed to be displayed by the screen.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
the fourth acquisition unit is used for acquiring the hidden proportion contained in the view to be analyzed;
and the second determining unit is used for determining that the visualization state meets the preset condition under the condition that the hiding ratio is smaller than or equal to a second threshold value, wherein the second threshold value is a minimum ratio value of the view to be analyzed which is blocked by other views.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
the fifth acquisition unit is used for acquiring the characteristic attribute of the view to be analyzed;
and the third determining unit is used for determining that the visualization state meets the preset condition under the condition that the visualization attribute is contained in the determined characteristic attribute.
As an alternative embodiment, it is determined that the visualization state meets the preset condition as follows:
a sixth obtaining unit, configured to obtain a display scale of a view to be analyzed;
and the fourth determining unit is used for determining that the visualization state meets the preset condition under the condition that the display proportion is greater than or equal to a third threshold value, wherein the third threshold value is a critical value of the visualization display area of the view to be analyzed.
As an alternative embodiment, the apparatus comprises:
the seventh obtaining unit is used for obtaining a target page to which the view to be analyzed belongs before the view to be analyzed is taken as the target view and sent to the acceptance platform;
the eighth acquiring unit is used for acquiring screenshot information of the target page, wherein the screenshot information comprises a view to be analyzed;
the first generation unit is used for packaging the screenshot information and the view to be analyzed to generate a data packet;
and the second sending unit is used for sending the data packet to the acceptance platform.
As an alternative embodiment, the apparatus further comprises:
a fifth determining unit, configured to determine a view type of the view to be analyzed;
and the ninth acquisition unit is used for acquiring the additional information of the view to be analyzed according to the view type, wherein the additional information is information which is associated with the view to be analyzed.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules described above as a part of the apparatus may be operated in a hardware environment as shown in fig. 1, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided a view screening method, which uses the view analysis method of the above embodiments to complete view screening, and the method includes:
under the condition of acquiring the indication information of the acceptance view combination, analyzing the view combination to acquire a plurality of views to be analyzed;
and performing view analysis on the multiple views to be analyzed, screening multiple target views with visual states meeting preset conditions from the multiple views to be analyzed, and generating a target view combination, wherein the target view combination is view combination information to be checked.
According to another aspect of the embodiments of the present application, there is also provided an apparatus for view screening, the apparatus including:
the tenth acquiring unit is used for analyzing the view combination to acquire a plurality of views to be analyzed under the condition of acquiring the indication information of the acceptance view combination;
and the second generating unit is used for carrying out view analysis on the multiple views to be analyzed, screening multiple target views with visualization states meeting preset conditions from the multiple views to be analyzed, and generating a target view combination, wherein the target view combination is view combination information to be checked.
As an alternative embodiment, the tenth acquiring unit includes:
the traversal module is used for traversing the view tree by utilizing a target traversal scheme, wherein the view tree is generated by a view combination and sub-views forming the view combination, the target traversal scheme is that for leaf nodes forming the view tree, the view tree is traversed according to the mode that the sub-views are traversed preferentially and the sub-views generated finally are traversed preferentially, and each leaf node corresponds to one sub-view;
and the acquisition module is used for analyzing the view tree and acquiring a plurality of views to be analyzed.
According to yet another aspect of the embodiments of the present application, there is also provided an electronic device for implementing the method of view analysis, where the electronic device may be a server, a terminal, or a combination thereof.
Fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present application, as shown in fig. 6, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, where the processor 601, the communication interface 602, and the memory 603 complete communication with each other through the communication bus 604, where,
a memory 603 for storing a computer program;
the processor 601, when executing the computer program stored in the memory 603, implements the following steps:
acquiring a view to be analyzed;
acquiring a visual state of a view to be analyzed;
and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state.
Alternatively, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication 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. 6, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The memory may include RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. Alternatively, the memory may be at least one memory device located remotely from the processor.
As an example, as shown in fig. 6, the memory 603 may include, but is not limited to, a first obtaining unit 501, a second obtaining unit 502, and a first sending unit 503 in the view analysis apparatus. In addition, other module units in the above view analysis apparatus may also be included, but are not limited to these, and are not described in detail in this example.
The processor may be a general-purpose processor, and may include but is not limited to: a CPU (Central Processing Unit), an NP (Network Processor), and the like; but also a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In addition, the electronic device further includes: and the display is used for displaying the result of the view analysis.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 6 is only an illustration, and the device implementing the view analysis method may be a terminal device, and the terminal device may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 6 is a diagram illustrating a structure of the electronic device. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, and the like.
According to still another aspect of an embodiment of the present application, there is also provided a storage medium. Alternatively, in this embodiment, the storage medium may be a program code for executing the method of view analysis.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
acquiring a view to be analyzed;
acquiring a visual state of a view to be analyzed;
and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state.
Optionally, the specific example in this embodiment may refer to the example described in the above embodiment, which is not described again in this embodiment.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, a ROM, a RAM, a removable hard disk, a magnetic disk, or an optical disk.
According to yet another aspect of an embodiment of the present application, there is also provided a computer program product or a computer program comprising computer instructions stored in a computer readable storage medium; the processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method steps of view analysis in any of the embodiments described above.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in the form of a software product, stored in a storage medium, including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the method for view analysis of the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, and may also be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (12)

1. A method of view analysis, the method comprising:
acquiring a view to be analyzed;
acquiring the visual state of the view to be analyzed;
and under the condition that the visualization state meets a preset condition, sending the view to be analyzed as a target view to an acceptance platform, wherein the preset condition is used for indicating that the view is in the visualization state.
2. The method according to claim 1, wherein the visualization state is determined to meet the preset condition as follows:
acquiring a display area corresponding to the view to be analyzed on a screen;
and determining that the visualization state meets the preset condition when the display area is smaller than or equal to a first threshold value, wherein the first threshold value is the maximum value of the view range allowed to be displayed by the screen.
3. The method according to claim 1, wherein the visualization state is determined to meet the preset condition as follows:
acquiring a hidden proportion contained in the view to be analyzed;
and under the condition that the hiding proportion is smaller than or equal to a second threshold value, determining that the visualization state meets the preset condition, wherein the second threshold value is a minimum proportion value of the view to be analyzed which is blocked by other views.
4. The method according to claim 1, wherein the visualization state is determined to meet the preset condition as follows:
acquiring the characteristic attribute of the view to be analyzed;
and under the condition that the characteristic attribute is determined to contain the visualization attribute, determining that the visualization state meets the preset condition.
5. The method according to claim 1, wherein the visualization state is determined to meet the preset condition as follows:
acquiring the display scale of the view to be analyzed;
and determining that the visualization state meets the preset condition when the display proportion is larger than or equal to a third threshold value, wherein the third threshold value is a critical value of the visualization display area of the view to be analyzed.
6. The method of claim 1, wherein prior to sending the view to be analyzed as a target view to an acceptance platform, the method further comprises:
acquiring a target page to which the view to be analyzed belongs;
acquiring screenshot information of the target page, wherein the screenshot information comprises the view to be analyzed;
packaging the screenshot information and the view to be analyzed to generate a data packet;
and sending the data packet to the acceptance platform.
7. The method of claim 1, further comprising:
determining a view type of the view to be analyzed;
and acquiring additional information of the view to be analyzed according to the view type, wherein the additional information is information associated with the view to be analyzed.
8. A method of view screening, wherein view screening is performed using the method of view analysis of any one of claims 1-7, the method comprising:
under the condition that indicating information of an acceptance view combination is obtained, analyzing the view combination to obtain a plurality of views to be analyzed;
and performing view analysis on the views to be analyzed, screening a plurality of target views of which the visualization states meet the preset conditions from the views to be analyzed, and generating a target view combination, wherein the target view combination is view combination information to be checked.
9. The method according to claim 8, wherein the parsing the view combination to obtain a plurality of views to be analyzed comprises:
traversing a view tree by using a target traversal scheme, wherein the view tree is generated by the view combination and the sub-views forming the view combination, the target traversal scheme is to traverse the view tree according to the mode of sub-view-first traversal and the last generated sub-view-first for the leaf nodes forming the view tree, and each leaf node corresponds to one sub-view;
and analyzing the view tree to obtain a plurality of views to be analyzed.
10. An apparatus for view analysis, the apparatus comprising:
the first acquisition unit is used for acquiring a view to be analyzed;
the second acquisition unit is used for acquiring the visual state of the view to be analyzed;
the first sending unit is used for sending the view to be analyzed to an acceptance platform as a target view under the condition that the visualization state meets a preset condition, wherein the preset condition is used for indicating that the view is in the visualization state.
11. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein said processor, said communication interface and said memory communicate with each other via said communication bus,
the memory for storing a computer program;
the processor for performing the method steps of any one of claims 1 to 7 or 8 to 9 by running the computer program stored on the memory.
12. A computer-readable storage medium, in which a computer program is stored, wherein the computer program realizes the method steps of any one of claims 1 to 7 or 8 to 9 when executed by a processor.
CN202111509452.9A 2021-12-10 2021-12-10 View analysis method and device, electronic equipment and storage medium Pending CN114155239A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111509452.9A CN114155239A (en) 2021-12-10 2021-12-10 View analysis method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111509452.9A CN114155239A (en) 2021-12-10 2021-12-10 View analysis method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114155239A true CN114155239A (en) 2022-03-08

Family

ID=80450590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111509452.9A Pending CN114155239A (en) 2021-12-10 2021-12-10 View analysis method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114155239A (en)

Similar Documents

Publication Publication Date Title
US11184241B2 (en) Topology-aware continuous evaluation of microservice-based applications
CN106951925B (en) Data processing method, device, server and system
CN106657192B (en) Method and equipment for presenting service calling information
CN112817866A (en) Recording playback method, device, system, computer equipment and storage medium
CN111782317A (en) Page testing method and device, storage medium and electronic device
CN108292447B (en) Method and terminal device for generating three-dimensional model
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
CN112445693A (en) Page update detection method, device, equipment and storage medium
CN112729868A (en) Vehicle diagnosis method, device, equipment and medium
CN112965711A (en) Job test method and apparatus, electronic device, and storage medium
CN113407254A (en) Form generation method and device, electronic equipment and storage medium
CN117370203A (en) Automatic test method, system, electronic equipment and storage medium
CN106358220A (en) Detection method of abnormal contact person information, device and system
CN115774707B (en) Object attribute-based data processing method and device, electronic equipment and storage medium
CN114155239A (en) View analysis method and device, electronic equipment and storage medium
CN115562993A (en) Test script recording method and device, electronic equipment and storage medium
CN112487771B (en) Report generation method, report generation device and terminal
CN114896161A (en) File construction method and device based on artificial intelligence, computer equipment and medium
CN111210279B (en) Target user prediction method and device and electronic equipment
CN104809061B (en) regression testing method and device
CN107168684B (en) Method and device for generating content editing form
CN111125605A (en) Page element acquisition method and device
CN114419197B (en) SVG-based function definition system, method and computer equipment
CN115794245B (en) Data loading method and device, electronic equipment and storage medium
CN113721976B (en) Data migration method and device based on BI analysis software, storage medium and 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