CN110262938B - Content monitoring method and device - Google Patents

Content monitoring method and device Download PDF

Info

Publication number
CN110262938B
CN110262938B CN201910374512.7A CN201910374512A CN110262938B CN 110262938 B CN110262938 B CN 110262938B CN 201910374512 A CN201910374512 A CN 201910374512A CN 110262938 B CN110262938 B CN 110262938B
Authority
CN
China
Prior art keywords
target
picture
page
icon
content
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.)
Active
Application number
CN201910374512.7A
Other languages
Chinese (zh)
Other versions
CN110262938A (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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Advanced New Technologies 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 Advanced New Technologies Co Ltd filed Critical Advanced New Technologies Co Ltd
Priority to CN201910374512.7A priority Critical patent/CN110262938B/en
Publication of CN110262938A publication Critical patent/CN110262938A/en
Application granted granted Critical
Publication of CN110262938B publication Critical patent/CN110262938B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs

Abstract

The application discloses a content monitoring method and a device, wherein the method comprises the following steps: acquiring a picture corresponding to a target page; identifying the picture and determining layout parameters of target content in the picture; based on the layout parameters, whether the target content is correctly displayed in the target page is determined.

Description

Content monitoring method and device
Technical Field
The present application relates to the field of computer technologies, and in particular, to a content monitoring method and apparatus.
Background
In the prior art, in the process of providing services to the outside of an application, a target page in the application is generally monitored to determine whether to correctly display target content in the target page of the application.
Taking the first application and the second application as an example, after the second application provides a certain service for the first application, in the process that the first application provides other services to the outside based on the service, the second application generally requires that the logo and the document of the second application be displayed in the target page of the first application, and monitors whether the logo and the document of the second application are correctly displayed in the target page of the first application.
However, in the prior art, it is not possible to effectively monitor whether the logo and the document of the second application are correctly displayed in the target page of the first application. Similarly, in other scenes where monitoring of target content in a target page is required, there is a problem that effective monitoring cannot be performed.
Disclosure of Invention
The embodiment of the application provides a content monitoring method and device, which are used for solving the problem that whether target content is correctly displayed in a target page of an application cannot be effectively monitored in the prior art.
In order to solve the technical problems, the embodiment of the application is realized as follows:
in a first aspect, a content monitoring method is provided, including:
acquiring a picture corresponding to a target page;
identifying the picture and determining layout parameters of target content in the picture;
based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
In a second aspect, a content monitoring apparatus is provided, including:
the acquisition unit acquires a picture corresponding to the target page;
the identification unit is used for identifying the picture and determining layout parameters of target content in the picture;
and the determining unit is used for determining whether the target content is correctly displayed in the target page or not based on the layout parameters.
In a third aspect, an electronic device is presented, the electronic device comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a picture corresponding to a target page;
identifying the picture and determining layout parameters of target content in the picture;
based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
In a fourth aspect, a computer-readable storage medium storing one or more programs that, when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of:
acquiring a picture corresponding to a target page;
identifying the picture and determining layout parameters of target content in the picture;
based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
The above at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects:
according to the technical scheme provided by the embodiment of the application, when the content in the target page is monitored, the layout parameters of the target content in the picture corresponding to the target page can be identified through the picture identification method, and whether the target content is correctly displayed in the target page is judged based on the layout parameters of the target content, so that the intelligent monitoring of the target content in the target page can be realized.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a content monitoring method according to one embodiment of the application;
FIG. 2 is a flow diagram of a content monitoring method according to one embodiment of the application;
FIG. 3 is a schematic diagram of the architecture of an electronic device according to one embodiment of the application;
fig. 4 is a schematic structural view of a content monitoring apparatus according to an embodiment of the present application.
Detailed Description
In the prior art, in the process of providing services to the outside of an application, a target page in the application is generally monitored to determine whether to correctly display target content in the target page of the application.
In general, a method capable of being manually checked is adopted when monitoring a target page of an application. Taking the example of whether the logo and the document of the second application are correctly displayed in the target page of the first application, the related auditor of the second application can manually audit the target page of the first application to judge whether the logo and the document of the second application are correctly displayed in the target page of the first application.
However, in practical application, although the manual auditing method is simpler, the whole auditing process needs to spend a great deal of time and manpower resources, so that the method is not easy to realize, and therefore, whether the target content is correctly displayed in the target page cannot be effectively monitored.
In order to solve the above technical problems, an embodiment of the present application provides a content monitoring method and apparatus, where the method includes: acquiring a picture corresponding to a target page; identifying the picture and determining layout parameters of target content in the picture; based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
According to the technical scheme provided by the embodiment of the application, when the content in the target page is monitored, the layout parameters of the target content in the picture corresponding to the target page can be identified through the picture identification method, and whether the target content is correctly displayed in the target page is judged based on the layout parameters of the target content, so that the intelligent monitoring of the target content in the target page can be realized.
In order to make the technical solution of the present application better understood by those skilled in the art, the technical solution of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, shall fall within the scope of the application.
It should be noted that, in the application scenario provided by the embodiment of the present application, the second application may monitor whether the logo and the document of the second application are correctly displayed in the target page of the first application, where in the application scenario, the target page described in the embodiment of the present application may be understood as the target page in the first application, and the target content may be understood as the logo and the document of the second application. The target page in the first application may be understood as a page that the second application requires the first application to display its logo and text, or may also be understood as a page designated by the first application and used for displaying its logo and text, which is not specifically limited, where the logo of the second application may be regarded as a target icon included in the target content, and the text of the second application may be regarded as a target text included in the target content.
Besides the application scenario described above, the technical solution provided by the embodiment of the present application may also be used in other application scenarios that need to monitor whether the target content is correctly displayed in the target page, which is not illustrated here.
The following describes in detail the technical solutions provided by the embodiments of the present application with reference to the accompanying drawings.
FIG. 1 is a flow chart of a content monitoring method according to an embodiment of the present application. The content monitoring method is as follows.
S102: and obtaining a picture corresponding to the target page.
In S102, when whether the target content is correctly displayed in the target page of the target application needs to be monitored, a picture corresponding to the target page may be acquired. The picture corresponding to the target page may include content in the target page.
The method for obtaining the picture corresponding to the target page in the embodiment may include the following steps:
first, a target application is run at a test terminal.
Specifically, the target application may be installed in a test terminal using a script, and the test terminal may be a smart phone, a simulator, or other terminals capable of running the application.
After the target application is installed in the test terminal, the target application can be run in the test terminal by utilizing a script and an open source software app, and the specific steps include: and sending a starting instruction to the open source software appium by utilizing the script, and starting and running the target application by the open source software appium after receiving the starting instruction.
Second, a target page of the target application is accessed.
After the test terminal runs the target application, the script and the open source software app ium can be utilized to operate the target application, so that the target page in the target application can be accessed. Specifically, assuming that the target page is a certain page after logging in the target application, the specific steps for accessing the target page are as follows:
transmitting an instruction for opening a login page to an open source software app ium by utilizing a script, and opening the login page of a target application after the open source software app ium receives the instruction; after a login page is opened, a login instruction comprising a user name and a password is sent to the open source software appium by utilizing a script, and after the open source software appium receives the login instruction, a target application is logged in based on the user name and the password; after logging in the target application, the script is utilized to send an access instruction to a target page in the target application to the open source software appium, and after receiving the access instruction, the open source software appium opens the target page in the target application to realize access to the target page in the target application.
And thirdly, capturing a target page to obtain a picture corresponding to the target page.
When the target application is subjected to screenshot, the method can be realized by utilizing a script and an open source software app, and the specific steps are as follows: after a target page of a target application is opened, a screenshot instruction is sent to an open source software app ium by utilizing a script, and after the open source software app ium receives the screenshot instruction, the target page is subjected to screenshot, and a picture corresponding to the target page is obtained.
And finally, obtaining a picture corresponding to the target page.
It should be understood that, in this embodiment, the picture corresponding to the target page may be obtained through other implementation manners, which are not illustrated here.
After the picture corresponding to the target page is acquired, S104 may be executed.
S104: and identifying the picture and determining the layout parameters of the target content in the picture.
In S104, after the picture corresponding to the target page is obtained, the picture may be identified, and the layout parameters of the target content in the picture may be determined. The layout parameters of the target content in the picture can be understood as information related to the layout of the target content in the target page in the picture, and can be specifically used for judging whether the target content is correctly displayed in the target page.
In this embodiment, the target content may include a target icon and a target text, and when determining a layout parameter of the target content in the picture, the layout parameter of the target icon in the picture and the layout parameter of the target text in the picture may be determined. The layout parameters of the target icon in the picture may include position information of the target icon in the picture, and the layout parameters of the target text in the picture may include position information of the target text in the picture.
When determining the layout parameters of the target icon in the picture, the method can be realized based on an icon identification model obtained through pre-training. In this embodiment, the icon recognition model may be obtained based on training layout parameters of the target icon in a plurality of sample pictures, and the specific implementation manner is as follows:
first, a plurality of sample icons is acquired.
The plurality of sample pictures can comprise target icons, and preferably, in order to facilitate the icon recognition model to recognize the target icons with different layout parameters, the layout parameters of the target icons in the plurality of acquired sample pictures can be different.
Secondly, the layout parameters of the target icons in a plurality of sample pictures are obtained.
The layout parameters of the target icons in the plurality of sample pictures can be obtained in a labeling mode.
And finally, learning and training the target icons in the plurality of sample pictures based on layout parameters of the target icons in the plurality of sample pictures to obtain an icon identification model.
After the icon identification model is obtained through training, when the picture is identified and the layout parameters of the target icon in the picture are determined, the picture can be used as the input of the model, and the output of the model is the layout parameters of the target icon in the picture.
It should be noted that, in this embodiment, the layout parameters of the target icon in the picture may have two cases, one is that the layout parameters of the target icon in the picture are not null, and the other is that the layout parameters of the target icon in the picture are null, and when the layout parameters are not null, it may be stated that the target icon is identified in the picture; when the layout parameter is empty, it may be stated that the target icon is not recognized in the picture. The present embodiment may be described by taking an example in which the layout parameters are not null.
Optionally, when the layout parameters of the target icon in the picture are identified based on the icon identification model, in order to avoid false identification, the accuracy of the identification result (which may be given by the icon identification model) may be further determined, and if the accuracy of the identification result is greater than or equal to a set value (which may be determined according to the actual situation), the identification result may be considered as not being false identification; if the accuracy of the recognition result is smaller than the set value, the recognition result may be considered to be erroneous, and at this time, the erroneous recognition result may be ignored.
When determining the layout parameters of the target text in the picture, the embodiment can be realized based on a text recognition technology, and the specific steps are as follows:
firstly, recognizing a picture based on a character recognition technology, and obtaining layout parameters of texts in the picture, wherein the character recognition technology can be an optical character recognition (OCR, optical Character Recognition) technology.
And secondly, matching the identified text with the target text, if the matching is successful, determining that the target text is included in the picture, and if the matching is failed, determining that the target text is not included in the picture. The embodiment may be described by taking the example that the picture includes the target text.
Finally, when the picture is determined to comprise the target text, the layout parameters of the target text in the picture can be obtained according to the text recognition result of the target text.
After the layout parameters of the target content in the picture are identified based on the above-described method, S106 may be performed.
Optionally, if the layout parameter of the target icon in the picture is null (i.e. the target icon is not identified in the picture) or the target text is not identified in the picture, it may be directly determined that the target content is not correctly displayed in the target page, without executing S106.
S106: based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
In S106, it may be determined whether the target content is correctly shown in the target page based on the layout parameters of the target icon included in the target content in the picture and the layout parameters of the target text in the picture. The layout parameters of the target icon may include position information of the target icon in the picture, and the layout parameters of the target text may include position information of the target text in the picture.
When determining whether the target content is correctly displayed in the target page based on the position information of the target icon in the picture and the position information of the target text in the picture, the method may include the steps of:
first, dividing a target icon and a target text to obtain at least one group, wherein the distance between the target icon and the target text included in one group is within a set distance.
In this embodiment, considering that when the target page correctly displays the target icon and the target text included in the target content, the distance between the target icon and the target text is within a set distance, for example, the target icon is above the target text and the distance between the target icon and the target text is within the set distance, when determining whether the target page correctly displays the target content, the target icon and the target text may be divided based on the position information of the target icon in the picture and the position information of the target text in the picture, and the target text and the target icon with the distance within the set distance are taken as a group, so as to obtain at least one group. The set distance may be determined according to practical situations, and is not specifically limited herein.
Secondly, for one of the groups, whether the target icon and the target text in the group are correctly displayed in the target page can be determined based on the position information of the target icon and the position information of the target text in the group.
In this embodiment, when the target icons and the target texts in the group are correctly displayed in the target page, the sizes of the target icons in the group conform to the preset sizes, and the target icons and the target texts in the group are located in the preset area of the target page, so that the target icons and the target texts in the group can be determined whether to correctly display the target icons and the target texts in the group in the target page by taking the target icons and the target texts as the judgment criteria.
Specifically, the location information of the target icon in the picture and the location information of the target text in the picture may be used to determine the regions of the target icon and the target text in the picture, and the size of the target icon may be determined based on the location information of the target icon, where, when the size of the target icon is determined, parameters such as the length and the width of the target icon may be calculated based on the abscissa and the ordinate included in the location information of the target icon, so as to obtain the size of the target icon.
After the areas of the target icons and the target texts in the pictures and the sizes of the target icons are obtained, whether the target icons and the target texts are located in the preset areas of the pictures or not can be judged, whether the sizes of the target icons accord with the preset sizes or not can be judged, and if yes, the target icons and the target texts included in the groups can be correctly displayed in the target pages; if not, that is, the target icon and the target text are not located in the preset area of the picture, or the size of the target icon does not accord with the preset size, it can be determined that the target icon and the target text in the group are not correctly displayed in the target page.
So far, for one of the groupings, it may be determined whether the target icon and the target text included in the grouping are correctly presented in the target page. Whether the target icon and the target text included in the other group are correctly presented in the target page can be determined based on the same method, and a description thereof will not be repeated.
Optionally, in the process of determining whether the target content is correctly displayed in the target page, when the target text and the target icon are grouped, if at least one group is not obtained, it may be indicated that the distance between the target icon and the target text is not within the set distance, and at this time, it may be directly determined that the target content is not correctly displayed in the target page.
If at least one group is obtained, considering that the number of the target icons and the target texts included in one group is one when the target texts and the target icons in the target content are correctly displayed by the target page, judging whether the number of the target icons and the target texts included in one group is one or not according to one group, if so, further judging whether the target texts and the target icons included in the group are correctly displayed by the target page by the method; if not, the target icons and the target texts in the group which are not correctly displayed in the target page can be directly determined without further judgment.
Optionally, after determining whether the target icon and the target text are correctly displayed in the target page, notification information may also be generated, so that a related person may determine whether the target icon and the target text are correctly displayed in the target page. The notification information may be mail, short message, etc.
For ease of understanding the entire solution, reference may be made to fig. 2.
Fig. 2 is a flow chart of a content monitoring method according to an embodiment of the application. The content monitoring method shown in fig. 2 may include the steps of:
s201: and obtaining a picture corresponding to the target page.
The picture corresponding to the target page can comprise content in the target page.
When obtaining a picture corresponding to a target page, one implementation method includes: running a target application at a test terminal; accessing a target page of a target application; screenshot is carried out on the target page, and a picture corresponding to the target page is obtained; and obtaining a picture corresponding to the target page.
S202: and identifying the picture based on the icon identification model obtained through pre-training, and determining the layout parameters of the target icon in the picture.
The icon recognition model may be trained based on layout parameters of the target icon in a plurality of sample pictures, and a specific implementation may refer to the relevant content recorded in the embodiment shown in fig. 1, which is not repeated here. The layout parameters of the target icon in the picture may include position information of the target icon in the picture.
When the picture is identified based on the icon identification model, the picture can be used as the input of the model, and the output of the model is the layout parameter of the target icon in the picture.
S203: and carrying out character recognition on the picture, and determining layout parameters of the target text in the picture.
Specifically, first, a layout parameter of a text in a picture in the picture may be identified based on a text recognition technique, the layout parameter including location information; and secondly, if the matching between the identified text and the target text is successful, determining that the target text is included in the picture, and obtaining layout parameters of the target text in the picture based on a text identification result.
S204: and grouping the target icon and the target text to obtain at least one group.
Specifically, the target icon and the target text within a set distance may be divided into a group based on a layout parameter of the target icon in the picture and a layout parameter of the target text in the picture, so as to obtain at least one group, where the layout parameter of the target icon in the picture includes position information of the target icon in the picture, the layout parameter of the target text in the picture includes position information of the target text in the picture, and the set distance may be determined according to an actual situation.
S205: for one of the groupings, the regions of the target icon and target text included in the grouping in the picture, and the size of the target icon are determined.
In S205, it may be determined whether the target icon and the target text included in the group are correctly shown in the target page, taking one of the groups as an example.
Specifically, the areas of the target icon and the target text in the picture may be determined based on the position information of the target icon and the target text included in the group, and the size of the target icon may be determined based on the position information of the target icon included in the group.
S206: and judging whether the target icon and the target text in the group are positioned in a preset area of the picture, wherein the size of the target icon accords with the preset size.
If yes, S207 may be performed; if not, i.e. the target icon and the target text in the group are not located in the preset area, or the size of the target icon does not conform to the preset size, S208 may be executed.
S207: and determining the target icon and the target text in the correct display group in the target page.
S208: and determining that the target icon and the target text are not correctly displayed in the target page.
Optionally, in S202 above, if the layout parameter of the target icon in the picture is empty, S208 may be executed; in S203 above, if the target text is not recognized in the picture, S208 may be executed; in S204, if at least one group is not obtained, S208 may be executed, and if the number of target icons and target texts included in the obtained group does not satisfy the requirement, S208 may be executed.
According to the technical scheme provided by the embodiment of the application, when the content in the target page is monitored, the layout parameters of the target content in the picture corresponding to the target page can be identified through the picture identification method, and whether the target content is correctly displayed in the target page is judged based on the layout parameters of the target content, so that the intelligent monitoring of the target content in the target page can be realized.
The foregoing describes certain embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Fig. 3 is a schematic structural view of an electronic device according to an embodiment of the present application. Referring to fig. 3, at the hardware level, the electronic device includes a processor, and optionally an internal bus, a network interface, and a memory. The Memory may include a Memory, such as a Random-Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least 1 disk Memory. Of course, the electronic device may also include hardware required for other services.
The processor, network interface, and memory may be interconnected by an internal bus, which may be an ISA (Industry Standard Architecture ) bus, a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 3, but not only one bus or type of bus.
And the memory is used for storing programs. In particular, the program may include program code including computer-operating instructions. The memory may include memory and non-volatile storage and provide instructions and data to the processor.
The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs, and forms the content monitoring device on a logic level. The processor is used for executing the programs stored in the memory and is specifically used for executing the following operations:
acquiring a picture corresponding to a target page;
identifying the picture and determining layout parameters of target content in the picture;
based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
The method performed by the content monitoring device disclosed in the embodiment of fig. 3 of the present application may be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; but also digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor reads the information in the memory and, in combination with its hardware, performs the steps of the above method.
The electronic device may also execute the methods of fig. 1 and fig. 2, and implement the functions of the content monitoring device in the embodiments shown in fig. 1 and fig. 2, which are not described herein again.
Of course, other implementations, such as a logic device or a combination of hardware and software, are not excluded from the electronic device of the present application, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or a logic device.
The embodiments of the present application also provide a computer-readable storage medium storing one or more programs, the one or more programs comprising instructions, which when executed by a portable electronic device comprising a plurality of application programs, enable the portable electronic device to perform the methods of the embodiments shown in fig. 1 and 2, and in particular to perform the operations of:
acquiring a picture corresponding to a target page;
identifying the picture and determining layout parameters of target content in the picture;
based on the layout parameters, whether the target content is correctly displayed in the target page is determined.
Fig. 4 is a schematic structural view of a content monitoring apparatus 40 according to an embodiment of the present application. Referring to fig. 4, in a software implementation, the content monitoring device 40 may include: an acquisition unit 41, an identification unit 42, and a determination unit 43, wherein:
an acquisition unit 41 that acquires a picture corresponding to a target page;
the identifying unit 42 identifies the picture and determines the layout parameters of the target content in the picture;
the determining unit 43 determines whether the target content is correctly presented in the target page based on the layout parameters.
Optionally, the target content includes a target icon and a target text.
Optionally, the identifying unit 42 identifies the picture, and determines layout parameters of the target content in the picture, including:
and identifying the picture based on an icon identification model obtained through pre-training, determining layout parameters of the target icon in the picture, and training the icon identification model based on the layout parameters of the target icon in a plurality of sample pictures.
Optionally, the layout parameter of the target icon in the picture includes position information, and the layout parameter of the target text in the picture includes position information.
Optionally, the determining unit 43 determines whether the target content is correctly displayed in the target page, including:
dividing the target icon and the target text to obtain at least one group, wherein the distance between the target icon and the target text in one group is within a set distance;
for one of the packets, the following is performed:
and determining whether the target icon and the target text included in the group are correctly displayed in the target page or not based on the position information of the target icon and the target text included in the group.
Optionally, the determining unit 43 determines whether the target icon and the target text included in the group are correctly displayed in the target page, including:
judging whether the target icons and the target texts included in the group are positioned in a preset area of the picture or not based on the position information of the target icons and the target texts included in the group, and judging whether the sizes of the target icons included in the group accord with the preset sizes or not;
if yes, determining that the target icons and the target texts included in the groups are correctly displayed in the target page;
if not, determining that the target icons and the target texts included in the group are not correctly displayed in the target page.
Optionally, the obtaining unit 41 obtains a picture corresponding to the target page, including:
running a target application at a test terminal;
accessing a target page of the target application;
screenshot is carried out on the target page, and a picture corresponding to the target page is obtained;
and obtaining a picture corresponding to the target page.
The content monitoring device 40 provided in the embodiment of the present application may also execute the methods of fig. 1 and fig. 2, and implement the functions of the content monitoring device in the embodiment shown in fig. 1 and fig. 2, which are not described herein again.
In summary, the foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The embodiments of the present application are described in a progressive manner, and the same and similar parts of the embodiments are all referred to each other, and each embodiment is mainly described in the differences from the other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.

Claims (7)

1. A content monitoring method, comprising:
acquiring a picture corresponding to a target page;
identifying the picture, and determining the layout parameters of target content in the picture, wherein the target content comprises a target icon and a target text, the layout parameters of the target icon in the picture comprise position information, and the layout parameters of the target text in the picture comprise position information;
if the target icon or the target text is not recognized in the picture, determining that the target content is not correctly displayed in the target page;
if the target icon and the target text are identified in the picture, determining whether the target content is correctly displayed in the target page or not based on the layout parameters;
wherein determining whether the target content is correctly displayed in the target page comprises:
dividing the target icon and the target text, and determining whether at least one group is obtained, wherein the distance between the target icon and the target text in one group is within a set distance;
if not, determining that the target content is not correctly displayed in the target page;
if yes, the following operations are performed for one of the packets:
determining whether the number of target icons and target texts included in the group is one; if yes, determining whether the target icons and the target texts included in the group are correctly displayed in the target page or not based on the position information of the target icons and the target texts included in the group; if not, determining that the target content is not correctly displayed in the target page.
2. The method of claim 1, identifying the picture, determining layout parameters of target content in the picture, comprising:
and identifying the picture based on an icon identification model obtained through pre-training, determining layout parameters of the target icon in the picture, and training the icon identification model based on the layout parameters of the target icon in a plurality of sample pictures.
3. The method of claim 1, determining whether the target icon and target text included in the group are properly presented in the target page, comprising:
judging whether the target icons and the target texts included in the group are positioned in a preset area of the picture or not based on the position information of the target icons and the target texts included in the group, and judging whether the sizes of the target icons included in the group accord with the preset sizes or not;
if yes, determining that the target icons and the target texts included in the groups are correctly displayed in the target page;
if not, determining that the target icons and the target texts included in the group are not correctly displayed in the target page.
4. The method of claim 1, obtaining a picture corresponding to a target page, comprising:
running a target application at a test terminal;
accessing a target page of the target application;
screenshot is carried out on the target page, and a picture corresponding to the target page is obtained;
and obtaining a picture corresponding to the target page.
5. A content monitoring apparatus comprising:
the acquisition unit acquires a picture corresponding to the target page;
the identification unit is used for identifying the picture and determining the layout parameters of target content in the picture, wherein the target content comprises a target icon and a target text, the layout parameters of the target icon in the picture comprise position information, and the layout parameters of the target text in the picture comprise position information;
the determining unit is used for determining that the target content is not correctly displayed in the target page if the target icon or the target text is not recognized in the picture; if the target icon and the target text are identified in the picture, determining whether the target content is correctly displayed in the target page or not based on the layout parameters;
the determining unit determines whether the target content is correctly displayed in the target page, including:
dividing the target icon and the target text, and determining whether at least one group is obtained, wherein the distance between the target icon and the target text in one group is within a set distance;
if not, determining that the target content is not correctly displayed in the target page;
if yes, the following operations are performed for one of the packets:
determining whether the number of target icons and target texts included in the group is one; if yes, determining whether the target icons and the target texts included in the group are correctly displayed in the target page or not based on the position information of the target icons and the target texts included in the group; if not, determining that the target content is not correctly displayed in the target page.
6. An electronic device, comprising:
a processor; and
a memory arranged to store computer executable instructions that, when executed, cause the processor to:
acquiring a picture corresponding to a target page;
identifying the picture, and determining the layout parameters of target content in the picture, wherein the target content comprises a target icon and a target text, the layout parameters of the target icon in the picture comprise position information, and the layout parameters of the target text in the picture comprise position information;
if the target icon or the target text is not recognized in the picture, determining that the target content is not correctly displayed in the target page;
if the target icon and the target text are identified in the picture, determining whether the target content is correctly displayed in the target page or not based on the layout parameters;
wherein determining whether the target content is correctly displayed in the target page comprises:
dividing the target icon and the target text, and determining whether at least one group is obtained, wherein the distance between the target icon and the target text in one group is within a set distance;
if not, determining that the target content is not correctly displayed in the target page;
if yes, the following operations are performed for one of the packets:
determining whether the number of target icons and target texts included in the group is one; if yes, determining whether the target icons and the target texts included in the group are correctly displayed in the target page or not based on the position information of the target icons and the target texts included in the group; if not, determining that the target content is not correctly displayed in the target page.
7. A computer readable storage medium storing one or more programs, which when executed by an electronic device comprising a plurality of application programs, cause the electronic device to perform the method of:
acquiring a picture corresponding to a target page;
identifying the picture, and determining the layout parameters of target content in the picture, wherein the target content comprises a target icon and a target text, the layout parameters of the target icon in the picture comprise position information, and the layout parameters of the target text in the picture comprise position information;
if the target icon or the target text is not recognized in the picture, determining that the target content is not correctly displayed in the target page;
if the target icon and the target text are identified in the picture, determining whether the target content is correctly displayed in the target page or not based on the layout parameters;
wherein determining whether the target content is correctly displayed in the target page comprises:
dividing the target icon and the target text, and determining whether at least one group is obtained, wherein the distance between the target icon and the target text in one group is within a set distance;
if not, determining that the target content is not correctly displayed in the target page;
if yes, the following operations are performed for one of the packets:
determining whether the number of target icons and target texts included in the group is one; if yes, determining whether the target icons and the target texts included in the group are correctly displayed in the target page or not based on the position information of the target icons and the target texts included in the group; if not, determining that the target content is not correctly displayed in the target page.
CN201910374512.7A 2019-05-07 2019-05-07 Content monitoring method and device Active CN110262938B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910374512.7A CN110262938B (en) 2019-05-07 2019-05-07 Content monitoring method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910374512.7A CN110262938B (en) 2019-05-07 2019-05-07 Content monitoring method and device

Publications (2)

Publication Number Publication Date
CN110262938A CN110262938A (en) 2019-09-20
CN110262938B true CN110262938B (en) 2023-10-27

Family

ID=67914256

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910374512.7A Active CN110262938B (en) 2019-05-07 2019-05-07 Content monitoring method and device

Country Status (1)

Country Link
CN (1) CN110262938B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004062624A (en) * 2002-07-30 2004-02-26 Fujitsu Ltd Information processing terminal and event display program
CN105760146A (en) * 2014-12-16 2016-07-13 上海天脉聚源文化传媒有限公司 User interface layout method and system
CN106980431A (en) * 2016-01-18 2017-07-25 阿里巴巴集团控股有限公司 Application program image target management method and device in mobile terminal
CN107170309A (en) * 2017-04-14 2017-09-15 弘成科技发展有限公司 Learn the display methods of mobile solution platform
WO2017219983A1 (en) * 2016-06-21 2017-12-28 华为技术有限公司 Method and terminal for acquiring application program between terminals
CN109189682A (en) * 2018-08-27 2019-01-11 广州云测信息技术有限公司 A kind of script method for recording and device
CN109271607A (en) * 2018-08-17 2019-01-25 阿里巴巴集团控股有限公司 User Page layout detection method and device, electronic equipment
CN109409985A (en) * 2018-09-25 2019-03-01 五八有限公司 A kind of information displaying method, device, equipment and storage medium
CN109597615A (en) * 2018-10-22 2019-04-09 中国平安人寿保险股份有限公司 Third party's Pages Design Specifications Matching, device, medium and equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4165888B2 (en) * 2004-01-30 2008-10-15 キヤノン株式会社 Layout control method, layout control apparatus, and layout control program
US20140281934A1 (en) * 2013-03-18 2014-09-18 Tencent Technology (Shenzhen) Company Limited Method and apparatus for display adjustment
CN108349423B (en) * 2015-11-13 2022-02-01 哈曼国际工业有限公司 User interface for in-vehicle system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004062624A (en) * 2002-07-30 2004-02-26 Fujitsu Ltd Information processing terminal and event display program
CN105760146A (en) * 2014-12-16 2016-07-13 上海天脉聚源文化传媒有限公司 User interface layout method and system
CN106980431A (en) * 2016-01-18 2017-07-25 阿里巴巴集团控股有限公司 Application program image target management method and device in mobile terminal
WO2017219983A1 (en) * 2016-06-21 2017-12-28 华为技术有限公司 Method and terminal for acquiring application program between terminals
CN107170309A (en) * 2017-04-14 2017-09-15 弘成科技发展有限公司 Learn the display methods of mobile solution platform
CN109271607A (en) * 2018-08-17 2019-01-25 阿里巴巴集团控股有限公司 User Page layout detection method and device, electronic equipment
CN109189682A (en) * 2018-08-27 2019-01-11 广州云测信息技术有限公司 A kind of script method for recording and device
CN109409985A (en) * 2018-09-25 2019-03-01 五八有限公司 A kind of information displaying method, device, equipment and storage medium
CN109597615A (en) * 2018-10-22 2019-04-09 中国平安人寿保险股份有限公司 Third party's Pages Design Specifications Matching, device, medium and equipment

Also Published As

Publication number Publication date
CN110262938A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN110826006B (en) Abnormal collection behavior identification method and device based on privacy data protection
CN109033772B (en) Verification information input method and device
CN111078908A (en) Data annotation detection method and device
CN109271611B (en) Data verification method and device and electronic equipment
CN110956275A (en) Risk prediction and risk prediction model training method and device and electronic equipment
CN111163067B (en) Safety testing method and device and electronic equipment
CN113392404A (en) Vulnerability detection method and device and electronic equipment
CN109978044B (en) Training data generation method and device, and model training method and device
CN109062793B (en) Test method and device of roller control and electronic equipment
CN113129298B (en) Method for identifying definition of text image
CN112184143B (en) Model training method, device and equipment in compliance audit rule
CN113535577A (en) Application testing method and device based on knowledge graph, electronic equipment and medium
CN111460448B (en) Malicious software family detection method and device
CN108255891B (en) Method and device for judging webpage type
CN110262938B (en) Content monitoring method and device
CN109145821B (en) Method and device for positioning pupil image in human eye image
CN109740336B (en) Method and device for identifying verification information in picture and electronic equipment
CN115272682A (en) Target object detection method, target detection model training method and electronic equipment
CN110059563B (en) Text processing method and device
CN113849674A (en) Method and device for identifying disguised user agent information and electronic equipment
US20160350318A1 (en) Method, system for classifying comment record and webpage management device
US11704589B1 (en) Automatically identifying dynamic applications
CN112183951A (en) Supervision processing method and device based on audit quality evaluation
CN111125714A (en) Safety detection method and device and electronic equipment
CN111143203A (en) Machine learning method, privacy code determination method, device 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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200924

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman, British Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant